[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Version (please complete the following information):**\n - 3X-UI Version : [e.g. 2.3.5]\n - Xray Version : [e.g. 1.8.13]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: enhancement\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question-.md",
    "content": "---\nname: 'Question '\nabout: Describe this issue template's purpose here.\ntitle: ''\nlabels: question\nassignees: ''\n\n---\n\n\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"gomod\" # See documentation for possible values\n    directory: \"/\" # Location of package manifests\n    schedule:\n      interval: \"daily\"\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n"
  },
  {
    "path": ".github/workflows/docker.yml",
    "content": "name: Release 3X-UI for Docker\non:\n  push:\n    tags:\n      - \"*\"\n  workflow_dispatch:\n\njobs:\n  build_and_push:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Check out the code\n        uses: actions/checkout@v4\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v3\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Login to GHCR\n        uses: docker/login-action@v3\n        with:\n          registry: ghcr.io\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Docker meta\n        id: meta\n        uses: docker/metadata-action@v5\n        with:\n          images: ghcr.io/${{ github.repository }}\n\n      - name: Build and push Docker image\n        uses: docker/build-push-action@v6\n        with:\n          context: .\n          push: ${{ github.event_name != 'pull_request' }}\n          platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release 3X-UI\n\non:\n  push:\n    tags:\n      - \"*\"\n  workflow_dispatch:\n\njobs:\n  build:\n    strategy:\n      matrix:\n        platform:\n          - amd64\n          - arm64\n          - armv7\n          - armv6\n          - 386\n          - armv5\n          - s390x\n    runs-on: ubuntu-20.04\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Setup Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: '1.22'\n\n      - name: Install dependencies\n        run: |\n          sudo apt-get update\n          if [ \"${{ matrix.platform }}\" == \"arm64\" ]; then\n            sudo apt install gcc-aarch64-linux-gnu\n          elif [ \"${{ matrix.platform }}\" == \"armv7\" ]; then\n            sudo apt install gcc-arm-linux-gnueabihf\n          elif [ \"${{ matrix.platform }}\" == \"armv6\" ]; then\n            sudo apt install gcc-arm-linux-gnueabihf\n          elif [ \"${{ matrix.platform }}\" == \"386\" ]; then\n            sudo apt install gcc-i686-linux-gnu\n          elif [ \"${{ matrix.platform }}\" == \"armv5\" ]; then\n            sudo apt install gcc-arm-linux-gnueabi\n          elif [ \"${{ matrix.platform }}\" == \"s390x\" ]; then\n            sudo apt install gcc-s390x-linux-gnu\n          fi\n\n      - name: Build x-ui\n        run: |\n          export CGO_ENABLED=1\n          export GOOS=linux\n          export GOARCH=${{ matrix.platform }}\n          if [ \"${{ matrix.platform }}\" == \"arm64\" ]; then\n            export GOARCH=arm64\n            export CC=aarch64-linux-gnu-gcc\n          elif [ \"${{ matrix.platform }}\" == \"armv7\" ]; then\n            export GOARCH=arm\n            export GOARM=7\n            export CC=arm-linux-gnueabihf-gcc\n          elif [ \"${{ matrix.platform }}\" == \"armv6\" ]; then\n            export GOARCH=arm\n            export GOARM=6\n            export CC=arm-linux-gnueabihf-gcc\n          elif [ \"${{ matrix.platform }}\" == \"386\" ]; then\n            export GOARCH=386\n            export CC=i686-linux-gnu-gcc\n          elif [ \"${{ matrix.platform }}\" == \"armv5\" ]; then\n            export GOARCH=arm\n            export GOARM=5\n            export CC=arm-linux-gnueabi-gcc\n          elif [ \"${{ matrix.platform }}\" == \"s390x\" ]; then\n            export GOARCH=s390x\n            export CC=s390x-linux-gnu-gcc\n          fi\n          go build -o xui-release -v main.go\n          \n          mkdir x-ui\n          cp xui-release x-ui/\n          cp x-ui.service x-ui/\n          cp x-ui.sh x-ui/\n          mv x-ui/xui-release x-ui/x-ui\n          mkdir x-ui/bin\n          cd x-ui/bin\n          \n          # Download dependencies\n          Xray_URL=\"https://github.com/XTLS/Xray-core/releases/download/v1.8.16/\"\n          if [ \"${{ matrix.platform }}\" == \"amd64\" ]; then\n            wget ${Xray_URL}Xray-linux-64.zip\n            unzip Xray-linux-64.zip\n            rm -f Xray-linux-64.zip\n          elif [ \"${{ matrix.platform }}\" == \"arm64\" ]; then\n            wget ${Xray_URL}Xray-linux-arm64-v8a.zip\n            unzip Xray-linux-arm64-v8a.zip\n            rm -f Xray-linux-arm64-v8a.zip\n          elif [ \"${{ matrix.platform }}\" == \"armv7\" ]; then\n            wget ${Xray_URL}Xray-linux-arm32-v7a.zip\n            unzip Xray-linux-arm32-v7a.zip\n            rm -f Xray-linux-arm32-v7a.zip\n          elif [ \"${{ matrix.platform }}\" == \"armv6\" ]; then\n            wget ${Xray_URL}Xray-linux-arm32-v6.zip\n            unzip Xray-linux-arm32-v6.zip\n            rm -f Xray-linux-arm32-v6.zip\n          elif [ \"${{ matrix.platform }}\" == \"386\" ]; then\n            wget ${Xray_URL}Xray-linux-32.zip\n            unzip Xray-linux-32.zip\n            rm -f Xray-linux-32.zip\n          elif [ \"${{ matrix.platform }}\" == \"armv5\" ]; then\n            wget ${Xray_URL}Xray-linux-arm32-v5.zip\n            unzip Xray-linux-arm32-v5.zip\n            rm -f Xray-linux-arm32-v5.zip\n          elif [ \"${{ matrix.platform }}\" == \"s390x\" ]; then\n            wget ${Xray_URL}Xray-linux-s390x.zip\n            unzip Xray-linux-s390x.zip\n            rm -f Xray-linux-s390x.zip\n          fi\n          rm -f geoip.dat geosite.dat\n          wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\n          wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\n          wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat\n          wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat\n          wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat\n          wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat\n          mv xray xray-linux-${{ matrix.platform }}\n          cd ../..\n          \n      - name: Package\n        run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui\n        \n      - name: Upload files to GH release\n        uses: svenstaro/upload-release-action@v2\n        with:\n          repo_token: ${{ secrets.GITHUB_TOKEN }}\n          tag: ${{ github.ref }}\n          file: x-ui-linux-${{ matrix.platform }}.tar.gz\n          asset_name: x-ui-linux-${{ matrix.platform }}.tar.gz\n          prerelease: true\n"
  },
  {
    "path": ".gitignore",
    "content": ".idea\n.vscode\n.cache\n.sync*\n*.tar.gz\n*.log\naccess.log\nerror.log\ntmp\nmain\nbackup/\nbin/\ndist/\nrelease/\n/release.sh\n/x-ui\n"
  },
  {
    "path": "DockerEntrypoint.sh",
    "content": "#!/bin/sh\n\n# Start fail2ban\nfail2ban-client -x start\n\n# Run x-ui\nexec /app/x-ui\n"
  },
  {
    "path": "DockerInit.sh",
    "content": "#!/bin/sh\ncase $1 in\n    amd64)\n        ARCH=\"64\"\n        FNAME=\"amd64\"\n        ;;\n    i386)\n        ARCH=\"32\"\n        FNAME=\"i386\"\n        ;;\n    armv8 | arm64 | aarch64)\n        ARCH=\"arm64-v8a\"\n        FNAME=\"arm64\"\n        ;;\n    armv7 | arm | arm32)\n        ARCH=\"arm32-v7a\"\n        FNAME=\"arm32\"\n        ;;\n    armv6)\n        ARCH=\"arm32-v6\"\n        FNAME=\"armv6\"\n        ;;\n    *)\n        ARCH=\"64\"\n        FNAME=\"amd64\"\n        ;;\nesac\nmkdir -p build/bin\ncd build/bin\nwget \"https://github.com/XTLS/Xray-core/releases/download/v1.8.16/Xray-linux-${ARCH}.zip\"\nunzip \"Xray-linux-${ARCH}.zip\"\nrm -f \"Xray-linux-${ARCH}.zip\" geoip.dat geosite.dat\nmv xray \"xray-linux-${FNAME}\"\nwget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\nwget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\nwget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat\nwget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat\nwget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat\nwget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat\ncd ../../\n"
  },
  {
    "path": "Dockerfile",
    "content": "# ========================================================\n# Stage: Builder\n# ========================================================\nFROM golang:1.22-alpine AS builder\nWORKDIR /app\nARG TARGETARCH\n\nRUN apk --no-cache --update add \\\n  build-base \\\n  gcc \\\n  wget \\\n  unzip\n\nCOPY . .\n\nENV CGO_ENABLED=1\nENV CGO_CFLAGS=\"-D_LARGEFILE64_SOURCE\"\nRUN go build -o build/x-ui main.go\nRUN ./DockerInit.sh \"$TARGETARCH\"\n\n# ========================================================\n# Stage: Final Image of 3x-ui\n# ========================================================\nFROM alpine\nENV TZ=Asia/Shanghai\nWORKDIR /app\n\nRUN apk add --no-cache --update \\\n  ca-certificates \\\n  tzdata \\\n  fail2ban \\\n  bash\n\nCOPY --from=builder /app/build/ /app/\nCOPY --from=builder /app/DockerEntrypoint.sh /app/\nCOPY --from=builder /app/x-ui.sh /usr/bin/x-ui\n\n\n# Configure fail2ban\nRUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \\\n  && cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local \\\n  && sed -i \"s/^\\[ssh\\]$/&\\nenabled = false/\" /etc/fail2ban/jail.local \\\n  && sed -i \"s/^\\[sshd\\]$/&\\nenabled = false/\" /etc/fail2ban/jail.local \\\n  && sed -i \"s/#allowipv6 = auto/allowipv6 = auto/g\" /etc/fail2ban/fail2ban.conf\n\nRUN chmod +x \\\n  /app/DockerEntrypoint.sh \\\n  /app/x-ui \\\n  /usr/bin/x-ui\n\nVOLUME [ \"/etc/x-ui\" ]\nCMD [ \"./x-ui\" ]\nENTRYPOINT [ \"/app/DockerEntrypoint.sh\" ]\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.es_ES.md",
    "content": "[English](/README.md) | [Chinese](/README.zh.md) | [Español](/README.es_ES.md)\n\n<p align=\"center\"><a href=\"#\"><img src=\"./media/3X-UI.png\" alt=\"Image\"></a></p>\n\n**Un Panel Web Avanzado • Construido sobre Xray Core**\n\n[![](https://img.shields.io/github/v/release/xeefei/3x-ui.svg)](https://github.com/xeefei/3x-ui/releases)\n[![](https://img.shields.io/github/actions/workflow/status/xeefei/3x-ui/release.yml.svg)](#)\n[![GO Version](https://img.shields.io/github/go-mod/go-version/xeefei/3x-ui.svg)](#)\n[![Downloads](https://img.shields.io/github/downloads/xeefei/3x-ui/total.svg)](#)\n[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\n> **Descargo de responsabilidad:** Este proyecto es solo para aprendizaje personal y comunicación, por favor no lo uses con fines ilegales, por favor no lo uses en un entorno de producción\n\n**Si este proyecto te es útil, podrías considerar darle una**:star2:\n\n<p align=\"left\"><a href=\"#\"><img width=\"125\" src=\"https://github.com/xeefei/3x-ui/assets/115543613/7aa895dd-048a-42e7-989b-afd41a74e2e1\" alt=\"Image\"></a></p>\n\n- USDT (TRC20): `TYQEmQp1P65u9bG7KPehgJdvuokfb72YkZ`\n\n## Instalar y Actualizar\n\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)\n```\n\n## Instalar una Versión Personalizada\n\n\nPara instalar la versión deseada, agrega la versión al final del comando de instalación. Por ejemplo, ver `v2.3.6`:\n\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh) v2.3.6\n```\n\n## Certificado SSL\n\n<details>\n  <summary>Haz clic para el Certificado SSL</summary>\n\n### Cloudflare\n\nEl script de gestión tiene una aplicación de certificado SSL incorporada para Cloudflare. Para usar este script para colocar un certificado, necesitas lo siguiente:\n\n- Correo electrónico registrado en Cloudflare\n- Clave Global de API de Cloudflare\n- El nombre de dominio se ha resuelto en el servidor actual a través de Cloudflare\n\n**1:** Ejecuta el comando`x-ui`en la terminal, luego elige `Certificado SSL de Cloudflare`.\n\n\n### Certbot\n```\napt-get install certbot -y\ncertbot certonly --standalone --agree-tos --register-unsafely-without-email -d yourdomain.com\ncertbot renew --dry-run\n```\n\n***Consejo:*** *Certbot también está integrado en el script de gestión. Puedes ejecutar el comando `x-ui` , luego elegir `Gestión de Certificados SSL`.*\n\n</details>\n\n## Instalación y Actualización Manual\n\n<details>\n  <summary>Haz clic para más detalles de la instalación manual</summary>\n\n#### Uso\n\n1. Para descargar la última versión del paquete comprimido directamente en tu servidor, ejecuta el siguiente comando:\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\n\nwget https://github.com/xeefei/3x-ui/releases/latest/download/x-ui-linux-${XUI_ARCH}.tar.gz\n```\n\n2. Una vez que se haya descargado el paquete comprimido, ejecuta los siguientes comandos para instalar o actualizar x-ui:\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\ncd /root/\nrm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui\ntar zxvf x-ui-linux-${XUI_ARCH}.tar.gz\nchmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh\ncp x-ui/x-ui.sh /usr/bin/x-ui\ncp -f x-ui/x-ui.service /etc/systemd/system/\nmv x-ui/ /usr/local/\nsystemctl daemon-reload\nsystemctl enable x-ui\nsystemctl restart x-ui\n```\n\n</details>\n\n## Instalar con Docker\n\n<details>\n  <summary>Haz clic para más detalles del Docker</summary>\n\n#### Uso\n\n1. Instala Docker:\n\n   ```sh\n   bash <(curl -sSL https://get.docker.com)\n   ```\n\n2. Clona el Repositorio del Proyecto:\n\n   ```sh\n   git clone https://github.com/xeefei/3x-ui.git\n   cd 3x-ui\n   ```\n\n3. Inicia el Servicio\n\n   ```sh\n   docker compose up -d\n   ```\n\n   O tambien\n\n   ```sh\n   docker run -itd \\\n      -e XRAY_VMESS_AEAD_FORCED=false \\\n      -v $PWD/db/:/etc/x-ui/ \\\n      -v $PWD/cert/:/root/cert/ \\\n      --network=host \\\n      --restart=unless-stopped \\\n      --name 3x-ui \\\n      ghcr.io/xeefei/3x-ui:latest\n   ```\n\nactualizar a la última versión\n\n   ```sh\n    cd 3x-ui\n    docker compose down\n    docker compose pull 3x-ui\n    docker compose up -d\n   ```\n\neliminar 3x-ui de docker\n\n   ```sh\n    docker stop 3x-ui\n    docker rm 3x-ui\n    cd --\n    rm -r 3x-ui\n   ```\n\n</details>\n\n\n## SO Recomendados\n\n- Ubuntu 20.04+\n- Debian 11+\n- CentOS 8+\n- Fedora 36+\n- Arch Linux\n- Manjaro\n- Armbian\n- AlmaLinux 9+\n- Rockylinux 9+\n- OpenSUSE Tubleweed\n\n## Arquitecturas y Dispositivos Compatibles\n\n<details>\n  <summary>Haz clic para detalles de arquitecturas y dispositivos compatibles</summary>\n\nNuestra plataforma ofrece compatibilidad con una amplia gama de arquitecturas y dispositivos, garantizando flexibilidad en diversos entornos informáticos. A continuación se presentan las principales arquitecturas que admitimos:\n\n- **amd64**: Esta arquitectura predominante es la estándar para computadoras personales y servidores, y admite la mayoría de los sistemas operativos modernos sin problemas.\n\n- **x86 / i386**: Ampliamente adoptada en computadoras de escritorio y portátiles, esta arquitectura cuenta con un amplio soporte de numerosos sistemas operativos y aplicaciones, incluidos, entre otros, Windows, macOS y sistemas Linux.\n\n- **armv8 / arm64 / aarch64**: Diseñada para dispositivos móviles y embebidos contemporáneos, como teléfonos inteligentes y tabletas, esta arquitectura está ejemplificada por dispositivos como Raspberry Pi 4, Raspberry Pi 3, Raspberry Pi Zero 2/Zero 2 W, Orange Pi 3 LTS, entre otros.\n\n- **armv7 / arm / arm32**: Sirve como arquitectura para dispositivos móviles y embebidos más antiguos, y sigue siendo ampliamente utilizada en dispositivos como Orange Pi Zero LTS, Orange Pi PC Plus, Raspberry Pi 2, entre otros.\n\n- **armv6 / arm / arm32**: Orientada a dispositivos embebidos muy antiguos, esta arquitectura, aunque menos común, todavía se utiliza. Dispositivos como Raspberry Pi 1, Raspberry Pi Zero/Zero W, dependen de esta arquitectura.\n\n- **armv5 / arm / arm32**: Una arquitectura más antigua asociada principalmente con sistemas embebidos tempranos, es menos común hoy en día pero aún puede encontrarse en dispositivos heredados como versiones antiguas de Raspberry Pi y algunos teléfonos inteligentes más antiguos.\n</details>\n\n## Idiomas\n\n- Inglés\n- Farsi\n- Chino\n- Ruso\n- Vietnamita\n- Español\n- Indonesio\n- Ucraniano\n\n\n## Características\n\n- Monitoreo del Estado del Sistema\n- Búsqueda dentro de todas las reglas de entrada y clientes\n- Tema Oscuro/Claro\n- Soporta multiusuario y multiprotocolo\n- Soporta protocolos, incluyendo VMess, VLESS, Trojan, Shadowsocks, Dokodemo-door, Socks, HTTP, wireguard\n- Soporta Protocolos nativos XTLS, incluyendo RPRX-Direct, Visión, REALITY\n- Estadísticas de tráfico, límite de tráfico, límite de tiempo de vencimiento\n- Plantillas de configuración de Xray personalizables\n- Soporta acceso HTTPS al panel (dominio proporcionado por uno mismo + certificado SSL)\n- Soporta la solicitud y renovación automática de certificados SSL con un clic\n- Para elementos de configuración más avanzados, consulta el panel\n- Corrige rutas de API (la configuración del usuario se creará con la API)\n- Soporta cambiar las configuraciones por diferentes elementos proporcionados en el panel.\n- Soporta exportar/importar base de datos desde el panel\n\n\n## Configuraciones por Defecto\n\n<details>\n  <summary>Haz clic para detalles de las configuraciones por defecto</summary>\n\n  ### Información\n\n- **Puerto:** 2053\n- **Usuario y Contraseña:** Se generarán aleatoriamente si omites la modificación.\n- **Ruta de la Base de Datos:**\n  - /etc/x-ui/x-ui.db\n- **Ruta de Configuración de Xray:**\n  - /usr/local/x-ui/bin/config.json\n- **Ruta del Panel Web sin Implementar SSL:**\n  - http://ip:2053/panel\n  - http://domain:2053/panel\n- **Ruta del Panel Web con Implementación de SSL:**\n  - https://domain:2053/panel\n \n</details>\n\n## Configuración WARP\n\n<details>\n  <summary>Haz clic para detalles de la configuración WARP</summary>\n\n#### Uso\n\nSi deseas usar enrutamiento a WARP antes de la versión v2.1.0, sigue los pasos a continuación:\n\n**1.** Instala WARP en **Modo de Proxy SOCKS**:\n\n   ```sh\n   bash <(curl -sSL https://raw.githubusercontent.com/hamid-gh98/x-ui-scripts/main/install_warp_proxy.sh)\n   ```\n\n**2.** Si ya instalaste warp, puedes desinstalarlo usando el siguiente comando:\n\n   ```sh\n   warp u\n   ```\n\n**3.** Activa la configuración que necesites en el panel\n\n   Características de Configuración:\n\n   - Bloquear Anuncios\n   - Enrutar Google + Netflix + Spotify + OpenAI (ChatGPT) a WARP\n   - Corregir error 403 de Google\n\n</details>\n\n## Límite de IP\n\n<details>\n  <summary>Haz clic para más detalles del límite de IP</summary>\n\n#### Uso\n\n**Nota:** El Límite de IP no funcionará correctamente cuando se use IP Tunnel\n\n- Para versiones hasta `v1.6.1`:\n\n  - El límite de IP está integrado en el panel.\n\n- Para versiones `v1.7.0` y posteriores:\n\n  - Para que el Límite de IP funcione correctamente, necesitas instalar fail2ban y sus archivos requeridos siguiendo estos pasos:\n\n    1. Usa el comando `x-ui` dentro de la terminal.\n    2. Selecciona `Gestión de Límite de IP`.\n    3. Elige las opciones apropiadas según tus necesidades.\n   \n  - asegúrate de tener ./access.log en tu Configuración de Xray después de la v2.1.3 tenemos una opción para ello\n  \n  ```sh\n    \"log\": {\n      \"access\": \"./access.log\",\n      \"dnsLog\": false,\n      \"loglevel\": \"warning\"\n    },\n  ```\n\n</details>\n\n## Bot de Telegram\n\n<details>\n  <summary>Haz clic para más detalles del bot de Telegram</summary>\n\n#### Uso\n\nEl panel web admite tráfico diario, inicio de sesión en el panel, copia de seguridad de la base de datos, estado del sistema, información del cliente y otras notificaciones y funciones a través del Bot de Telegram. Para usar el bot, debes establecer los parámetros relacionados con el bot en el panel, que incluyen:\n\n- Token de Telegram\n- ID de chat de administrador(es)\n- Hora de Notificación (en sintaxis cron)\n- Notificación de Fecha de Caducidad\n- Notificación de Capacidad de Tráfico\n- Copia de seguridad de la base de datos\n- Notificación de Carga de CPU\n\n\n**Sintaxis de referencia:**\n\n- `30 \\* \\* \\* \\* \\*` - Notifica a los 30s de cada punto\n- `0 \\*/10 \\* \\* \\* \\*` - Notifica en el primer segundo de cada 10 minutos\n- `@hourly` - Notificación por hora\n- `@daily` - Notificación diaria (00:00 de la mañana)\n- `@weekly` - Notificación semanal\n- `@every 8h` - Notifica cada 8 horas\n\n### Funcionalidades del Bot de Telegram\n\n- Reporte periódico\n- Notificación de inicio de sesión\n- Notificación de umbral de CPU\n- Umbral de Notificación para Fecha de Caducidad y Tráfico para informar con anticipación\n- Soporte para menú de reporte de cliente si el nombre de usuario de Telegram del cliente se agrega a las configuraciones de usuario\n- Soporte para reporte de tráfico de Telegram buscado con UUID (VMESS/VLESS) o Contraseña (TROJAN) - anónimamente\n- Bot basado en menú\n- Buscar cliente por correo electrónico (solo administrador)\n- Ver todas las Entradas\n- Ver estado del servidor\n- Ver clientes agotados\n- Recibir copia de seguridad bajo demanda y en informes periódicos\n- Bot multilingüe\n\n### Configuración del Bot de Telegram\n\n- Inicia [Botfather](https://t.me/BotFather) en tu cuenta de Telegram:\n    ![Botfather](./media/botfather.png)\n  \n- Crea un nuevo bot usando el comando /newbot: Te hará 2 preguntas, Un nombre y un nombre de usuario para tu bot. Ten en cuenta que el nombre de usuario debe terminar con la palabra \"bot\".\n    ![Create new bot](./media/newbot.png)\n\n- Inicia el bot que acabas de crear. Puedes encontrar el enlace a tu bot aquí.\n    ![token](./media/token.png)\n\n- Ingresa a tu panel y configura los ajustes del bot de Telegram como se muestra a continuación:\n![Panel Config](./media/panel-bot-config.png)\n\nIngresa el token de tu bot en el campo de entrada número 3.\nIngresa el ID de chat de usuario en el campo de entrada número 4. Las cuentas de Telegram con esta ID serán los administradores del bot. (Puedes ingresar más de uno, solo sepáralos con ,)\n\n- ¿Cómo obtener el ID de chat de Telegram? Usa este [bot](https://t.me/useridinfobot), Inicia el bot y te dará el ID de chat del usuario de Telegram.\n![User ID](./media/user-id.png)\n\n</details>\n\n## Rutas de API\n\n<details>\n  <summary>Haz clic para más detalles de las rutas de API</summary>\n\n#### Uso\n\n- `/login` con `POST` datos de usuario: `{username: '', password: ''}` para iniciar sesión\n- `/panel/api/inbounds` base para las siguientes acciones:\n\n| Método | Ruta                               | Acción                                                    |\n| :----: | ---------------------------------- | --------------------------------------------------------- |\n| `GET`  | `\"/list\"`                          | Obtener todas los Entradas                                |\n| `GET`  | `\"/get/:id\"`                       | Obtener Entrada con inbound.id                            |\n| `GET`  | `\"/getClientTraffics/:email\"`      | Obtener Tráficos del Cliente con email                    |\n| `GET`  | `\"/createbackup\"`                  | El bot de Telegram envía copia de seguridad a los admins  |\n| `POST` | `\"/add\"`                           | Agregar Entrada                                           |\n| `POST` | `\"/del/:id\"`                       | Eliminar Entrada                                          |\n| `POST` | `\"/update/:id\"`                    | Actualizar Entrada                                        |\n| `POST` | `\"/clientIps/:email\"`              | Dirección IP del Cliente                                  |\n| `POST` | `\"/clearClientIps/:email\"`         | Borrar Dirección IP del Cliente                           |\n| `POST` | `\"/addClient\"`                     | Agregar Cliente a la Entrada                              |\n| `POST` | `\"/:id/delClient/:clientId\"`       | Eliminar Cliente por clientId\\*                           |\n| `POST` | `\"/updateClient/:clientId\"`        | Actualizar Cliente por clientId\\*                         |\n| `POST` | `\"/:id/resetClientTraffic/:email\"` | Restablecer Tráfico del Cliente                           |\n| `POST` | `\"/resetAllTraffics\"`              | Restablecer tráfico de todos las Entradas                 |\n| `POST` | `\"/resetAllClientTraffics/:id\"`    | Restablecer tráfico de todos los clientes en una Entrada  |\n| `POST` | `\"/delDepletedClients/:id\"`        | Eliminar clientes agotados de la entrada (-1: todos)      |\n| `POST` | `\"/onlines\"`                       | Obtener usuarios en línea (lista de correos electrónicos) |\n\n\\*- El campo `clientId` debe llenarse por:\n\n- `client.id` para VMESS y VLESS\n- `client.password` para TROJAN\n- `client.email` para Shadowsocks\n\n\n- [Documentación de API](https://documenter.getpostman.com/view/16802678/2s9YkgD5jm)\n- [<img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\">](https://app.getpostman.com/run-collection/16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415%26entityType%3Dcollection%26workspaceId%3D2cd38c01-c851-4a15-a972-f181c23359d9)\n</details>\n\n## Variables de Entorno\n\n<details>\n  <summary>Haz clic para más detalles de las variables de entorno</summary>\n\n#### Uso\n\n| Variable       |                      Tipo                      | Predeterminado |\n| -------------- | :--------------------------------------------: | :------------- |\n| XUI_LOG_LEVEL  | `\"debug\"` \\| `\"info\"` \\| `\"warn\"` \\| `\"error\"` | `\"info\"`       |\n| XUI_DEBUG      |                   `boolean`                    | `false`        |\n| XUI_BIN_FOLDER |                    `string`                    | `\"bin\"`        |\n| XUI_DB_FOLDER  |                    `string`                    | `\"/etc/x-ui\"`  |\n| XUI_LOG_FOLDER |                    `string`                    | `\"/var/log\"`   |\n\nEjemplo:\n\n```sh\nXUI_BIN_FOLDER=\"bin\" XUI_DB_FOLDER=\"/etc/x-ui\" go build main.go\n```\n\n</details>\n\n## Vista previa\n\n![1](./media/1.png)\n![2](./media/2.png)\n![3](./media/3.png)\n![4](./media/4.png)\n![5](./media/5.png)\n![6](./media/6.png)\n![7](./media/7.png)\n\n## Un agradecimiento especial a\n\n- [alireza0](https://github.com/alireza0/)\n\n## Reconocimientos\n\n- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (Licencia: **GPL-3.0**): _Reglas de enrutamiento mejoradas de v2ray/xray y v2ray/xray-clients con dominios iraníes integrados y un enfoque en seguridad y bloqueo de anuncios._\n- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _Un dominio alojado en Vietnam y una lista de bloqueo con la máxima eficiencia para vietnamitas._\n\n## Estrellas a lo largo del tiempo\n\n[![Stargazers over time](https://starchart.cc/xeefei/3x-ui.svg)](https://starchart.cc/xeefei/3x-ui)\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\"><a href=\"#\"><img src=\"./media/3X-UI.png\" alt=\"Image\"></a></p>\n\n**------------------一个更好的面板 • 基于Xray Core构建----------------**\n\n[![](https://img.shields.io/github/v/release/xeefei/3x-ui.svg)](https://github.com/xeefei/3x-ui/releases)\n[![](https://img.shields.io/github/actions/workflow/status/xeefei/3x-ui/release.yml.svg)](#)\n[![GO Version](https://img.shields.io/github/go-mod/go-version/xeefei/3x-ui.svg)](#)\n[![Downloads](https://img.shields.io/github/downloads/xeefei/3x-ui/total.svg)](#)\n[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\n> **声明：** 此项目仅供个人学习、交流使用，请遵守当地法律法规，勿用于非法用途；请勿用于生产环境。\n\n> **注意：** 在使用此项目和〔教程〕过程中，若因违反以上声明使用规则而产生的一切后果由使用者自负。\n\n**如果此项目对你有用，请给一个**:star2:\n- 赞助地址（USDT/TRC20）：`TYQEmQp1P65u9bG7KPehgJdvuokfb72YkZ`\n\n## [【3X-UI】中文交流群：https://t.me/XUI_CN](https://t.me/XUI_CN)\n## [【3X-UI】详细安装流程步骤：https://xeefei.github.io/xufei/2024/05/3x-ui/](https://xeefei.github.io/xufei/2024/05/3x-ui/)\n\n------------\n## ✰〔3X-UI优化版〕跟原版3X-UI的区别？✰\n### 大部分功能基于原版3X-UI进行汉化优化，主要的优化内容如下：\n#### 1、最大限度地汉化了面板项目，更适合中文宝宝体质，包括：\n##### ①优化在VPS中进行〔脚本安装过程〕的汉化提示，增加相应的安装中文提示，让中文用户能明白清楚自己安装到了哪个环节？在细节方面，增加了安装成功之后的〔用户设置信息〕提示，在脚本中加入〔面板登录地址〕显示，\n##### ②管理后台进行了相应的〔图标和按钮〕汉化，让中文宝宝能够看得懂，\n##### ③安装成功后〔自动更改〕后台管理界面和电报机器人界面默认为〔中文〕，\n##### ④在管理后台中〔设置证书处〕，增加了acme方式填入路径的提示；\n#### 2、优化了电报机器人响应〔按钮〕的名称和排序；\n#### 3、创建了〔3X-UI〕中文交流群，各位中文宝宝可以一起讨论交流；\n#### 4、管理后台中增加了〔实用导航〕页面，里面包含实用内容；\n#### 5、优化了后台〔二维码〕显示模式，点击打开会更加丝滑美观；\n#### 6、在创建reality协议时，更改uTLS指纹默认使用chrome；\n#### 7、更新README内容添加备份&恢复操作说明，以及更多其他图文介绍；\n#### 8、管理后台中增加〔端口检测〕和〔网络测速〕，点击可以跳转直达；\n#### 9、增加了详细的项目〔安装配置教程〕，解决小白用户不懂配置的烦恼。\n\n------------\n## ✰如何从其他x-ui版本迁移到〔3X-UI优化版〕？✰\n#### 1、若你用的是伊朗老哥的原版3X-UI，是可以直接〔覆盖安装〕的，因为〔3X-UI优化版〕是fork了原版3X-UI的项目，基于原有的功能进行优化的，大功能是没有变化的，主要是进行了脚本的〔汉化处理〕，其他诸如数据库文件等位置是没有改变的，所以直接覆盖安装，并不会影响你〔原有节点及配置〕等数据；安装命令如下：\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)\n```\n#### 2、若你之前用的是Docker方式安装，那先进入容器里面/命令：docker exec -it 容器id /bin/sh，再执行以上脚本命令直接【覆盖安装】即可，\n#### 3、若你用的是之前F佬的x-ui或者其他分支版本，那直接覆盖安装的话，并不能确保一定就能够兼容？建议你先去备份〔数据库〕配置文件，再进行安装〔3X-UI优化版〕。\n\n\n------------\n## 安装之前的准备\n- 购买一台性能还不错的VPS，可通过本页底部链接购买，\n- PS：若你不想升级系统，则可以跳过此步骤。\n- 若你需要更新/升级系统，Debian系统可用如下命令：\n  ```\n  apt update\n  apt upgrade -y\n  apt dist-upgrade -y\n  apt autoclean\n  apt autoremove -y\n  ```\n- 查看系统当前版本：\n  ```\n  cat /etc/debian_version\n  ```\n- 查看内核版本：\n  ```\n  uname -r\n  ```\n- 列出所有内核：\n  ```\n  dpkg --list | grep linux-image\n  ```\n- 更新完成后执行重新引导：\n  ```\n  update-grub\n  ```\n- 完成以上步骤之后输入reboot重启系统\n\n------------\n## 【搬瓦工】重装/升级系统之后SSH连不上如何解决？\n- 【搬瓦工】重装/升级系统会恢复默认22端口，如果需要修改SSH的端口号，您需要进行以下步骤：\n- 以管理员身份使用默认22端口登录到SSH服务器\n- 打开SSH服务器的配置文件进行编辑，SSH配置文件通常位于/etc/ssh/sshd_config\n- 找到\"Port\"选项，并将其更改为您想要的端口号\n- Port <新端口号>，请将<新端口号>替换为您想要使用的端口号\n- 保存文件并退出编辑器\n- 重启服务器以使更改生效\n\n------------\n## 安装 & 升级\n- 使用3x-ui脚本一般情况下，安装完成创建入站之后，端口是默认关闭的，所以必须进入脚本选择【22】去放行端口\n- 要使用【自动续签】证书功能，也必须放行【80】端口，保持80端口是打开的，才会每3个月自动续签一次\n\n- 【全新安装】请执行以下脚本：\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)\n```\n#### 如果执行了上面的代码但是报错，证明你的系统里面没有curl这个软件，请执行以下命令先安装curl软件，安装curl之后再去执行上面代码，\n```\napt update -y&&apt install -y curl&&apt install -y socat\n```\n\n- 若要对版本进行升级，可直接通过脚本选择【2】，如下图：\n![8](./media/8.png)\n![10](./media/10.png)\n- 在到这一步必须要注意：要保留旧设置的话，需要输入【n】\n![11](./media/11.png)\n\n\n------------\n## 安装指定版本\n\n若要安装指定的版本，请将该版本添加到安装命令的末尾。 e.g., ver `v2.3.9`:\n\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh) v2.3.9\n```\n------------\n## 若你的VPS默认有防火墙，请在安装完成之后放行指定端口\n- 放行【面板登录端口】\n- 放行出入站管理协议端口\n- 如果要申请安装证书并每3个月【自动续签】证书，请确保80和443端口是放行打开的\n- 可通过此脚本的第【22】选项去安装防火墙进行管理，如下图：\n![9](./media/9.png)\n- 若要一次性放行多个端口或一整个段的端口，用英文逗号隔开。\n#### PS：若你的VPS没有防火墙，则所有端口都是能够ping通的，可自行选择是否进入脚本安装防火墙保证安全，但安装了防火墙必须放行相应端口。\n\n------------\n## 安装证书开启https方式实现域名登录访问管理面板/偷自己\n#### PS：如果不需要以上功能或无域名，可以跳过这步，\n##### 1、把自己的域名托管到CF，并解析到自己VPS的IP，不要开启【小云朵】，\n##### 2、如果要申请安装证书并每3个月【自动续签】证书，请确保80和443端口是放行打开的，\n##### 3、输入x-ui命令进入面板管理脚本，通过选择第【18】选项去进行安装，\n##### 4、记录好已经安装证书的【路径】，位置在：/root/.acme.sh/（域名）_ecc，后续需要用到，\n##### 5、进入后台【面板设置】—–>【常规】中，去分别填入刚才已经记录的证书公钥、私钥路径，\n##### 6、点击左上角的【保存】和【重启面板】，即可用自己域名进行登录管理；也可按照后续方法实现【自己偷自己】。\n\n------------\n## 登录面板进行【常规】设置\n### 特别是如果在安装过程中，全部都是默认【回车键】安装的话，用户名/密码/访问路径是随机的，而面板监听端口默认是2053，最好进入面板更改，\n##### 1、填写自己想要设置的【面板监听端口】，并去登录SSH放行，\n##### 2、更改自己想要设置的【面板登录访问路径】，后续加上路径登录访问，\n![25](./media/25.png)\n##### 3、其他：安全设定和电报机器人等配置，可自行根据需求去进行设置，\n##### 4、若申请了证书须填写证书公钥/私钥路径，建议配置电报机器人方便管理，\n![26](./media/26.png)\n##### 5、面板设置【改动保存】之后，都需要点击左上角【重启面板】，才能生效。\n#### PS：若你在正确完成了上述步骤之后，你没有安装证书的情况下，去用IP+端口号/路径的方式却不能访问面板，那请检查一下是不是你的浏览器自动默认开启了https模式，需要手动调整一下改成http方式，把“s”去掉，即可访问成功。\n\n------------\n## 创建【入站协议】和添加【客户端】，并测试上网\n##### 1、点击左边【入站列表】，然后【添加入站】，传输方式保持【TCP】不变，尽量选择主流的vless+reality+vision协议组合，\n![23](./media/23.png)\n##### 2、在选择reality协议时，偷的域名可以使用默认的，要使用其他的，请替换尽量保持一致就行，比如Apple、Yahoo，VPS所在地区的旅游、学校网站等；如果要实现【偷自己】，请参看后续【如何偷自己】的说明部分；而私钥/公钥部分，可以直接点击下方的【Get New Cert】获取一个随机的，\n##### 3、在创建reality协议过程中，至于其他诸如：PROXY Protocol，HTTP 伪装，TPROXY，External Proxy等等选项，若无特殊要求，保持默认设置即可，不用去动它们，\n![24](./media/24.png)\n##### 4、创建好入站协议之后，默认只有一个客户端，可根据自己需求继续添加；重点：并编辑客户端，选择【Flow流控】为xtls-rprx-vision-udp443，\n![19](./media/19.png)\n##### 5、其他：流量限制，到期时间，客户TG的ID等选项根据自己需求填写，\n![4](./media/4.png)\n##### 6、一定要放行端口之后，确保端口能够ping通，再导入软件，\n##### 7、点击二维码或者复制链接导入到v2rayN等软件中进行测试。\n\n------------\n## 备份与恢复/迁移数据库（以Debian系统为例）\n#### 一、备份：通过配置好电报管理机器人，并去设置开启【自动备份】，每天凌晨12点会通过VPS管理机器人获取【备份配置】文件，有x-ui.db和config.json两个文件，可自行下载保存到自己电脑里面，\n![14](./media/14.png)\n#### 二、搭建：在新的VPS中全新安装好3x-ui面板，通过脚本放行之前配置的所有端口，一次性放行多个端口请用【英文逗号】分隔，\n#### 三、若需要安装证书，则提前把域名解析到新的VPS对应的IP，并且去输入x-ui选择第【18】选项去安装，并记录公钥/私钥的路径，无域名则跳过这一步，\n#### 四、恢复：SSH登录服务器找到/etc/x-ui/x-ui.db和/usr/local/x-ui/bin/config.json文件位置，上传之前的两个备份文件，进行覆盖，\n![12](./media/12.png)\n##### PS：把之前通过自动备份下载得到的两个文件上传覆盖掉旧文件，重启3x-ui面板即可【迁移成功】；即使迁移过程中出现问题，你是有备份文件的，不用担心，多试几次。\n![13](./media/13.png)\n#### 五、若安装了证书，去核对/更改一下证书的路径，一般是同一个域名的话，位置在：/root/.acme.sh/（域名）_ecc，路径是相同的就不用更改，\n#### 六、重启面板/重启服务器，让上述步骤生效即可，这时可以看到所有配置都是之前自己常用的，包括面板用户名、密码，入站、客户端，电报机器人配置等。\n\n------------\n## 安装完成后如何设置调整成【中文界面】？\n- 方法一：通过管理后台【登录页面】调整，登录时可以选择，如下图：\n![15](./media/15.png)\n- 方法二：通过在管理后台-->【面板设置】中去选择设置，如下图：\n![16](./media/16.png)\n- 【TG机器人】设置中文：通过在管理后台-->【面板设置】-->【机器人配置】中去选择设置，并建议打开数据库备份和登录通知，如下图：\n![17](./media/17.png)\n\n------------\n## 用3x-ui如何实现【自己偷自己】？\n- 其实很简单，只要你为面板设置了证书，\n- 开启了HTTPS登录，就可以将3x-ui自身作为Web Server，\n- 无需Nginx等，这里给一个示例：\n- 其中目标网站（Dest）请填写面板监听端口，\n- 可选域名（SNI）填写面板登录域名，\n- 如果您使用其他web server（如nginx）等，\n- 将目标网站改为对应监听端口也可。\n- 需要说明的是，如果您处于白名单地区，自己“偷”自己并不适合你；\n- 其次，可选域名一项实际上可以填写任意SNI，只要客户端保持一致即可，不过并不推荐这样做。\n- 配置方法如下图所示：\n![18](./media/18.png)\n\n------------\n## 〔子域名〕被墙针对特征\n#### 网络表现：\n##### 1、可以Ping通域名和IP地址，\n##### 2、子域名无法打开3X-UI管理界面，\n##### 3、什么都正常就是不能上网；\n\n#### 问题：\n##### 你的子域名被墙针对了：无法上网！\n\n#### 解决方案：\n##### 1、更换为新的子域名，\n##### 2、解析新的子域名到VPS的IP，\n##### 3、重新去安装新证书，\n##### 4、重启3X-UI和服务器，\n##### 5、重新去获取链接并测试上网。\n#### PS：若通过以上步骤还是不能正常上网，则重装VPS服务器OS系统，以及3X-UI面板全部重新安装，之后就正常了！\n\n------------\n## 在自己的VPS服务器部署【订阅转换】功能\n### 如何把vless/vmess等协议转换成Clash/Surge等软件支持的格式？\n##### 1、进入脚本输入x-ui命令调取面板，选择第【24】选项安装订阅转换模块，如下图：\n![21](./media/21.png)\n##### 2、等待安装【订阅转换】成功之后，访问地址：你的IP:18080（端口号）进行转换，\n![22](./media/22.png)\n##### 3、因为在转换过程中需要调取后端API，所以请确保端口25500是打开放行的，\n##### 4、在得到【转换链接】之后，只要你的VPS服务器25500端口是能ping通的，就能导入Clash/Surge等软件成功下载配置，\n##### 5、此功能集成到3x-ui面板中，是为了保证安全，通过调取24选项把【订阅转换】功能部署在自己的VPS中，不会造成链接泄露。\n### 【订阅转换】功能在自己的VPS中安装部署成功之后的界面如下图所示：\n![20](./media/20.png)\n\n------------\n## 如何保护自己的IP不被墙被封？\n##### 1、使用的代理协议要安全，加密是必备，推荐使用vless+reality+vision协议组合，\n##### 2、因为有时节点会共享，在不同的地区，多个省份之间不要共同连接同一个IP，\n##### 3、连接同一个IP就算了，不要同一个端口，不要同IP+同端口到处漫游，要分开，\n##### 4、同一台VPS，不要在一天内一直大流量去下载东西使用，不要流量过高要切换，\n##### 5、创建【入站协议】的时候，尽量用【高位端口】，比如40000--65000之间的端口号。\n#### 提醒：为什么在特殊时期，比如：两会，春节等被封得最严重最惨？\n##### 尼玛同一个IP+同一个端口号，多个省份去漫游，跟开飞机场一样！不封你，封谁的IP和端口？\n#### 总结：不要多终端/多省份/多个朋友/共同使用同一个IP和端口号！使用3x-ui多创建几个【入站】，\n####      多做几条备用，各用各的！各行其道才比较安全！GFW的思维模式是干掉机场，机场的特征个人用户不要去沾染，自然IP就保护好了。\n\n------------\n## SSL 认证\n\n<details>\n  <summary>点击查看 SSL 认证</summary>\n\n### ACME\n\n要使用 ACME 管理 SSL 证书：\n\n1. 确保您的域名已正确解析到服务器，\n2. 输入“x-ui”命令并选择“SSL 证书管理”，\n3. 您将看到以下选项：\n\n   - **获取证书** ----获取SSL证书\n   - **吊销证书** ----吊销现有的SSL证书\n   - **续签证书** ----强制续签SSL证书\n\n### Certbot\n\n安装和使用 Certbot：\n\n```sh\napt-get install certbot -y\ncertbot certonly --standalone --agree-tos --register-unsafely-without-email -d yourdomain.com\ncertbot renew --dry-run\n```\n\n### Cloudflare\n\n管理脚本具有用于 Cloudflare 的内置 SSL 证书应用程序。若要使用此脚本申请证书，需要满足以下条件：\n\n- Cloudflare 邮箱地址\n- Cloudflare Global API Key\n- 域名已通过 cloudflare 解析到当前服务器\n\n**如何获取 Cloudflare全局API密钥:**\n\n1. 在终端中输入“x-ui”命令，然后选择“CF SSL 证书”。\n2. 访问链接: [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens).\n3. 点击“查看全局 API 密钥”（如下图所示）：\n   ![](media/APIKey1.PNG)\n4. 您可能需要重新验证您的帐户。之后，将显示 API 密钥（请参见下面的屏幕截图）：\n   ![](media/APIKey2.png)\n\n使用时，只需输入您的“域名”、“电子邮件”和“API KEY”即可。示意图如下：\n   ![](media/DetailEnter.png)\n\n\n</details>\n\n------------\n## 手动安装 & 升级\n\n<details>\n  <summary>点击查看 手动安装 & 升级</summary>\n\n#### 使用\n\n1. 若要将最新版本的压缩包直接下载到服务器，请运行以下命令：\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  s390x) echo 's390x' ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\n\nwget https://github.com/xeefei/3x-ui/releases/latest/download/x-ui-linux-${XUI_ARCH}.tar.gz\n```\n\n2. 下载压缩包后，执行以下命令安装或升级 x-ui：\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  s390x) echo 's390x' ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\ncd /root/\nrm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui\ntar zxvf x-ui-linux-${XUI_ARCH}.tar.gz\nchmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh\ncp x-ui/x-ui.sh /usr/bin/x-ui\ncp -f x-ui/x-ui.service /etc/systemd/system/\nmv x-ui/ /usr/local/\nsystemctl daemon-reload\nsystemctl enable x-ui\nsystemctl restart x-ui\n```\n\n</details>\n\n------------\n## 通过Docker安装\n\n<details>\n  <summary>点击查看 通过Docker安装</summary>\n\n#### 使用\n\n\n1. **安装Docker**\n\n   ```sh\n   bash <(curl -sSL https://get.docker.com)\n   ```\n\n\n2. **克隆项目仓库**\n\n   ```sh\n   git clone https://github.com/xeefei/3x-ui.git\n   cd 3x-ui\n   ```\n\n3. **启动服务**：\n\n   ```sh\n   docker compose up -d\n   ```\n\n   **或**\n\n   ```sh\n   docker run -itd \\\n      -e XRAY_VMESS_AEAD_FORCED=false \\\n      -v $PWD/db/:/etc/x-ui/ \\\n      -v $PWD/cert/:/root/cert/ \\\n      --network=host \\\n      --restart=unless-stopped \\\n      --name 3x-ui \\\n      ghcr.io/xeefei/3x-ui:latest\n   ```\n\n4. **更新至最新版本**\n\n   ```sh\n   cd 3x-ui\n   docker compose down\n   docker compose pull 3x-ui\n   docker compose up -d\n   ```\n\n5. **从Docker中删除3x-ui **\n\n   ```sh\n   docker stop 3x-ui\n   docker rm 3x-ui\n   cd --\n   rm -r 3x-ui\n   ```\n\n</details>\n\n------------\n## 建议使用的操作系统\n\n- Ubuntu 20.04+\n- Debian 11+\n- CentOS 8+\n- Fedora 36+\n- Arch Linux\n- Manjaro\n- Armbian\n- AlmaLinux 9+\n- Rocky Linux 9+\n- Oracle Linux 8+\n- OpenSUSE Tubleweed\n\n------------\n## 支持的架构和设备\n<details>\n  <summary>点击查看 支持的架构和设备</summary>\n\n我们的平台提供与各种架构和设备的兼容性，确保在各种计算环境中的灵活性。以下是我们支持的关键架构：\n\n- **amd64**: 这种流行的架构是个人计算机和服务器的标准，可以无缝地适应大多数现代操作系统。\n\n- **x86 / i386**: 这种架构在台式机和笔记本电脑中被广泛采用，得到了众多操作系统和应用程序的广泛支持，包括但不限于 Windows、macOS 和 Linux 系统。\n\n- **armv8 / arm64 / aarch64**: 这种架构专为智能手机和平板电脑等当代移动和嵌入式设备量身定制，以 Raspberry Pi 4、Raspberry Pi 3、Raspberry Pi Zero 2/Zero 2 W、Orange Pi 3 LTS 等设备为例。\n\n- **armv7 / arm / arm32**: 作为较旧的移动和嵌入式设备的架构，它仍然广泛用于Orange Pi Zero LTS、Orange Pi PC Plus、Raspberry Pi 2等设备。\n\n- **armv6 / arm / arm32**: 这种架构面向非常老旧的嵌入式设备，虽然不太普遍，但仍在使用中。Raspberry Pi 1、Raspberry Pi Zero/Zero W 等设备都依赖于这种架构。\n\n- **armv5 / arm / arm32**: 它是一种主要与早期嵌入式系统相关的旧架构，目前不太常见，但仍可能出现在早期 Raspberry Pi 版本和一些旧智能手机等传统设备中。\n</details>\n\n------------\n## Languages\n\n- English（英语）\n- Farsi（伊朗语）\n- Chinese（中文）\n- Russian（俄语）\n- Vietnamese（越南语）\n- Spanish（西班牙语）\n- Indonesian （印度尼西亚语）\n- Ukrainian（乌克兰语）\n\n------------\n## 项目特点\n\n- 系统状态查看与监控\n- 可搜索所有入站和客户端信息\n- 深色/浅色主题随意切换\n- 支持多用户和多协议\n- 支持多种协议，包括 VMess、VLESS、Trojan、Shadowsocks、Dokodemo-door、Socks、HTTP、wireguard\n- 支持 XTLS 原生协议，包括 RPRX-Direct、Vision、REALITY\n- 流量统计、流量限制、过期时间限制\n- 可自定义的 Xray配置模板\n- 支持HTTPS访问面板（自备域名+SSL证书）\n- 支持一键式SSL证书申请和自动续签证书\n- 更多高级配置项目请参考面板去进行设定\n- 修复了 API 路由（用户设置将使用 API 创建）\n- 支持通过面板中提供的不同项目更改配置。\n- 支持从面板导出/导入数据库\n\n------------\n## 默认面板设置\n\n<details>\n\n  <summary>点击查看 默认设置</summary>\n\n  ### 默认信息\n\n- **端口** \n    - 2053\n- **用户名 & 密码 & 访问路径** \n    - 当您跳过设置时，这些信息会随机生成，\n    - 您也可以在安装的时候自定义访问路径。\n- **数据库路径：**\n  - /etc/x-ui/x-ui.db\n- **Xray 配置路径：**\n  - /usr/local/x-ui/bin/config.json\n- **面板链接（无SSL）：**\n  - http://ip:2053/访问路径/panel\n- **面板链接（有SSL）：**\n  - https://你的域名:2053/访问路径/panel\n\n</details>\n\n------------\n## [WARP 配置](https://gitlab.com/fscarmen/warp)\n\n<details>\n  <summary>点击查看 WARP 配置</summary>\n\n#### 使用\n\n**对于版本 `v2.1.0` 及更高版本：**\n\nWARP 是内置的，无需额外安装；只需在面板中打开必要的配置即可。\n\n**如果要在 v2.1.0 之前使用 WARP 路由**，请按照以下步骤操作：\n\n**1.** 在 **SOCKS Proxy Mode** 模式中安装Wrap\n\n   - **Account Type (free, plus, team):** Choose the appropriate account type.\n   - **Enable/Disable WireProxy:** Toggle WireProxy on or off.\n   - **Uninstall WARP:** Remove the WARP application.\n\n**2.** 如果您已经安装了 warp，您可以使用以下命令卸载：\n\n   ```sh\n   warp u\n   ```\n\n**3.** 在面板中打开您需要的配置\n\n   配置:\n\n   - Block Ads\n   - Route Google, Netflix, Spotify, and OpenAI (ChatGPT) traffic to WARP\n   - Fix Google 403 error\n\n\n</details>\n\n------------\n## IP 限制\n\n<details>\n  <summary>点击查看 IP 限制</summary>\n\n#### 使用\n\n**注意：** 使用 IP 隧道时，IP 限制无法正常工作。\n\n- 对于 `v1.6.1`之前的版本 ：\n\n  - IP 限制 已被集成在面板中。\n\n- 对于 `v1.7.0` 以及更新的版本：\n\n  - 要使 IP 限制正常工作，您需要按照以下步骤安装 fail2ban 及其所需的文件：\n\n    1. 使用面板内置的 `x-ui` 指令\n    2. 选择 `IP Limit Management`.\n    3. 根据您的需要选择合适的选项。\n   \n  - 确保您的 Xray 配置上有 ./access.log 。在 v2.1.3 之后，我们有一个选项。\n  \n  ```sh\n    \"log\": {\n      \"access\": \"./access.log\",\n      \"dnsLog\": false,\n      \"loglevel\": \"warning\"\n    },\n    ```\n  - 您需要在Xray配置中手动设置〔访问日志〕的路径。\n\n</details>\n\n------------\n## Telegram 机器人\n\n<details>\n  <summary>点击查看 Telegram 机器人</summary>\n\n#### 使用\n\nWeb 面板通过 Telegram Bot 支持每日流量、面板登录、数据库备份、系统状态、客户端信息等通知和功能。要使用机器人，您需要在面板中设置机器人相关参数，包括：\n\n- 电报令牌\n- 管理员聊天 ID\n- 通知时间（cron 语法）\n- 到期日期通知\n- 流量上限通知\n- 数据库备份\n- CPU 负载通知\n\n\n**参考：**\n\n- `30 \\* \\* \\* \\* \\*` - 在每个点的 30 秒处通知\n- `0 \\*/10 \\* \\* \\* \\*` - 每 10 分钟的第一秒通知\n- `@hourly` - 每小时通知\n- `@daily` - 每天通知 (00:00)\n- `@weekly` - 每周通知\n- `@every 8h` - 每8小时通知\n\n### Telegram Bot 功能\n\n- 定期报告\n- 登录通知\n- CPU 阈值通知\n- 提前报告的过期时间和流量阈值\n- 如果将客户的电报用户名添加到用户的配置中，则支持客户端报告菜单\n- 支持使用UUID（VMESS/VLESS）或密码（TROJAN）搜索报文流量报告 - 匿名\n- 基于菜单的机器人\n- 通过电子邮件搜索客户端（仅限管理员）\n- 检查所有入库\n- 检查服务器状态\n- 检查耗尽的用户\n- 根据请求和定期报告接收备份\n- 多语言机器人\n\n### 注册 Telegram bot\n\n- 与 [Botfather](https://t.me/BotFather) 对话：\n    ![Botfather](./media/botfather.png)\n  \n- 使用 /newbot 创建新机器人：你需要提供机器人名称以及用户名，注意名称中末尾要包含“bot”\n    ![创建机器人](./media/newbot.png)\n\n- 启动您刚刚创建的机器人。可以在此处找到机器人的链接。\n    ![令牌](./media/token.png)\n\n- 输入您的面板并配置 Telegram 机器人设置，如下所示：\n    ![面板设置](./media/panel-bot-config.png)\n\n在输入字段编号 3 中输入机器人令牌。\n在输入字段编号 4 中输入用户 ID。具有此 id 的 Telegram 帐户将是机器人管理员。 （您可以输入多个，只需将它们用“ ，”分开即可）\n\n- 如何获取TG ID? 使用 [bot](https://t.me/useridinfobot)， 启动机器人，它会给你 Telegram 用户 ID。\n![用户 ID](./media/user-id.png)\n\n</details>\n\n------------\n## API 路由\n\n<details>\n  <summary>点击查看 API 路由</summary>\n\n#### 使用\n\n- `/login` 使用 `POST` 用户名称 & 密码： `{username: '', password: ''}` 登录\n- `/panel/api/inbounds` 以下操作的基础：\n\n| 方法   |  路径                               | 操作                                        |\n| :----: | ---------------------------------- | ------------------------------------------- |\n| `GET`  | `\"/list\"`                          | 获取所有入站                                 |\n| `GET`  | `\"/get/:id\"`                       | 获取所有入站以及inbound.id                   |\n| `GET`  | `\"/getClientTraffics/:email\"`      | 通过电子邮件获取客户端流量                    |\n| `GET`  | `\"/createbackup\"`                  | Telegram 机器人向管理员发送备份               |\n| `POST` | `\"/add\"`                           | 添加入站                                    |\n| `POST` | `\"/del/:id\"`                       | 删除入站                                    |\n| `POST` | `\"/update/:id\"`                    | 更新入站                                    |\n| `POST` | `\"/clientIps/:email\"`              | 客户端 IP 地址                              | \n| `POST` | `\"/clearClientIps/:email\"`         | 清除客户端 IP 地址                           |\n| `POST` | `\"/addClient\"`                     | 将客户端添加到入站                           |\n| `POST` | `\"/:id/delClient/:clientId\"`       | 通过 clientId\\* 删除客户端                   |\n| `POST` | `\"/updateClient/:clientId\"`        | 通过 clientId\\* 更新客户端                   |\n| `POST` | `\"/:id/resetClientTraffic/:email\"` | 重置客户端的流量                             |\n| `POST` | `\"/resetAllTraffics\"`              | 重置所有入站的流量                           |\n| `POST` | `\"/resetAllClientTraffics/:id\"`    | 重置入站中所有客户端的流量                    |\n| `POST` | `\"/delDepletedClients/:id\"`        | 删除入站耗尽的客户端 （-1： all）             |\n| `POST` | `\"/onlines\"`                       | 获取在线用户 （ 电子邮件列表 ）               |\n\n\\*- `clientId` 项应该使用下列数据\n\n- `client.id`  VMESS and VLESS\n- `client.password`  TROJAN\n- `client.email`  Shadowsocks\n\n\n- [API 文档](https://documenter.getpostman.com/view/16802678/2s9YkgD5jm)\n\n- [<img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\">](https://app.getpostman.com/run-collection/16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415%26entityType%3Dcollection%26workspaceId%3D2cd38c01-c851-4a15-a972-f181c23359d9)\n</details>\n\n------------\n## 环境变量\n\n<details>\n  <summary>点击查看 环境变量</summary>\n\n#### Usage\n\n| 变量            |                      Type                      | 默认          |\n| -------------- | :--------------------------------------------: | :------------ |\n| XUI_LOG_LEVEL  | `\"debug\"` \\| `\"info\"` \\| `\"warn\"` \\| `\"error\"` | `\"info\"`      |\n| XUI_DEBUG      |                   `boolean`                    | `false`       |\n| XUI_BIN_FOLDER |                    `string`                    | `\"bin\"`       |\n| XUI_DB_FOLDER  |                    `string`                    | `\"/etc/x-ui\"` |\n| XUI_LOG_FOLDER |                    `string`                    | `\"/var/log\"`  |\n\n例子：\n\n```sh\nXUI_BIN_FOLDER=\"bin\" XUI_DB_FOLDER=\"/etc/x-ui\" go build main.go\n```\n\n</details>\n\n------------\n## 预览\n\n![1](./media/1.png)\n![2](./media/2.png)\n![3](./media/3.png)\n![5](./media/5.png)\n![6](./media/6.png)\n![7](./media/7.png)\n\n------------\n## 广告赞助\n- 如果你觉得本项目对你有用，而且你也恰巧有这方面的需求，你也可以选择通过我的购买链接赞助我。\n- [搬瓦工GIA高端线路，仅推荐购买GIA套餐](https://bandwagonhost.com/aff.php?aff=75015)\n- [Dmit高端GIA线路](https://www.dmit.io/aff.php?aff=9326)\n- [白丝云【4837线路】实惠量大管饱](https://cloudsilk.io/aff.php?aff=706)\n\n------------\n## 特别感谢\n\n- [alireza0](https://github.com/alireza0/)\n\n------------\n## 致谢\n\n- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._\n- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._\n\n------------\n## Star 趋势\n\n[![Stargazers over time](https://starchart.cc/xeefei/3x-ui.svg)](https://starchart.cc/xeefei/3x-ui)\n"
  },
  {
    "path": "README.zh.md",
    "content": "[English](/README.md) | [Chinese](/README.zh.md) | [Español](/README.es_ES.md)\n\n<p align=\"center\"><a href=\"#\"><img src=\"./media/3X-UI.png\" alt=\"Image\"></a></p>\n\n**一个更好的面板 • 基于Xray Core构建**\n\n[![](https://img.shields.io/github/v/release/xeefei/3x-ui.svg)](https://github.com/xeefei/3x-ui/releases)\n[![](https://img.shields.io/github/actions/workflow/status/xeefei/3x-ui/release.yml.svg)](#)\n[![GO Version](https://img.shields.io/github/go-mod/go-version/xeefei/3x-ui.svg)](#)\n[![Downloads](https://img.shields.io/github/downloads/xeefei/3x-ui/total.svg)](#)\n[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\n> **Disclaimer:** 此项目仅供个人学习交流，请不要用于非法目的，请不要在生产环境中使用。\n\n**如果此项目对你有用，请给一个**:star2:\n\n<p align=\"left\"><a href=\"#\"><img width=\"125\" src=\"https://github.com/xeefei/3x-ui/assets/115543613/7aa895dd-048a-42e7-989b-afd41a74e2e1\" alt=\"Image\"></a></p>\n\n- USDT (TRC20): `TYQEmQp1P65u9bG7KPehgJdvuokfb72YkZ`\n\n## 安装 & 升级\n\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)\n```\n\n## 安装指定版本\n\n若需要安装指定的版本，请将该版本添加到安装命令的末尾。 e.g., ver `v2.3.6`:\n\n```\nbash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh) v2.3.6\n```\n\n## SSL 认证\n\n<details>\n  <summary>点击查看 SSL 认证</summary>\n\n### Cloudflare\n\n管理脚本具有用于 Cloudflare 的内置 SSL 证书应用程序。若要使用此脚本申请证书，需要满足以下条件：\n\n- Cloudflare 邮箱地址\n- Cloudflare Global API Key\n- 域名已通过 cloudflare 解析到当前服务器\n\n**1:** 在终端中运行`x-ui`， 选择 `Cloudflare SSL Certificate`.\n\n\n### Certbot\n```\napt-get install certbot -y\ncertbot certonly --standalone --agree-tos --register-unsafely-without-email -d yourdomain.com\ncertbot renew --dry-run\n```\n\n***Tip:*** *管理脚本具有 Certbot 。使用 `x-ui` 命令， 选择 `SSL Certificate Management`.*\n\n</details>\n\n## 手动安装 & 升级\n\n<details>\n  <summary>点击查看 手动安装 & 升级</summary>\n\n#### 使用\n\n1. 若要将最新版本的压缩包直接下载到服务器，请运行以下命令：\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\n\nwget https://github.com/xeefei/3x-ui/releases/latest/download/x-ui-linux-${XUI_ARCH}.tar.gz\n```\n\n2. 下载压缩包后，执行以下命令安装或升级 x-ui：\n\n```sh\nARCH=$(uname -m)\ncase \"${ARCH}\" in\n  x86_64 | x64 | amd64) XUI_ARCH=\"amd64\" ;;\n  i*86 | x86) XUI_ARCH=\"386\" ;;\n  armv8* | armv8 | arm64 | aarch64) XUI_ARCH=\"arm64\" ;;\n  armv7* | armv7) XUI_ARCH=\"armv7\" ;;\n  armv6* | armv6) XUI_ARCH=\"armv6\" ;;\n  armv5* | armv5) XUI_ARCH=\"armv5\" ;;\n  *) XUI_ARCH=\"amd64\" ;;\nesac\n\ncd /root/\nrm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui\ntar zxvf x-ui-linux-${XUI_ARCH}.tar.gz\nchmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh\ncp x-ui/x-ui.sh /usr/bin/x-ui\ncp -f x-ui/x-ui.service /etc/systemd/system/\nmv x-ui/ /usr/local/\nsystemctl daemon-reload\nsystemctl enable x-ui\nsystemctl restart x-ui\n```\n\n</details>\n\n## 通过Docker安装\n\n<details>\n  <summary>点击查看 通过Docker安装</summary>\n\n#### 使用\n\n1. 安装Docker：\n\n   ```sh\n   bash <(curl -sSL https://get.docker.com)\n   ```\n\n2. 克隆仓库：\n\n   ```sh\n   git clone https://github.com/xeefei/3x-ui.git\n   cd 3x-ui\n   ```\n\n3. 运行服务：\n\n   ```sh\n   docker compose up -d\n   ```\n\n   或\n\n   ```sh\n   docker run -itd \\\n      -e XRAY_VMESS_AEAD_FORCED=false \\\n      -v $PWD/db/:/etc/x-ui/ \\\n      -v $PWD/cert/:/root/cert/ \\\n      --network=host \\\n      --restart=unless-stopped \\\n      --name 3x-ui \\\n      ghcr.io/xeefei/3x-ui:latest\n   ```\n\n更新至最新版本\n\n   ```sh\n    cd 3x-ui\n    docker compose down\n    docker compose pull 3x-ui\n    docker compose up -d\n   ```\n\n从Docker中删除3x-ui \n\n   ```sh\n    docker stop 3x-ui\n    docker rm 3x-ui\n    cd --\n    rm -r 3x-ui\n   ```\n\n</details>\n\n\n## 建议使用的操作系统\n\n- Ubuntu 20.04+\n- Debian 11+\n- CentOS 8+\n- Fedora 36+\n- Arch Linux\n- Manjaro\n- Armbian\n- AlmaLinux 9+\n- Rockylinux 9+\n- OpenSUSE Tubleweed\n\n## 支持的架构和设备\n<details>\n  <summary>点击查看 支持的架构和设备</summary>\n\n我们的平台提供与各种架构和设备的兼容性，确保在各种计算环境中的灵活性。以下是我们支持的关键架构：\n\n- **amd64**: 这种流行的架构是个人计算机和服务器的标准，可以无缝地适应大多数现代操作系统。\n\n- **x86 / i386**: 这种架构在台式机和笔记本电脑中被广泛采用，得到了众多操作系统和应用程序的广泛支持，包括但不限于 Windows、macOS 和 Linux 系统。\n\n- **armv8 / arm64 / aarch64**: 这种架构专为智能手机和平板电脑等当代移动和嵌入式设备量身定制，以 Raspberry Pi 4、Raspberry Pi 3、Raspberry Pi Zero 2/Zero 2 W、Orange Pi 3 LTS 等设备为例。\n\n- **armv7 / arm / arm32**: 作为较旧的移动和嵌入式设备的架构，它仍然广泛用于Orange Pi Zero LTS、Orange Pi PC Plus、Raspberry Pi 2等设备。\n\n- **armv6 / arm / arm32**: 这种架构面向非常老旧的嵌入式设备，虽然不太普遍，但仍在使用中。Raspberry Pi 1、Raspberry Pi Zero/Zero W 等设备都依赖于这种架构。\n\n- **armv5 / arm / arm32**: 它是一种主要与早期嵌入式系统相关的旧架构，目前不太常见，但仍可能出现在早期 Raspberry Pi 版本和一些旧智能手机等传统设备中。\n</details>\n\n## Languages\n\n- English（英语）\n- Farsi（伊朗语）\n- Chinese（中文）\n- Russian（俄语）\n- Vietnamese（越南语）\n- Spanish（西班牙语）\n- Indonesian （印度尼西亚语）\n- Ukrainian（乌克兰语）\n\n\n## Features\n\n- 系统状态监控\n- 在所有入站和客户端中搜索\n- 深色/浅色主题\n- 支持多用户和多协议\n- 支持多种协议，包括 VMess、VLESS、Trojan、Shadowsocks、Dokodemo-door、Socks、HTTP、wireguard\n- 支持 XTLS 原生协议，包括 RPRX-Direct、Vision、REALITY\n- 流量统计、流量限制、过期时间限制\n- 可自定义的 Xray配置模板\n- 支持HTTPS访问面板（自建域名+SSL证书）\n- 支持一键式SSL证书申请和自动续费\n- 更多高级配置项目请参考面板\n- 修复了 API 路由（用户设置将使用 API 创建）\n- 支持通过面板中提供的不同项目更改配置。\n- 支持从面板导出/导入数据库\n\n\n## 默认设置\n\n<details>\n  <summary>点击查看 默认设置</summary>\n\n  ### 信息\n\n- **端口：** 2053\n- **用户名 & 密码：** 当您跳过设置时，此项会随机生成。\n- **数据库路径：**\n  - /etc/x-ui/x-ui.db\n- **Xray 配置路径：**\n  - /usr/local/x-ui/bin/config.json\n- **面板链接（无SSL）：**\n  - http://ip:2053/panel\n  - http://domain:2053/panel\n- **面板链接（有SSL）：**\n  - https://domain:2053/panel\n \n</details>\n\n## WARP 配置\n\n<details>\n  <summary>点击查看 WARP 配置</summary>\n\n#### 使用\n\n如果要在 v2.1.0 之前使用 WARP 路由，请按照以下步骤操作：\n\n**1.** 在 **SOCKS Proxy Mode** 模式中安装Wrap\n\n   ```sh\n   bash <(curl -sSL https://raw.githubusercontent.com/hamid-gh98/x-ui-scripts/main/install_warp_proxy.sh)\n   ```\n\n**2.** 如果您已经安装了 warp，您可以使用以下命令卸载：\n\n   ```sh\n   warp u\n   ```\n\n**3.** 在面板中打开您需要的配置\n\n   配置:\n\n   - Block Ads\n   - Route Google + Netflix + Spotify + OpenAI (ChatGPT) to WARP\n   - Fix Google 403 error\n\n</details>\n\n## IP 限制\n\n<details>\n  <summary>点击查看 IP 限制</summary>\n\n#### 使用\n\n**注意：** 使用 IP 隧道时，IP 限制无法正常工作。\n\n- 适用于最高 `v1.6.1` ：\n\n  - IP 限制 已被集成在面板中。\n\n- 适用于 `v1.7.0` 以及更新的版本：\n\n  - 要使 IP 限制正常工作，您需要按照以下步骤安装 fail2ban 及其所需的文件：\n\n    1. 使用面板内置的 `x-ui` 指令\n    2. 选择 `IP Limit Management`.\n    3. 根据您的需要选择合适的选项。\n   \n  - 确保您的 Xray 配置上有 ./access.log 。在 v2.1.3 之后，我们有一个选项。\n  \n  ```sh\n    \"log\": {\n      \"access\": \"./access.log\",\n      \"dnsLog\": false,\n      \"loglevel\": \"warning\"\n    },\n  ```\n\n</details>\n\n## Telegram 机器人\n\n<details>\n  <summary>点击查看 Telegram 机器人</summary>\n\n#### 使用\n\nWeb 面板通过 Telegram Bot 支持每日流量、面板登录、数据库备份、系统状态、客户端信息等通知和功能。要使用机器人，您需要在面板中设置机器人相关参数，包括：\n\n- 电报令牌\n- 管理员聊天 ID\n- 通知时间（cron 语法）\n- 到期日期通知\n- 流量上限通知\n- 数据库备份\n- CPU 负载通知\n\n\n**参考：**\n\n- `30 \\* \\* \\* \\* \\*` - 在每个点的 30 秒处通知\n- `0 \\*/10 \\* \\* \\* \\*` - 每 10 分钟的第一秒通知\n- `@hourly` - 每小时通知\n- `@daily` - 每天通知 (00:00)\n- `@weekly` - 每周通知\n- `@every 8h` - 每8小时通知\n\n### Telegram Bot 功能\n\n- 定期报告\n- 登录通知\n- CPU 阈值通知\n- 提前报告的过期时间和流量阈值\n- 如果将客户的电报用户名添加到用户的配置中，则支持客户端报告菜单\n- 支持使用UUID（VMESS/VLESS）或密码（TROJAN）搜索报文流量报告 - 匿名\n- 基于菜单的机器人\n- 通过电子邮件搜索客户端（仅限管理员）\n- 检查所有入库\n- 检查服务器状态\n- 检查耗尽的用户\n- 根据请求和定期报告接收备份\n- 多语言机器人\n\n### 注册 Telegram bot\n\n- 与 [Botfather](https://t.me/BotFather) 对话：\n    ![Botfather](./media/botfather.png)\n  \n- 使用 /newbot 创建新机器人：你需要提供机器人名称以及用户名，注意名称中末尾要包含“bot”\n    ![创建机器人](./media/newbot.png)\n\n- 启动您刚刚创建的机器人。可以在此处找到机器人的链接。\n    ![令牌](./media/token.png)\n\n- 输入您的面板并配置 Telegram 机器人设置，如下所示：\n    ![面板设置](./media/panel-bot-config.png)\n\n在输入字段编号 3 中输入机器人令牌。\n在输入字段编号 4 中输入用户 ID。具有此 id 的 Telegram 帐户将是机器人管理员。 （您可以输入多个，只需将它们用“ ，”分开即可）\n\n- 如何获取TG ID? 使用 [bot](https://t.me/useridinfobot)， 启动机器人，它会给你 Telegram 用户 ID。\n![用户 ID](./media/user-id.png)\n\n</details>\n\n## API 路由\n\n<details>\n  <summary>点击查看 API 路由</summary>\n\n#### 使用\n\n- `/login` 使用 `POST` 用户名称 & 密码： `{username: '', password: ''}` 登录\n- `/panel/api/inbounds` 以下操作的基础：\n\n|  方法  | 路径                               | 操作                              |\n| :----: | ---------------------------------- | --------------------------------- |\n| `GET`  | `\"/list\"`                          | 获取所有入站                      |\n| `GET`  | `\"/get/:id\"`                       | 获取所有入站以及inbound.id        |\n| `GET`  | `\"/getClientTraffics/:email\"`      | 通过电子邮件获取客户端流量        |\n| `GET`  | `\"/createbackup\"`                  | Telegram 机器人向管理员发送备份   |\n| `POST` | `\"/add\"`                           | 添加入站                          |\n| `POST` | `\"/del/:id\"`                       | 删除入站                          |\n| `POST` | `\"/update/:id\"`                    | 更新入站                          |\n| `POST` | `\"/clientIps/:email\"`              | 客户端 IP 地址                    |\n| `POST` | `\"/clearClientIps/:email\"`         | 清除客户端 IP 地址                |\n| `POST` | `\"/addClient\"`                     | 将客户端添加到入站                |\n| `POST` | `\"/:id/delClient/:clientId\"`       | 通过 clientId\\* 删除客户端        |\n| `POST` | `\"/updateClient/:clientId\"`        | 通过 clientId\\* 更新客户端        |\n| `POST` | `\"/:id/resetClientTraffic/:email\"` | 重置客户端的流量                  |\n| `POST` | `\"/resetAllTraffics\"`              | 重置所有入站的流量                |\n| `POST` | `\"/resetAllClientTraffics/:id\"`    | 重置入站中所有客户端的流量        |\n| `POST` | `\"/delDepletedClients/:id\"`        | 删除入站耗尽的客户端 （-1： all） |\n| `POST` | `\"/onlines\"`                       | 获取在线用户 （ 电子邮件列表 ）   |\n\n\\*- `clientId` 项应该使用下列数据\n\n- `client.id`  VMESS and VLESS\n- `client.password`  TROJAN\n- `client.email`  Shadowsocks\n\n\n- [API 文档](https://documenter.getpostman.com/view/16802678/2s9YkgD5jm)\n- [<img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In Postman\" style=\"width: 128px; height: 32px;\">](https://app.getpostman.com/run-collection/16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D16802678-1a4c9270-ac77-40ed-959a-7aa56dc4a415%26entityType%3Dcollection%26workspaceId%3D2cd38c01-c851-4a15-a972-f181c23359d9)\n</details>\n\n## 环境变量\n\n<details>\n  <summary>点击查看 环境变量</summary>\n\n#### Usage\n\n| 变量           |                      Type                      | 默认          |\n| -------------- | :--------------------------------------------: | :------------ |\n| XUI_LOG_LEVEL  | `\"debug\"` \\| `\"info\"` \\| `\"warn\"` \\| `\"error\"` | `\"info\"`      |\n| XUI_DEBUG      |                   `boolean`                    | `false`       |\n| XUI_BIN_FOLDER |                    `string`                    | `\"bin\"`       |\n| XUI_DB_FOLDER  |                    `string`                    | `\"/etc/x-ui\"` |\n| XUI_LOG_FOLDER |                    `string`                    | `\"/var/log\"`  |\n\n例子：\n\n```sh\nXUI_BIN_FOLDER=\"bin\" XUI_DB_FOLDER=\"/etc/x-ui\" go build main.go\n```\n\n</details>\n\n## 预览\n\n![1](./media/1.png)\n![2](./media/2.png)\n![3](./media/3.png)\n![4](./media/4.png)\n![5](./media/5.png)\n![6](./media/6.png)\n![7](./media/7.png)\n\n## 特别感谢\n\n- [alireza0](https://github.com/alireza0/)\n\n## 致谢\n\n- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._\n- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._\n\n## Star趋势\n\n[![Stargazers over time](https://starchart.cc/xeefei/3x-ui.svg)](https://starchart.cc/xeefei/3x-ui)\n"
  },
  {
    "path": "config/config.go",
    "content": "package config\n\nimport (\n\t_ \"embed\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n)\n\n//go:embed version\nvar version string\n\n//go:embed name\nvar name string\n\ntype LogLevel string\n\nconst (\n\tDebug  LogLevel = \"debug\"\n\tInfo   LogLevel = \"info\"\n\tNotice LogLevel = \"notice\"\n\tWarn   LogLevel = \"warn\"\n\tError  LogLevel = \"error\"\n)\n\nfunc GetVersion() string {\n\treturn strings.TrimSpace(version)\n}\n\nfunc GetName() string {\n\treturn strings.TrimSpace(name)\n}\n\nfunc GetLogLevel() LogLevel {\n\tif IsDebug() {\n\t\treturn Debug\n\t}\n\tlogLevel := os.Getenv(\"XUI_LOG_LEVEL\")\n\tif logLevel == \"\" {\n\t\treturn Info\n\t}\n\treturn LogLevel(logLevel)\n}\n\nfunc IsDebug() bool {\n\treturn os.Getenv(\"XUI_DEBUG\") == \"true\"\n}\n\nfunc GetBinFolderPath() string {\n\tbinFolderPath := os.Getenv(\"XUI_BIN_FOLDER\")\n\tif binFolderPath == \"\" {\n\t\tbinFolderPath = \"bin\"\n\t}\n\treturn binFolderPath\n}\n\nfunc GetDBFolderPath() string {\n\tdbFolderPath := os.Getenv(\"XUI_DB_FOLDER\")\n\tif dbFolderPath == \"\" {\n\t\tdbFolderPath = \"/etc/x-ui\"\n\t}\n\treturn dbFolderPath\n}\n\nfunc GetDBPath() string {\n\treturn fmt.Sprintf(\"%s/%s.db\", GetDBFolderPath(), GetName())\n}\n\nfunc GetLogFolder() string {\n\tlogFolderPath := os.Getenv(\"XUI_LOG_FOLDER\")\n\tif logFolderPath == \"\" {\n\t\tlogFolderPath = \"/var/log\"\n\t}\n\treturn logFolderPath\n}\n"
  },
  {
    "path": "config/name",
    "content": "x-ui"
  },
  {
    "path": "config/version",
    "content": "2.3.8"
  },
  {
    "path": "database/db.go",
    "content": "package database\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path\"\n\n\t\"x-ui/config\"\n\t\"x-ui/database/model\"\n\t\"x-ui/xray\"\n\n\t\"gorm.io/driver/sqlite\"\n\t\"gorm.io/gorm\"\n\t\"gorm.io/gorm/logger\"\n)\n\nvar db *gorm.DB\n\nvar initializers = []func() error{\n\tinitUser,\n\tinitInbound,\n\tinitOutbound,\n\tinitSetting,\n\tinitInboundClientIps,\n\tinitClientTraffic,\n}\n\nfunc initUser() error {\n\terr := db.AutoMigrate(&model.User{})\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar count int64\n\terr = db.Model(&model.User{}).Count(&count).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\tif count == 0 {\n\t\tuser := &model.User{\n\t\t\tUsername:    \"admin\",\n\t\t\tPassword:    \"admin\",\n\t\t\tLoginSecret: \"\",\n\t\t}\n\t\treturn db.Create(user).Error\n\t}\n\treturn nil\n}\n\nfunc initInbound() error {\n\treturn db.AutoMigrate(&model.Inbound{})\n}\n\nfunc initOutbound() error {\n\treturn db.AutoMigrate(&model.OutboundTraffics{})\n}\n\nfunc initSetting() error {\n\treturn db.AutoMigrate(&model.Setting{})\n}\n\nfunc initInboundClientIps() error {\n\treturn db.AutoMigrate(&model.InboundClientIps{})\n}\n\nfunc initClientTraffic() error {\n\treturn db.AutoMigrate(&xray.ClientTraffic{})\n}\n\nfunc InitDB(dbPath string) error {\n\tdir := path.Dir(dbPath)\n\terr := os.MkdirAll(dir, fs.ModePerm)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar gormLogger logger.Interface\n\n\tif config.IsDebug() {\n\t\tgormLogger = logger.Default\n\t} else {\n\t\tgormLogger = logger.Discard\n\t}\n\n\tc := &gorm.Config{\n\t\tLogger: gormLogger,\n\t}\n\tdb, err = gorm.Open(sqlite.Open(dbPath), c)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, initialize := range initializers {\n\t\tif err := initialize(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc GetDB() *gorm.DB {\n\treturn db\n}\n\nfunc IsNotFound(err error) bool {\n\treturn err == gorm.ErrRecordNotFound\n}\n\nfunc IsSQLiteDB(file io.ReaderAt) (bool, error) {\n\tsignature := []byte(\"SQLite format 3\\x00\")\n\tbuf := make([]byte, len(signature))\n\t_, err := file.ReadAt(buf, 0)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn bytes.Equal(buf, signature), nil\n}\n\nfunc Checkpoint() error {\n\t// Update WAL\n\terr := db.Exec(\"PRAGMA wal_checkpoint;\").Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "database/model/model.go",
    "content": "package model\n\nimport (\n\t\"fmt\"\n\n\t\"x-ui/util/json_util\"\n\t\"x-ui/xray\"\n)\n\ntype Protocol string\n\nconst (\n\tVMess       Protocol = \"vmess\"\n\tVLESS       Protocol = \"vless\"\n\tDOKODEMO    Protocol = \"dokodemo-door\"\n\tHTTP        Protocol = \"http\"\n\tTrojan      Protocol = \"trojan\"\n\tShadowsocks Protocol = \"shadowsocks\"\n\tSocks       Protocol = \"socks\"\n\tWireGuard   Protocol = \"wireguard\"\n)\n\ntype User struct {\n\tId          int    `json:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tUsername    string `json:\"username\"`\n\tPassword    string `json:\"password\"`\n\tLoginSecret string `json:\"loginSecret\"`\n}\n\ntype Inbound struct {\n\tId          int                  `json:\"id\" form:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tUserId      int                  `json:\"-\"`\n\tUp          int64                `json:\"up\" form:\"up\"`\n\tDown        int64                `json:\"down\" form:\"down\"`\n\tTotal       int64                `json:\"total\" form:\"total\"`\n\tRemark      string               `json:\"remark\" form:\"remark\"`\n\tEnable      bool                 `json:\"enable\" form:\"enable\"`\n\tExpiryTime  int64                `json:\"expiryTime\" form:\"expiryTime\"`\n\tClientStats []xray.ClientTraffic `gorm:\"foreignKey:InboundId;references:Id\" json:\"clientStats\" form:\"clientStats\"`\n\n\t// config part\n\tListen         string   `json:\"listen\" form:\"listen\"`\n\tPort           int      `json:\"port\" form:\"port\"`\n\tProtocol       Protocol `json:\"protocol\" form:\"protocol\"`\n\tSettings       string   `json:\"settings\" form:\"settings\"`\n\tStreamSettings string   `json:\"streamSettings\" form:\"streamSettings\"`\n\tTag            string   `json:\"tag\" form:\"tag\" gorm:\"unique\"`\n\tSniffing       string   `json:\"sniffing\" form:\"sniffing\"`\n}\n\ntype OutboundTraffics struct {\n\tId    int    `json:\"id\" form:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tTag   string `json:\"tag\" form:\"tag\" gorm:\"unique\"`\n\tUp    int64  `json:\"up\" form:\"up\" gorm:\"default:0\"`\n\tDown  int64  `json:\"down\" form:\"down\" gorm:\"default:0\"`\n\tTotal int64  `json:\"total\" form:\"total\" gorm:\"default:0\"`\n}\n\ntype InboundClientIps struct {\n\tId          int    `json:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tClientEmail string `json:\"clientEmail\" form:\"clientEmail\" gorm:\"unique\"`\n\tIps         string `json:\"ips\" form:\"ips\"`\n}\n\nfunc (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {\n\tlisten := i.Listen\n\tif listen != \"\" {\n\t\tlisten = fmt.Sprintf(\"\\\"%v\\\"\", listen)\n\t}\n\treturn &xray.InboundConfig{\n\t\tListen:         json_util.RawMessage(listen),\n\t\tPort:           i.Port,\n\t\tProtocol:       string(i.Protocol),\n\t\tSettings:       json_util.RawMessage(i.Settings),\n\t\tStreamSettings: json_util.RawMessage(i.StreamSettings),\n\t\tTag:            i.Tag,\n\t\tSniffing:       json_util.RawMessage(i.Sniffing),\n\t}\n}\n\ntype Setting struct {\n\tId    int    `json:\"id\" form:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tKey   string `json:\"key\" form:\"key\"`\n\tValue string `json:\"value\" form:\"value\"`\n}\n\ntype Client struct {\n\tID         string `json:\"id\"`\n\tPassword   string `json:\"password\"`\n\tFlow       string `json:\"flow\"`\n\tEmail      string `json:\"email\"`\n\tLimitIP    int    `json:\"limitIp\"`\n\tTotalGB    int64  `json:\"totalGB\" form:\"totalGB\"`\n\tExpiryTime int64  `json:\"expiryTime\" form:\"expiryTime\"`\n\tEnable     bool   `json:\"enable\" form:\"enable\"`\n\tTgID       int64  `json:\"tgId\" form:\"tgId\"`\n\tSubID      string `json:\"subId\" form:\"subId\"`\n\tReset      int    `json:\"reset\" form:\"reset\"`\n}\n"
  },
  {
    "path": "docker-compose.yml",
    "content": "---\nversion: \"3\"\n\nservices:\n  3x-ui:\n    image: ghcr.io/xeefei/3x-ui:latest\n    container_name: 3x-ui\n    hostname: yourhostname\n    volumes:\n      - $PWD/db/:/etc/x-ui/\n      - $PWD/cert/:/root/cert/\n    environment:\n      XRAY_VMESS_AEAD_FORCED: \"false\"\n    tty: true\n    network_mode: host\n    restart: unless-stopped\n"
  },
  {
    "path": "go.mod",
    "content": "module x-ui\n\ngo 1.22.4\n\nrequire (\n\tgithub.com/gin-contrib/gzip v1.0.1\n\tgithub.com/gin-contrib/sessions v1.0.1\n\tgithub.com/gin-gonic/gin v1.10.0\n\tgithub.com/goccy/go-json v0.10.3\n\tgithub.com/mymmrac/telego v0.31.0\n\tgithub.com/nicksnyder/go-i18n/v2 v2.4.0\n\tgithub.com/op/go-logging v0.0.0-20160315200505-970db520ece7\n\tgithub.com/pelletier/go-toml/v2 v2.2.2\n\tgithub.com/robfig/cron/v3 v3.0.1\n\tgithub.com/shirou/gopsutil/v4 v4.24.6\n\tgithub.com/valyala/fasthttp v1.55.0\n\tgithub.com/xtls/xray-core v1.8.17\n\tgo.uber.org/atomic v1.11.0\n\tgolang.org/x/text v0.16.0\n\tgoogle.golang.org/grpc v1.65.0\n\tgorm.io/driver/sqlite v1.5.6\n\tgorm.io/gorm v1.25.11\n)\n\nrequire (\n\tgithub.com/andybalholm/brotli v1.1.0 // indirect\n\tgithub.com/bytedance/sonic v1.11.9 // indirect\n\tgithub.com/bytedance/sonic/loader v0.1.1 // indirect\n\tgithub.com/cloudflare/circl v1.3.9 // indirect\n\tgithub.com/cloudwego/base64x v0.1.4 // indirect\n\tgithub.com/cloudwego/iasm v0.2.0 // indirect\n\tgithub.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 // indirect\n\tgithub.com/fasthttp/router v1.5.2 // indirect\n\tgithub.com/francoispqt/gojay v1.2.13 // indirect\n\tgithub.com/gabriel-vasile/mimetype v1.4.4 // indirect\n\tgithub.com/gin-contrib/sse v0.1.0 // indirect\n\tgithub.com/go-ole/go-ole v1.3.0 // indirect\n\tgithub.com/go-playground/locales v0.14.1 // indirect\n\tgithub.com/go-playground/universal-translator v0.18.1 // indirect\n\tgithub.com/go-playground/validator/v10 v10.22.0 // indirect\n\tgithub.com/go-task/slim-sprig/v3 v3.0.0 // indirect\n\tgithub.com/google/btree v1.1.2 // indirect\n\tgithub.com/google/pprof v0.0.0-20240528025155-186aa0362fba // indirect\n\tgithub.com/gorilla/context v1.1.2 // indirect\n\tgithub.com/gorilla/securecookie v1.1.2 // indirect\n\tgithub.com/gorilla/sessions v1.2.2 // indirect\n\tgithub.com/gorilla/websocket v1.5.3 // indirect\n\tgithub.com/grbit/go-json v0.11.0 // indirect\n\tgithub.com/jinzhu/inflection v1.0.0 // indirect\n\tgithub.com/jinzhu/now v1.1.5 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/klauspost/compress v1.17.9 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.2.8 // indirect\n\tgithub.com/leodido/go-urn v1.4.0 // indirect\n\tgithub.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/mattn/go-sqlite3 v1.14.22 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect\n\tgithub.com/modern-go/reflect2 v1.0.2 // indirect\n\tgithub.com/onsi/ginkgo/v2 v2.19.0 // indirect\n\tgithub.com/pires/go-proxyproto v0.7.0 // indirect\n\tgithub.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect\n\tgithub.com/quic-go/quic-go v0.45.1 // indirect\n\tgithub.com/refraction-networking/utls v1.6.7 // indirect\n\tgithub.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect\n\tgithub.com/rogpeppe/go-internal v1.11.0 // indirect\n\tgithub.com/sagernet/sing v0.4.1 // indirect\n\tgithub.com/sagernet/sing-shadowsocks v0.2.7 // indirect\n\tgithub.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38 // indirect\n\tgithub.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb // indirect\n\tgithub.com/shoenig/go-m1cpu v0.1.6 // indirect\n\tgithub.com/tklauser/go-sysconf v0.3.12 // indirect\n\tgithub.com/tklauser/numcpus v0.6.1 // indirect\n\tgithub.com/twitchyliquid64/golang-asm v0.15.1 // indirect\n\tgithub.com/ugorji/go/codec v1.2.12 // indirect\n\tgithub.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect\n\tgithub.com/valyala/bytebufferpool v1.0.0 // indirect\n\tgithub.com/valyala/fastjson v1.6.4 // indirect\n\tgithub.com/vishvananda/netlink v1.2.1-beta.2.0.20230316163032-ced5aaba43e3 // indirect\n\tgithub.com/vishvananda/netns v0.0.4 // indirect\n\tgithub.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d // indirect\n\tgithub.com/yusufpapurcu/wmi v1.2.4 // indirect\n\tgo.uber.org/mock v0.4.0 // indirect\n\tgo4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect\n\tgolang.org/x/arch v0.8.0 // indirect\n\tgolang.org/x/crypto v0.25.0 // indirect\n\tgolang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect\n\tgolang.org/x/mod v0.18.0 // indirect\n\tgolang.org/x/net v0.27.0 // indirect\n\tgolang.org/x/sys v0.22.0 // indirect\n\tgolang.org/x/time v0.5.0 // indirect\n\tgolang.org/x/tools v0.22.0 // indirect\n\tgolang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect\n\tgolang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect\n\tgoogle.golang.org/protobuf v1.34.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n\tgvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489 // indirect\n\tlukechampine.com/blake3 v1.3.0 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=\ndmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=\ndmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=\ndmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=\ndmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=\ngit.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=\ngithub.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=\ngithub.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=\ngithub.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=\ngithub.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=\ngithub.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=\ngithub.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=\ngithub.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=\ngithub.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=\ngithub.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=\ngithub.com/bytedance/sonic v1.11.9 h1:LFHENlIY/SLzDWverzdOvgMztTxcfcF+cqNsz9pK5zg=\ngithub.com/bytedance/sonic v1.11.9/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=\ngithub.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=\ngithub.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE=\ngithub.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=\ngithub.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=\ngithub.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=\ngithub.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=\ngithub.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=\ngithub.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=\ngithub.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0=\ngithub.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=\ngithub.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=\ngithub.com/fasthttp/router v1.5.2 h1:ckJCCdV7hWkkrMeId3WfEhz+4Gyyf6QPwxi/RHIMZ6I=\ngithub.com/fasthttp/router v1.5.2/go.mod h1:C8EY53ozOwpONyevc/V7Gr8pqnEjwnkFFqPo1alAGs0=\ngithub.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=\ngithub.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=\ngithub.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I=\ngithub.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4=\ngithub.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=\ngithub.com/gin-contrib/gzip v1.0.1 h1:HQ8ENHODeLY7a4g1Au/46Z92bdGFl74OhxcZble9WJE=\ngithub.com/gin-contrib/gzip v1.0.1/go.mod h1:njt428fdUNRvjuJf16tZMYZ2Yl+WQB53X5wmhDwXvC4=\ngithub.com/gin-contrib/sessions v1.0.1 h1:3hsJyNs7v7N8OtelFmYXFrulAf6zSR7nW/putcPEHxI=\ngithub.com/gin-contrib/sessions v1.0.1/go.mod h1:ouxSFM24/OgIud5MJYQJLpy6AwxQ5EYO9yLhbtObGkM=\ngithub.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=\ngithub.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=\ngithub.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=\ngithub.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=\ngithub.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=\ngithub.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=\ngithub.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=\ngithub.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=\ngithub.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=\ngithub.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=\ngithub.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=\ngithub.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=\ngithub.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=\ngithub.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=\ngithub.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=\ngithub.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=\ngithub.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao=\ngithub.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=\ngithub.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=\ngithub.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=\ngithub.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=\ngithub.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=\ngithub.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U=\ngithub.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=\ngithub.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=\ngithub.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=\ngithub.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g=\ngithub.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=\ngithub.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=\ngithub.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o=\ngithub.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM=\ngithub.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=\ngithub.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=\ngithub.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY=\ngithub.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ=\ngithub.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=\ngithub.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/grbit/go-json v0.11.0 h1:bAbyMdYrYl/OjYsSqLH99N2DyQ291mHy726Mx+sYrnc=\ngithub.com/grbit/go-json v0.11.0/go.mod h1:IYpHsdybQ386+6g3VE6AXQ3uTGa5mquBme5/ZWmtzek=\ngithub.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=\ngithub.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=\ngithub.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=\ngithub.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=\ngithub.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=\ngithub.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=\ngithub.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=\ngithub.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=\ngithub.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=\ngithub.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=\ngithub.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=\ngithub.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=\ngithub.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=\ngithub.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=\ngithub.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=\ngithub.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=\ngithub.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed h1:036IscGBfJsFIgJQzlui7nK1Ncm0tp2ktmPj8xO4N/0=\ngithub.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k=\ngithub.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=\ngithub.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=\ngithub.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=\ngithub.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=\ngithub.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs=\ngithub.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=\ngithub.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/mymmrac/telego v0.31.0 h1:vsN+JCNkh7Z9vfL/2/AHZ2xBsRk2GCMj3zydjCxkgIc=\ngithub.com/mymmrac/telego v0.31.0/go.mod h1:MuqgVf2xXnIOWZs0prvsp3f4Yss80kCSjVEj4CRl7Ig=\ngithub.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=\ngithub.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=\ngithub.com/nicksnyder/go-i18n/v2 v2.4.0 h1:3IcvPOAvnCKwNm0TB0dLDTuawWEj+ax/RERNC+diLMM=\ngithub.com/nicksnyder/go-i18n/v2 v2.4.0/go.mod h1:nxYSZE9M0bf3Y70gPQjN9ha7XNHX7gMc814+6wVyEI4=\ngithub.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=\ngithub.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=\ngithub.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=\ngithub.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=\ngithub.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=\ngithub.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=\ngithub.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=\ngithub.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=\ngithub.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=\ngithub.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=\ngithub.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=\ngithub.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=\ngithub.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=\ngithub.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=\ngithub.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/quic-go/quic-go v0.45.1 h1:tPfeYCk+uZHjmDRwHHQmvHRYL2t44ROTujLeFVBmjCA=\ngithub.com/quic-go/quic-go v0.45.1/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI=\ngithub.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM=\ngithub.com/refraction-networking/utls v1.6.7/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=\ngithub.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=\ngithub.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s=\ngithub.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=\ngithub.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=\ngithub.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=\ngithub.com/sagernet/sing v0.4.1 h1:zVlpE+7k7AFoC2pv6ReqLf0PIHjihL/jsBl5k05PQFk=\ngithub.com/sagernet/sing v0.4.1/go.mod h1:ieZHA/+Y9YZfXs2I3WtuwgyCZ6GPsIR7HdKb1SdEnls=\ngithub.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=\ngithub.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=\ngithub.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38 h1:D0vL7YNisV2yqE55+q0lFuGse6U8lxlg7fYTctlT5Gc=\ngithub.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38/go.mod h1:sM7Mt7uEoCeFSCBM+qBrqvEo+/9vdmj19wzp3yzUhmg=\ngithub.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIOUX+osiMraVgIrMR27uMXnRJWGm1+GL8/63U=\ngithub.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/shirou/gopsutil/v4 v4.24.6 h1:9qqCSYF2pgOU+t+NgJtp7Co5+5mHF/HyKBUckySQL64=\ngithub.com/shirou/gopsutil/v4 v4.24.6/go.mod h1:aoebb2vxetJ/yIDZISmduFvVNPHqXQ9SEJwRXxkf0RA=\ngithub.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=\ngithub.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=\ngithub.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=\ngithub.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=\ngithub.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=\ngithub.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=\ngithub.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=\ngithub.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=\ngithub.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=\ngithub.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=\ngithub.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI=\ngithub.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=\ngithub.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag=\ngithub.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg=\ngithub.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw=\ngithub.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y=\ngithub.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=\ngithub.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q=\ngithub.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ=\ngithub.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I=\ngithub.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0=\ngithub.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=\ngithub.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=\ngithub.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=\ngithub.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=\ngithub.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=\ngithub.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=\ngithub.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=\ngithub.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=\ngithub.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=\ngithub.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=\ngithub.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=\ngithub.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=\ngithub.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e h1:5QefA066A1tF8gHIiADmOVOV5LS43gt3ONnlEl3xkwI=\ngithub.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e/go.mod h1:5t19P9LBIrNamL6AcMQOncg/r10y3Pc01AbHeMhwlpU=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8=\ngithub.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM=\ngithub.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=\ngithub.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=\ngithub.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=\ngithub.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=\ngithub.com/vishvananda/netlink v1.2.1-beta.2.0.20230316163032-ced5aaba43e3 h1:tkMT5pTye+1NlKIXETU78NXw0fyjnaNHmJyyLyzw8+U=\ngithub.com/vishvananda/netlink v1.2.1-beta.2.0.20230316163032-ced5aaba43e3/go.mod h1:cAAsePK2e15YDAMJNyOpGYEWNe4sIghTY7gpz4cX/Ik=\ngithub.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=\ngithub.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=\ngithub.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=\ngithub.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg=\ngithub.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=\ngithub.com/xtls/xray-core v1.8.17 h1:T+A/hkBB33P0sEGXDiuKrQMZUOYxbZ84JlsYfyRiK8w=\ngithub.com/xtls/xray-core v1.8.17/go.mod h1:qEVGJD2suPN7EArG3r5EX6pYGV0QLiSRTlDMn0paJkc=\ngithub.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=\ngithub.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=\ngo.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=\ngo.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=\ngo.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=\ngo.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=\ngo.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=\ngo4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=\ngo4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=\ngo4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=\ngolang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=\ngolang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=\ngolang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=\ngolang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=\ngolang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=\ngolang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=\ngolang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=\ngolang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=\ngolang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=\ngolang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=\ngolang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=\ngolang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=\ngolang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=\ngolang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=\ngolang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=\ngolang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=\ngolang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=\ngolang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=\ngolang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 h1:/jFs0duh4rdb8uIfPMv78iAJGcPKDeqAFnaLBropIC4=\ngolang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173/go.mod h1:tkCQ4FQXmpAgYVh++1cq16/dH4QJtmvpRv19DWGAHSA=\ngoogle.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=\ngoogle.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=\ngoogle.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=\ngoogle.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=\ngoogle.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=\ngoogle.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=\ngoogle.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=\ngoogle.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=\ngoogle.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=\ngoogle.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE=\ngorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=\ngorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg=\ngorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=\ngrpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=\ngvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489 h1:ze1vwAdliUAr68RQ5NtufWaXaOg8WUO2OACzEV+TNdE=\ngvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489/go.mod h1:10sU+Uh5KKNv1+2x2A0Gvzt8FjD3ASIhorV3YsauXhk=\nhonnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nlukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=\nlukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=\nnullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=\nrsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=\nsourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=\nsourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=\n"
  },
  {
    "path": "install.sh",
    "content": "#!/bin/bash\n\nred='\\033[0;31m'\ngreen='\\033[0;32m'\nyellow='\\033[0;33m'\nplain='\\033[0m'\n\ncur_dir=$(pwd)\n\n# check root\n[[ $EUID -ne 0 ]] && echo -e \"${red}致命错误: ${plain} 请使用 root 权限运行此脚本\\n\" && exit 1\n\n# Check OS and set release variable\nif [[ -f /etc/os-release ]]; then\n    source /etc/os-release\n    release=$ID\nelif [[ -f /usr/lib/os-release ]]; then\n    source /usr/lib/os-release\n    release=$ID\nelse\n    echo \"\"\n    echo -e \"${red}检查服务器操作系统失败，请联系作者!${plain}\" >&2\n    exit 1\nfi\necho \"\"\necho -e \"${green}---------->>>>>目前服务器的操作系统为: $release${plain}\"\n\narch() {\n    case \"$(uname -m)\" in\n        x86_64 | x64 | amd64 ) echo 'amd64' ;;\n        i*86 | x86 ) echo '386' ;;\n        armv8* | armv8 | arm64 | aarch64 ) echo 'arm64' ;;\n        armv7* | armv7 | arm ) echo 'armv7' ;;\n        armv6* | armv6 ) echo 'armv6' ;;\n        armv5* | armv5 ) echo 'armv5' ;;\n        armv5* | armv5 ) echo 's390x' ;;\n        *) echo -e \"${green}不支持的CPU架构! ${plain}\" && rm -f install.sh && exit 1 ;;\n    esac\n}\n\necho \"\"\necho -e \"${yellow}---------->>>>>当前系统的架构为: $(arch)${plain}\"\necho \"\"\nlast_version=$(curl -Ls \"https://api.github.com/repos/gm-cx/releases/latest\" | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\\1/')\n# 获取 x-ui 版本\nxui_version=$(/usr/local/x-ui/x-ui -v)\n\n# 检查 xui_version 是否为空\nif [[ -z \"$xui_version\" ]]; then\n    echo \"\"\n    echo -e \"${red}------>>>当前服务器没有安装任何 x-ui 系列代理面板${plain}\"\n    echo \"\"\n    echo -e \"${green}-------->>>>片刻之后脚本将会自动引导安装〔3X-UI优化版〕${plain}\"\nelse\n    # 检查版本号中是否包含冒号\n    if [[ \"$xui_version\" == *:* ]]; then\n        echo -e \"${green}---------->>>>>当前代理面板的版本为: ${red}其他 x-ui 分支版本${plain}\"\n        echo \"\"\n        echo -e \"${green}-------->>>>片刻之后脚本将会自动引导安装〔3X-UI优化版〕${plain}\"\n    else\n        echo -e \"${green}---------->>>>>当前代理面板的版本为: ${red}〔3X-UI优化版〕v${xui_version}${plain}\"\n    fi\nfi\necho \"\"\necho -e \"${yellow}---------------------->>>>>〔3X-UI优化版〕最新版为：${last_version}${plain}\"\nsleep 4\n\nos_version=$(grep -i version_id /etc/os-release | cut -d \\\" -f2 | cut -d . -f1)\n\nif [[ \"${release}\" == \"arch\" ]]; then\n    echo \"您的操作系统是 ArchLinux\"\nelif [[ \"${release}\" == \"manjaro\" ]]; then\n    echo \"您的操作系统是 Manjaro\"\nelif [[ \"${release}\" == \"armbian\" ]]; then\n    echo \"您的操作系统是 Armbian\"\nelif [[ \"${release}\" == \"alpine\" ]]; then\n    echo \"您的操作系统是 Alpine Linux\"\nelif [[ \"${release}\" == \"opensuse-tumbleweed\" ]]; then\n    echo \"您的操作系统是 OpenSUSE Tumbleweed\"\nelif [[ \"${release}\" == \"centos\" ]]; then\n    if [[ ${os_version} -lt 8 ]]; then\n        echo -e \"${red} 请使用 CentOS 8 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"ubuntu\" ]]; then\n    if [[ ${os_version} -lt 20 ]]; then\n        echo -e \"${red} 请使用 Ubuntu 20 或更高版本!${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"fedora\" ]]; then\n    if [[ ${os_version} -lt 36 ]]; then\n        echo -e \"${red} 请使用 Fedora 36 或更高版本!${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"debian\" ]]; then\n    if [[ ${os_version} -lt 11 ]]; then\n        echo -e \"${red} 请使用 Debian 11 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"almalinux\" ]]; then\n    if [[ ${os_version} -lt 9 ]]; then\n        echo -e \"${red} 请使用 AlmaLinux 9 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"rocky\" ]]; then\n    if [[ ${os_version} -lt 9 ]]; then\n        echo -e \"${red} 请使用 RockyLinux 9 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"oracle\" ]]; then\n    if [[ ${os_version} -lt 8 ]]; then\n        echo -e \"${red} 请使用 Oracle Linux 8 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelse\n    echo -e \"${red}此脚本不支持您的操作系统。${plain}\\n\"\n    echo \"请确保您使用的是以下受支持的操作系统之一：\"\n    echo \"- Ubuntu 20.04+\"\n    echo \"- Debian 11+\"\n    echo \"- CentOS 8+\"\n    echo \"- Fedora 36+\"\n    echo \"- Arch Linux\"\n    echo \"- Manjaro\"\n    echo \"- Armbian\"\n    echo \"- Alpine Linux\"\n    echo \"- AlmaLinux 9+\"\n    echo \"- Rocky Linux 9+\"\n    echo \"- Oracle Linux 8+\"\n    echo \"- OpenSUSE Tumbleweed\"\n    exit 1\n\nfi\n\ninstall_base() {\n    case \"${release}\" in\n    ubuntu | debian | armbian)\n        apt-get update && apt-get install -y -q wget curl tar tzdata\n        ;;\n    centos | almalinux | rocky | oracle)\n        yum -y update && yum install -y -q wget curl tar tzdata\n        ;;\n    fedora)\n        dnf -y update && dnf install -y -q wget curl tar tzdata\n        ;;\n    arch | manjaro)\n        pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata\n        ;;\n    alpine)\n        apk update && apk add --no-cache wget curl tar tzdata\n        ;;\n    opensuse-tumbleweed)\n        zypper refresh && zypper -q install -y wget curl tar timezone\n        ;;\n    *)\n        apt-get update && apt install -y -q wget curl tar tzdata\n        ;;\n    esac\n}\n\ngen_random_string() {\n    local length=\"$1\"\n    local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w \"$length\" | head -n 1)\n    echo \"$random_string\"\n}\n\n# This function will be called when user installed x-ui out of security\nconfig_after_install() {\n    echo -e \"${yellow}安装/更新完成！ 为了您的面板安全，建议修改面板设置 ${plain}\"\n    echo \"\"\n    read -p \"$(echo -e \"${green}想继续修改吗？${red}选择“n”以保留旧设置${plain} [y/n]？--->>请输入：\")\" config_confirm\n    if [[ \"${config_confirm}\" == \"y\" || \"${config_confirm}\" == \"Y\" ]]; then\n        read -p \"请设置您的用户名: \" config_account\n        echo -e \"${yellow}您的用户名将是: ${config_account}${plain}\"\n        read -p \"请设置您的密码: \" config_password\n        echo -e \"${yellow}您的密码将是: ${config_password}${plain}\"\n        read -p \"请设置面板端口: \" config_port\n        echo -e \"${yellow}您的面板端口号为: ${config_port}${plain}\"\n        read -p \"请设置面板登录访问路径（访问方式演示：ip:端口号/路径/）: \" config_webBasePath\n        echo -e \"${yellow}您的面板访问路径为: ${config_webBasePath}${plain}\"\n        echo -e \"${yellow}正在初始化，请稍候...${plain}\"\n        /usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password}\n        echo -e \"${yellow}用户名和密码设置成功!${plain}\"\n        /usr/local/x-ui/x-ui setting -port ${config_port}\n        echo -e \"${yellow}面板端口号设置成功!${plain}\"\n        /usr/local/x-ui/x-ui setting -webBasePath ${config_webBasePath}\n        echo -e \"${yellow}面板登录访问路径设置成功!${plain}\"\n        echo \"\"\n    else\n        echo \"\"\n        sleep 1\n        echo -e \"${red}--------------->>>>Cancel...--------------->>>>>>>取消修改...${plain}\"\n        echo \"\"\n        if [[ ! -f \"/etc/x-ui/x-ui.db\" ]]; then\n            local usernameTemp=$(head -c 6 /dev/urandom | base64)\n            local passwordTemp=$(head -c 6 /dev/urandom | base64)\n            local webBasePathTemp=$(gen_random_string 10)\n            /usr/local/x-ui/x-ui setting -username ${usernameTemp} -password ${passwordTemp} -webBasePath ${webBasePathTemp}\n            echo -e \"${yellow}检测到为全新安装，出于安全考虑将生成随机登录信息:${plain}\"\n            echo -e \"###############################################\"\n            echo -e \"${green}用户名: ${usernameTemp}${plain}\"\n            echo -e \"${green}密  码: ${passwordTemp}${plain}\"\n            echo -e \"${green}访问路径: ${webBasePathTemp}${plain}\"\n            echo -e \"###############################################\"\n            echo -e \"${green}如果您忘记了登录信息，可以在安装后通过 x-ui 命令然后输入${red}数字 10 选项${green}进行查看${plain}\"\n        else\n            echo -e \"${green}此次操作属于版本升级，保留之前旧设置项，登录方式保持不变${plain}\"\n            echo \"\"\n            echo -e \"${green}如果您忘记了登录信息，您可以通过 x-ui 命令然后输入${red}数字 10 选项${green}进行查看${plain}\"\n            echo \"\"\n            echo \"\"\n        fi\n    fi\n    sleep 1\n    echo -e \">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\"\n    echo \"\"\n    /usr/local/x-ui/x-ui migrate\n}\n\necho \"\"\ninstall_x-ui() {\n    cd /usr/local/\n\n    if [ $# == 0 ]; then\n        last_version=$(curl -Ls \"https://api.github.com/repos/xeefei/3x-ui/releases/latest\" | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\\1/')\n        if [[ ! -n \"$last_version\" ]]; then\n            echo -e \"${red}获取 3x-ui 版本失败，可能是 Github API 限制，请稍后再试${plain}\"\n            exit 1\n        fi\n        echo \"\"\n        echo -e \"-----------------------------------------------------\"\n        echo -e \"${green}--------->>获取 3x-ui 最新版本：${yellow}${last_version}${plain}${green}，开始安装...${plain}\"\n        echo -e \"-----------------------------------------------------\"\n        echo \"\"\n        sleep 2\n        echo -e \"${green}---------------->>>>>>>>>安装进度50%${plain}\"\n        sleep 3\n        echo \"\"\n        echo -e \"${green}---------------->>>>>>>>>>>>>>>>>>>>>安装进度100%${plain}\"\n        echo \"\"\n        sleep 2\n        wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/xeefei/3x-ui/releases/download/${last_version}/x-ui-linux-$(arch).tar.gz\n        if [[ $? -ne 0 ]]; then\n            echo -e \"${red}下载 3x-ui 失败, 请检查服务器是否可以连接至 GitHub？ ${plain}\"\n            exit 1\n        fi\n    else\n        last_version=$1\n        url=\"https://github.com/xeefei/3x-ui/releases/download/${last_version}/x-ui-linux-$(arch).tar.gz\"\n        echo \"\"\n        echo -e \"--------------------------------------------\"\n        echo -e \"${green}---------------->>>>开始安装 3x-ui $1${plain}\"\n        echo -e \"--------------------------------------------\"\n        echo \"\"\n        sleep 2\n        echo -e \"${green}---------------->>>>>>>>>安装进度50%${plain}\"\n        sleep 3\n        echo \"\"\n        echo -e \"${green}---------------->>>>>>>>>>>>>>>>>>>>>安装进度100%${plain}\"\n        echo \"\"\n        sleep 2\n        wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz ${url}\n        if [[ $? -ne 0 ]]; then\n            echo -e \"${red}下载 3x-ui $1 失败, 请检查此版本是否存在 ${plain}\"\n            exit 1\n        fi\n    fi\n\n    if [[ -e /usr/local/x-ui/ ]]; then\n        systemctl stop x-ui\n        rm /usr/local/x-ui/ -rf\n    fi\n    \n    sleep 3\n    echo -e \"${green}------->>>>>>>>>>>检查并保存安装目录${plain}\"\n    echo \"\"\n    tar zxvf x-ui-linux-$(arch).tar.gz\n    rm x-ui-linux-$(arch).tar.gz -f\n    cd x-ui\n    chmod +x x-ui\n\n    # Check the system's architecture and rename the file accordingly\n    if [[ $(arch) == \"armv5\" || $(arch) == \"armv6\" || $(arch) == \"armv7\" ]]; then\n        mv bin/xray-linux-$(arch) bin/xray-linux-arm\n        chmod +x bin/xray-linux-arm\n    fi\n\n    chmod +x x-ui bin/xray-linux-$(arch)\n    cp -f x-ui.service /etc/systemd/system/\n    wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/xeefei/3x-ui/main/x-ui.sh\n    chmod +x /usr/local/x-ui/x-ui.sh\n    chmod +x /usr/bin/x-ui\n    sleep 2\n    echo -e \"${green}------->>>>>>>>>>>保存成功${plain}\"\n    sleep 2\n    echo \"\"\n    config_after_install\n\n    systemctl daemon-reload\n    systemctl enable x-ui\n    systemctl start x-ui\n    systemctl stop warp-go >/dev/null 2>&1\n    wg-quick down wgcf >/dev/null 2>&1\n    ipv4=$(curl -s4m8 ip.p3terx.com -k | sed -n 1p)\n    ipv6=$(curl -s6m8 ip.p3terx.com -k | sed -n 1p)\n    systemctl start warp-go >/dev/null 2>&1\n    wg-quick up wgcf >/dev/null 2>&1\n\n    echo \"\"\n    echo -e \"------->>>>${green}3x-ui ${last_version}${plain}<<<<安装成功，正在启动...\"\n    sleep 1\n    echo \"\"\n    echo -e \"         ---------------------\"\n    echo -e \"         |${green}3X-UI 控制菜单用法 ${plain}|${plain}\"\n    echo -e \"         |  ${yellow}一个更好的面板   ${plain}|${plain}\"   \n    echo -e \"         | ${yellow}基于Xray Core构建 ${plain}|${plain}\"  \n    echo -e \"--------------------------------------------\"\n    echo -e \"x-ui              - 进入管理脚本\"\n    echo -e \"x-ui start        - 启动 3x-ui 面板\"\n    echo -e \"x-ui stop         - 关闭 3x-ui 面板\"\n    echo -e \"x-ui restart      - 重启 3x-ui 面板\"\n    echo -e \"x-ui status       - 查看 3x-ui 状态\"\n    echo -e \"x-ui settings     - 查看当前设置信息\"\n    echo -e \"x-ui enable       - 启用 3x-ui 开机启动\"\n    echo -e \"x-ui disable      - 禁用 3x-ui 开机启动\"\n    echo -e \"x-ui log          - 查看 3x-ui 运行日志\"\n    echo -e \"x-ui banlog       - 检查 Fail2ban 禁止日志\"\n    echo -e \"x-ui update       - 更新 3x-ui 面板\"\n    echo -e \"x-ui custom       - 自定义 3x-ui 版本\"\n    echo -e \"x-ui install      - 安装 3x-ui 面板\"\n    echo -e \"x-ui uninstall    - 卸载 3x-ui 面板\"\n    echo -e \"--------------------------------------------\"\n    echo \"\"\n    # if [[ -n $ipv4 ]]; then\n    #    echo -e \"${yellow}面板 IPv4 访问地址为：${green}http://$ipv4:${config_port}/${config_webBasePath}${plain}\"\n    # fi\n    # if [[ -n $ipv6 ]]; then\n    #    echo -e \"${yellow}面板 IPv6 访问地址为：${green}http://[$ipv6]:${config_port}/${config_webBasePath}${plain}\"\n    # fi\n    #    echo -e \"请自行确保此端口没有被其他程序占用，${yellow}并且确保${red} ${config_port} ${yellow}端口已放行${plain}\"\n    sleep 3\n    echo -e \">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\"\n    echo \"\"\n    echo -e \"${yellow}----->>>3X-UI面板和Xray启动成功<<<-----${plain}\"\n}\ninstall_base\ninstall_x-ui $1\necho \"\"\necho -e \"----------------------------------------------\"\nsleep 4\ninfo=$(/usr/local/x-ui/x-ui setting -show true)\necho -e \"${info}${plain}\"\necho \"\"\necho -e \"若您忘记了上述面板信息，后期可通过x-ui命令进入脚本${red}输入数字〔10〕选项获取${plain}\"\necho \"\"\necho -e \"----------------------------------------------\"\necho \"\"\nsleep 2\necho -e \"${green}安装/更新完成，若在使用过程中有任何问题${plain}\"\necho -e \"${yellow}请先描述清楚所遇问题加〔3X-UI〕中文交流群${plain}\"\necho -e \"${yellow}在TG群中${red} https://t.me/XUI_CN ${yellow}截图进行反馈${plain}\"\necho \"\"\necho -e \"----------------------------------------------\"\necho \"\"\necho -e \"${green}〔3X-UI〕优化版项目地址：${yellow}https://github.com/xeefei/3x-ui${plain}\" \necho \"\"\necho -e \"${green} 详细安装教程：${yellow}https://xeefei.github.io/xufei/2024/05/3x-ui/${plain}\"\necho \"\"\necho -e \"----------------------------------------------\"\necho \"\"\n"
  },
  {
    "path": "logger/logger.go",
    "content": "package logger\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/op/go-logging\"\n)\n\nvar (\n\tlogger    *logging.Logger\n\tlogBuffer []struct {\n\t\ttime  string\n\t\tlevel logging.Level\n\t\tlog   string\n\t}\n)\n\nfunc init() {\n\tInitLogger(logging.INFO)\n}\n\nfunc InitLogger(level logging.Level) {\n\tnewLogger := logging.MustGetLogger(\"x-ui\")\n\tvar err error\n\tvar backend logging.Backend\n\tvar format logging.Formatter\n\tppid := os.Getppid()\n\n\tbackend, err = logging.NewSyslogBackend(\"\")\n\tif err != nil {\n\t\tprintln(err)\n\t\tbackend = logging.NewLogBackend(os.Stderr, \"\", 0)\n\t}\n\tif ppid > 0 && err != nil {\n\t\tformat = logging.MustStringFormatter(`%{time:2006/01/02 15:04:05} %{level} - %{message}`)\n\t} else {\n\t\tformat = logging.MustStringFormatter(`%{level} - %{message}`)\n\t}\n\n\tbackendFormatter := logging.NewBackendFormatter(backend, format)\n\tbackendLeveled := logging.AddModuleLevel(backendFormatter)\n\tbackendLeveled.SetLevel(level, \"x-ui\")\n\tnewLogger.SetBackend(backendLeveled)\n\n\tlogger = newLogger\n}\n\nfunc Debug(args ...interface{}) {\n\tlogger.Debug(args...)\n\taddToBuffer(\"DEBUG\", fmt.Sprint(args...))\n}\n\nfunc Debugf(format string, args ...interface{}) {\n\tlogger.Debugf(format, args...)\n\taddToBuffer(\"DEBUG\", fmt.Sprintf(format, args...))\n}\n\nfunc Info(args ...interface{}) {\n\tlogger.Info(args...)\n\taddToBuffer(\"INFO\", fmt.Sprint(args...))\n}\n\nfunc Infof(format string, args ...interface{}) {\n\tlogger.Infof(format, args...)\n\taddToBuffer(\"INFO\", fmt.Sprintf(format, args...))\n}\n\nfunc Notice(args ...interface{}) {\n\tlogger.Notice(args...)\n\taddToBuffer(\"NOTICE\", fmt.Sprint(args...))\n}\n\nfunc Noticef(format string, args ...interface{}) {\n\tlogger.Noticef(format, args...)\n\taddToBuffer(\"NOTICE\", fmt.Sprintf(format, args...))\n}\n\nfunc Warning(args ...interface{}) {\n\tlogger.Warning(args...)\n\taddToBuffer(\"WARNING\", fmt.Sprint(args...))\n}\n\nfunc Warningf(format string, args ...interface{}) {\n\tlogger.Warningf(format, args...)\n\taddToBuffer(\"WARNING\", fmt.Sprintf(format, args...))\n}\n\nfunc Error(args ...interface{}) {\n\tlogger.Error(args...)\n\taddToBuffer(\"ERROR\", fmt.Sprint(args...))\n}\n\nfunc Errorf(format string, args ...interface{}) {\n\tlogger.Errorf(format, args...)\n\taddToBuffer(\"ERROR\", fmt.Sprintf(format, args...))\n}\n\nfunc addToBuffer(level string, newLog string) {\n\tt := time.Now()\n\tif len(logBuffer) >= 10240 {\n\t\tlogBuffer = logBuffer[1:]\n\t}\n\n\tlogLevel, _ := logging.LogLevel(level)\n\tlogBuffer = append(logBuffer, struct {\n\t\ttime  string\n\t\tlevel logging.Level\n\t\tlog   string\n\t}{\n\t\ttime:  t.Format(\"2006/01/02 15:04:05\"),\n\t\tlevel: logLevel,\n\t\tlog:   newLog,\n\t})\n}\n\nfunc GetLogs(c int, level string) []string {\n\tvar output []string\n\tlogLevel, _ := logging.LogLevel(level)\n\n\tfor i := len(logBuffer) - 1; i >= 0 && len(output) <= c; i-- {\n\t\tif logBuffer[i].level <= logLevel {\n\t\t\toutput = append(output, fmt.Sprintf(\"%s %s - %s\", logBuffer[i].time, logBuffer[i].level, logBuffer[i].log))\n\t\t}\n\t}\n\treturn output\n}\n"
  },
  {
    "path": "main.go",
    "content": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"os/exec\"\n        \"strings\"\n\t\"syscall\"\n\t_ \"unsafe\"\n\n\t\"x-ui/config\"\n\t\"x-ui/database\"\n\t\"x-ui/logger\"\n\t\"x-ui/sub\"\n\t\"x-ui/web\"\n\t\"x-ui/web/global\"\n\t\"x-ui/web/service\"\n\n\t\"github.com/op/go-logging\"\n)\n\nfunc runWebServer() {\n\tlog.Printf(\"Starting %v %v\", config.GetName(), config.GetVersion())\n\n\tswitch config.GetLogLevel() {\n\tcase config.Debug:\n\t\tlogger.InitLogger(logging.DEBUG)\n\tcase config.Info:\n\t\tlogger.InitLogger(logging.INFO)\n\tcase config.Notice:\n\t\tlogger.InitLogger(logging.NOTICE)\n\tcase config.Warn:\n\t\tlogger.InitLogger(logging.WARNING)\n\tcase config.Error:\n\t\tlogger.InitLogger(logging.ERROR)\n\tdefault:\n\t\tlog.Fatalf(\"Unknown log level: %v\", config.GetLogLevel())\n\t}\n\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tlog.Fatalf(\"Error initializing database（初始化数据库出错）: %v\", err)\n\t}\n\n\tvar server *web.Server\n\tserver = web.NewServer()\n\tglobal.SetWebServer(server)\n\terr = server.Start()\n\tif err != nil {\n\t\tlog.Fatalf(\"Error starting web server: %v\", err)\n\t\treturn\n\t}\n\n\tvar subServer *sub.Server\n\tsubServer = sub.NewServer()\n\tglobal.SetSubServer(subServer)\n\terr = subServer.Start()\n\tif err != nil {\n\t\tlog.Fatalf(\"Error starting sub server: %v\", err)\n\t\treturn\n\t}\n\n\tsigCh := make(chan os.Signal, 1)\n\t// Trap shutdown signals\n\tsignal.Notify(sigCh, syscall.SIGHUP, syscall.SIGTERM)\n\tfor {\n\t\tsig := <-sigCh\n\n\t\tswitch sig {\n\t\tcase syscall.SIGHUP:\n\t\t\tlogger.Info(\"Received SIGHUP signal. Restarting servers...\")\n\n\t\t\terr := server.Stop()\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Error stopping web server:\", err)\n\t\t\t}\n\t\t\terr = subServer.Stop()\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Error stopping sub server:\", err)\n\t\t\t}\n\n\t\t\tserver = web.NewServer()\n\t\t\tglobal.SetWebServer(server)\n\t\t\terr = server.Start()\n\t\t\tif err != nil {\n\t\t\t\tlog.Fatalf(\"Error restarting web server: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tlog.Println(\"Web server restarted successfully.\")\n\n\t\t\tsubServer = sub.NewServer()\n\t\t\tglobal.SetSubServer(subServer)\n\t\t\terr = subServer.Start()\n\t\t\tif err != nil {\n\t\t\t\tlog.Fatalf(\"Error restarting sub server: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tlog.Println(\"Sub server restarted successfully.\")\n\n\t\tdefault:\n\t\t\tserver.Stop()\n\t\t\tsubServer.Stop()\n\t\t\tlog.Println(\"Shutting down servers.\")\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc resetSetting() {\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tfmt.Println(\"Failed to initialize database（初始化数据库失败）:\", err)\n\t\treturn\n\t}\n\n\tsettingService := service.SettingService{}\n\terr = settingService.ResetSettings()\n\tif err != nil {\n\t\tfmt.Println(\"reset setting failed（重置设置失败）:\", err)\n\t} else {\n\t\tfmt.Println(\"reset setting success---->>重置设置成功\")\n\t}\n}\n\nfunc showSetting(show bool) {\n\t// 执行 shell 命令获取 IPv4 地址\n        cmdIPv4 := exec.Command(\"sh\", \"-c\", \"curl -s4m8 ip.p3terx.com -k | sed -n 1p\")\n        outputIPv4, err := cmdIPv4.Output()\n        if err != nil {\n        log.Fatal(err)\n    }\n\n    // 执行 shell 命令获取 IPv6 地址\n        cmdIPv6 := exec.Command(\"sh\", \"-c\", \"curl -s6m8 ip.p3terx.com -k | sed -n 1p\")\n        outputIPv6, err := cmdIPv6.Output()\n        if err != nil {\n        log.Fatal(err)\n    }\n\n    // 去除命令输出中的换行符\n    ipv4 := strings.TrimSpace(string(outputIPv4))\n    ipv6 := strings.TrimSpace(string(outputIPv6))\n    // 定义转义字符，定义不同颜色的转义字符\n\tconst (\n\t\tReset      = \"\\033[0m\"\n\t\tRed        = \"\\033[31m\"\n\t\tGreen      = \"\\033[32m\"\n\t\tYellow     = \"\\033[33m\"\n\t)\n\t\n\tif show {\n\t\tsettingService := service.SettingService{}\n\t\tport, err := settingService.GetPort()\n\t\tif err != nil {\n\t\t\tfmt.Println(\"get current port failed, error info（获取当前端口失败，错误信息）:\", err)\n\t\t}\n\n\t\twebBasePath, err := settingService.GetBasePath()\n\t\tif err != nil {\n\t\t\tfmt.Println(\"get webBasePath failed, error info（获取访问路径失败，错误信息）:\", err)\n\t\t}\n\n\t\tuserService := service.UserService{}\n\t\tuserModel, err := userService.GetFirstUser()\n\t\tif err != nil {\n\t\t\tfmt.Println(\"get current user info failed, error info（获取当前用户信息失败，错误信息）:\", err)\n\t\t}\n\n\t\tusername := userModel.Username\n\t\tuserpasswd := userModel.Password\n\t\tif username == \"\" || userpasswd == \"\" {\n\t\t\tfmt.Println(\"current username or password is empty--->>当前用户名或密码为空\")\n\t\t}\n\t\tfmt.Println(\"\")\n                fmt.Println(Yellow + \"----->>>以下为面板重要信息，请自行记录保存<<<-----\" + Reset)\n\t\tfmt.Println(Green + \"Current panel settings as follows (当前面板设置如下):\" + Reset)\n\t\tfmt.Println(\"\")\n\t        fmt.Println(Green + fmt.Sprintf(\"username（用户名）: %s\", username) + Reset)\n\t        fmt.Println(Green + fmt.Sprintf(\"password（密 码）: %s\", userpasswd) + Reset)\n\t        fmt.Println(Green + fmt.Sprintf(\"port（端口号）: %d\", port) + Reset)\n\t\tif webBasePath != \"\" {\n\t\t\tfmt.Println(Green + fmt.Sprintf(\"webBasePath（访问路径）: %s\", webBasePath) + Reset)\n\t\t} else {\n\t\t\tfmt.Println(\"webBasePath is not set----->>未设置访问路径\")\n\t\t}\n                fmt.Println(\"\")\n\t\tfmt.Println(\"--------------------------------------------------\")\n  // 根据条件打印带颜色的字符串\n        if ipv4 != \"\" {\n\t\tfmt.Println(\"\")\n\t\tformattedIPv4 := fmt.Sprintf(\"%s %s%s:%d%s\" + Reset,\n\t\t\tGreen+\"面板 IPv4 访问地址------>>\",\n\t\t  \tYellow+\"http://\",\n\t\t\tipv4,\n\t\t\tport,\n\t\t\tYellow+webBasePath + Reset)\n\t\tfmt.Println(formattedIPv4)\n\t\tfmt.Println(\"\")\n\t}\n\n\tif ipv6 != \"\" {\n\t\tfmt.Println(\"\")\n\t\tformattedIPv6 := fmt.Sprintf(\"%s %s[%s%s%s]:%d%s%s\",\n\t        \tGreen+\"面板 IPv6 访问地址------>>\", // 绿色的提示信息\n\t\t        Yellow+\"http://\",                 // 黄色的 http:// 部分\n\t\t        Yellow,                           // 黄色的[ 左方括号\n\t\t        ipv6,                             // IPv6 地址\n\t\t        Yellow,                           // 黄色的] 右方括号\n\t\t        port,                             // 端口号\n\t        \tYellow+webBasePath,               // 黄色的 Web 基础路径\n\t         \tReset)                            // 重置颜色\n\t\tfmt.Println(formattedIPv6)\n\t\tfmt.Println(\"\")\n\t}\n\tfmt.Println(Green + \">>>>>>>>注：若您安装了〔证书〕，请把IP换成您的域名用https方式登录\" + Reset)\n\tfmt.Println(\"\")\n\tfmt.Println(\"--------------------------------------------------\")\n\tfmt.Println(\"↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑\")\n\tfmt.Println(fmt.Sprintf(\"%s请确保 %s%d%s 端口已打开放行%s\",Green, Red, port, Green, Reset))\t\n\tfmt.Println(\"请自行确保此端口没有被其他程序占用\")\n\tfmt.Println(Green + \"若要登录访问面板，请复制上面的地址到浏览器\" + Reset)\n\tfmt.Println(\"\")\n\tfmt.Println(\"--------------------------------------------------\")\n\tfmt.Println(\"\")\n\t}\n}\n\nfunc updateTgbotEnableSts(status bool) {\n\tsettingService := service.SettingService{}\n\tcurrentTgSts, err := settingService.GetTgbotEnabled()\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\tlogger.Infof(\"current enabletgbot status[%v],need update to status[%v]\", currentTgSts, status)\n\tif currentTgSts != status {\n\t\terr := settingService.SetTgbotEnabled(status)\n\t\tif err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn\n\t\t} else {\n\t\t\tlogger.Infof(\"SetTgbotEnabled[%v] success\", status)\n\t\t}\n\t}\n}\n\nfunc updateTgbotSetting(tgBotToken string, tgBotChatid string, tgBotRuntime string) {\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tfmt.Println(\"Error initializing database（初始化数据库出错）:\", err)\n\t\treturn\n\t}\n\n\tsettingService := service.SettingService{}\n\n\tif tgBotToken != \"\" {\n\t\terr := settingService.SetTgBotToken(tgBotToken)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"Error setting Telegram bot token（设置TG电报机器人令牌出错）: %v\\n\", err)\n\t\t\treturn\n\t\t}\n\t\tlogger.Info(\"Successfully updated Telegram bot token----->>已成功更新TG电报机器人令牌\")\n\t}\n\n\tif tgBotRuntime != \"\" {\n\t\terr := settingService.SetTgbotRuntime(tgBotRuntime)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"Error setting Telegram bot runtime（设置TG电报机器人通知周期出错）: %v\\n\", err)\n\t\t\treturn\n\t\t}\n\t\tlogger.Infof(\"Successfully updated Telegram bot runtime to（已成功将TG电报机器人通知周期设置为） [%s].\", tgBotRuntime)\n\t}\n\n\tif tgBotChatid != \"\" {\n\t\terr := settingService.SetTgBotChatId(tgBotChatid)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"Error setting Telegram bot chat ID（设置TG电报机器人管理者聊天ID出错）: %v\\n\", err)\n\t\t\treturn\n\t\t}\n\t\tlogger.Info(\"Successfully updated Telegram bot chat ID----->>已成功更新TG电报机器人管理者聊天ID\")\n\t}\n}\n\nfunc updateSetting(port int, username string, password string, webBasePath string) {\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tfmt.Println(\"Database initialization failed（初始化数据库失败）:\", err)\n\t\treturn\n\t}\n\n\tsettingService := service.SettingService{}\n\tuserService := service.UserService{}\n\n\tif port > 0 {\n\t\terr := settingService.SetPort(port)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to set port（设置端口失败）:\", err)\n\t\t} else {\n\t\t\tfmt.Printf(\"Port set successfully（端口设置成功）: %v\\n\", port)\n\t\t}\n\t}\n\n\tif username != \"\" || password != \"\" {\n\t\terr := userService.UpdateFirstUser(username, password)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to update username and password（更新用户名和密码失败）:\", err)\n\t\t} else {\n\t\t\tfmt.Println(\"Username and password updated successfully------>>用户名和密码更新成功\")\n\t\t}\n\t}\n\n\tif webBasePath != \"\" {\n\t\terr := settingService.SetBasePath(webBasePath)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Failed to set base URI path（设置访问路径失败）:\", err)\n\t\t} else {\n\t\t\tfmt.Println(\"Base URI path set successfully------>>设置访问路径成功\")\n\t\t}\n\t}\n}\n\nfunc updateCert(publicKey string, privateKey string) {\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\n\tif (privateKey != \"\" && publicKey != \"\") || (privateKey == \"\" && publicKey == \"\") {\n\t\tsettingService := service.SettingService{}\n\t\terr = settingService.SetCertFile(publicKey)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"set certificate public key failed（设置证书公钥失败）:\", err)\n\t\t} else {\n\t\t\tfmt.Println(\"set certificate public key success--------->>设置证书公钥成功\")\n\t\t}\n\n\t\terr = settingService.SetKeyFile(privateKey)\n\t\tif err != nil {\n\t\t\tfmt.Println(\"set certificate private key failed（设置证书私钥失败）:\", err)\n\t\t} else {\n\t\t\tfmt.Println(\"set certificate private key success--------->>设置证书私钥成功\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"both public and private key should be entered.------>>必须同时输入证书公钥和私钥\")\n\t}\n}\n\nfunc migrateDb() {\n\tinboundService := service.InboundService{}\n\n\terr := database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(\"Start migrating database...---->>开始迁移数据库...\")\n\tinboundService.MigrateDB()\n\tfmt.Println(\"\")\n\tfmt.Println(\"Migration done!------------>>迁移完成！\")\n}\n\nfunc removeSecret() {\n\tuserService := service.UserService{}\n\n\tsecretExists, err := userService.CheckSecretExistence()\n\tif err != nil {\n\t\tfmt.Println(\"Error checking secret existence:\", err)\n\t\treturn\n\t}\n\n\tif !secretExists {\n\t\tfmt.Println(\"No secret exists to remove.\")\n\t\treturn\n\t}\n\n\terr = userService.RemoveUserSecret()\n\tif err != nil {\n\t\tfmt.Println(\"Error removing secret:\", err)\n\t\treturn\n\t}\n\n\tsettingService := service.SettingService{}\n\terr = settingService.SetSecretStatus(false)\n\tif err != nil {\n\t\tfmt.Println(\"Error updating secret status:\", err)\n\t\treturn\n\t}\n\n\tfmt.Println(\"Secret removed successfully.\")\n}\n\nfunc main() {\n\tif len(os.Args) < 2 {\n\t\trunWebServer()\n\t\treturn\n\t}\n\n\tvar showVersion bool\n\tflag.BoolVar(&showVersion, \"v\", false, \"show version\")\n\n\trunCmd := flag.NewFlagSet(\"run\", flag.ExitOnError)\n\n\tsettingCmd := flag.NewFlagSet(\"setting\", flag.ExitOnError)\n\tvar port int\n\tvar username string\n\tvar password string\n\tvar webBasePath string\n\tvar webCertFile string\n\tvar webKeyFile string\n\tvar tgbottoken string\n\tvar tgbotchatid string\n\tvar enabletgbot bool\n\tvar tgbotRuntime string\n\tvar reset bool\n\tvar show bool\n\tvar remove_secret bool\n\tsettingCmd.BoolVar(&reset, \"reset\", false, \"Reset all settings\")\n\tsettingCmd.BoolVar(&show, \"show\", false, \"Display current settings\")\n\tsettingCmd.BoolVar(&remove_secret, \"remove_secret\", false, \"Remove secret key\")\n\tsettingCmd.IntVar(&port, \"port\", 0, \"Set panel port number\")\n\tsettingCmd.StringVar(&username, \"username\", \"\", \"Set login username\")\n\tsettingCmd.StringVar(&password, \"password\", \"\", \"Set login password\")\n\tsettingCmd.StringVar(&webBasePath, \"webBasePath\", \"\", \"Set base path for Panel\")\n\tsettingCmd.StringVar(&webCertFile, \"webCert\", \"\", \"Set path to public key file for panel\")\n\tsettingCmd.StringVar(&webKeyFile, \"webCertKey\", \"\", \"Set path to private key file for panel\")\n\tsettingCmd.StringVar(&tgbottoken, \"tgbottoken\", \"\", \"Set token for Telegram bot\")\n\tsettingCmd.StringVar(&tgbotRuntime, \"tgbotRuntime\", \"\", \"Set cron time for Telegram bot notifications\")\n\tsettingCmd.StringVar(&tgbotchatid, \"tgbotchatid\", \"\", \"Set chat ID for Telegram bot notifications\")\n\tsettingCmd.BoolVar(&enabletgbot, \"enabletgbot\", false, \"Enable notifications via Telegram bot\")\n\n\toldUsage := flag.Usage\n\tflag.Usage = func() {\n\t\toldUsage()\n\t\tfmt.Println()\n\t\tfmt.Println(\"Commands:\")\n\t\tfmt.Println(\"    run            run web panel\")\n\t\tfmt.Println(\"    migrate        migrate form other/old x-ui\")\n\t\tfmt.Println(\"    setting        set settings\")\n\t}\n\n\tflag.Parse()\n\tif showVersion {\n\t\tfmt.Println(config.GetVersion())\n\t\treturn\n\t}\n\n\tswitch os.Args[1] {\n\tcase \"run\":\n\t\terr := runCmd.Parse(os.Args[2:])\n\t\tif err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn\n\t\t}\n\t\trunWebServer()\n\tcase \"migrate\":\n\t\tmigrateDb()\n\tcase \"setting\":\n\t\terr := settingCmd.Parse(os.Args[2:])\n\t\tif err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn\n\t\t}\n\t\tif reset {\n\t\t\tresetSetting()\n\t\t} else {\n\t\t\tupdateSetting(port, username, password, webBasePath)\n\t\t}\n\t\tif show {\n\t\t\tshowSetting(show)\n\t\t}\n\t\tif (tgbottoken != \"\") || (tgbotchatid != \"\") || (tgbotRuntime != \"\") {\n\t\t\tupdateTgbotSetting(tgbottoken, tgbotchatid, tgbotRuntime)\n\t\t}\n\t\tif remove_secret {\n\t\t\tremoveSecret()\n\t\t}\n\t\tif enabletgbot {\n\t\t\tupdateTgbotEnableSts(enabletgbot)\n\t\t}\n\tcase \"cert\":\n\t\terr := settingCmd.Parse(os.Args[2:])\n\t\tif err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn\n\t\t}\n\t\tif reset {\n\t\t\tupdateCert(\"\", \"\")\n\t\t} else {\n\t\t\tupdateCert(webCertFile, webKeyFile)\n\t\t}\n\n\tdefault:\n\t\tfmt.Println(\"Invalid subcommands----->>无效命令\")\n\t\tfmt.Println()\n\t\trunCmd.Usage()\n\t\tfmt.Println()\n\t\tsettingCmd.Usage()\n\t}\n}\n"
  },
  {
    "path": "sub/default.json",
    "content": "{\n  \"remarks\": \"\",\n  \"dns\": {\n    \"tag\": \"dns_out\",\n    \"queryStrategy\": \"UseIP\",\n    \"servers\": [\n      {\n        \"address\": \"8.8.8.8\",\n        \"skipFallback\": false\n      }\n    ]\n  },\n  \"inbounds\": [\n    {\n      \"port\": 10808,\n      \"protocol\": \"socks\",\n      \"settings\": {\n        \"auth\": \"noauth\",\n        \"udp\": true,\n        \"userLevel\": 8\n      },\n      \"sniffing\": {\n        \"destOverride\": [\n          \"http\",\n          \"tls\",\n          \"fakedns\"\n        ],\n        \"enabled\": true\n      },\n      \"tag\": \"socks\"\n    },\n    {\n      \"port\": 10809,\n      \"protocol\": \"http\",\n      \"settings\": {\n        \"userLevel\": 8\n      },\n      \"tag\": \"http\"\n    }\n  ],\n  \"log\": {\n    \"loglevel\": \"warning\"\n  },\n  \"outbounds\": [\n    {\n      \"tag\": \"direct\",\n      \"protocol\": \"freedom\",\n      \"settings\": {\n        \"domainStrategy\": \"UseIP\"\n      }\n    },\n    {\n      \"tag\": \"block\",\n      \"protocol\": \"blackhole\",\n      \"settings\": {\n        \"response\": {\n          \"type\": \"http\"\n        }\n      }\n    }\n  ],\n  \"policy\": {\n    \"levels\": {\n      \"8\": {\n        \"connIdle\": 300,\n        \"downlinkOnly\": 1,\n        \"handshake\": 4,\n        \"uplinkOnly\": 1\n      }\n    },\n    \"system\": {\n      \"statsOutboundUplink\": true,\n      \"statsOutboundDownlink\": true\n    }\n  },\n  \"routing\": {\n    \"domainStrategy\": \"AsIs\",\n    \"rules\": [\n      {\n        \"type\": \"field\",\n        \"network\": \"tcp,udp\",\n        \"outboundTag\": \"proxy\"\n      }\n    ]\n  },\n  \"stats\": {}\n}"
  },
  {
    "path": "sub/sub.go",
    "content": "package sub\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"x-ui/config\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/web/middleware\"\n\t\"x-ui/web/network\"\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype Server struct {\n\thttpServer *http.Server\n\tlistener   net.Listener\n\n\tsub            *SUBController\n\tsettingService service.SettingService\n\n\tctx    context.Context\n\tcancel context.CancelFunc\n}\n\nfunc NewServer() *Server {\n\tctx, cancel := context.WithCancel(context.Background())\n\treturn &Server{\n\t\tctx:    ctx,\n\t\tcancel: cancel,\n\t}\n}\n\nfunc (s *Server) initRouter() (*gin.Engine, error) {\n\tif config.IsDebug() {\n\t\tgin.SetMode(gin.DebugMode)\n\t} else {\n\t\tgin.DefaultWriter = io.Discard\n\t\tgin.DefaultErrorWriter = io.Discard\n\t\tgin.SetMode(gin.ReleaseMode)\n\t}\n\n\tengine := gin.Default()\n\n\tsubDomain, err := s.settingService.GetSubDomain()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif subDomain != \"\" {\n\t\tengine.Use(middleware.DomainValidatorMiddleware(subDomain))\n\t}\n\n\tLinksPath, err := s.settingService.GetSubPath()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tJsonPath, err := s.settingService.GetSubJsonPath()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tEncrypt, err := s.settingService.GetSubEncrypt()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tShowInfo, err := s.settingService.GetSubShowInfo()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tRemarkModel, err := s.settingService.GetRemarkModel()\n\tif err != nil {\n\t\tRemarkModel = \"-ieo\"\n\t}\n\n\tSubUpdates, err := s.settingService.GetSubUpdates()\n\tif err != nil {\n\t\tSubUpdates = \"10\"\n\t}\n\n\tSubJsonFragment, err := s.settingService.GetSubJsonFragment()\n\tif err != nil {\n\t\tSubJsonFragment = \"\"\n\t}\n\n\tSubJsonMux, err := s.settingService.GetSubJsonMux()\n\tif err != nil {\n\t\tSubJsonMux = \"\"\n\t}\n\n\tSubJsonRules, err := s.settingService.GetSubJsonRules()\n\tif err != nil {\n\t\tSubJsonRules = \"\"\n\t}\n\n\tg := engine.Group(\"/\")\n\n\ts.sub = NewSUBController(\n\t\tg, LinksPath, JsonPath, Encrypt, ShowInfo, RemarkModel, SubUpdates,\n\t\tSubJsonFragment, SubJsonMux, SubJsonRules)\n\n\treturn engine, nil\n}\n\nfunc (s *Server) Start() (err error) {\n\t// This is an anonymous function, no function name\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ts.Stop()\n\t\t}\n\t}()\n\n\tsubEnable, err := s.settingService.GetSubEnable()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !subEnable {\n\t\treturn nil\n\t}\n\n\tengine, err := s.initRouter()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcertFile, err := s.settingService.GetSubCertFile()\n\tif err != nil {\n\t\treturn err\n\t}\n\tkeyFile, err := s.settingService.GetSubKeyFile()\n\tif err != nil {\n\t\treturn err\n\t}\n\tlisten, err := s.settingService.GetSubListen()\n\tif err != nil {\n\t\treturn err\n\t}\n\tport, err := s.settingService.GetSubPort()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tlistenAddr := net.JoinHostPort(listen, strconv.Itoa(port))\n\tlistener, err := net.Listen(\"tcp\", listenAddr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif certFile != \"\" || keyFile != \"\" {\n\t\tcert, err := tls.LoadX509KeyPair(certFile, keyFile)\n\t\tif err == nil {\n\t\t\tc := &tls.Config{\n\t\t\t\tCertificates: []tls.Certificate{cert},\n\t\t\t}\n\t\t\tlistener = network.NewAutoHttpsListener(listener)\n\t\t\tlistener = tls.NewListener(listener, c)\n\t\t\tlogger.Info(\"Sub server running HTTPS on\", listener.Addr())\n\t\t} else {\n\t\t\tlogger.Error(\"Error loading certificates:\", err)\n\t\t\tlogger.Info(\"Sub server running HTTP on\", listener.Addr())\n\t\t}\n\t} else {\n\t\tlogger.Info(\"Sub server running HTTP on\", listener.Addr())\n\t}\n\ts.listener = listener\n\n\ts.httpServer = &http.Server{\n\t\tHandler: engine,\n\t}\n\n\tgo func() {\n\t\ts.httpServer.Serve(listener)\n\t}()\n\n\treturn nil\n}\n\nfunc (s *Server) Stop() error {\n\ts.cancel()\n\n\tvar err1 error\n\tvar err2 error\n\tif s.httpServer != nil {\n\t\terr1 = s.httpServer.Shutdown(s.ctx)\n\t}\n\tif s.listener != nil {\n\t\terr2 = s.listener.Close()\n\t}\n\treturn common.Combine(err1, err2)\n}\n\nfunc (s *Server) GetCtx() context.Context {\n\treturn s.ctx\n}\n"
  },
  {
    "path": "sub/subController.go",
    "content": "package sub\n\nimport (\n\t\"encoding/base64\"\n\t\"net\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype SUBController struct {\n\tsubPath        string\n\tsubJsonPath    string\n\tsubEncrypt     bool\n\tupdateInterval string\n\n\tsubService     *SubService\n\tsubJsonService *SubJsonService\n}\n\nfunc NewSUBController(\n\tg *gin.RouterGroup,\n\tsubPath string,\n\tjsonPath string,\n\tencrypt bool,\n\tshowInfo bool,\n\trModel string,\n\tupdate string,\n\tjsonFragment string,\n\tjsonMux string,\n\tjsonRules string,\n) *SUBController {\n\tsub := NewSubService(showInfo, rModel)\n\ta := &SUBController{\n\t\tsubPath:        subPath,\n\t\tsubJsonPath:    jsonPath,\n\t\tsubEncrypt:     encrypt,\n\t\tupdateInterval: update,\n\n\t\tsubService:     sub,\n\t\tsubJsonService: NewSubJsonService(jsonFragment, jsonMux, jsonRules, sub),\n\t}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *SUBController) initRouter(g *gin.RouterGroup) {\n\tgLink := g.Group(a.subPath)\n\tgJson := g.Group(a.subJsonPath)\n\n\tgLink.GET(\":subid\", a.subs)\n\n\tgJson.GET(\":subid\", a.subJsons)\n}\n\nfunc (a *SUBController) subs(c *gin.Context) {\n\tsubId := c.Param(\"subid\")\n\thost := c.GetHeader(\"X-Forwarded-Host\")\n\tif host == \"\" {\n\t\thost = c.GetHeader(\"X-Real-IP\")\n\t}\n\tif host == \"\" {\n\t\tvar err error\n\t\thost, _, err = net.SplitHostPort(c.Request.Host)\n\t\tif err != nil {\n\t\t\thost = c.Request.Host\n\t\t}\n\t}\n\tsubs, header, err := a.subService.GetSubs(subId, host)\n\tif err != nil || len(subs) == 0 {\n\t\tc.String(400, \"Error!\")\n\t} else {\n\t\tresult := \"\"\n\t\tfor _, sub := range subs {\n\t\t\tresult += sub + \"\\n\"\n\t\t}\n\n\t\t// Add headers\n\t\tc.Writer.Header().Set(\"Subscription-Userinfo\", header)\n\t\tc.Writer.Header().Set(\"Profile-Update-Interval\", a.updateInterval)\n\t\tc.Writer.Header().Set(\"Profile-Title\", subId)\n\n\t\tif a.subEncrypt {\n\t\t\tc.String(200, base64.StdEncoding.EncodeToString([]byte(result)))\n\t\t} else {\n\t\t\tc.String(200, result)\n\t\t}\n\t}\n}\n\nfunc (a *SUBController) subJsons(c *gin.Context) {\n\tsubId := c.Param(\"subid\")\n\thost := c.GetHeader(\"X-Forwarded-Host\")\n\tif host == \"\" {\n\t\thost = c.GetHeader(\"X-Real-IP\")\n\t}\n\tif host == \"\" {\n\t\tvar err error\n\t\thost, _, err = net.SplitHostPort(c.Request.Host)\n\t\tif err != nil {\n\t\t\thost = c.Request.Host\n\t\t}\n\t}\n\tjsonSub, header, err := a.subJsonService.GetJson(subId, host)\n\tif err != nil || len(jsonSub) == 0 {\n\t\tc.String(400, \"Error!\")\n\t} else {\n\n\t\t// Add headers\n\t\tc.Writer.Header().Set(\"Subscription-Userinfo\", header)\n\t\tc.Writer.Header().Set(\"Profile-Update-Interval\", a.updateInterval)\n\t\tc.Writer.Header().Set(\"Profile-Title\", subId)\n\n\t\tc.String(200, jsonSub)\n\t}\n}\n"
  },
  {
    "path": "sub/subJsonService.go",
    "content": "package sub\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/json_util\"\n\t\"x-ui/util/random\"\n\t\"x-ui/web/service\"\n\t\"x-ui/xray\"\n)\n\n//go:embed default.json\nvar defaultJson string\n\ntype SubJsonService struct {\n\tconfigJson       map[string]interface{}\n\tdefaultOutbounds []json_util.RawMessage\n\tfragment         string\n\tmux              string\n\n\tinboundService service.InboundService\n\tSubService     *SubService\n}\n\nfunc NewSubJsonService(fragment string, mux string, rules string, subService *SubService) *SubJsonService {\n\tvar configJson map[string]interface{}\n\tvar defaultOutbounds []json_util.RawMessage\n\tjson.Unmarshal([]byte(defaultJson), &configJson)\n\tif outboundSlices, ok := configJson[\"outbounds\"].([]interface{}); ok {\n\t\tfor _, defaultOutbound := range outboundSlices {\n\t\t\tjsonBytes, _ := json.Marshal(defaultOutbound)\n\t\t\tdefaultOutbounds = append(defaultOutbounds, jsonBytes)\n\t\t}\n\t}\n\n\tif rules != \"\" {\n\t\tvar newRules []interface{}\n\t\trouting, _ := configJson[\"routing\"].(map[string]interface{})\n\t\tdefaultRules, _ := routing[\"rules\"].([]interface{})\n\t\tjson.Unmarshal([]byte(rules), &newRules)\n\t\tdefaultRules = append(newRules, defaultRules...)\n\t\trouting[\"rules\"] = defaultRules\n\t\tconfigJson[\"routing\"] = routing\n\t}\n\n\tif fragment != \"\" {\n\t\tdefaultOutbounds = append(defaultOutbounds, json_util.RawMessage(fragment))\n\t}\n\n\treturn &SubJsonService{\n\t\tconfigJson:       configJson,\n\t\tdefaultOutbounds: defaultOutbounds,\n\t\tfragment:         fragment,\n\t\tmux:              mux,\n\t\tSubService:       subService,\n\t}\n}\n\nfunc (s *SubJsonService) GetJson(subId string, host string) (string, string, error) {\n\tinbounds, err := s.SubService.getInboundsBySubId(subId)\n\tif err != nil || len(inbounds) == 0 {\n\t\treturn \"\", \"\", err\n\t}\n\n\tvar header string\n\tvar traffic xray.ClientTraffic\n\tvar clientTraffics []xray.ClientTraffic\n\tvar configArray []json_util.RawMessage\n\n\t// Prepare Inbounds\n\tfor _, inbound := range inbounds {\n\t\tclients, err := s.inboundService.GetClients(inbound)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"SubJsonService - GetClients: Unable to get clients from inbound\")\n\t\t}\n\t\tif clients == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif len(inbound.Listen) > 0 && inbound.Listen[0] == '@' {\n\t\t\tlisten, port, streamSettings, err := s.SubService.getFallbackMaster(inbound.Listen, inbound.StreamSettings)\n\t\t\tif err == nil {\n\t\t\t\tinbound.Listen = listen\n\t\t\t\tinbound.Port = port\n\t\t\t\tinbound.StreamSettings = streamSettings\n\t\t\t}\n\t\t}\n\n\t\tfor _, client := range clients {\n\t\t\tif client.Enable && client.SubID == subId {\n\t\t\t\tclientTraffics = append(clientTraffics, s.SubService.getClientTraffics(inbound.ClientStats, client.Email))\n\t\t\t\tnewConfigs := s.getConfig(inbound, client, host)\n\t\t\t\tconfigArray = append(configArray, newConfigs...)\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(configArray) == 0 {\n\t\treturn \"\", \"\", nil\n\t}\n\n\t// Prepare statistics\n\tfor index, clientTraffic := range clientTraffics {\n\t\tif index == 0 {\n\t\t\ttraffic.Up = clientTraffic.Up\n\t\t\ttraffic.Down = clientTraffic.Down\n\t\t\ttraffic.Total = clientTraffic.Total\n\t\t\tif clientTraffic.ExpiryTime > 0 {\n\t\t\t\ttraffic.ExpiryTime = clientTraffic.ExpiryTime\n\t\t\t}\n\t\t} else {\n\t\t\ttraffic.Up += clientTraffic.Up\n\t\t\ttraffic.Down += clientTraffic.Down\n\t\t\tif traffic.Total == 0 || clientTraffic.Total == 0 {\n\t\t\t\ttraffic.Total = 0\n\t\t\t} else {\n\t\t\t\ttraffic.Total += clientTraffic.Total\n\t\t\t}\n\t\t\tif clientTraffic.ExpiryTime != traffic.ExpiryTime {\n\t\t\t\ttraffic.ExpiryTime = 0\n\t\t\t}\n\t\t}\n\t}\n\n\t// Combile outbounds\n\tvar finalJson []byte\n\tif len(configArray) == 1 {\n\t\tfinalJson, _ = json.MarshalIndent(configArray[0], \"\", \"  \")\n\t} else {\n\t\tfinalJson, _ = json.MarshalIndent(configArray, \"\", \"  \")\n\t}\n\n\theader = fmt.Sprintf(\"upload=%d; download=%d; total=%d; expire=%d\", traffic.Up, traffic.Down, traffic.Total, traffic.ExpiryTime/1000)\n\treturn string(finalJson), header, nil\n}\n\nfunc (s *SubJsonService) getConfig(inbound *model.Inbound, client model.Client, host string) []json_util.RawMessage {\n\tvar newJsonArray []json_util.RawMessage\n\tstream := s.streamData(inbound.StreamSettings)\n\n\texternalProxies, ok := stream[\"externalProxy\"].([]interface{})\n\tif !ok || len(externalProxies) == 0 {\n\t\texternalProxies = []interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"forceTls\": \"same\",\n\t\t\t\t\"dest\":     host,\n\t\t\t\t\"port\":     float64(inbound.Port),\n\t\t\t\t\"remark\":   \"\",\n\t\t\t},\n\t\t}\n\t}\n\n\tdelete(stream, \"externalProxy\")\n\n\tfor _, ep := range externalProxies {\n\t\textPrxy := ep.(map[string]interface{})\n\t\tinbound.Listen = extPrxy[\"dest\"].(string)\n\t\tinbound.Port = int(extPrxy[\"port\"].(float64))\n\t\tnewStream := stream\n\t\tswitch extPrxy[\"forceTls\"].(string) {\n\t\tcase \"tls\":\n\t\t\tif newStream[\"security\"] != \"tls\" {\n\t\t\t\tnewStream[\"security\"] = \"tls\"\n\t\t\t\tnewStream[\"tslSettings\"] = map[string]interface{}{}\n\t\t\t}\n\t\tcase \"none\":\n\t\t\tif newStream[\"security\"] != \"none\" {\n\t\t\t\tnewStream[\"security\"] = \"none\"\n\t\t\t\tdelete(newStream, \"tslSettings\")\n\t\t\t}\n\t\t}\n\t\tstreamSettings, _ := json.MarshalIndent(newStream, \"\", \"  \")\n\n\t\tvar newOutbounds []json_util.RawMessage\n\n\t\tswitch inbound.Protocol {\n\t\tcase \"vmess\", \"vless\":\n\t\t\tnewOutbounds = append(newOutbounds, s.genVnext(inbound, streamSettings, client))\n\t\tcase \"trojan\", \"shadowsocks\":\n\t\t\tnewOutbounds = append(newOutbounds, s.genServer(inbound, streamSettings, client))\n\t\t}\n\n\t\tnewOutbounds = append(newOutbounds, s.defaultOutbounds...)\n\t\tnewConfigJson := make(map[string]interface{})\n\t\tfor key, value := range s.configJson {\n\t\t\tnewConfigJson[key] = value\n\t\t}\n\t\tnewConfigJson[\"outbounds\"] = newOutbounds\n\t\tnewConfigJson[\"remarks\"] = s.SubService.genRemark(inbound, client.Email, extPrxy[\"remark\"].(string))\n\n\t\tnewConfig, _ := json.MarshalIndent(newConfigJson, \"\", \"  \")\n\t\tnewJsonArray = append(newJsonArray, newConfig)\n\t}\n\n\treturn newJsonArray\n}\n\nfunc (s *SubJsonService) streamData(stream string) map[string]interface{} {\n\tvar streamSettings map[string]interface{}\n\tjson.Unmarshal([]byte(stream), &streamSettings)\n\tsecurity, _ := streamSettings[\"security\"].(string)\n\tif security == \"tls\" {\n\t\tstreamSettings[\"tlsSettings\"] = s.tlsData(streamSettings[\"tlsSettings\"].(map[string]interface{}))\n\t} else if security == \"reality\" {\n\t\tstreamSettings[\"realitySettings\"] = s.realityData(streamSettings[\"realitySettings\"].(map[string]interface{}))\n\t}\n\tdelete(streamSettings, \"sockopt\")\n\n\tif s.fragment != \"\" {\n\t\tstreamSettings[\"sockopt\"] = json_util.RawMessage(`{\"dialerProxy\": \"fragment\", \"tcpKeepAliveIdle\": 100, \"tcpMptcp\": true, \"tcpNoDelay\": true}`)\n\t}\n\n\t// remove proxy protocol\n\tnetwork, _ := streamSettings[\"network\"].(string)\n\tswitch network {\n\tcase \"tcp\":\n\t\tstreamSettings[\"tcpSettings\"] = s.removeAcceptProxy(streamSettings[\"tcpSettings\"])\n\tcase \"ws\":\n\t\tstreamSettings[\"wsSettings\"] = s.removeAcceptProxy(streamSettings[\"wsSettings\"])\n\tcase \"httpupgrade\":\n\t\tstreamSettings[\"httpupgradeSettings\"] = s.removeAcceptProxy(streamSettings[\"httpupgradeSettings\"])\n\t}\n\treturn streamSettings\n}\n\nfunc (s *SubJsonService) removeAcceptProxy(setting interface{}) map[string]interface{} {\n\tnetSettings, ok := setting.(map[string]interface{})\n\tif ok {\n\t\tdelete(netSettings, \"acceptProxyProtocol\")\n\t}\n\treturn netSettings\n}\n\nfunc (s *SubJsonService) tlsData(tData map[string]interface{}) map[string]interface{} {\n\ttlsData := make(map[string]interface{}, 1)\n\ttlsClientSettings, _ := tData[\"settings\"].(map[string]interface{})\n\n\ttlsData[\"serverName\"] = tData[\"serverName\"]\n\ttlsData[\"alpn\"] = tData[\"alpn\"]\n\tif allowInsecure, ok := tlsClientSettings[\"allowInsecure\"].(bool); ok {\n\t\ttlsData[\"allowInsecure\"] = allowInsecure\n\t}\n\tif fingerprint, ok := tlsClientSettings[\"fingerprint\"].(string); ok {\n\t\ttlsData[\"fingerprint\"] = fingerprint\n\t}\n\treturn tlsData\n}\n\nfunc (s *SubJsonService) realityData(rData map[string]interface{}) map[string]interface{} {\n\trltyData := make(map[string]interface{}, 1)\n\trltyClientSettings, _ := rData[\"settings\"].(map[string]interface{})\n\n\trltyData[\"show\"] = false\n\trltyData[\"publicKey\"] = rltyClientSettings[\"publicKey\"]\n\trltyData[\"fingerprint\"] = rltyClientSettings[\"fingerprint\"]\n\n\t// Set random data\n\trltyData[\"spiderX\"] = \"/\" + random.Seq(15)\n\tshortIds, ok := rData[\"shortIds\"].([]interface{})\n\tif ok && len(shortIds) > 0 {\n\t\trltyData[\"shortId\"] = shortIds[random.Num(len(shortIds))].(string)\n\t} else {\n\t\trltyData[\"shortId\"] = \"\"\n\t}\n\tserverNames, ok := rData[\"serverNames\"].([]interface{})\n\tif ok && len(serverNames) > 0 {\n\t\trltyData[\"serverName\"] = serverNames[random.Num(len(serverNames))].(string)\n\t} else {\n\t\trltyData[\"serverName\"] = \"\"\n\t}\n\n\treturn rltyData\n}\n\nfunc (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client) json_util.RawMessage {\n\toutbound := Outbound{}\n\tusersData := make([]UserVnext, 1)\n\n\tusersData[0].ID = client.ID\n\tusersData[0].Level = 8\n\tif inbound.Protocol == model.VLESS {\n\t\tusersData[0].Flow = client.Flow\n\t\tusersData[0].Encryption = \"none\"\n\t}\n\n\tvnextData := make([]VnextSetting, 1)\n\tvnextData[0] = VnextSetting{\n\t\tAddress: inbound.Listen,\n\t\tPort:    inbound.Port,\n\t\tUsers:   usersData,\n\t}\n\n\toutbound.Protocol = string(inbound.Protocol)\n\toutbound.Tag = \"proxy\"\n\tif s.mux != \"\" {\n\t\toutbound.Mux = json_util.RawMessage(s.mux)\n\t}\n\toutbound.StreamSettings = streamSettings\n\toutbound.Settings = OutboundSettings{\n\t\tVnext: vnextData,\n\t}\n\n\tresult, _ := json.MarshalIndent(outbound, \"\", \"  \")\n\treturn result\n}\n\nfunc (s *SubJsonService) genServer(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client) json_util.RawMessage {\n\toutbound := Outbound{}\n\n\tserverData := make([]ServerSetting, 1)\n\tserverData[0] = ServerSetting{\n\t\tAddress:  inbound.Listen,\n\t\tPort:     inbound.Port,\n\t\tLevel:    8,\n\t\tPassword: client.Password,\n\t}\n\n\tif inbound.Protocol == model.Shadowsocks {\n\t\tvar inboundSettings map[string]interface{}\n\t\tjson.Unmarshal([]byte(inbound.Settings), &inboundSettings)\n\t\tmethod, _ := inboundSettings[\"method\"].(string)\n\t\tserverData[0].Method = method\n\n\t\t// server password in multi-user 2022 protocols\n\t\tif strings.HasPrefix(method, \"2022\") {\n\t\t\tif serverPassword, ok := inboundSettings[\"password\"].(string); ok {\n\t\t\t\tserverData[0].Password = fmt.Sprintf(\"%s:%s\", serverPassword, client.Password)\n\t\t\t}\n\t\t}\n\t}\n\n\toutbound.Protocol = string(inbound.Protocol)\n\toutbound.Tag = \"proxy\"\n\tif s.mux != \"\" {\n\t\toutbound.Mux = json_util.RawMessage(s.mux)\n\t}\n\toutbound.StreamSettings = streamSettings\n\toutbound.Settings = OutboundSettings{\n\t\tServers: serverData,\n\t}\n\n\tresult, _ := json.MarshalIndent(outbound, \"\", \"  \")\n\treturn result\n}\n\ntype Outbound struct {\n\tProtocol       string                 `json:\"protocol\"`\n\tTag            string                 `json:\"tag\"`\n\tStreamSettings json_util.RawMessage   `json:\"streamSettings\"`\n\tMux            json_util.RawMessage   `json:\"mux,omitempty\"`\n\tProxySettings  map[string]interface{} `json:\"proxySettings,omitempty\"`\n\tSettings       OutboundSettings       `json:\"settings,omitempty\"`\n}\n\ntype OutboundSettings struct {\n\tVnext   []VnextSetting  `json:\"vnext,omitempty\"`\n\tServers []ServerSetting `json:\"servers,omitempty\"`\n}\n\ntype VnextSetting struct {\n\tAddress string      `json:\"address\"`\n\tPort    int         `json:\"port\"`\n\tUsers   []UserVnext `json:\"users\"`\n}\n\ntype UserVnext struct {\n\tEncryption string `json:\"encryption,omitempty\"`\n\tFlow       string `json:\"flow,omitempty\"`\n\tID         string `json:\"id\"`\n\tLevel      int    `json:\"level\"`\n}\n\ntype ServerSetting struct {\n\tPassword string `json:\"password\"`\n\tLevel    int    `json:\"level\"`\n\tAddress  string `json:\"address\"`\n\tPort     int    `json:\"port\"`\n\tFlow     string `json:\"flow,omitempty\"`\n\tMethod   string `json:\"method,omitempty\"`\n}\n"
  },
  {
    "path": "sub/subService.go",
    "content": "package sub\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/util/random\"\n\t\"x-ui/web/service\"\n\t\"x-ui/xray\"\n\n\t\"github.com/goccy/go-json\"\n)\n\ntype SubService struct {\n\taddress        string\n\tshowInfo       bool\n\tremarkModel    string\n\tdatepicker     string\n\tinboundService service.InboundService\n\tsettingService service.SettingService\n}\n\nfunc NewSubService(showInfo bool, remarkModel string) *SubService {\n\treturn &SubService{\n\t\tshowInfo:    showInfo,\n\t\tremarkModel: remarkModel,\n\t}\n}\n\nfunc (s *SubService) GetSubs(subId string, host string) ([]string, string, error) {\n\ts.address = host\n\tvar result []string\n\tvar header string\n\tvar traffic xray.ClientTraffic\n\tvar clientTraffics []xray.ClientTraffic\n\tinbounds, err := s.getInboundsBySubId(subId)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tif len(inbounds) == 0 {\n\t\treturn nil, \"\", common.NewError(\"No inbounds found with \", subId)\n\t}\n\n\ts.datepicker, err = s.settingService.GetDatepicker()\n\tif err != nil {\n\t\ts.datepicker = \"gregorian\"\n\t}\n\tfor _, inbound := range inbounds {\n\t\tclients, err := s.inboundService.GetClients(inbound)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"SubService - GetClients: Unable to get clients from inbound\")\n\t\t}\n\t\tif clients == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif len(inbound.Listen) > 0 && inbound.Listen[0] == '@' {\n\t\t\tlisten, port, streamSettings, err := s.getFallbackMaster(inbound.Listen, inbound.StreamSettings)\n\t\t\tif err == nil {\n\t\t\t\tinbound.Listen = listen\n\t\t\t\tinbound.Port = port\n\t\t\t\tinbound.StreamSettings = streamSettings\n\t\t\t}\n\t\t}\n\t\tfor _, client := range clients {\n\t\t\tif client.Enable && client.SubID == subId {\n\t\t\t\tlink := s.getLink(inbound, client.Email)\n\t\t\t\tresult = append(result, link)\n\t\t\t\tclientTraffics = append(clientTraffics, s.getClientTraffics(inbound.ClientStats, client.Email))\n\t\t\t}\n\t\t}\n\t}\n\n\t// Prepare statistics\n\tfor index, clientTraffic := range clientTraffics {\n\t\tif index == 0 {\n\t\t\ttraffic.Up = clientTraffic.Up\n\t\t\ttraffic.Down = clientTraffic.Down\n\t\t\ttraffic.Total = clientTraffic.Total\n\t\t\tif clientTraffic.ExpiryTime > 0 {\n\t\t\t\ttraffic.ExpiryTime = clientTraffic.ExpiryTime\n\t\t\t}\n\t\t} else {\n\t\t\ttraffic.Up += clientTraffic.Up\n\t\t\ttraffic.Down += clientTraffic.Down\n\t\t\tif traffic.Total == 0 || clientTraffic.Total == 0 {\n\t\t\t\ttraffic.Total = 0\n\t\t\t} else {\n\t\t\t\ttraffic.Total += clientTraffic.Total\n\t\t\t}\n\t\t\tif clientTraffic.ExpiryTime != traffic.ExpiryTime {\n\t\t\t\ttraffic.ExpiryTime = 0\n\t\t\t}\n\t\t}\n\t}\n\theader = fmt.Sprintf(\"upload=%d; download=%d; total=%d; expire=%d\", traffic.Up, traffic.Down, traffic.Total, traffic.ExpiryTime/1000)\n\treturn result, header, nil\n}\n\nfunc (s *SubService) getInboundsBySubId(subId string) ([]*model.Inbound, error) {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\terr := db.Model(model.Inbound{}).Preload(\"ClientStats\").Where(`id in (\n\t\tSELECT DISTINCT inbounds.id\n\t\tFROM inbounds,\n\t\t\tJSON_EACH(JSON_EXTRACT(inbounds.settings, '$.clients')) AS client \n\t\tWHERE\n\t\t\tprotocol in ('vmess','vless','trojan','shadowsocks')\n\t\t\tAND JSON_EXTRACT(client.value, '$.subId') = ? AND enable = ?\n\t)`, subId, true).Find(&inbounds).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn inbounds, nil\n}\n\nfunc (s *SubService) getClientTraffics(traffics []xray.ClientTraffic, email string) xray.ClientTraffic {\n\tfor _, traffic := range traffics {\n\t\tif traffic.Email == email {\n\t\t\treturn traffic\n\t\t}\n\t}\n\treturn xray.ClientTraffic{}\n}\n\nfunc (s *SubService) getFallbackMaster(dest string, streamSettings string) (string, int, string, error) {\n\tdb := database.GetDB()\n\tvar inbound *model.Inbound\n\terr := db.Model(model.Inbound{}).\n\t\tWhere(\"JSON_TYPE(settings, '$.fallbacks') = 'array'\").\n\t\tWhere(\"EXISTS (SELECT * FROM json_each(settings, '$.fallbacks') WHERE json_extract(value, '$.dest') = ?)\", dest).\n\t\tFind(&inbound).Error\n\tif err != nil {\n\t\treturn \"\", 0, \"\", err\n\t}\n\n\tvar stream map[string]interface{}\n\tjson.Unmarshal([]byte(streamSettings), &stream)\n\tvar masterStream map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.StreamSettings), &masterStream)\n\tstream[\"security\"] = masterStream[\"security\"]\n\tstream[\"tlsSettings\"] = masterStream[\"tlsSettings\"]\n\tstream[\"externalProxy\"] = masterStream[\"externalProxy\"]\n\tmodifiedStream, _ := json.MarshalIndent(stream, \"\", \"  \")\n\n\treturn inbound.Listen, inbound.Port, string(modifiedStream), nil\n}\n\nfunc (s *SubService) getLink(inbound *model.Inbound, email string) string {\n\tswitch inbound.Protocol {\n\tcase \"vmess\":\n\t\treturn s.genVmessLink(inbound, email)\n\tcase \"vless\":\n\t\treturn s.genVlessLink(inbound, email)\n\tcase \"trojan\":\n\t\treturn s.genTrojanLink(inbound, email)\n\tcase \"shadowsocks\":\n\t\treturn s.genShadowsocksLink(inbound, email)\n\t}\n\treturn \"\"\n}\n\nfunc (s *SubService) genVmessLink(inbound *model.Inbound, email string) string {\n\tif inbound.Protocol != model.VMess {\n\t\treturn \"\"\n\t}\n\tobj := map[string]interface{}{\n\t\t\"v\":    \"2\",\n\t\t\"add\":  s.address,\n\t\t\"port\": inbound.Port,\n\t\t\"type\": \"none\",\n\t}\n\tvar stream map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.StreamSettings), &stream)\n\tnetwork, _ := stream[\"network\"].(string)\n\tobj[\"net\"] = network\n\tswitch network {\n\tcase \"tcp\":\n\t\ttcp, _ := stream[\"tcpSettings\"].(map[string]interface{})\n\t\theader, _ := tcp[\"header\"].(map[string]interface{})\n\t\ttypeStr, _ := header[\"type\"].(string)\n\t\tobj[\"type\"] = typeStr\n\t\tif typeStr == \"http\" {\n\t\t\trequest := header[\"request\"].(map[string]interface{})\n\t\t\trequestPath, _ := request[\"path\"].([]interface{})\n\t\t\tobj[\"path\"] = requestPath[0].(string)\n\t\t\theaders, _ := request[\"headers\"].(map[string]interface{})\n\t\t\tobj[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"kcp\":\n\t\tkcp, _ := stream[\"kcpSettings\"].(map[string]interface{})\n\t\theader, _ := kcp[\"header\"].(map[string]interface{})\n\t\tobj[\"type\"], _ = header[\"type\"].(string)\n\t\tobj[\"path\"], _ = kcp[\"seed\"].(string)\n\tcase \"ws\":\n\t\tws, _ := stream[\"wsSettings\"].(map[string]interface{})\n\t\tobj[\"path\"] = ws[\"path\"].(string)\n\t\tif host, ok := ws[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tobj[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := ws[\"headers\"].(map[string]interface{})\n\t\t\tobj[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"http\":\n\t\tobj[\"net\"] = \"h2\"\n\t\thttp, _ := stream[\"httpSettings\"].(map[string]interface{})\n\t\tobj[\"path\"], _ = http[\"path\"].(string)\n\t\tobj[\"host\"] = searchHost(http)\n\tcase \"quic\":\n\t\tquic, _ := stream[\"quicSettings\"].(map[string]interface{})\n\t\theader := quic[\"header\"].(map[string]interface{})\n\t\tobj[\"type\"], _ = header[\"type\"].(string)\n\t\tobj[\"host\"], _ = quic[\"security\"].(string)\n\t\tobj[\"path\"], _ = quic[\"key\"].(string)\n\tcase \"grpc\":\n\t\tgrpc, _ := stream[\"grpcSettings\"].(map[string]interface{})\n\t\tobj[\"path\"] = grpc[\"serviceName\"].(string)\n\t\tobj[\"authority\"] = grpc[\"authority\"].(string)\n\t\tif grpc[\"multiMode\"].(bool) {\n\t\t\tobj[\"type\"] = \"multi\"\n\t\t}\n\tcase \"httpupgrade\":\n\t\thttpupgrade, _ := stream[\"httpupgradeSettings\"].(map[string]interface{})\n\t\tobj[\"path\"] = httpupgrade[\"path\"].(string)\n\t\tif host, ok := httpupgrade[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tobj[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := httpupgrade[\"headers\"].(map[string]interface{})\n\t\t\tobj[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"splithttp\":\n\t\tsplithttp, _ := stream[\"splithttpSettings\"].(map[string]interface{})\n\t\tobj[\"path\"] = splithttp[\"path\"].(string)\n\t\tif host, ok := splithttp[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tobj[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := splithttp[\"headers\"].(map[string]interface{})\n\t\t\tobj[\"host\"] = searchHost(headers)\n\t\t}\n\t}\n\tsecurity, _ := stream[\"security\"].(string)\n\tobj[\"tls\"] = security\n\tif security == \"tls\" {\n\t\ttlsSetting, _ := stream[\"tlsSettings\"].(map[string]interface{})\n\t\talpns, _ := tlsSetting[\"alpn\"].([]interface{})\n\t\tif len(alpns) > 0 {\n\t\t\tvar alpn []string\n\t\t\tfor _, a := range alpns {\n\t\t\t\talpn = append(alpn, a.(string))\n\t\t\t}\n\t\t\tobj[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(tlsSetting, \"serverName\"); ok {\n\t\t\tobj[\"sni\"], _ = sniValue.(string)\n\t\t}\n\n\t\ttlsSettings, _ := searchKey(tlsSetting, \"settings\")\n\t\tif tlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(tlsSettings, \"fingerprint\"); ok {\n\t\t\t\tobj[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(tlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tobj[\"allowInsecure\"], _ = insecure.(bool)\n\t\t\t}\n\t\t}\n\t}\n\n\tclients, _ := s.inboundService.GetClients(inbound)\n\tclientIndex := -1\n\tfor i, client := range clients {\n\t\tif client.Email == email {\n\t\t\tclientIndex = i\n\t\t\tbreak\n\t\t}\n\t}\n\tobj[\"id\"] = clients[clientIndex].ID\n\n\texternalProxies, _ := stream[\"externalProxy\"].([]interface{})\n\n\tif len(externalProxies) > 0 {\n\t\tlinks := \"\"\n\t\tfor index, externalProxy := range externalProxies {\n\t\t\tep, _ := externalProxy.(map[string]interface{})\n\t\t\tnewSecurity, _ := ep[\"forceTls\"].(string)\n\t\t\tnewObj := map[string]interface{}{}\n\t\t\tfor key, value := range obj {\n\t\t\t\tif !(newSecurity == \"none\" && (key == \"alpn\" || key == \"sni\" || key == \"fp\" || key == \"allowInsecure\")) {\n\t\t\t\t\tnewObj[key] = value\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewObj[\"ps\"] = s.genRemark(inbound, email, ep[\"remark\"].(string))\n\t\t\tnewObj[\"add\"] = ep[\"dest\"].(string)\n\t\t\tnewObj[\"port\"] = int(ep[\"port\"].(float64))\n\n\t\t\tif newSecurity != \"same\" {\n\t\t\t\tnewObj[\"tls\"] = newSecurity\n\t\t\t}\n\t\t\tif index > 0 {\n\t\t\t\tlinks += \"\\n\"\n\t\t\t}\n\t\t\tjsonStr, _ := json.MarshalIndent(newObj, \"\", \"  \")\n\t\t\tlinks += \"vmess://\" + base64.StdEncoding.EncodeToString(jsonStr)\n\t\t}\n\t\treturn links\n\t}\n\n\tobj[\"ps\"] = s.genRemark(inbound, email, \"\")\n\n\tjsonStr, _ := json.MarshalIndent(obj, \"\", \"  \")\n\treturn \"vmess://\" + base64.StdEncoding.EncodeToString(jsonStr)\n}\n\nfunc (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {\n\taddress := s.address\n\tif inbound.Protocol != model.VLESS {\n\t\treturn \"\"\n\t}\n\tvar stream map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.StreamSettings), &stream)\n\tclients, _ := s.inboundService.GetClients(inbound)\n\tclientIndex := -1\n\tfor i, client := range clients {\n\t\tif client.Email == email {\n\t\t\tclientIndex = i\n\t\t\tbreak\n\t\t}\n\t}\n\tuuid := clients[clientIndex].ID\n\tport := inbound.Port\n\tstreamNetwork := stream[\"network\"].(string)\n\tparams := make(map[string]string)\n\tparams[\"type\"] = streamNetwork\n\n\tswitch streamNetwork {\n\tcase \"tcp\":\n\t\ttcp, _ := stream[\"tcpSettings\"].(map[string]interface{})\n\t\theader, _ := tcp[\"header\"].(map[string]interface{})\n\t\ttypeStr, _ := header[\"type\"].(string)\n\t\tif typeStr == \"http\" {\n\t\t\trequest := header[\"request\"].(map[string]interface{})\n\t\t\trequestPath, _ := request[\"path\"].([]interface{})\n\t\t\tparams[\"path\"] = requestPath[0].(string)\n\t\t\theaders, _ := request[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t\tparams[\"headerType\"] = \"http\"\n\t\t}\n\tcase \"kcp\":\n\t\tkcp, _ := stream[\"kcpSettings\"].(map[string]interface{})\n\t\theader, _ := kcp[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\t\tparams[\"seed\"] = kcp[\"seed\"].(string)\n\tcase \"ws\":\n\t\tws, _ := stream[\"wsSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = ws[\"path\"].(string)\n\t\tif host, ok := ws[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := ws[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"http\":\n\t\thttp, _ := stream[\"httpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = http[\"path\"].(string)\n\t\tparams[\"host\"] = searchHost(http)\n\tcase \"quic\":\n\t\tquic, _ := stream[\"quicSettings\"].(map[string]interface{})\n\t\tparams[\"quicSecurity\"] = quic[\"security\"].(string)\n\t\tparams[\"key\"] = quic[\"key\"].(string)\n\t\theader := quic[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\tcase \"grpc\":\n\t\tgrpc, _ := stream[\"grpcSettings\"].(map[string]interface{})\n\t\tparams[\"serviceName\"] = grpc[\"serviceName\"].(string)\n\t\tparams[\"authority\"], _ = grpc[\"authority\"].(string)\n\t\tif grpc[\"multiMode\"].(bool) {\n\t\t\tparams[\"mode\"] = \"multi\"\n\t\t}\n\tcase \"httpupgrade\":\n\t\thttpupgrade, _ := stream[\"httpupgradeSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = httpupgrade[\"path\"].(string)\n\t\tif host, ok := httpupgrade[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := httpupgrade[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"splithttp\":\n\t\tsplithttp, _ := stream[\"splithttpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = splithttp[\"path\"].(string)\n\t\tif host, ok := splithttp[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := splithttp[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\t}\n\tsecurity, _ := stream[\"security\"].(string)\n\tif security == \"tls\" {\n\t\tparams[\"security\"] = \"tls\"\n\t\ttlsSetting, _ := stream[\"tlsSettings\"].(map[string]interface{})\n\t\talpns, _ := tlsSetting[\"alpn\"].([]interface{})\n\t\tvar alpn []string\n\t\tfor _, a := range alpns {\n\t\t\talpn = append(alpn, a.(string))\n\t\t}\n\t\tif len(alpn) > 0 {\n\t\t\tparams[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(tlsSetting, \"serverName\"); ok {\n\t\t\tparams[\"sni\"], _ = sniValue.(string)\n\t\t}\n\n\t\ttlsSettings, _ := searchKey(tlsSetting, \"settings\")\n\t\tif tlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(tlsSettings, \"fingerprint\"); ok {\n\t\t\t\tparams[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(tlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tif insecure.(bool) {\n\t\t\t\t\tparams[\"allowInsecure\"] = \"1\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif streamNetwork == \"tcp\" && len(clients[clientIndex].Flow) > 0 {\n\t\t\tparams[\"flow\"] = clients[clientIndex].Flow\n\t\t}\n\t}\n\n\tif security == \"reality\" {\n\t\tparams[\"security\"] = \"reality\"\n\t\trealitySetting, _ := stream[\"realitySettings\"].(map[string]interface{})\n\t\trealitySettings, _ := searchKey(realitySetting, \"settings\")\n\t\tif realitySetting != nil {\n\t\t\tif sniValue, ok := searchKey(realitySetting, \"serverNames\"); ok {\n\t\t\t\tsNames, _ := sniValue.([]interface{})\n\t\t\t\tparams[\"sni\"] = sNames[random.Num(len(sNames))].(string)\n\t\t\t}\n\t\t\tif pbkValue, ok := searchKey(realitySettings, \"publicKey\"); ok {\n\t\t\t\tparams[\"pbk\"], _ = pbkValue.(string)\n\t\t\t}\n\t\t\tif sidValue, ok := searchKey(realitySetting, \"shortIds\"); ok {\n\t\t\t\tshortIds, _ := sidValue.([]interface{})\n\t\t\t\tparams[\"sid\"] = shortIds[random.Num(len(shortIds))].(string)\n\t\t\t}\n\t\t\tif fpValue, ok := searchKey(realitySettings, \"fingerprint\"); ok {\n\t\t\t\tif fp, ok := fpValue.(string); ok && len(fp) > 0 {\n\t\t\t\t\tparams[\"fp\"] = fp\n\t\t\t\t}\n\t\t\t}\n\t\t\tparams[\"spx\"] = \"/\" + random.Seq(15)\n\t\t}\n\n\t\tif streamNetwork == \"tcp\" && len(clients[clientIndex].Flow) > 0 {\n\t\t\tparams[\"flow\"] = clients[clientIndex].Flow\n\t\t}\n\t}\n\n\tif security == \"xtls\" {\n\t\tparams[\"security\"] = \"xtls\"\n\t\txtlsSetting, _ := stream[\"xtlsSettings\"].(map[string]interface{})\n\t\talpns, _ := xtlsSetting[\"alpn\"].([]interface{})\n\t\tvar alpn []string\n\t\tfor _, a := range alpns {\n\t\t\talpn = append(alpn, a.(string))\n\t\t}\n\t\tif len(alpn) > 0 {\n\t\t\tparams[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(xtlsSetting, \"serverName\"); ok {\n\t\t\tparams[\"sni\"], _ = sniValue.(string)\n\t\t}\n\t\txtlsSettings, _ := searchKey(xtlsSetting, \"settings\")\n\t\tif xtlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(xtlsSettings, \"fingerprint\"); ok {\n\t\t\t\tparams[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(xtlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tif insecure.(bool) {\n\t\t\t\t\tparams[\"allowInsecure\"] = \"1\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif streamNetwork == \"tcp\" && len(clients[clientIndex].Flow) > 0 {\n\t\t\tparams[\"flow\"] = clients[clientIndex].Flow\n\t\t}\n\t}\n\n\tif security != \"tls\" && security != \"reality\" && security != \"xtls\" {\n\t\tparams[\"security\"] = \"none\"\n\t}\n\n\texternalProxies, _ := stream[\"externalProxy\"].([]interface{})\n\n\tif len(externalProxies) > 0 {\n\t\tlinks := \"\"\n\t\tfor index, externalProxy := range externalProxies {\n\t\t\tep, _ := externalProxy.(map[string]interface{})\n\t\t\tnewSecurity, _ := ep[\"forceTls\"].(string)\n\t\t\tdest, _ := ep[\"dest\"].(string)\n\t\t\tport := int(ep[\"port\"].(float64))\n\t\t\tlink := fmt.Sprintf(\"vless://%s@%s:%d\", uuid, dest, port)\n\n\t\t\tif newSecurity != \"same\" {\n\t\t\t\tparams[\"security\"] = newSecurity\n\t\t\t} else {\n\t\t\t\tparams[\"security\"] = security\n\t\t\t}\n\t\t\turl, _ := url.Parse(link)\n\t\t\tq := url.Query()\n\n\t\t\tfor k, v := range params {\n\t\t\t\tif !(newSecurity == \"none\" && (k == \"alpn\" || k == \"sni\" || k == \"fp\" || k == \"allowInsecure\")) {\n\t\t\t\t\tq.Add(k, v)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the new query values on the URL\n\t\t\turl.RawQuery = q.Encode()\n\n\t\t\turl.Fragment = s.genRemark(inbound, email, ep[\"remark\"].(string))\n\n\t\t\tif index > 0 {\n\t\t\t\tlinks += \"\\n\"\n\t\t\t}\n\t\t\tlinks += url.String()\n\t\t}\n\t\treturn links\n\t}\n\n\tlink := fmt.Sprintf(\"vless://%s@%s:%d\", uuid, address, port)\n\turl, _ := url.Parse(link)\n\tq := url.Query()\n\n\tfor k, v := range params {\n\t\tq.Add(k, v)\n\t}\n\n\t// Set the new query values on the URL\n\turl.RawQuery = q.Encode()\n\n\turl.Fragment = s.genRemark(inbound, email, \"\")\n\treturn url.String()\n}\n\nfunc (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string {\n\taddress := s.address\n\tif inbound.Protocol != model.Trojan {\n\t\treturn \"\"\n\t}\n\tvar stream map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.StreamSettings), &stream)\n\tclients, _ := s.inboundService.GetClients(inbound)\n\tclientIndex := -1\n\tfor i, client := range clients {\n\t\tif client.Email == email {\n\t\t\tclientIndex = i\n\t\t\tbreak\n\t\t}\n\t}\n\tpassword := clients[clientIndex].Password\n\tport := inbound.Port\n\tstreamNetwork := stream[\"network\"].(string)\n\tparams := make(map[string]string)\n\tparams[\"type\"] = streamNetwork\n\n\tswitch streamNetwork {\n\tcase \"tcp\":\n\t\ttcp, _ := stream[\"tcpSettings\"].(map[string]interface{})\n\t\theader, _ := tcp[\"header\"].(map[string]interface{})\n\t\ttypeStr, _ := header[\"type\"].(string)\n\t\tif typeStr == \"http\" {\n\t\t\trequest := header[\"request\"].(map[string]interface{})\n\t\t\trequestPath, _ := request[\"path\"].([]interface{})\n\t\t\tparams[\"path\"] = requestPath[0].(string)\n\t\t\theaders, _ := request[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t\tparams[\"headerType\"] = \"http\"\n\t\t}\n\tcase \"kcp\":\n\t\tkcp, _ := stream[\"kcpSettings\"].(map[string]interface{})\n\t\theader, _ := kcp[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\t\tparams[\"seed\"] = kcp[\"seed\"].(string)\n\tcase \"ws\":\n\t\tws, _ := stream[\"wsSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = ws[\"path\"].(string)\n\t\tif host, ok := ws[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := ws[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"http\":\n\t\thttp, _ := stream[\"httpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = http[\"path\"].(string)\n\t\tparams[\"host\"] = searchHost(http)\n\tcase \"quic\":\n\t\tquic, _ := stream[\"quicSettings\"].(map[string]interface{})\n\t\tparams[\"quicSecurity\"] = quic[\"security\"].(string)\n\t\tparams[\"key\"] = quic[\"key\"].(string)\n\t\theader := quic[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\tcase \"grpc\":\n\t\tgrpc, _ := stream[\"grpcSettings\"].(map[string]interface{})\n\t\tparams[\"serviceName\"] = grpc[\"serviceName\"].(string)\n\t\tparams[\"authority\"], _ = grpc[\"authority\"].(string)\n\t\tif grpc[\"multiMode\"].(bool) {\n\t\t\tparams[\"mode\"] = \"multi\"\n\t\t}\n\tcase \"httpupgrade\":\n\t\thttpupgrade, _ := stream[\"httpupgradeSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = httpupgrade[\"path\"].(string)\n\t\tif host, ok := httpupgrade[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := httpupgrade[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"splithttp\":\n\t\tsplithttp, _ := stream[\"splithttpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = splithttp[\"path\"].(string)\n\t\tif host, ok := splithttp[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := splithttp[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\t}\n\tsecurity, _ := stream[\"security\"].(string)\n\tif security == \"tls\" {\n\t\tparams[\"security\"] = \"tls\"\n\t\ttlsSetting, _ := stream[\"tlsSettings\"].(map[string]interface{})\n\t\talpns, _ := tlsSetting[\"alpn\"].([]interface{})\n\t\tvar alpn []string\n\t\tfor _, a := range alpns {\n\t\t\talpn = append(alpn, a.(string))\n\t\t}\n\t\tif len(alpn) > 0 {\n\t\t\tparams[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(tlsSetting, \"serverName\"); ok {\n\t\t\tparams[\"sni\"], _ = sniValue.(string)\n\t\t}\n\n\t\ttlsSettings, _ := searchKey(tlsSetting, \"settings\")\n\t\tif tlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(tlsSettings, \"fingerprint\"); ok {\n\t\t\t\tparams[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(tlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tif insecure.(bool) {\n\t\t\t\t\tparams[\"allowInsecure\"] = \"1\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif security == \"reality\" {\n\t\tparams[\"security\"] = \"reality\"\n\t\trealitySetting, _ := stream[\"realitySettings\"].(map[string]interface{})\n\t\trealitySettings, _ := searchKey(realitySetting, \"settings\")\n\t\tif realitySetting != nil {\n\t\t\tif sniValue, ok := searchKey(realitySetting, \"serverNames\"); ok {\n\t\t\t\tsNames, _ := sniValue.([]interface{})\n\t\t\t\tparams[\"sni\"] = sNames[random.Num(len(sNames))].(string)\n\t\t\t}\n\t\t\tif pbkValue, ok := searchKey(realitySettings, \"publicKey\"); ok {\n\t\t\t\tparams[\"pbk\"], _ = pbkValue.(string)\n\t\t\t}\n\t\t\tif sidValue, ok := searchKey(realitySetting, \"shortIds\"); ok {\n\t\t\t\tshortIds, _ := sidValue.([]interface{})\n\t\t\t\tparams[\"sid\"] = shortIds[random.Num(len(shortIds))].(string)\n\t\t\t}\n\t\t\tif fpValue, ok := searchKey(realitySettings, \"fingerprint\"); ok {\n\t\t\t\tif fp, ok := fpValue.(string); ok && len(fp) > 0 {\n\t\t\t\t\tparams[\"fp\"] = fp\n\t\t\t\t}\n\t\t\t}\n\t\t\tparams[\"spx\"] = \"/\" + random.Seq(15)\n\t\t}\n\n\t\tif streamNetwork == \"tcp\" && len(clients[clientIndex].Flow) > 0 {\n\t\t\tparams[\"flow\"] = clients[clientIndex].Flow\n\t\t}\n\t}\n\n\tif security == \"xtls\" {\n\t\tparams[\"security\"] = \"xtls\"\n\t\txtlsSetting, _ := stream[\"xtlsSettings\"].(map[string]interface{})\n\t\talpns, _ := xtlsSetting[\"alpn\"].([]interface{})\n\t\tvar alpn []string\n\t\tfor _, a := range alpns {\n\t\t\talpn = append(alpn, a.(string))\n\t\t}\n\t\tif len(alpn) > 0 {\n\t\t\tparams[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(xtlsSetting, \"serverName\"); ok {\n\t\t\tparams[\"sni\"], _ = sniValue.(string)\n\t\t}\n\n\t\txtlsSettings, _ := searchKey(xtlsSetting, \"settings\")\n\t\tif xtlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(xtlsSettings, \"fingerprint\"); ok {\n\t\t\t\tparams[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(xtlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tif insecure.(bool) {\n\t\t\t\t\tparams[\"allowInsecure\"] = \"1\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif streamNetwork == \"tcp\" && len(clients[clientIndex].Flow) > 0 {\n\t\t\tparams[\"flow\"] = clients[clientIndex].Flow\n\t\t}\n\t}\n\n\tif security != \"tls\" && security != \"reality\" && security != \"xtls\" {\n\t\tparams[\"security\"] = \"none\"\n\t}\n\n\texternalProxies, _ := stream[\"externalProxy\"].([]interface{})\n\n\tif len(externalProxies) > 0 {\n\t\tlinks := \"\"\n\t\tfor index, externalProxy := range externalProxies {\n\t\t\tep, _ := externalProxy.(map[string]interface{})\n\t\t\tnewSecurity, _ := ep[\"forceTls\"].(string)\n\t\t\tdest, _ := ep[\"dest\"].(string)\n\t\t\tport := int(ep[\"port\"].(float64))\n\t\t\tlink := fmt.Sprintf(\"trojan://%s@%s:%d\", password, dest, port)\n\n\t\t\tif newSecurity != \"same\" {\n\t\t\t\tparams[\"security\"] = newSecurity\n\t\t\t} else {\n\t\t\t\tparams[\"security\"] = security\n\t\t\t}\n\t\t\turl, _ := url.Parse(link)\n\t\t\tq := url.Query()\n\n\t\t\tfor k, v := range params {\n\t\t\t\tif !(newSecurity == \"none\" && (k == \"alpn\" || k == \"sni\" || k == \"fp\" || k == \"allowInsecure\")) {\n\t\t\t\t\tq.Add(k, v)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the new query values on the URL\n\t\t\turl.RawQuery = q.Encode()\n\n\t\t\turl.Fragment = s.genRemark(inbound, email, ep[\"remark\"].(string))\n\n\t\t\tif index > 0 {\n\t\t\t\tlinks += \"\\n\"\n\t\t\t}\n\t\t\tlinks += url.String()\n\t\t}\n\t\treturn links\n\t}\n\n\tlink := fmt.Sprintf(\"trojan://%s@%s:%d\", password, address, port)\n\n\turl, _ := url.Parse(link)\n\tq := url.Query()\n\n\tfor k, v := range params {\n\t\tq.Add(k, v)\n\t}\n\n\t// Set the new query values on the URL\n\turl.RawQuery = q.Encode()\n\n\turl.Fragment = s.genRemark(inbound, email, \"\")\n\treturn url.String()\n}\n\nfunc (s *SubService) genShadowsocksLink(inbound *model.Inbound, email string) string {\n\taddress := s.address\n\tif inbound.Protocol != model.Shadowsocks {\n\t\treturn \"\"\n\t}\n\tvar stream map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.StreamSettings), &stream)\n\tclients, _ := s.inboundService.GetClients(inbound)\n\n\tvar settings map[string]interface{}\n\tjson.Unmarshal([]byte(inbound.Settings), &settings)\n\tinboundPassword := settings[\"password\"].(string)\n\tmethod := settings[\"method\"].(string)\n\tclientIndex := -1\n\tfor i, client := range clients {\n\t\tif client.Email == email {\n\t\t\tclientIndex = i\n\t\t\tbreak\n\t\t}\n\t}\n\tstreamNetwork := stream[\"network\"].(string)\n\tparams := make(map[string]string)\n\tparams[\"type\"] = streamNetwork\n\n\tswitch streamNetwork {\n\tcase \"tcp\":\n\t\ttcp, _ := stream[\"tcpSettings\"].(map[string]interface{})\n\t\theader, _ := tcp[\"header\"].(map[string]interface{})\n\t\ttypeStr, _ := header[\"type\"].(string)\n\t\tif typeStr == \"http\" {\n\t\t\trequest := header[\"request\"].(map[string]interface{})\n\t\t\trequestPath, _ := request[\"path\"].([]interface{})\n\t\t\tparams[\"path\"] = requestPath[0].(string)\n\t\t\theaders, _ := request[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t\tparams[\"headerType\"] = \"http\"\n\t\t}\n\tcase \"kcp\":\n\t\tkcp, _ := stream[\"kcpSettings\"].(map[string]interface{})\n\t\theader, _ := kcp[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\t\tparams[\"seed\"] = kcp[\"seed\"].(string)\n\tcase \"ws\":\n\t\tws, _ := stream[\"wsSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = ws[\"path\"].(string)\n\t\tif host, ok := ws[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := ws[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"http\":\n\t\thttp, _ := stream[\"httpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = http[\"path\"].(string)\n\t\tparams[\"host\"] = searchHost(http)\n\tcase \"quic\":\n\t\tquic, _ := stream[\"quicSettings\"].(map[string]interface{})\n\t\tparams[\"quicSecurity\"] = quic[\"security\"].(string)\n\t\tparams[\"key\"] = quic[\"key\"].(string)\n\t\theader := quic[\"header\"].(map[string]interface{})\n\t\tparams[\"headerType\"] = header[\"type\"].(string)\n\tcase \"grpc\":\n\t\tgrpc, _ := stream[\"grpcSettings\"].(map[string]interface{})\n\t\tparams[\"serviceName\"] = grpc[\"serviceName\"].(string)\n\t\tparams[\"authority\"], _ = grpc[\"authority\"].(string)\n\t\tif grpc[\"multiMode\"].(bool) {\n\t\t\tparams[\"mode\"] = \"multi\"\n\t\t}\n\tcase \"httpupgrade\":\n\t\thttpupgrade, _ := stream[\"httpupgradeSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = httpupgrade[\"path\"].(string)\n\t\tif host, ok := httpupgrade[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := httpupgrade[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\tcase \"splithttp\":\n\t\tsplithttp, _ := stream[\"splithttpSettings\"].(map[string]interface{})\n\t\tparams[\"path\"] = splithttp[\"path\"].(string)\n\t\tif host, ok := splithttp[\"host\"].(string); ok && len(host) > 0 {\n\t\t\tparams[\"host\"] = host\n\t\t} else {\n\t\t\theaders, _ := splithttp[\"headers\"].(map[string]interface{})\n\t\t\tparams[\"host\"] = searchHost(headers)\n\t\t}\n\t}\n\n\tsecurity, _ := stream[\"security\"].(string)\n\tif security == \"tls\" {\n\t\tparams[\"security\"] = \"tls\"\n\t\ttlsSetting, _ := stream[\"tlsSettings\"].(map[string]interface{})\n\t\talpns, _ := tlsSetting[\"alpn\"].([]interface{})\n\t\tvar alpn []string\n\t\tfor _, a := range alpns {\n\t\t\talpn = append(alpn, a.(string))\n\t\t}\n\t\tif len(alpn) > 0 {\n\t\t\tparams[\"alpn\"] = strings.Join(alpn, \",\")\n\t\t}\n\t\tif sniValue, ok := searchKey(tlsSetting, \"serverName\"); ok {\n\t\t\tparams[\"sni\"], _ = sniValue.(string)\n\t\t}\n\n\t\ttlsSettings, _ := searchKey(tlsSetting, \"settings\")\n\t\tif tlsSetting != nil {\n\t\t\tif fpValue, ok := searchKey(tlsSettings, \"fingerprint\"); ok {\n\t\t\t\tparams[\"fp\"], _ = fpValue.(string)\n\t\t\t}\n\t\t\tif insecure, ok := searchKey(tlsSettings, \"allowInsecure\"); ok {\n\t\t\t\tif insecure.(bool) {\n\t\t\t\t\tparams[\"allowInsecure\"] = \"1\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tencPart := fmt.Sprintf(\"%s:%s\", method, clients[clientIndex].Password)\n\tif method[0] == '2' {\n\t\tencPart = fmt.Sprintf(\"%s:%s:%s\", method, inboundPassword, clients[clientIndex].Password)\n\t}\n\n\texternalProxies, _ := stream[\"externalProxy\"].([]interface{})\n\n\tif len(externalProxies) > 0 {\n\t\tlinks := \"\"\n\t\tfor index, externalProxy := range externalProxies {\n\t\t\tep, _ := externalProxy.(map[string]interface{})\n\t\t\tnewSecurity, _ := ep[\"forceTls\"].(string)\n\t\t\tdest, _ := ep[\"dest\"].(string)\n\t\t\tport := int(ep[\"port\"].(float64))\n\t\t\tlink := fmt.Sprintf(\"ss://%s@%s:%d\", base64.StdEncoding.EncodeToString([]byte(encPart)), dest, port)\n\n\t\t\tif newSecurity != \"same\" {\n\t\t\t\tparams[\"security\"] = newSecurity\n\t\t\t} else {\n\t\t\t\tparams[\"security\"] = security\n\t\t\t}\n\t\t\turl, _ := url.Parse(link)\n\t\t\tq := url.Query()\n\n\t\t\tfor k, v := range params {\n\t\t\t\tif !(newSecurity == \"none\" && (k == \"alpn\" || k == \"sni\" || k == \"fp\" || k == \"allowInsecure\")) {\n\t\t\t\t\tq.Add(k, v)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the new query values on the URL\n\t\t\turl.RawQuery = q.Encode()\n\n\t\t\turl.Fragment = s.genRemark(inbound, email, ep[\"remark\"].(string))\n\n\t\t\tif index > 0 {\n\t\t\t\tlinks += \"\\n\"\n\t\t\t}\n\t\t\tlinks += url.String()\n\t\t}\n\t\treturn links\n\t}\n\n\tlink := fmt.Sprintf(\"ss://%s@%s:%d\", base64.StdEncoding.EncodeToString([]byte(encPart)), address, inbound.Port)\n\turl, _ := url.Parse(link)\n\tq := url.Query()\n\n\tfor k, v := range params {\n\t\tq.Add(k, v)\n\t}\n\n\t// Set the new query values on the URL\n\turl.RawQuery = q.Encode()\n\n\turl.Fragment = s.genRemark(inbound, email, \"\")\n\treturn url.String()\n}\n\nfunc (s *SubService) genRemark(inbound *model.Inbound, email string, extra string) string {\n\tseparationChar := string(s.remarkModel[0])\n\torderChars := s.remarkModel[1:]\n\torders := map[byte]string{\n\t\t'i': \"\",\n\t\t'e': \"\",\n\t\t'o': \"\",\n\t}\n\tif len(email) > 0 {\n\t\torders['e'] = email\n\t}\n\tif len(inbound.Remark) > 0 {\n\t\torders['i'] = inbound.Remark\n\t}\n\tif len(extra) > 0 {\n\t\torders['o'] = extra\n\t}\n\n\tvar remark []string\n\tfor i := 0; i < len(orderChars); i++ {\n\t\tchar := orderChars[i]\n\t\torder, exists := orders[char]\n\t\tif exists && order != \"\" {\n\t\t\tremark = append(remark, order)\n\t\t}\n\t}\n\n\tif s.showInfo {\n\t\tstatsExist := false\n\t\tvar stats xray.ClientTraffic\n\t\tfor _, clientStat := range inbound.ClientStats {\n\t\t\tif clientStat.Email == email {\n\t\t\t\tstats = clientStat\n\t\t\t\tstatsExist = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Get remained days\n\t\tif statsExist {\n\t\t\tif !stats.Enable {\n\t\t\t\treturn fmt.Sprintf(\"⛔️N/A%s%s\", separationChar, strings.Join(remark, separationChar))\n\t\t\t}\n\t\t\tif vol := stats.Total - (stats.Up + stats.Down); vol > 0 {\n\t\t\t\tremark = append(remark, fmt.Sprintf(\"%s%s\", common.FormatTraffic(vol), \"📊\"))\n\t\t\t}\n\t\t\tnow := time.Now().Unix()\n\t\t\tswitch exp := stats.ExpiryTime / 1000; {\n\t\t\tcase exp > 0:\n\t\t\t\tremainingSeconds := exp - now\n\t\t\t\tdays := remainingSeconds / 86400\n\t\t\t\thours := (remainingSeconds % 86400) / 3600\n\t\t\t\tminutes := (remainingSeconds % 3600) / 60\n\t\t\t\tif days > 0 {\n\t\t\t\t\tif hours > 0 {\n\t\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dD,%dH⏳\", days, hours))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dD⏳\", days))\n\t\t\t\t\t}\n\t\t\t\t} else if hours > 0 {\n\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dH⏳\", hours))\n\t\t\t\t} else {\n\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dM⏳\", minutes))\n\t\t\t\t}\n\t\t\tcase exp < 0:\n\t\t\t\tpassedSeconds := now - exp\n\t\t\t\tdays := passedSeconds / 86400\n\t\t\t\thours := (passedSeconds % 86400) / 3600\n\t\t\t\tminutes := (passedSeconds % 3600) / 60\n\t\t\t\tif days > 0 {\n\t\t\t\t\tif hours > 0 {\n\t\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dD,%dH⏳\", days, hours))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dD⏳\", days))\n\t\t\t\t\t}\n\t\t\t\t} else if hours > 0 {\n\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dH⏳\", hours))\n\t\t\t\t} else {\n\t\t\t\t\tremark = append(remark, fmt.Sprintf(\"%dM⏳\", minutes))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn strings.Join(remark, separationChar)\n}\n\nfunc searchKey(data interface{}, key string) (interface{}, bool) {\n\tswitch val := data.(type) {\n\tcase map[string]interface{}:\n\t\tfor k, v := range val {\n\t\t\tif k == key {\n\t\t\t\treturn v, true\n\t\t\t}\n\t\t\tif result, ok := searchKey(v, key); ok {\n\t\t\t\treturn result, true\n\t\t\t}\n\t\t}\n\tcase []interface{}:\n\t\tfor _, v := range val {\n\t\t\tif result, ok := searchKey(v, key); ok {\n\t\t\t\treturn result, true\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, false\n}\n\nfunc searchHost(headers interface{}) string {\n\tdata, _ := headers.(map[string]interface{})\n\tfor k, v := range data {\n\t\tif strings.EqualFold(k, \"host\") {\n\t\t\tswitch v.(type) {\n\t\t\tcase []interface{}:\n\t\t\t\thosts, _ := v.([]interface{})\n\t\t\t\tif len(hosts) > 0 {\n\t\t\t\t\treturn hosts[0].(string)\n\t\t\t\t} else {\n\t\t\t\t\treturn \"\"\n\t\t\t\t}\n\t\t\tcase interface{}:\n\t\t\t\treturn v.(string)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn \"\"\n}\n"
  },
  {
    "path": "util/common/err.go",
    "content": "package common\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"x-ui/logger\"\n)\n\nfunc NewErrorf(format string, a ...interface{}) error {\n\tmsg := fmt.Sprintf(format, a...)\n\treturn errors.New(msg)\n}\n\nfunc NewError(a ...interface{}) error {\n\tmsg := fmt.Sprintln(a...)\n\treturn errors.New(msg)\n}\n\nfunc Recover(msg string) interface{} {\n\tpanicErr := recover()\n\tif panicErr != nil {\n\t\tif msg != \"\" {\n\t\t\tlogger.Error(msg, \"panic:\", panicErr)\n\t\t}\n\t}\n\treturn panicErr\n}\n"
  },
  {
    "path": "util/common/format.go",
    "content": "package common\n\nimport (\n\t\"fmt\"\n)\n\nfunc FormatTraffic(trafficBytes int64) (size string) {\n\tif trafficBytes < 1024 {\n\t\treturn fmt.Sprintf(\"%.2fB\", float64(trafficBytes)/float64(1))\n\t} else if trafficBytes < (1024 * 1024) {\n\t\treturn fmt.Sprintf(\"%.2fKB\", float64(trafficBytes)/float64(1024))\n\t} else if trafficBytes < (1024 * 1024 * 1024) {\n\t\treturn fmt.Sprintf(\"%.2fMB\", float64(trafficBytes)/float64(1024*1024))\n\t} else if trafficBytes < (1024 * 1024 * 1024 * 1024) {\n\t\treturn fmt.Sprintf(\"%.2fGB\", float64(trafficBytes)/float64(1024*1024*1024))\n\t} else if trafficBytes < (1024 * 1024 * 1024 * 1024 * 1024) {\n\t\treturn fmt.Sprintf(\"%.2fTB\", float64(trafficBytes)/float64(1024*1024*1024*1024))\n\t} else {\n\t\treturn fmt.Sprintf(\"%.2fEB\", float64(trafficBytes)/float64(1024*1024*1024*1024*1024))\n\t}\n}\n"
  },
  {
    "path": "util/common/multi_error.go",
    "content": "package common\n\nimport (\n\t\"strings\"\n)\n\ntype multiError []error\n\nfunc (e multiError) Error() string {\n\tvar r strings.Builder\n\tr.WriteString(\"multierr: \")\n\tfor _, err := range e {\n\t\tr.WriteString(err.Error())\n\t\tr.WriteString(\" | \")\n\t}\n\treturn r.String()\n}\n\nfunc Combine(maybeError ...error) error {\n\tvar errs multiError\n\tfor _, err := range maybeError {\n\t\tif err != nil {\n\t\t\terrs = append(errs, err)\n\t\t}\n\t}\n\tif len(errs) == 0 {\n\t\treturn nil\n\t}\n\treturn errs\n}\n"
  },
  {
    "path": "util/json_util/json.go",
    "content": "package json_util\n\nimport (\n\t\"errors\"\n)\n\ntype RawMessage []byte\n\n// MarshalJSON: Customize json.RawMessage default behavior\nfunc (m RawMessage) MarshalJSON() ([]byte, error) {\n\tif len(m) == 0 {\n\t\treturn []byte(\"null\"), nil\n\t}\n\treturn m, nil\n}\n\n// UnmarshalJSON: sets *m to a copy of data.\nfunc (m *RawMessage) UnmarshalJSON(data []byte) error {\n\tif m == nil {\n\t\treturn errors.New(\"json.RawMessage: UnmarshalJSON on nil pointer\")\n\t}\n\t*m = append((*m)[0:0], data...)\n\treturn nil\n}\n"
  },
  {
    "path": "util/random/random.go",
    "content": "package random\n\nimport (\n\t\"math/rand\"\n)\n\nvar (\n\tnumSeq      [10]rune\n\tlowerSeq    [26]rune\n\tupperSeq    [26]rune\n\tnumLowerSeq [36]rune\n\tnumUpperSeq [36]rune\n\tallSeq      [62]rune\n)\n\nfunc init() {\n\tfor i := 0; i < 10; i++ {\n\t\tnumSeq[i] = rune('0' + i)\n\t}\n\tfor i := 0; i < 26; i++ {\n\t\tlowerSeq[i] = rune('a' + i)\n\t\tupperSeq[i] = rune('A' + i)\n\t}\n\n\tcopy(numLowerSeq[:], numSeq[:])\n\tcopy(numLowerSeq[len(numSeq):], lowerSeq[:])\n\n\tcopy(numUpperSeq[:], numSeq[:])\n\tcopy(numUpperSeq[len(numSeq):], upperSeq[:])\n\n\tcopy(allSeq[:], numSeq[:])\n\tcopy(allSeq[len(numSeq):], lowerSeq[:])\n\tcopy(allSeq[len(numSeq)+len(lowerSeq):], upperSeq[:])\n}\n\nfunc Seq(n int) string {\n\trunes := make([]rune, n)\n\tfor i := 0; i < n; i++ {\n\t\trunes[i] = allSeq[rand.Intn(len(allSeq))]\n\t}\n\treturn string(runes)\n}\n\nfunc Num(n int) int {\n\treturn rand.Intn(n)\n}\n"
  },
  {
    "path": "util/reflect_util/reflect.go",
    "content": "package reflect_util\n\nimport \"reflect\"\n\nfunc GetFields(t reflect.Type) []reflect.StructField {\n\tnum := t.NumField()\n\tfields := make([]reflect.StructField, 0, num)\n\tfor i := 0; i < num; i++ {\n\t\tfields = append(fields, t.Field(i))\n\t}\n\treturn fields\n}\n\nfunc GetFieldValues(v reflect.Value) []reflect.Value {\n\tnum := v.NumField()\n\tfields := make([]reflect.Value, 0, num)\n\tfor i := 0; i < num; i++ {\n\t\tfields = append(fields, v.Field(i))\n\t}\n\treturn fields\n}\n"
  },
  {
    "path": "util/sys/psutil.go",
    "content": "package sys\n\nimport (\n\t_ \"unsafe\"\n)\n\n//go:linkname HostProc github.com/shirou/gopsutil/v4/internal/common.HostProc\nfunc HostProc(combineWith ...string) string\n"
  },
  {
    "path": "util/sys/sys_darwin.go",
    "content": "//go:build darwin\n// +build darwin\n\npackage sys\n\nimport (\n\t\"github.com/shirou/gopsutil/v4/net\"\n)\n\nfunc GetTCPCount() (int, error) {\n\tstats, err := net.Connections(\"tcp\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(stats), nil\n}\n\nfunc GetUDPCount() (int, error) {\n\tstats, err := net.Connections(\"udp\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(stats), nil\n}\n"
  },
  {
    "path": "util/sys/sys_linux.go",
    "content": "//go:build linux\n// +build linux\n\npackage sys\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc getLinesNum(filename string) (int, error) {\n\tfile, err := os.Open(filename)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer file.Close()\n\n\tsum := 0\n\tbuf := make([]byte, 8192)\n\tfor {\n\t\tn, err := file.Read(buf)\n\n\t\tvar buffPosition int\n\t\tfor {\n\t\t\ti := bytes.IndexByte(buf[buffPosition:n], '\\n')\n\t\t\tif i < 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tbuffPosition += i + 1\n\t\t\tsum++\n\t\t}\n\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t} else if err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\treturn sum, nil\n}\n\nfunc GetTCPCount() (int, error) {\n\troot := HostProc()\n\n\ttcp4, err := getLinesNum(fmt.Sprintf(\"%v/net/tcp\", root))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\ttcp6, err := getLinesNum(fmt.Sprintf(\"%v/net/tcp6\", root))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn tcp4 + tcp6, nil\n}\n\nfunc GetUDPCount() (int, error) {\n\troot := HostProc()\n\n\tudp4, err := getLinesNum(fmt.Sprintf(\"%v/net/udp\", root))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tudp6, err := getLinesNum(fmt.Sprintf(\"%v/net/udp6\", root))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn udp4 + udp6, nil\n}\n"
  },
  {
    "path": "util/sys/sys_windows.go",
    "content": "//go:build windows\n// +build windows\n\npackage sys\n\nimport (\n\t\"errors\"\n\n\t\"github.com/shirou/gopsutil/v4/net\"\n)\n\nfunc GetConnectionCount(proto string) (int, error) {\n\tif proto != \"tcp\" && proto != \"udp\" {\n\t\treturn 0, errors.New(\"invalid protocol\")\n\t}\n\n\tstats, err := net.Connections(proto)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(stats), nil\n}\n\nfunc GetTCPCount() (int, error) {\n\treturn GetConnectionCount(\"tcp\")\n}\n\nfunc GetUDPCount() (int, error) {\n\treturn GetConnectionCount(\"udp\")\n}\n"
  },
  {
    "path": "web/assets/ant-design-vue/antd.less",
    "content": "@import \"../lib/style/index.less\";\n@import \"../lib/style/components.less\";\n\n@green-6: #008771;\n@primary-color: @green-6;\n@border-radius-base: 1rem;\n@progress-remaining-color: #EDEDED;"
  },
  {
    "path": "web/assets/codemirror/codemirror.css",
    "content": " .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.CodeMirror-overwrite .CodeMirror-cursor{}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue;}.cm-s-default .cm-quote{color:#090;}.cm-negative{color:#d44;}.cm-positive{color:#292;}.cm-header,.cm-strong{font-weight:bold;}.cm-em{font-style:italic;}.cm-link{text-decoration:underline;}.cm-strikethrough{text-decoration:line-through;}.cm-s-default .cm-keyword{color:#708;}.cm-s-default .cm-atom{color:#219;}.cm-s-default .cm-number{color:#164;}.cm-s-default .cm-def{color:#00f;}.cm-s-default .cm-variable,.cm-s-default .cm-punctuation,.cm-s-default .cm-property,.cm-s-default .cm-operator{}.cm-s-default .cm-variable-2{color:#05a;}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085;}.cm-s-default .cm-comment{color:#a50;}.cm-s-default .cm-string{color:#a11;}.cm-s-default .cm-string-2{color:#f50;}.cm-s-default .cm-meta{color:#555;}.cm-s-default .cm-qualifier{color:#555;}.cm-s-default .cm-builtin{color:#30a;}.cm-s-default .cm-bracket{color:#997;}.cm-s-default .cm-tag{color:#170;}.cm-s-default .cm-attribute{color:#00c;}.cm-s-default .cm-hr{color:#999;}.cm-s-default .cm-link{color:#00c;}.cm-s-default .cm-error{color:#f00;}.cm-invalidchar{color:#f00;}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0;}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22;}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff;}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper::selection{background-color:transparent}.CodeMirror-gutter-wrapper::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-widget{}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}"
  },
  {
    "path": "web/assets/codemirror/codemirror.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// This is CodeMirror (https://codemirror.net/5), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n// CodeMirror v5.65.15\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = global || self, global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n  // Kludges for bugs and behavior differences that can't be feature\n  // detected are enabled based on userAgent etc sniffing.\n  var userAgent = navigator.userAgent;\n  var platform = navigator.platform;\n\n  var gecko = /gecko\\/\\d/i.test(userAgent);\n  var ie_upto10 = /MSIE \\d/.test(userAgent);\n  var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n  var edge = /Edge\\/(\\d+)/.exec(userAgent);\n  var ie = ie_upto10 || ie_11up || edge;\n  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n  var webkit = !edge && /WebKit\\//.test(userAgent);\n  var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n  var chrome = !edge && /Chrome\\/(\\d+)/.exec(userAgent);\n  var chrome_version = chrome && +chrome[1];\n  var presto = /Opera\\//.test(userAgent);\n  var safari = /Apple Computer/.test(navigator.vendor);\n  var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n  var phantom = /PhantomJS/.test(userAgent);\n\n  var ios = safari && (/Mobile\\/\\w+/.test(userAgent) || navigator.maxTouchPoints > 2);\n  var android = /Android/.test(userAgent);\n  // This is woefully incomplete. Suggestions for alternative methods welcome.\n  var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n  var mac = ios || /Mac/.test(platform);\n  var chromeOS = /\\bCrOS\\b/.test(userAgent);\n  var windows = /win/i.test(platform);\n\n  var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n  if (presto_version) { presto_version = Number(presto_version[1]); }\n  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n  var captureRightClick = gecko || (ie && ie_version >= 9);\n\n  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n  var rmClass = function(node, cls) {\n    var current = node.className;\n    var match = classTest(cls).exec(current);\n    if (match) {\n      var after = current.slice(match.index + match[0].length);\n      node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n    }\n  };\n\n  function removeChildren(e) {\n    for (var count = e.childNodes.length; count > 0; --count)\n      { e.removeChild(e.firstChild); }\n    return e\n  }\n\n  function removeChildrenAndAdd(parent, e) {\n    return removeChildren(parent).appendChild(e)\n  }\n\n  function elt(tag, content, className, style) {\n    var e = document.createElement(tag);\n    if (className) { e.className = className; }\n    if (style) { e.style.cssText = style; }\n    if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n    else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n    return e\n  }\n  // wrapper for elt, which removes the elt from the accessibility tree\n  function eltP(tag, content, className, style) {\n    var e = elt(tag, content, className, style);\n    e.setAttribute(\"role\", \"presentation\");\n    return e\n  }\n\n  var range;\n  if (document.createRange) { range = function(node, start, end, endNode) {\n    var r = document.createRange();\n    r.setEnd(endNode || node, end);\n    r.setStart(node, start);\n    return r\n  }; }\n  else { range = function(node, start, end) {\n    var r = document.body.createTextRange();\n    try { r.moveToElementText(node.parentNode); }\n    catch(e) { return r }\n    r.collapse(true);\n    r.moveEnd(\"character\", end);\n    r.moveStart(\"character\", start);\n    return r\n  }; }\n\n  function contains(parent, child) {\n    if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n      { child = child.parentNode; }\n    if (parent.contains)\n      { return parent.contains(child) }\n    do {\n      if (child.nodeType == 11) { child = child.host; }\n      if (child == parent) { return true }\n    } while (child = child.parentNode)\n  }\n\n  function activeElt(doc) {\n    // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n    // IE < 10 will throw when accessed while the page is loading or in an iframe.\n    // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n    var activeElement;\n    try {\n      activeElement = doc.activeElement;\n    } catch(e) {\n      activeElement = doc.body || null;\n    }\n    while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n      { activeElement = activeElement.shadowRoot.activeElement; }\n    return activeElement\n  }\n\n  function addClass(node, cls) {\n    var current = node.className;\n    if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n  }\n  function joinClasses(a, b) {\n    var as = a.split(\" \");\n    for (var i = 0; i < as.length; i++)\n      { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n    return b\n  }\n\n  var selectInput = function(node) { node.select(); };\n  if (ios) // Mobile Safari apparently has a bug where select() is broken.\n    { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n  else if (ie) // Suppress mysterious IE10 errors\n    { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n  function doc(cm) { return cm.display.wrapper.ownerDocument }\n\n  function win(cm) { return doc(cm).defaultView }\n\n  function bind(f) {\n    var args = Array.prototype.slice.call(arguments, 1);\n    return function(){return f.apply(null, args)}\n  }\n\n  function copyObj(obj, target, overwrite) {\n    if (!target) { target = {}; }\n    for (var prop in obj)\n      { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n        { target[prop] = obj[prop]; } }\n    return target\n  }\n\n  // Counts the column offset in a string, taking tabs into account.\n  // Used mostly to find indentation.\n  function countColumn(string, end, tabSize, startIndex, startValue) {\n    if (end == null) {\n      end = string.search(/[^\\s\\u00a0]/);\n      if (end == -1) { end = string.length; }\n    }\n    for (var i = startIndex || 0, n = startValue || 0;;) {\n      var nextTab = string.indexOf(\"\\t\", i);\n      if (nextTab < 0 || nextTab >= end)\n        { return n + (end - i) }\n      n += nextTab - i;\n      n += tabSize - (n % tabSize);\n      i = nextTab + 1;\n    }\n  }\n\n  var Delayed = function() {\n    this.id = null;\n    this.f = null;\n    this.time = 0;\n    this.handler = bind(this.onTimeout, this);\n  };\n  Delayed.prototype.onTimeout = function (self) {\n    self.id = 0;\n    if (self.time <= +new Date) {\n      self.f();\n    } else {\n      setTimeout(self.handler, self.time - +new Date);\n    }\n  };\n  Delayed.prototype.set = function (ms, f) {\n    this.f = f;\n    var time = +new Date + ms;\n    if (!this.id || time < this.time) {\n      clearTimeout(this.id);\n      this.id = setTimeout(this.handler, ms);\n      this.time = time;\n    }\n  };\n\n  function indexOf(array, elt) {\n    for (var i = 0; i < array.length; ++i)\n      { if (array[i] == elt) { return i } }\n    return -1\n  }\n\n  // Number of pixels added to scroller and sizer to hide scrollbar\n  var scrollerGap = 50;\n\n  // Returned or thrown by various protocols to signal 'I'm not\n  // handling this'.\n  var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n  // Reused option objects for setSelection & friends\n  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n  // The inverse of countColumn -- find the offset that corresponds to\n  // a particular column.\n  function findColumn(string, goal, tabSize) {\n    for (var pos = 0, col = 0;;) {\n      var nextTab = string.indexOf(\"\\t\", pos);\n      if (nextTab == -1) { nextTab = string.length; }\n      var skipped = nextTab - pos;\n      if (nextTab == string.length || col + skipped >= goal)\n        { return pos + Math.min(skipped, goal - col) }\n      col += nextTab - pos;\n      col += tabSize - (col % tabSize);\n      pos = nextTab + 1;\n      if (col >= goal) { return pos }\n    }\n  }\n\n  var spaceStrs = [\"\"];\n  function spaceStr(n) {\n    while (spaceStrs.length <= n)\n      { spaceStrs.push(lst(spaceStrs) + \" \"); }\n    return spaceStrs[n]\n  }\n\n  function lst(arr) { return arr[arr.length-1] }\n\n  function map(array, f) {\n    var out = [];\n    for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n    return out\n  }\n\n  function insertSorted(array, value, score) {\n    var pos = 0, priority = score(value);\n    while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n    array.splice(pos, 0, value);\n  }\n\n  function nothing() {}\n\n  function createObj(base, props) {\n    var inst;\n    if (Object.create) {\n      inst = Object.create(base);\n    } else {\n      nothing.prototype = base;\n      inst = new nothing();\n    }\n    if (props) { copyObj(props, inst); }\n    return inst\n  }\n\n  var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n  function isWordCharBasic(ch) {\n    return /\\w/.test(ch) || ch > \"\\x80\" &&\n      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n  }\n  function isWordChar(ch, helper) {\n    if (!helper) { return isWordCharBasic(ch) }\n    if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n    return helper.test(ch)\n  }\n\n  function isEmpty(obj) {\n    for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n    return true\n  }\n\n  // Extending unicode characters. A series of a non-extending char +\n  // any number of extending chars is treated as a single unit as far\n  // as editing and measuring is concerned. This is not fully correct,\n  // since some scripts/fonts/browsers also treat other configurations\n  // of code points as a group.\n  var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n  // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n  function skipExtendingChars(str, pos, dir) {\n    while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n    return pos\n  }\n\n  // Returns the value from the range [`from`; `to`] that satisfies\n  // `pred` and is closest to `from`. Assumes that at least `to`\n  // satisfies `pred`. Supports `from` being greater than `to`.\n  function findFirst(pred, from, to) {\n    // At any point we are certain `to` satisfies `pred`, don't know\n    // whether `from` does.\n    var dir = from > to ? -1 : 1;\n    for (;;) {\n      if (from == to) { return from }\n      var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n      if (mid == from) { return pred(mid) ? from : to }\n      if (pred(mid)) { to = mid; }\n      else { from = mid + dir; }\n    }\n  }\n\n  // BIDI HELPERS\n\n  function iterateBidiSections(order, from, to, f) {\n    if (!order) { return f(from, to, \"ltr\", 0) }\n    var found = false;\n    for (var i = 0; i < order.length; ++i) {\n      var part = order[i];\n      if (part.from < to && part.to > from || from == to && part.to == from) {\n        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n        found = true;\n      }\n    }\n    if (!found) { f(from, to, \"ltr\"); }\n  }\n\n  var bidiOther = null;\n  function getBidiPartAt(order, ch, sticky) {\n    var found;\n    bidiOther = null;\n    for (var i = 0; i < order.length; ++i) {\n      var cur = order[i];\n      if (cur.from < ch && cur.to > ch) { return i }\n      if (cur.to == ch) {\n        if (cur.from != cur.to && sticky == \"before\") { found = i; }\n        else { bidiOther = i; }\n      }\n      if (cur.from == ch) {\n        if (cur.from != cur.to && sticky != \"before\") { found = i; }\n        else { bidiOther = i; }\n      }\n    }\n    return found != null ? found : bidiOther\n  }\n\n  // Bidirectional ordering algorithm\n  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n  // that this (partially) implements.\n\n  // One-char codes used for character types:\n  // L (L):   Left-to-Right\n  // R (R):   Right-to-Left\n  // r (AL):  Right-to-Left Arabic\n  // 1 (EN):  European Number\n  // + (ES):  European Number Separator\n  // % (ET):  European Number Terminator\n  // n (AN):  Arabic Number\n  // , (CS):  Common Number Separator\n  // m (NSM): Non-Spacing Mark\n  // b (BN):  Boundary Neutral\n  // s (B):   Paragraph Separator\n  // t (S):   Segment Separator\n  // w (WS):  Whitespace\n  // N (ON):  Other Neutrals\n\n  // Returns null if characters are ordered as they appear\n  // (left-to-right), or an array of sections ({from, to, level}\n  // objects) in the order in which they occur visually.\n  var bidiOrdering = (function() {\n    // Character types for codepoints 0 to 0xff\n    var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n    // Character types for codepoints 0x600 to 0x6f9\n    var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n    function charType(code) {\n      if (code <= 0xf7) { return lowTypes.charAt(code) }\n      else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n      else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n      else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n      else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n      else if (code == 0x200c) { return \"b\" }\n      else { return \"L\" }\n    }\n\n    var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n    function BidiSpan(level, from, to) {\n      this.level = level;\n      this.from = from; this.to = to;\n    }\n\n    return function(str, direction) {\n      var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n      if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n      var len = str.length, types = [];\n      for (var i = 0; i < len; ++i)\n        { types.push(charType(str.charCodeAt(i))); }\n\n      // W1. Examine each non-spacing mark (NSM) in the level run, and\n      // change the type of the NSM to the type of the previous\n      // character. If the NSM is at the start of the level run, it will\n      // get the type of sor.\n      for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n        var type = types[i$1];\n        if (type == \"m\") { types[i$1] = prev; }\n        else { prev = type; }\n      }\n\n      // W2. Search backwards from each instance of a European number\n      // until the first strong type (R, L, AL, or sor) is found. If an\n      // AL is found, change the type of the European number to Arabic\n      // number.\n      // W3. Change all ALs to R.\n      for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n        var type$1 = types[i$2];\n        if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n        else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n      }\n\n      // W4. A single European separator between two European numbers\n      // changes to a European number. A single common separator between\n      // two numbers of the same type changes to that type.\n      for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n        var type$2 = types[i$3];\n        if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n        else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n                 (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n        prev$1 = type$2;\n      }\n\n      // W5. A sequence of European terminators adjacent to European\n      // numbers changes to all European numbers.\n      // W6. Otherwise, separators and terminators change to Other\n      // Neutral.\n      for (var i$4 = 0; i$4 < len; ++i$4) {\n        var type$3 = types[i$4];\n        if (type$3 == \",\") { types[i$4] = \"N\"; }\n        else if (type$3 == \"%\") {\n          var end = (void 0);\n          for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n          var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n          for (var j = i$4; j < end; ++j) { types[j] = replace; }\n          i$4 = end - 1;\n        }\n      }\n\n      // W7. Search backwards from each instance of a European number\n      // until the first strong type (R, L, or sor) is found. If an L is\n      // found, then change the type of the European number to L.\n      for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n        var type$4 = types[i$5];\n        if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n        else if (isStrong.test(type$4)) { cur$1 = type$4; }\n      }\n\n      // N1. A sequence of neutrals takes the direction of the\n      // surrounding strong text if the text on both sides has the same\n      // direction. European and Arabic numbers act as if they were R in\n      // terms of their influence on neutrals. Start-of-level-run (sor)\n      // and end-of-level-run (eor) are used at level run boundaries.\n      // N2. Any remaining neutrals take the embedding direction.\n      for (var i$6 = 0; i$6 < len; ++i$6) {\n        if (isNeutral.test(types[i$6])) {\n          var end$1 = (void 0);\n          for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n          var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n          var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n          var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n          for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n          i$6 = end$1 - 1;\n        }\n      }\n\n      // Here we depart from the documented algorithm, in order to avoid\n      // building up an actual levels array. Since there are only three\n      // levels (0, 1, 2) in an implementation that doesn't take\n      // explicit embedding into account, we can build up the order on\n      // the fly, without following the level-based algorithm.\n      var order = [], m;\n      for (var i$7 = 0; i$7 < len;) {\n        if (countsAsLeft.test(types[i$7])) {\n          var start = i$7;\n          for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n          order.push(new BidiSpan(0, start, i$7));\n        } else {\n          var pos = i$7, at = order.length, isRTL = direction == \"rtl\" ? 1 : 0;\n          for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n          for (var j$2 = pos; j$2 < i$7;) {\n            if (countsAsNum.test(types[j$2])) {\n              if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }\n              var nstart = j$2;\n              for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n              order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n              at += isRTL;\n              pos = j$2;\n            } else { ++j$2; }\n          }\n          if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n        }\n      }\n      if (direction == \"ltr\") {\n        if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n          order[0].from = m[0].length;\n          order.unshift(new BidiSpan(0, 0, m[0].length));\n        }\n        if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n          lst(order).to -= m[0].length;\n          order.push(new BidiSpan(0, len - m[0].length, len));\n        }\n      }\n\n      return direction == \"rtl\" ? order.reverse() : order\n    }\n  })();\n\n  // Get the bidi ordering for the given line (and cache it). Returns\n  // false for lines that are fully left-to-right, and an array of\n  // BidiSpan objects otherwise.\n  function getOrder(line, direction) {\n    var order = line.order;\n    if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n    return order\n  }\n\n  // EVENT HANDLING\n\n  // Lightweight event framework. on/off also work on DOM nodes,\n  // registering native DOM handlers.\n\n  var noHandlers = [];\n\n  var on = function(emitter, type, f) {\n    if (emitter.addEventListener) {\n      emitter.addEventListener(type, f, { passive: false });\n    } else if (emitter.attachEvent) {\n      emitter.attachEvent(\"on\" + type, f);\n    } else {\n      var map = emitter._handlers || (emitter._handlers = {});\n      map[type] = (map[type] || noHandlers).concat(f);\n    }\n  };\n\n  function getHandlers(emitter, type) {\n    return emitter._handlers && emitter._handlers[type] || noHandlers\n  }\n\n  function off(emitter, type, f) {\n    if (emitter.removeEventListener) {\n      emitter.removeEventListener(type, f, false);\n    } else if (emitter.detachEvent) {\n      emitter.detachEvent(\"on\" + type, f);\n    } else {\n      var map = emitter._handlers, arr = map && map[type];\n      if (arr) {\n        var index = indexOf(arr, f);\n        if (index > -1)\n          { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n      }\n    }\n  }\n\n  function signal(emitter, type /*, values...*/) {\n    var handlers = getHandlers(emitter, type);\n    if (!handlers.length) { return }\n    var args = Array.prototype.slice.call(arguments, 2);\n    for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n  }\n\n  // The DOM events that CodeMirror handles can be overridden by\n  // registering a (non-DOM) handler on the editor for the event name,\n  // and preventDefault-ing the event in that handler.\n  function signalDOMEvent(cm, e, override) {\n    if (typeof e == \"string\")\n      { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n    signal(cm, override || e.type, cm, e);\n    return e_defaultPrevented(e) || e.codemirrorIgnore\n  }\n\n  function signalCursorActivity(cm) {\n    var arr = cm._handlers && cm._handlers.cursorActivity;\n    if (!arr) { return }\n    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n    for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n      { set.push(arr[i]); } }\n  }\n\n  function hasHandler(emitter, type) {\n    return getHandlers(emitter, type).length > 0\n  }\n\n  // Add on and off methods to a constructor's prototype, to make\n  // registering events on such objects more convenient.\n  function eventMixin(ctor) {\n    ctor.prototype.on = function(type, f) {on(this, type, f);};\n    ctor.prototype.off = function(type, f) {off(this, type, f);};\n  }\n\n  // Due to the fact that we still support jurassic IE versions, some\n  // compatibility wrappers are needed.\n\n  function e_preventDefault(e) {\n    if (e.preventDefault) { e.preventDefault(); }\n    else { e.returnValue = false; }\n  }\n  function e_stopPropagation(e) {\n    if (e.stopPropagation) { e.stopPropagation(); }\n    else { e.cancelBubble = true; }\n  }\n  function e_defaultPrevented(e) {\n    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n  }\n  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n  function e_target(e) {return e.target || e.srcElement}\n  function e_button(e) {\n    var b = e.which;\n    if (b == null) {\n      if (e.button & 1) { b = 1; }\n      else if (e.button & 2) { b = 3; }\n      else if (e.button & 4) { b = 2; }\n    }\n    if (mac && e.ctrlKey && b == 1) { b = 3; }\n    return b\n  }\n\n  // Detect drag-and-drop\n  var dragAndDrop = function() {\n    // There is *some* kind of drag-and-drop support in IE6-8, but I\n    // couldn't get it to work yet.\n    if (ie && ie_version < 9) { return false }\n    var div = elt('div');\n    return \"draggable\" in div || \"dragDrop\" in div\n  }();\n\n  var zwspSupported;\n  function zeroWidthElement(measure) {\n    if (zwspSupported == null) {\n      var test = elt(\"span\", \"\\u200b\");\n      removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n      if (measure.firstChild.offsetHeight != 0)\n        { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n    }\n    var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n      elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n    node.setAttribute(\"cm-text\", \"\");\n    return node\n  }\n\n  // Feature-detect IE's crummy client rect reporting for bidi text\n  var badBidiRects;\n  function hasBadBidiRects(measure) {\n    if (badBidiRects != null) { return badBidiRects }\n    var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n    var r0 = range(txt, 0, 1).getBoundingClientRect();\n    var r1 = range(txt, 1, 2).getBoundingClientRect();\n    removeChildren(measure);\n    if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n    return badBidiRects = (r1.right - r0.right < 3)\n  }\n\n  // See if \"\".split is the broken IE version, if so, provide an\n  // alternative way to split lines.\n  var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n    var pos = 0, result = [], l = string.length;\n    while (pos <= l) {\n      var nl = string.indexOf(\"\\n\", pos);\n      if (nl == -1) { nl = string.length; }\n      var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n      var rt = line.indexOf(\"\\r\");\n      if (rt != -1) {\n        result.push(line.slice(0, rt));\n        pos += rt + 1;\n      } else {\n        result.push(line);\n        pos = nl + 1;\n      }\n    }\n    return result\n  } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n  var hasSelection = window.getSelection ? function (te) {\n    try { return te.selectionStart != te.selectionEnd }\n    catch(e) { return false }\n  } : function (te) {\n    var range;\n    try {range = te.ownerDocument.selection.createRange();}\n    catch(e) {}\n    if (!range || range.parentElement() != te) { return false }\n    return range.compareEndPoints(\"StartToEnd\", range) != 0\n  };\n\n  var hasCopyEvent = (function () {\n    var e = elt(\"div\");\n    if (\"oncopy\" in e) { return true }\n    e.setAttribute(\"oncopy\", \"return;\");\n    return typeof e.oncopy == \"function\"\n  })();\n\n  var badZoomedRects = null;\n  function hasBadZoomedRects(measure) {\n    if (badZoomedRects != null) { return badZoomedRects }\n    var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n    var normal = node.getBoundingClientRect();\n    var fromRange = range(node, 0, 1).getBoundingClientRect();\n    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n  }\n\n  // Known modes, by name and by MIME\n  var modes = {}, mimeModes = {};\n\n  // Extra arguments are stored as the mode's dependencies, which is\n  // used by (legacy) mechanisms like loadmode.js to automatically\n  // load a mode. (Preferred mechanism is the require/define calls.)\n  function defineMode(name, mode) {\n    if (arguments.length > 2)\n      { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n    modes[name] = mode;\n  }\n\n  function defineMIME(mime, spec) {\n    mimeModes[mime] = spec;\n  }\n\n  // Given a MIME type, a {name, ...options} config object, or a name\n  // string, return a mode config object.\n  function resolveMode(spec) {\n    if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n      spec = mimeModes[spec];\n    } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n      var found = mimeModes[spec.name];\n      if (typeof found == \"string\") { found = {name: found}; }\n      spec = createObj(found, spec);\n      spec.name = found.name;\n    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n      return resolveMode(\"application/xml\")\n    } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n      return resolveMode(\"application/json\")\n    }\n    if (typeof spec == \"string\") { return {name: spec} }\n    else { return spec || {name: \"null\"} }\n  }\n\n  // Given a mode spec (anything that resolveMode accepts), find and\n  // initialize an actual mode object.\n  function getMode(options, spec) {\n    spec = resolveMode(spec);\n    var mfactory = modes[spec.name];\n    if (!mfactory) { return getMode(options, \"text/plain\") }\n    var modeObj = mfactory(options, spec);\n    if (modeExtensions.hasOwnProperty(spec.name)) {\n      var exts = modeExtensions[spec.name];\n      for (var prop in exts) {\n        if (!exts.hasOwnProperty(prop)) { continue }\n        if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n        modeObj[prop] = exts[prop];\n      }\n    }\n    modeObj.name = spec.name;\n    if (spec.helperType) { modeObj.helperType = spec.helperType; }\n    if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n      { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n    return modeObj\n  }\n\n  // This can be used to attach properties to mode objects from\n  // outside the actual mode definition.\n  var modeExtensions = {};\n  function extendMode(mode, properties) {\n    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n    copyObj(properties, exts);\n  }\n\n  function copyState(mode, state) {\n    if (state === true) { return state }\n    if (mode.copyState) { return mode.copyState(state) }\n    var nstate = {};\n    for (var n in state) {\n      var val = state[n];\n      if (val instanceof Array) { val = val.concat([]); }\n      nstate[n] = val;\n    }\n    return nstate\n  }\n\n  // Given a mode and a state (for that mode), find the inner mode and\n  // state at the position that the state refers to.\n  function innerMode(mode, state) {\n    var info;\n    while (mode.innerMode) {\n      info = mode.innerMode(state);\n      if (!info || info.mode == mode) { break }\n      state = info.state;\n      mode = info.mode;\n    }\n    return info || {mode: mode, state: state}\n  }\n\n  function startState(mode, a1, a2) {\n    return mode.startState ? mode.startState(a1, a2) : true\n  }\n\n  // STRING STREAM\n\n  // Fed to the mode parsers, provides helper functions to make\n  // parsers more succinct.\n\n  var StringStream = function(string, tabSize, lineOracle) {\n    this.pos = this.start = 0;\n    this.string = string;\n    this.tabSize = tabSize || 8;\n    this.lastColumnPos = this.lastColumnValue = 0;\n    this.lineStart = 0;\n    this.lineOracle = lineOracle;\n  };\n\n  StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n  StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n  StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n  StringStream.prototype.next = function () {\n    if (this.pos < this.string.length)\n      { return this.string.charAt(this.pos++) }\n  };\n  StringStream.prototype.eat = function (match) {\n    var ch = this.string.charAt(this.pos);\n    var ok;\n    if (typeof match == \"string\") { ok = ch == match; }\n    else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n    if (ok) {++this.pos; return ch}\n  };\n  StringStream.prototype.eatWhile = function (match) {\n    var start = this.pos;\n    while (this.eat(match)){}\n    return this.pos > start\n  };\n  StringStream.prototype.eatSpace = function () {\n    var start = this.pos;\n    while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }\n    return this.pos > start\n  };\n  StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n  StringStream.prototype.skipTo = function (ch) {\n    var found = this.string.indexOf(ch, this.pos);\n    if (found > -1) {this.pos = found; return true}\n  };\n  StringStream.prototype.backUp = function (n) {this.pos -= n;};\n  StringStream.prototype.column = function () {\n    if (this.lastColumnPos < this.start) {\n      this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n      this.lastColumnPos = this.start;\n    }\n    return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n  };\n  StringStream.prototype.indentation = function () {\n    return countColumn(this.string, null, this.tabSize) -\n      (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n  };\n  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n    if (typeof pattern == \"string\") {\n      var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n      var substr = this.string.substr(this.pos, pattern.length);\n      if (cased(substr) == cased(pattern)) {\n        if (consume !== false) { this.pos += pattern.length; }\n        return true\n      }\n    } else {\n      var match = this.string.slice(this.pos).match(pattern);\n      if (match && match.index > 0) { return null }\n      if (match && consume !== false) { this.pos += match[0].length; }\n      return match\n    }\n  };\n  StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n  StringStream.prototype.hideFirstChars = function (n, inner) {\n    this.lineStart += n;\n    try { return inner() }\n    finally { this.lineStart -= n; }\n  };\n  StringStream.prototype.lookAhead = function (n) {\n    var oracle = this.lineOracle;\n    return oracle && oracle.lookAhead(n)\n  };\n  StringStream.prototype.baseToken = function () {\n    var oracle = this.lineOracle;\n    return oracle && oracle.baseToken(this.pos)\n  };\n\n  // Find the line object corresponding to the given line number.\n  function getLine(doc, n) {\n    n -= doc.first;\n    if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n    var chunk = doc;\n    while (!chunk.lines) {\n      for (var i = 0;; ++i) {\n        var child = chunk.children[i], sz = child.chunkSize();\n        if (n < sz) { chunk = child; break }\n        n -= sz;\n      }\n    }\n    return chunk.lines[n]\n  }\n\n  // Get the part of a document between two positions, as an array of\n  // strings.\n  function getBetween(doc, start, end) {\n    var out = [], n = start.line;\n    doc.iter(start.line, end.line + 1, function (line) {\n      var text = line.text;\n      if (n == end.line) { text = text.slice(0, end.ch); }\n      if (n == start.line) { text = text.slice(start.ch); }\n      out.push(text);\n      ++n;\n    });\n    return out\n  }\n  // Get the lines between from and to, as array of strings.\n  function getLines(doc, from, to) {\n    var out = [];\n    doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n    return out\n  }\n\n  // Update the height of a line, propagating the height change\n  // upwards to parent nodes.\n  function updateLineHeight(line, height) {\n    var diff = height - line.height;\n    if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n  }\n\n  // Given a line object, find its line number by walking up through\n  // its parent links.\n  function lineNo(line) {\n    if (line.parent == null) { return null }\n    var cur = line.parent, no = indexOf(cur.lines, line);\n    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n      for (var i = 0;; ++i) {\n        if (chunk.children[i] == cur) { break }\n        no += chunk.children[i].chunkSize();\n      }\n    }\n    return no + cur.first\n  }\n\n  // Find the line at the given vertical position, using the height\n  // information in the document tree.\n  function lineAtHeight(chunk, h) {\n    var n = chunk.first;\n    outer: do {\n      for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n        var child = chunk.children[i$1], ch = child.height;\n        if (h < ch) { chunk = child; continue outer }\n        h -= ch;\n        n += child.chunkSize();\n      }\n      return n\n    } while (!chunk.lines)\n    var i = 0;\n    for (; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i], lh = line.height;\n      if (h < lh) { break }\n      h -= lh;\n    }\n    return n + i\n  }\n\n  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n  function lineNumberFor(options, i) {\n    return String(options.lineNumberFormatter(i + options.firstLineNumber))\n  }\n\n  // A Pos instance represents a position within the text.\n  function Pos(line, ch, sticky) {\n    if ( sticky === void 0 ) sticky = null;\n\n    if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n    this.line = line;\n    this.ch = ch;\n    this.sticky = sticky;\n  }\n\n  // Compare two positions, return 0 if they are the same, a negative\n  // number when a is less, and a positive number otherwise.\n  function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n  function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n  function copyPos(x) {return Pos(x.line, x.ch)}\n  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n  function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n  // Most of the external API clips given positions to make sure they\n  // actually exist within the document.\n  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n  function clipPos(doc, pos) {\n    if (pos.line < doc.first) { return Pos(doc.first, 0) }\n    var last = doc.first + doc.size - 1;\n    if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n    return clipToLen(pos, getLine(doc, pos.line).text.length)\n  }\n  function clipToLen(pos, linelen) {\n    var ch = pos.ch;\n    if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n    else if (ch < 0) { return Pos(pos.line, 0) }\n    else { return pos }\n  }\n  function clipPosArray(doc, array) {\n    var out = [];\n    for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n    return out\n  }\n\n  var SavedContext = function(state, lookAhead) {\n    this.state = state;\n    this.lookAhead = lookAhead;\n  };\n\n  var Context = function(doc, state, line, lookAhead) {\n    this.state = state;\n    this.doc = doc;\n    this.line = line;\n    this.maxLookAhead = lookAhead || 0;\n    this.baseTokens = null;\n    this.baseTokenPos = 1;\n  };\n\n  Context.prototype.lookAhead = function (n) {\n    var line = this.doc.getLine(this.line + n);\n    if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n    return line\n  };\n\n  Context.prototype.baseToken = function (n) {\n    if (!this.baseTokens) { return null }\n    while (this.baseTokens[this.baseTokenPos] <= n)\n      { this.baseTokenPos += 2; }\n    var type = this.baseTokens[this.baseTokenPos + 1];\n    return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n            size: this.baseTokens[this.baseTokenPos] - n}\n  };\n\n  Context.prototype.nextLine = function () {\n    this.line++;\n    if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n  };\n\n  Context.fromSaved = function (doc, saved, line) {\n    if (saved instanceof SavedContext)\n      { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n    else\n      { return new Context(doc, copyState(doc.mode, saved), line) }\n  };\n\n  Context.prototype.save = function (copy) {\n    var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n    return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n  };\n\n\n  // Compute a style array (an array starting with a mode generation\n  // -- for invalidation -- followed by pairs of end positions and\n  // style strings), which is used to highlight the tokens on the\n  // line.\n  function highlightLine(cm, line, context, forceToEnd) {\n    // A styles array always starts with a number identifying the\n    // mode/overlays that it is based on (for easy invalidation).\n    var st = [cm.state.modeGen], lineClasses = {};\n    // Compute the base array of styles\n    runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n            lineClasses, forceToEnd);\n    var state = context.state;\n\n    // Run overlays, adjust style array.\n    var loop = function ( o ) {\n      context.baseTokens = st;\n      var overlay = cm.state.overlays[o], i = 1, at = 0;\n      context.state = true;\n      runMode(cm, line.text, overlay.mode, context, function (end, style) {\n        var start = i;\n        // Ensure there's a token end at the current position, and that i points at it\n        while (at < end) {\n          var i_end = st[i];\n          if (i_end > end)\n            { st.splice(i, 1, end, st[i+1], i_end); }\n          i += 2;\n          at = Math.min(end, i_end);\n        }\n        if (!style) { return }\n        if (overlay.opaque) {\n          st.splice(start, i - start, end, \"overlay \" + style);\n          i = start + 2;\n        } else {\n          for (; start < i; start += 2) {\n            var cur = st[start+1];\n            st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n          }\n        }\n      }, lineClasses);\n      context.state = state;\n      context.baseTokens = null;\n      context.baseTokenPos = 1;\n    };\n\n    for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n  }\n\n  function getLineStyles(cm, line, updateFrontier) {\n    if (!line.styles || line.styles[0] != cm.state.modeGen) {\n      var context = getContextBefore(cm, lineNo(line));\n      var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n      var result = highlightLine(cm, line, context);\n      if (resetState) { context.state = resetState; }\n      line.stateAfter = context.save(!resetState);\n      line.styles = result.styles;\n      if (result.classes) { line.styleClasses = result.classes; }\n      else if (line.styleClasses) { line.styleClasses = null; }\n      if (updateFrontier === cm.doc.highlightFrontier)\n        { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n    }\n    return line.styles\n  }\n\n  function getContextBefore(cm, n, precise) {\n    var doc = cm.doc, display = cm.display;\n    if (!doc.mode.startState) { return new Context(doc, true, n) }\n    var start = findStartLine(cm, n, precise);\n    var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n    var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n    doc.iter(start, n, function (line) {\n      processLine(cm, line.text, context);\n      var pos = context.line;\n      line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n      context.nextLine();\n    });\n    if (precise) { doc.modeFrontier = context.line; }\n    return context\n  }\n\n  // Lightweight form of highlight -- proceed over this line and\n  // update state, but don't save a style array. Used for lines that\n  // aren't currently visible.\n  function processLine(cm, text, context, startAt) {\n    var mode = cm.doc.mode;\n    var stream = new StringStream(text, cm.options.tabSize, context);\n    stream.start = stream.pos = startAt || 0;\n    if (text == \"\") { callBlankLine(mode, context.state); }\n    while (!stream.eol()) {\n      readToken(mode, stream, context.state);\n      stream.start = stream.pos;\n    }\n  }\n\n  function callBlankLine(mode, state) {\n    if (mode.blankLine) { return mode.blankLine(state) }\n    if (!mode.innerMode) { return }\n    var inner = innerMode(mode, state);\n    if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n  }\n\n  function readToken(mode, stream, state, inner) {\n    for (var i = 0; i < 10; i++) {\n      if (inner) { inner[0] = innerMode(mode, state).mode; }\n      var style = mode.token(stream, state);\n      if (stream.pos > stream.start) { return style }\n    }\n    throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n  }\n\n  var Token = function(stream, type, state) {\n    this.start = stream.start; this.end = stream.pos;\n    this.string = stream.current();\n    this.type = type || null;\n    this.state = state;\n  };\n\n  // Utility for getTokenAt and getLineTokens\n  function takeToken(cm, pos, precise, asArray) {\n    var doc = cm.doc, mode = doc.mode, style;\n    pos = clipPos(doc, pos);\n    var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n    var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n    if (asArray) { tokens = []; }\n    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n      stream.start = stream.pos;\n      style = readToken(mode, stream, context.state);\n      if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n    }\n    return asArray ? tokens : new Token(stream, style, context.state)\n  }\n\n  function extractLineClasses(type, output) {\n    if (type) { for (;;) {\n      var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n      if (!lineClass) { break }\n      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n      var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n      if (output[prop] == null)\n        { output[prop] = lineClass[2]; }\n      else if (!(new RegExp(\"(?:^|\\\\s)\" + lineClass[2] + \"(?:$|\\\\s)\")).test(output[prop]))\n        { output[prop] += \" \" + lineClass[2]; }\n    } }\n    return type\n  }\n\n  // Run the given mode's parser over a line, calling f for each token.\n  function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n    var flattenSpans = mode.flattenSpans;\n    if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n    var curStart = 0, curStyle = null;\n    var stream = new StringStream(text, cm.options.tabSize, context), style;\n    var inner = cm.options.addModeClass && [null];\n    if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n    while (!stream.eol()) {\n      if (stream.pos > cm.options.maxHighlightLength) {\n        flattenSpans = false;\n        if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n        stream.pos = text.length;\n        style = null;\n      } else {\n        style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n      }\n      if (inner) {\n        var mName = inner[0].name;\n        if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n      }\n      if (!flattenSpans || curStyle != style) {\n        while (curStart < stream.start) {\n          curStart = Math.min(stream.start, curStart + 5000);\n          f(curStart, curStyle);\n        }\n        curStyle = style;\n      }\n      stream.start = stream.pos;\n    }\n    while (curStart < stream.pos) {\n      // Webkit seems to refuse to render text nodes longer than 57444\n      // characters, and returns inaccurate measurements in nodes\n      // starting around 5000 chars.\n      var pos = Math.min(stream.pos, curStart + 5000);\n      f(pos, curStyle);\n      curStart = pos;\n    }\n  }\n\n  // Finds the line to start with when starting a parse. Tries to\n  // find a line with a stateAfter, so that it can start with a\n  // valid state. If that fails, it returns the line with the\n  // smallest indentation, which tends to need the least context to\n  // parse correctly.\n  function findStartLine(cm, n, precise) {\n    var minindent, minline, doc = cm.doc;\n    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n    for (var search = n; search > lim; --search) {\n      if (search <= doc.first) { return doc.first }\n      var line = getLine(doc, search - 1), after = line.stateAfter;\n      if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n        { return search }\n      var indented = countColumn(line.text, null, cm.options.tabSize);\n      if (minline == null || minindent > indented) {\n        minline = search - 1;\n        minindent = indented;\n      }\n    }\n    return minline\n  }\n\n  function retreatFrontier(doc, n) {\n    doc.modeFrontier = Math.min(doc.modeFrontier, n);\n    if (doc.highlightFrontier < n - 10) { return }\n    var start = doc.first;\n    for (var line = n - 1; line > start; line--) {\n      var saved = getLine(doc, line).stateAfter;\n      // change is on 3\n      // state on line 1 looked ahead 2 -- so saw 3\n      // test 1 + 2 < 3 should cover this\n      if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n        start = line + 1;\n        break\n      }\n    }\n    doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n  }\n\n  // Optimize some code when these features are not used.\n  var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n  function seeReadOnlySpans() {\n    sawReadOnlySpans = true;\n  }\n\n  function seeCollapsedSpans() {\n    sawCollapsedSpans = true;\n  }\n\n  // TEXTMARKER SPANS\n\n  function MarkedSpan(marker, from, to) {\n    this.marker = marker;\n    this.from = from; this.to = to;\n  }\n\n  // Search an array of spans for a span matching the given marker.\n  function getMarkedSpanFor(spans, marker) {\n    if (spans) { for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.marker == marker) { return span }\n    } }\n  }\n\n  // Remove a span from an array, returning undefined if no spans are\n  // left (we don't store arrays for lines without spans).\n  function removeMarkedSpan(spans, span) {\n    var r;\n    for (var i = 0; i < spans.length; ++i)\n      { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n    return r\n  }\n\n  // Add a span to a line.\n  function addMarkedSpan(line, span, op) {\n    var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n    if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n      line.markedSpans.push(span);\n    } else {\n      line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n      if (inThisOp) { inThisOp.add(line.markedSpans); }\n    }\n    span.marker.attachLine(line);\n  }\n\n  // Used for the algorithm that adjusts markers for a change in the\n  // document. These functions cut an array of spans at a given\n  // character position, returning an array of remaining chunks (or\n  // undefined if nothing remains).\n  function markedSpansBefore(old, startCh, isInsert) {\n    var nw;\n    if (old) { for (var i = 0; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n      if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n        ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n      }\n    } }\n    return nw\n  }\n  function markedSpansAfter(old, endCh, isInsert) {\n    var nw;\n    if (old) { for (var i = 0; i < old.length; ++i) {\n      var span = old[i], marker = span.marker;\n      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n      if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n        ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n                                              span.to == null ? null : span.to - endCh));\n      }\n    } }\n    return nw\n  }\n\n  // Given a change object, compute the new set of marker spans that\n  // cover the line in which the change took place. Removes spans\n  // entirely within the change, reconnects spans belonging to the\n  // same marker that appear on both sides of the change, and cuts off\n  // spans partially within the change. Returns an array of span\n  // arrays with one element for each line in (after) the change.\n  function stretchSpansOverChange(doc, change) {\n    if (change.full) { return null }\n    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n    if (!oldFirst && !oldLast) { return null }\n\n    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n    // Get the spans that 'stick out' on both sides\n    var first = markedSpansBefore(oldFirst, startCh, isInsert);\n    var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n    // Next, merge those two ends\n    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n    if (first) {\n      // Fix up .to properties of first\n      for (var i = 0; i < first.length; ++i) {\n        var span = first[i];\n        if (span.to == null) {\n          var found = getMarkedSpanFor(last, span.marker);\n          if (!found) { span.to = startCh; }\n          else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n        }\n      }\n    }\n    if (last) {\n      // Fix up .from in last (or move them into first in case of sameLine)\n      for (var i$1 = 0; i$1 < last.length; ++i$1) {\n        var span$1 = last[i$1];\n        if (span$1.to != null) { span$1.to += offset; }\n        if (span$1.from == null) {\n          var found$1 = getMarkedSpanFor(first, span$1.marker);\n          if (!found$1) {\n            span$1.from = offset;\n            if (sameLine) { (first || (first = [])).push(span$1); }\n          }\n        } else {\n          span$1.from += offset;\n          if (sameLine) { (first || (first = [])).push(span$1); }\n        }\n      }\n    }\n    // Make sure we didn't create any zero-length spans\n    if (first) { first = clearEmptySpans(first); }\n    if (last && last != first) { last = clearEmptySpans(last); }\n\n    var newMarkers = [first];\n    if (!sameLine) {\n      // Fill gap with whole-line-spans\n      var gap = change.text.length - 2, gapMarkers;\n      if (gap > 0 && first)\n        { for (var i$2 = 0; i$2 < first.length; ++i$2)\n          { if (first[i$2].to == null)\n            { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n      for (var i$3 = 0; i$3 < gap; ++i$3)\n        { newMarkers.push(gapMarkers); }\n      newMarkers.push(last);\n    }\n    return newMarkers\n  }\n\n  // Remove spans that are empty and don't have a clearWhenEmpty\n  // option of false.\n  function clearEmptySpans(spans) {\n    for (var i = 0; i < spans.length; ++i) {\n      var span = spans[i];\n      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n        { spans.splice(i--, 1); }\n    }\n    if (!spans.length) { return null }\n    return spans\n  }\n\n  // Used to 'clip' out readOnly ranges when making a change.\n  function removeReadOnlyRanges(doc, from, to) {\n    var markers = null;\n    doc.iter(from.line, to.line + 1, function (line) {\n      if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n        var mark = line.markedSpans[i].marker;\n        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n          { (markers || (markers = [])).push(mark); }\n      } }\n    });\n    if (!markers) { return null }\n    var parts = [{from: from, to: to}];\n    for (var i = 0; i < markers.length; ++i) {\n      var mk = markers[i], m = mk.find(0);\n      for (var j = 0; j < parts.length; ++j) {\n        var p = parts[j];\n        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n          { newParts.push({from: p.from, to: m.from}); }\n        if (dto > 0 || !mk.inclusiveRight && !dto)\n          { newParts.push({from: m.to, to: p.to}); }\n        parts.splice.apply(parts, newParts);\n        j += newParts.length - 3;\n      }\n    }\n    return parts\n  }\n\n  // Connect or disconnect spans from a line.\n  function detachMarkedSpans(line) {\n    var spans = line.markedSpans;\n    if (!spans) { return }\n    for (var i = 0; i < spans.length; ++i)\n      { spans[i].marker.detachLine(line); }\n    line.markedSpans = null;\n  }\n  function attachMarkedSpans(line, spans) {\n    if (!spans) { return }\n    for (var i = 0; i < spans.length; ++i)\n      { spans[i].marker.attachLine(line); }\n    line.markedSpans = spans;\n  }\n\n  // Helpers used when computing which overlapping collapsed span\n  // counts as the larger one.\n  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n  // Returns a number indicating which of two overlapping collapsed\n  // spans is larger (and thus includes the other). Falls back to\n  // comparing ids when the spans cover exactly the same range.\n  function compareCollapsedMarkers(a, b) {\n    var lenDiff = a.lines.length - b.lines.length;\n    if (lenDiff != 0) { return lenDiff }\n    var aPos = a.find(), bPos = b.find();\n    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n    if (fromCmp) { return -fromCmp }\n    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n    if (toCmp) { return toCmp }\n    return b.id - a.id\n  }\n\n  // Find out whether a line ends or starts in a collapsed span. If\n  // so, return the marker for that span.\n  function collapsedSpanAtSide(line, start) {\n    var sps = sawCollapsedSpans && line.markedSpans, found;\n    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n          (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n        { found = sp.marker; }\n    } }\n    return found\n  }\n  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n  function collapsedSpanAround(line, ch) {\n    var sps = sawCollapsedSpans && line.markedSpans, found;\n    if (sps) { for (var i = 0; i < sps.length; ++i) {\n      var sp = sps[i];\n      if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n          (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n    } }\n    return found\n  }\n\n  // Test whether there exists a collapsed span that partially\n  // overlaps (covers the start or end, but not both) of a new span.\n  // Such overlap is not allowed.\n  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n    var line = getLine(doc, lineNo);\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) { for (var i = 0; i < sps.length; ++i) {\n      var sp = sps[i];\n      if (!sp.marker.collapsed) { continue }\n      var found = sp.marker.find(0);\n      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n      if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n          fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n        { return true }\n    } }\n  }\n\n  // A visual line is a line as drawn on the screen. Folding, for\n  // example, can cause multiple logical lines to appear on the same\n  // visual line. This finds the start of the visual line that the\n  // given line is part of (usually that is the line itself).\n  function visualLine(line) {\n    var merged;\n    while (merged = collapsedSpanAtStart(line))\n      { line = merged.find(-1, true).line; }\n    return line\n  }\n\n  function visualLineEnd(line) {\n    var merged;\n    while (merged = collapsedSpanAtEnd(line))\n      { line = merged.find(1, true).line; }\n    return line\n  }\n\n  // Returns an array of logical lines that continue the visual line\n  // started by the argument, or undefined if there are no such lines.\n  function visualLineContinued(line) {\n    var merged, lines;\n    while (merged = collapsedSpanAtEnd(line)) {\n      line = merged.find(1, true).line\n      ;(lines || (lines = [])).push(line);\n    }\n    return lines\n  }\n\n  // Get the line number of the start of the visual line that the\n  // given line number is part of.\n  function visualLineNo(doc, lineN) {\n    var line = getLine(doc, lineN), vis = visualLine(line);\n    if (line == vis) { return lineN }\n    return lineNo(vis)\n  }\n\n  // Get the line number of the start of the next visual line after\n  // the given line.\n  function visualLineEndNo(doc, lineN) {\n    if (lineN > doc.lastLine()) { return lineN }\n    var line = getLine(doc, lineN), merged;\n    if (!lineIsHidden(doc, line)) { return lineN }\n    while (merged = collapsedSpanAtEnd(line))\n      { line = merged.find(1, true).line; }\n    return lineNo(line) + 1\n  }\n\n  // Compute whether a line is hidden. Lines count as hidden when they\n  // are part of a visual line that starts with another line, or when\n  // they are entirely covered by collapsed, non-widget span.\n  function lineIsHidden(doc, line) {\n    var sps = sawCollapsedSpans && line.markedSpans;\n    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n      sp = sps[i];\n      if (!sp.marker.collapsed) { continue }\n      if (sp.from == null) { return true }\n      if (sp.marker.widgetNode) { continue }\n      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n        { return true }\n    } }\n  }\n  function lineIsHiddenInner(doc, line, span) {\n    if (span.to == null) {\n      var end = span.marker.find(1, true);\n      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n    }\n    if (span.marker.inclusiveRight && span.to == line.text.length)\n      { return true }\n    for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n      sp = line.markedSpans[i];\n      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n          (sp.to == null || sp.to != span.from) &&\n          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n          lineIsHiddenInner(doc, line, sp)) { return true }\n    }\n  }\n\n  // Find the height above the given line.\n  function heightAtLine(lineObj) {\n    lineObj = visualLine(lineObj);\n\n    var h = 0, chunk = lineObj.parent;\n    for (var i = 0; i < chunk.lines.length; ++i) {\n      var line = chunk.lines[i];\n      if (line == lineObj) { break }\n      else { h += line.height; }\n    }\n    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n      for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n        var cur = p.children[i$1];\n        if (cur == chunk) { break }\n        else { h += cur.height; }\n      }\n    }\n    return h\n  }\n\n  // Compute the character length of a line, taking into account\n  // collapsed ranges (see markText) that might hide parts, and join\n  // other lines onto it.\n  function lineLength(line) {\n    if (line.height == 0) { return 0 }\n    var len = line.text.length, merged, cur = line;\n    while (merged = collapsedSpanAtStart(cur)) {\n      var found = merged.find(0, true);\n      cur = found.from.line;\n      len += found.from.ch - found.to.ch;\n    }\n    cur = line;\n    while (merged = collapsedSpanAtEnd(cur)) {\n      var found$1 = merged.find(0, true);\n      len -= cur.text.length - found$1.from.ch;\n      cur = found$1.to.line;\n      len += cur.text.length - found$1.to.ch;\n    }\n    return len\n  }\n\n  // Find the longest line in the document.\n  function findMaxLine(cm) {\n    var d = cm.display, doc = cm.doc;\n    d.maxLine = getLine(doc, doc.first);\n    d.maxLineLength = lineLength(d.maxLine);\n    d.maxLineChanged = true;\n    doc.iter(function (line) {\n      var len = lineLength(line);\n      if (len > d.maxLineLength) {\n        d.maxLineLength = len;\n        d.maxLine = line;\n      }\n    });\n  }\n\n  // LINE DATA STRUCTURE\n\n  // Line objects. These hold state related to a line, including\n  // highlighting info (the styles array).\n  var Line = function(text, markedSpans, estimateHeight) {\n    this.text = text;\n    attachMarkedSpans(this, markedSpans);\n    this.height = estimateHeight ? estimateHeight(this) : 1;\n  };\n\n  Line.prototype.lineNo = function () { return lineNo(this) };\n  eventMixin(Line);\n\n  // Change the content (text, markers) of a line. Automatically\n  // invalidates cached information and tries to re-estimate the\n  // line's height.\n  function updateLine(line, text, markedSpans, estimateHeight) {\n    line.text = text;\n    if (line.stateAfter) { line.stateAfter = null; }\n    if (line.styles) { line.styles = null; }\n    if (line.order != null) { line.order = null; }\n    detachMarkedSpans(line);\n    attachMarkedSpans(line, markedSpans);\n    var estHeight = estimateHeight ? estimateHeight(line) : 1;\n    if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n  }\n\n  // Detach a line from the document tree and its markers.\n  function cleanUpLine(line) {\n    line.parent = null;\n    detachMarkedSpans(line);\n  }\n\n  // Convert a style as returned by a mode (either null, or a string\n  // containing one or more styles) to a CSS style. This is cached,\n  // and also looks for line-wide styles.\n  var styleToClassCache = {}, styleToClassCacheWithMode = {};\n  function interpretTokenStyle(style, options) {\n    if (!style || /^\\s*$/.test(style)) { return null }\n    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n    return cache[style] ||\n      (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n  }\n\n  // Render the DOM representation of the text of a line. Also builds\n  // up a 'line map', which points at the DOM nodes that represent\n  // specific stretches of text, and is used by the measuring code.\n  // The returned object contains the DOM node, this map, and\n  // information about line-wide styles that were set by the mode.\n  function buildLineContent(cm, lineView) {\n    // The padding-right forces the element to have a 'border', which\n    // is needed on Webkit to be able to get line-level bounding\n    // rectangles for it (in measureChar).\n    var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n    var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line Line-Hover\"), content: content,\n                   col: 0, pos: 0, cm: cm,\n                   trailingSpace: false,\n                   splitSpaces: cm.getOption(\"lineWrapping\")};\n    lineView.measure = {};\n\n    // Iterate over the logical lines that make up this visual line.\n    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n      var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n      builder.pos = 0;\n      builder.addToken = buildToken;\n      // Optionally wire in some hacks into the token-rendering\n      // algorithm, to deal with browser quirks.\n      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n        { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n      builder.map = [];\n      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n      if (line.styleClasses) {\n        if (line.styleClasses.bgClass)\n          { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n        if (line.styleClasses.textClass)\n          { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n      }\n\n      // Ensure at least a single node is present, for measuring.\n      if (builder.map.length == 0)\n        { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n      // Store the map and a cache object for the current logical line\n      if (i == 0) {\n        lineView.measure.map = builder.map;\n        lineView.measure.cache = {};\n      } else {\n  (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n        ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n      }\n    }\n\n    // See issue #2901\n    if (webkit) {\n      var last = builder.content.lastChild;\n      if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n        { builder.content.className = \"cm-tab-wrap-hack\"; }\n    }\n\n    signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n    if (builder.pre.className)\n      { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n    return builder\n  }\n\n  function defaultSpecialCharPlaceholder(ch) {\n    var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n    token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n    token.setAttribute(\"aria-label\", token.title);\n    return token\n  }\n\n  // Build up the DOM representation for a single token, and add it to\n  // the line map. Takes care to render special characters separately.\n  function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n    if (!text) { return }\n    var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n    var special = builder.cm.state.specialChars, mustWrap = false;\n    var content;\n    if (!special.test(text)) {\n      builder.col += text.length;\n      content = document.createTextNode(displayText);\n      builder.map.push(builder.pos, builder.pos + text.length, content);\n      if (ie && ie_version < 9) { mustWrap = true; }\n      builder.pos += text.length;\n    } else {\n      content = document.createDocumentFragment();\n      var pos = 0;\n      while (true) {\n        special.lastIndex = pos;\n        var m = special.exec(text);\n        var skipped = m ? m.index - pos : text.length - pos;\n        if (skipped) {\n          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n          if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n          else { content.appendChild(txt); }\n          builder.map.push(builder.pos, builder.pos + skipped, txt);\n          builder.col += skipped;\n          builder.pos += skipped;\n        }\n        if (!m) { break }\n        pos += skipped + 1;\n        var txt$1 = (void 0);\n        if (m[0] == \"\\t\") {\n          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n          txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n          txt$1.setAttribute(\"role\", \"presentation\");\n          txt$1.setAttribute(\"cm-text\", \"\\t\");\n          builder.col += tabWidth;\n        } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n          txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n          txt$1.setAttribute(\"cm-text\", m[0]);\n          builder.col += 1;\n        } else {\n          txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n          txt$1.setAttribute(\"cm-text\", m[0]);\n          if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n          else { content.appendChild(txt$1); }\n          builder.col += 1;\n        }\n        builder.map.push(builder.pos, builder.pos + 1, txt$1);\n        builder.pos++;\n      }\n    }\n    builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n    if (style || startStyle || endStyle || mustWrap || css || attributes) {\n      var fullStyle = style || \"\";\n      if (startStyle) { fullStyle += startStyle; }\n      if (endStyle) { fullStyle += endStyle; }\n      var token = elt(\"span\", [content], fullStyle, css);\n      if (attributes) {\n        for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n          { token.setAttribute(attr, attributes[attr]); } }\n      }\n      return builder.content.appendChild(token)\n    }\n    builder.content.appendChild(content);\n  }\n\n  // Change some spaces to NBSP to prevent the browser from collapsing\n  // trailing spaces at the end of a line when rendering text (issue #1362).\n  function splitSpaces(text, trailingBefore) {\n    if (text.length > 1 && !/  /.test(text)) { return text }\n    var spaceBefore = trailingBefore, result = \"\";\n    for (var i = 0; i < text.length; i++) {\n      var ch = text.charAt(i);\n      if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n        { ch = \"\\u00a0\"; }\n      result += ch;\n      spaceBefore = ch == \" \";\n    }\n    return result\n  }\n\n  // Work around nonsense dimensions being reported for stretches of\n  // right-to-left text.\n  function buildTokenBadBidi(inner, order) {\n    return function (builder, text, style, startStyle, endStyle, css, attributes) {\n      style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n      var start = builder.pos, end = start + text.length;\n      for (;;) {\n        // Find the part that overlaps with the start of this text\n        var part = (void 0);\n        for (var i = 0; i < order.length; i++) {\n          part = order[i];\n          if (part.to > start && part.from <= start) { break }\n        }\n        if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n        inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n        startStyle = null;\n        text = text.slice(part.to - start);\n        start = part.to;\n      }\n    }\n  }\n\n  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n    var widget = !ignoreWidget && marker.widgetNode;\n    if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n      if (!widget)\n        { widget = builder.content.appendChild(document.createElement(\"span\")); }\n      widget.setAttribute(\"cm-marker\", marker.id);\n    }\n    if (widget) {\n      builder.cm.display.input.setUneditable(widget);\n      builder.content.appendChild(widget);\n    }\n    builder.pos += size;\n    builder.trailingSpace = false;\n  }\n\n  // Outputs a number of spans to make up a line, taking highlighting\n  // and marked text into account.\n  function insertLineContent(line, builder, styles) {\n    var spans = line.markedSpans, allText = line.text, at = 0;\n    if (!spans) {\n      for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n        { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n      return\n    }\n\n    var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n    for (;;) {\n      if (nextChange == pos) { // Update current marker set\n        spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n        attributes = null;\n        collapsed = null; nextChange = Infinity;\n        var foundBookmarks = [], endStyles = (void 0);\n        for (var j = 0; j < spans.length; ++j) {\n          var sp = spans[j], m = sp.marker;\n          if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n            foundBookmarks.push(m);\n          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n            if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n              nextChange = sp.to;\n              spanEndStyle = \"\";\n            }\n            if (m.className) { spanStyle += \" \" + m.className; }\n            if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n            if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n            if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n            // support for the old title property\n            // https://github.com/codemirror/CodeMirror/pull/5673\n            if (m.title) { (attributes || (attributes = {})).title = m.title; }\n            if (m.attributes) {\n              for (var attr in m.attributes)\n                { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n            }\n            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n              { collapsed = sp; }\n          } else if (sp.from > pos && nextChange > sp.from) {\n            nextChange = sp.from;\n          }\n        }\n        if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n          { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n        if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n          { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n        if (collapsed && (collapsed.from || 0) == pos) {\n          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n                             collapsed.marker, collapsed.from == null);\n          if (collapsed.to == null) { return }\n          if (collapsed.to == pos) { collapsed = false; }\n        }\n      }\n      if (pos >= len) { break }\n\n      var upto = Math.min(len, nextChange);\n      while (true) {\n        if (text) {\n          var end = pos + text.length;\n          if (!collapsed) {\n            var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n          }\n          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n          pos = end;\n          spanStartStyle = \"\";\n        }\n        text = allText.slice(at, at = styles[i++]);\n        style = interpretTokenStyle(styles[i++], builder.cm.options);\n      }\n    }\n  }\n\n\n  // These objects are used to represent the visible (currently drawn)\n  // part of the document. A LineView may correspond to multiple\n  // logical lines, if those are connected by collapsed ranges.\n  function LineView(doc, line, lineN) {\n    // The starting line\n    this.line = line;\n    // Continuing lines, if any\n    this.rest = visualLineContinued(line);\n    // Number of logical lines in this visual line\n    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n    this.node = this.text = null;\n    this.hidden = lineIsHidden(doc, line);\n  }\n\n  // Create a range of LineView objects for the given lines.\n  function buildViewArray(cm, from, to) {\n    var array = [], nextPos;\n    for (var pos = from; pos < to; pos = nextPos) {\n      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n      nextPos = pos + view.size;\n      array.push(view);\n    }\n    return array\n  }\n\n  var operationGroup = null;\n\n  function pushOperation(op) {\n    if (operationGroup) {\n      operationGroup.ops.push(op);\n    } else {\n      op.ownsGroup = operationGroup = {\n        ops: [op],\n        delayedCallbacks: []\n      };\n    }\n  }\n\n  function fireCallbacksForOps(group) {\n    // Calls delayed callbacks and cursorActivity handlers until no\n    // new ones appear\n    var callbacks = group.delayedCallbacks, i = 0;\n    do {\n      for (; i < callbacks.length; i++)\n        { callbacks[i].call(null); }\n      for (var j = 0; j < group.ops.length; j++) {\n        var op = group.ops[j];\n        if (op.cursorActivityHandlers)\n          { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n            { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n      }\n    } while (i < callbacks.length)\n  }\n\n  function finishOperation(op, endCb) {\n    var group = op.ownsGroup;\n    if (!group) { return }\n\n    try { fireCallbacksForOps(group); }\n    finally {\n      operationGroup = null;\n      endCb(group);\n    }\n  }\n\n  var orphanDelayedCallbacks = null;\n\n  // Often, we want to signal events at a point where we are in the\n  // middle of some work, but don't want the handler to start calling\n  // other methods on the editor, which might be in an inconsistent\n  // state or simply not expect any other events to happen.\n  // signalLater looks whether there are any handlers, and schedules\n  // them to be executed when the last operation ends, or, if no\n  // operation is active, when a timeout fires.\n  function signalLater(emitter, type /*, values...*/) {\n    var arr = getHandlers(emitter, type);\n    if (!arr.length) { return }\n    var args = Array.prototype.slice.call(arguments, 2), list;\n    if (operationGroup) {\n      list = operationGroup.delayedCallbacks;\n    } else if (orphanDelayedCallbacks) {\n      list = orphanDelayedCallbacks;\n    } else {\n      list = orphanDelayedCallbacks = [];\n      setTimeout(fireOrphanDelayed, 0);\n    }\n    var loop = function ( i ) {\n      list.push(function () { return arr[i].apply(null, args); });\n    };\n\n    for (var i = 0; i < arr.length; ++i)\n      loop( i );\n  }\n\n  function fireOrphanDelayed() {\n    var delayed = orphanDelayedCallbacks;\n    orphanDelayedCallbacks = null;\n    for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n  }\n\n  // When an aspect of a line changes, a string is added to\n  // lineView.changes. This updates the relevant part of the line's\n  // DOM structure.\n  function updateLineForChanges(cm, lineView, lineN, dims) {\n    for (var j = 0; j < lineView.changes.length; j++) {\n      var type = lineView.changes[j];\n      if (type == \"text\") { updateLineText(cm, lineView); }\n      else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n      else if (type == \"class\") { updateLineClasses(cm, lineView); }\n      else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n    }\n    lineView.changes = null;\n  }\n\n  // Lines with gutter elements, widgets or a background class need to\n  // be wrapped, and have the extra elements added to the wrapper div\n  function ensureLineWrapped(lineView) {\n    if (lineView.node == lineView.text) {\n      lineView.node = elt(\"div\", null, null, \"position: relative\");\n      if (lineView.text.parentNode)\n        { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n      lineView.node.appendChild(lineView.text);\n      if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n    }\n    return lineView.node\n  }\n\n  function updateLineBackground(cm, lineView) {\n    var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n    if (cls) { cls += \" CodeMirror-linebackground\"; }\n    if (lineView.background) {\n      if (cls) { lineView.background.className = cls; }\n      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n    } else if (cls) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n      cm.display.input.setUneditable(lineView.background);\n    }\n  }\n\n  // Wrapper around buildLineContent which will reuse the structure\n  // in display.externalMeasured when possible.\n  function getLineContent(cm, lineView) {\n    var ext = cm.display.externalMeasured;\n    if (ext && ext.line == lineView.line) {\n      cm.display.externalMeasured = null;\n      lineView.measure = ext.measure;\n      return ext.built\n    }\n    return buildLineContent(cm, lineView)\n  }\n\n  // Redraw the line's text. Interacts with the background and text\n  // classes because the mode may output tokens that influence these\n  // classes.\n  function updateLineText(cm, lineView) {\n    var cls = lineView.text.className;\n    var built = getLineContent(cm, lineView);\n    if (lineView.text == lineView.node) { lineView.node = built.pre; }\n    lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n    lineView.text = built.pre;\n    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n      lineView.bgClass = built.bgClass;\n      lineView.textClass = built.textClass;\n      updateLineClasses(cm, lineView);\n    } else if (cls) {\n      lineView.text.className = cls;\n    }\n  }\n\n  function updateLineClasses(cm, lineView) {\n    updateLineBackground(cm, lineView);\n    if (lineView.line.wrapClass)\n      { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n    else if (lineView.node != lineView.text)\n      { lineView.node.className = \"\"; }\n    var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n    lineView.text.className = textClass || \"\";\n  }\n\n  function updateLineGutter(cm, lineView, lineN, dims) {\n    if (lineView.gutter) {\n      lineView.node.removeChild(lineView.gutter);\n      lineView.gutter = null;\n    }\n    if (lineView.gutterBackground) {\n      lineView.node.removeChild(lineView.gutterBackground);\n      lineView.gutterBackground = null;\n    }\n    if (lineView.line.gutterClass) {\n      var wrap = ensureLineWrapped(lineView);\n      lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n                                      (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n      cm.display.input.setUneditable(lineView.gutterBackground);\n      wrap.insertBefore(lineView.gutterBackground, lineView.text);\n    }\n    var markers = lineView.line.gutterMarkers;\n    if (cm.options.lineNumbers || markers) {\n      var wrap$1 = ensureLineWrapped(lineView);\n      var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n      gutterWrap.setAttribute(\"aria-hidden\", \"true\");\n      cm.display.input.setUneditable(gutterWrap);\n      wrap$1.insertBefore(gutterWrap, lineView.text);\n      if (lineView.line.gutterClass)\n        { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n      if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n        { lineView.lineNumber = gutterWrap.appendChild(\n          elt(\"div\", lineNumberFor(cm.options, lineN),\n              \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n              (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n      if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n        var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n        if (found)\n          { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n                                     (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n      } }\n    }\n  }\n\n  function updateLineWidgets(cm, lineView, dims) {\n    if (lineView.alignable) { lineView.alignable = null; }\n    var isWidget = classTest(\"CodeMirror-linewidget\");\n    for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n      next = node.nextSibling;\n      if (isWidget.test(node.className)) { lineView.node.removeChild(node); }\n    }\n    insertLineWidgets(cm, lineView, dims);\n  }\n\n  // Build a line's DOM representation from scratch\n  function buildLineElement(cm, lineView, lineN, dims) {\n    var built = getLineContent(cm, lineView);\n    lineView.text = lineView.node = built.pre;\n    if (built.bgClass) { lineView.bgClass = built.bgClass; }\n    if (built.textClass) { lineView.textClass = built.textClass; }\n\n    updateLineClasses(cm, lineView);\n    updateLineGutter(cm, lineView, lineN, dims);\n    insertLineWidgets(cm, lineView, dims);\n    return lineView.node\n  }\n\n  // A lineView may contain multiple logical lines (when merged by\n  // collapsed spans). The widgets for all of them need to be drawn.\n  function insertLineWidgets(cm, lineView, dims) {\n    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n    if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n      { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n  }\n\n  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n    if (!line.widgets) { return }\n    var wrap = ensureLineWrapped(lineView);\n    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n      var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\" + (widget.className ? \" \" + widget.className : \"\"));\n      if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n      positionLineWidget(widget, node, lineView, dims);\n      cm.display.input.setUneditable(node);\n      if (allowAbove && widget.above)\n        { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n      else\n        { wrap.appendChild(node); }\n      signalLater(widget, \"redraw\");\n    }\n  }\n\n  function positionLineWidget(widget, node, lineView, dims) {\n    if (widget.noHScroll) {\n  (lineView.alignable || (lineView.alignable = [])).push(node);\n      var width = dims.wrapperWidth;\n      node.style.left = dims.fixedPos + \"px\";\n      if (!widget.coverGutter) {\n        width -= dims.gutterTotalWidth;\n        node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n      }\n      node.style.width = width + \"px\";\n    }\n    if (widget.coverGutter) {\n      node.style.zIndex = 5;\n      node.style.position = \"relative\";\n      if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n    }\n  }\n\n  function widgetHeight(widget) {\n    if (widget.height != null) { return widget.height }\n    var cm = widget.doc.cm;\n    if (!cm) { return 0 }\n    if (!contains(document.body, widget.node)) {\n      var parentStyle = \"position: relative;\";\n      if (widget.coverGutter)\n        { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n      if (widget.noHScroll)\n        { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n      removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n    }\n    return widget.height = widget.node.parentNode.offsetHeight\n  }\n\n  // Return true when the given mouse event happened in a widget\n  function eventInWidget(display, e) {\n    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n      if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n          (n.parentNode == display.sizer && n != display.mover))\n        { return true }\n    }\n  }\n\n  // POSITION MEASUREMENT\n\n  function paddingTop(display) {return display.lineSpace.offsetTop}\n  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n  function paddingH(display) {\n    if (display.cachedPaddingH) { return display.cachedPaddingH }\n    var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n    if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n    return data\n  }\n\n  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n  function displayWidth(cm) {\n    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n  }\n  function displayHeight(cm) {\n    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n  }\n\n  // Ensure the lineView.wrapping.heights array is populated. This is\n  // an array of bottom offsets for the lines that make up a drawn\n  // line. When lineWrapping is on, there might be more than one\n  // height.\n  function ensureLineHeights(cm, lineView, rect) {\n    var wrapping = cm.options.lineWrapping;\n    var curWidth = wrapping && displayWidth(cm);\n    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n      var heights = lineView.measure.heights = [];\n      if (wrapping) {\n        lineView.measure.width = curWidth;\n        var rects = lineView.text.firstChild.getClientRects();\n        for (var i = 0; i < rects.length - 1; i++) {\n          var cur = rects[i], next = rects[i + 1];\n          if (Math.abs(cur.bottom - next.bottom) > 2)\n            { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n        }\n      }\n      heights.push(rect.bottom - rect.top);\n    }\n  }\n\n  // Find a line map (mapping character offsets to text nodes) and a\n  // measurement cache for the given line number. (A line view might\n  // contain multiple lines when collapsed ranges are present.)\n  function mapFromLineView(lineView, line, lineN) {\n    if (lineView.line == line)\n      { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n    if (lineView.rest) {\n      for (var i = 0; i < lineView.rest.length; i++)\n        { if (lineView.rest[i] == line)\n          { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n      for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n        { if (lineNo(lineView.rest[i$1]) > lineN)\n          { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n    }\n  }\n\n  // Render a line into the hidden node display.externalMeasured. Used\n  // when measurement is needed for a line that's not in the viewport.\n  function updateExternalMeasurement(cm, line) {\n    line = visualLine(line);\n    var lineN = lineNo(line);\n    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n    view.lineN = lineN;\n    var built = view.built = buildLineContent(cm, view);\n    view.text = built.pre;\n    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n    return view\n  }\n\n  // Get a {top, bottom, left, right} box (in line-local coordinates)\n  // for a given character.\n  function measureChar(cm, line, ch, bias) {\n    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n  }\n\n  // Find a line view that corresponds to the given line number.\n  function findViewForLine(cm, lineN) {\n    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n      { return cm.display.view[findViewIndex(cm, lineN)] }\n    var ext = cm.display.externalMeasured;\n    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n      { return ext }\n  }\n\n  // Measurement can be split in two steps, the set-up work that\n  // applies to the whole line, and the measurement of the actual\n  // character. Functions like coordsChar, that need to do a lot of\n  // measurements in a row, can thus ensure that the set-up work is\n  // only done once.\n  function prepareMeasureForLine(cm, line) {\n    var lineN = lineNo(line);\n    var view = findViewForLine(cm, lineN);\n    if (view && !view.text) {\n      view = null;\n    } else if (view && view.changes) {\n      updateLineForChanges(cm, view, lineN, getDimensions(cm));\n      cm.curOp.forceUpdate = true;\n    }\n    if (!view)\n      { view = updateExternalMeasurement(cm, line); }\n\n    var info = mapFromLineView(view, line, lineN);\n    return {\n      line: line, view: view, rect: null,\n      map: info.map, cache: info.cache, before: info.before,\n      hasHeights: false\n    }\n  }\n\n  // Given a prepared measurement object, measures the position of an\n  // actual character (or fetches it from the cache).\n  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n    if (prepared.before) { ch = -1; }\n    var key = ch + (bias || \"\"), found;\n    if (prepared.cache.hasOwnProperty(key)) {\n      found = prepared.cache[key];\n    } else {\n      if (!prepared.rect)\n        { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n      if (!prepared.hasHeights) {\n        ensureLineHeights(cm, prepared.view, prepared.rect);\n        prepared.hasHeights = true;\n      }\n      found = measureCharInner(cm, prepared, ch, bias);\n      if (!found.bogus) { prepared.cache[key] = found; }\n    }\n    return {left: found.left, right: found.right,\n            top: varHeight ? found.rtop : found.top,\n            bottom: varHeight ? found.rbottom : found.bottom}\n  }\n\n  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n  function nodeAndOffsetInLineMap(map, ch, bias) {\n    var node, start, end, collapse, mStart, mEnd;\n    // First, search the line map for the text node corresponding to,\n    // or closest to, the target character.\n    for (var i = 0; i < map.length; i += 3) {\n      mStart = map[i];\n      mEnd = map[i + 1];\n      if (ch < mStart) {\n        start = 0; end = 1;\n        collapse = \"left\";\n      } else if (ch < mEnd) {\n        start = ch - mStart;\n        end = start + 1;\n      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n        end = mEnd - mStart;\n        start = end - 1;\n        if (ch >= mEnd) { collapse = \"right\"; }\n      }\n      if (start != null) {\n        node = map[i + 2];\n        if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n          { collapse = bias; }\n        if (bias == \"left\" && start == 0)\n          { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n            node = map[(i -= 3) + 2];\n            collapse = \"left\";\n          } }\n        if (bias == \"right\" && start == mEnd - mStart)\n          { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n            node = map[(i += 3) + 2];\n            collapse = \"right\";\n          } }\n        break\n      }\n    }\n    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n  }\n\n  function getUsefulRect(rects, bias) {\n    var rect = nullRect;\n    if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n      if ((rect = rects[i]).left != rect.right) { break }\n    } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n      if ((rect = rects[i$1]).left != rect.right) { break }\n    } }\n    return rect\n  }\n\n  function measureCharInner(cm, prepared, ch, bias) {\n    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n    var rect;\n    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n      for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n          { rect = node.parentNode.getBoundingClientRect(); }\n        else\n          { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n        if (rect.left || rect.right || start == 0) { break }\n        end = start;\n        start = start - 1;\n        collapse = \"right\";\n      }\n      if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n    } else { // If it is a widget, simply get the box for the whole widget.\n      if (start > 0) { collapse = bias = \"right\"; }\n      var rects;\n      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n        { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n      else\n        { rect = node.getBoundingClientRect(); }\n    }\n    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n      var rSpan = node.parentNode.getClientRects()[0];\n      if (rSpan)\n        { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n      else\n        { rect = nullRect; }\n    }\n\n    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n    var mid = (rtop + rbot) / 2;\n    var heights = prepared.view.measure.heights;\n    var i = 0;\n    for (; i < heights.length - 1; i++)\n      { if (mid < heights[i]) { break } }\n    var top = i ? heights[i - 1] : 0, bot = heights[i];\n    var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n                  right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n                  top: top, bottom: bot};\n    if (!rect.left && !rect.right) { result.bogus = true; }\n    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n    return result\n  }\n\n  // Work around problem with bounding client rects on ranges being\n  // returned incorrectly when zoomed on IE10 and below.\n  function maybeUpdateRectForZooming(measure, rect) {\n    if (!window.screen || screen.logicalXDPI == null ||\n        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n      { return rect }\n    var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n    var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n    return {left: rect.left * scaleX, right: rect.right * scaleX,\n            top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n  }\n\n  function clearLineMeasurementCacheFor(lineView) {\n    if (lineView.measure) {\n      lineView.measure.cache = {};\n      lineView.measure.heights = null;\n      if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n        { lineView.measure.caches[i] = {}; } }\n    }\n  }\n\n  function clearLineMeasurementCache(cm) {\n    cm.display.externalMeasure = null;\n    removeChildren(cm.display.lineMeasure);\n    for (var i = 0; i < cm.display.view.length; i++)\n      { clearLineMeasurementCacheFor(cm.display.view[i]); }\n  }\n\n  function clearCaches(cm) {\n    clearLineMeasurementCache(cm);\n    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n    if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n    cm.display.lineNumChars = null;\n  }\n\n  function pageScrollX(doc) {\n    // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n    // which causes page_Offset and bounding client rects to use\n    // different reference viewports and invalidate our calculations.\n    if (chrome && android) { return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) }\n    return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft\n  }\n  function pageScrollY(doc) {\n    if (chrome && android) { return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) }\n    return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop\n  }\n\n  function widgetTopHeight(lineObj) {\n    var ref = visualLine(lineObj);\n    var widgets = ref.widgets;\n    var height = 0;\n    if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above)\n      { height += widgetHeight(widgets[i]); } } }\n    return height\n  }\n\n  // Converts a {top, bottom, left, right} box from line-local\n  // coordinates into another coordinate system. Context may be one of\n  // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n  // or \"page\".\n  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n    if (!includeWidgets) {\n      var height = widgetTopHeight(lineObj);\n      rect.top += height; rect.bottom += height;\n    }\n    if (context == \"line\") { return rect }\n    if (!context) { context = \"local\"; }\n    var yOff = heightAtLine(lineObj);\n    if (context == \"local\") { yOff += paddingTop(cm.display); }\n    else { yOff -= cm.display.viewOffset; }\n    if (context == \"page\" || context == \"window\") {\n      var lOff = cm.display.lineSpace.getBoundingClientRect();\n      yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY(doc(cm)));\n      var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX(doc(cm)));\n      rect.left += xOff; rect.right += xOff;\n    }\n    rect.top += yOff; rect.bottom += yOff;\n    return rect\n  }\n\n  // Coverts a box from \"div\" coords to another coordinate system.\n  // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n  function fromCoordSystem(cm, coords, context) {\n    if (context == \"div\") { return coords }\n    var left = coords.left, top = coords.top;\n    // First move into \"page\" coordinate system\n    if (context == \"page\") {\n      left -= pageScrollX(doc(cm));\n      top -= pageScrollY(doc(cm));\n    } else if (context == \"local\" || !context) {\n      var localBox = cm.display.sizer.getBoundingClientRect();\n      left += localBox.left;\n      top += localBox.top;\n    }\n\n    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n  }\n\n  function charCoords(cm, pos, context, lineObj, bias) {\n    if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n  }\n\n  // Returns a box for a given cursor position, which may have an\n  // 'other' property containing the position of the secondary cursor\n  // on a bidi boundary.\n  // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n  // and after `char - 1` in writing order of `char - 1`\n  // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n  // and before `char` in writing order of `char`\n  // Examples (upper-case letters are RTL, lower-case are LTR):\n  //     Pos(0, 1, ...)\n  //     before   after\n  // ab     a|b     a|b\n  // aB     a|B     aB|\n  // Ab     |Ab     A|b\n  // AB     B|A     B|A\n  // Every position after the last character on a line is considered to stick\n  // to the last character on the line.\n  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n    lineObj = lineObj || getLine(cm.doc, pos.line);\n    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n    function get(ch, right) {\n      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n      if (right) { m.left = m.right; } else { m.right = m.left; }\n      return intoCoordSystem(cm, lineObj, m, context)\n    }\n    var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n    if (ch >= lineObj.text.length) {\n      ch = lineObj.text.length;\n      sticky = \"before\";\n    } else if (ch <= 0) {\n      ch = 0;\n      sticky = \"after\";\n    }\n    if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n    function getBidi(ch, partPos, invert) {\n      var part = order[partPos], right = part.level == 1;\n      return get(invert ? ch - 1 : ch, right != invert)\n    }\n    var partPos = getBidiPartAt(order, ch, sticky);\n    var other = bidiOther;\n    var val = getBidi(ch, partPos, sticky == \"before\");\n    if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n    return val\n  }\n\n  // Used to cheaply estimate the coordinates for a position. Used for\n  // intermediate scroll updates.\n  function estimateCoords(cm, pos) {\n    var left = 0;\n    pos = clipPos(cm.doc, pos);\n    if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n    var lineObj = getLine(cm.doc, pos.line);\n    var top = heightAtLine(lineObj) + paddingTop(cm.display);\n    return {left: left, right: left, top: top, bottom: top + lineObj.height}\n  }\n\n  // Positions returned by coordsChar contain some extra information.\n  // xRel is the relative x position of the input coordinates compared\n  // to the found position (so xRel > 0 means the coordinates are to\n  // the right of the character position, for example). When outside\n  // is true, that means the coordinates lie outside the line's\n  // vertical range.\n  function PosWithInfo(line, ch, sticky, outside, xRel) {\n    var pos = Pos(line, ch, sticky);\n    pos.xRel = xRel;\n    if (outside) { pos.outside = outside; }\n    return pos\n  }\n\n  // Compute the character position closest to the given coordinates.\n  // Input must be lineSpace-local (\"div\" coordinate system).\n  function coordsChar(cm, x, y) {\n    var doc = cm.doc;\n    y += cm.display.viewOffset;\n    if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n    if (lineN > last)\n      { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n    if (x < 0) { x = 0; }\n\n    var lineObj = getLine(doc, lineN);\n    for (;;) {\n      var found = coordsCharInner(cm, lineObj, lineN, x, y);\n      var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n      if (!collapsed) { return found }\n      var rangeEnd = collapsed.find(1);\n      if (rangeEnd.line == lineN) { return rangeEnd }\n      lineObj = getLine(doc, lineN = rangeEnd.line);\n    }\n  }\n\n  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n    y -= widgetTopHeight(lineObj);\n    var end = lineObj.text.length;\n    var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n    end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n    return {begin: begin, end: end}\n  }\n\n  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n    var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n    return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n  }\n\n  // Returns true if the given side of a box is after the given\n  // coordinates, in top-to-bottom, left-to-right order.\n  function boxIsAfter(box, x, y, left) {\n    return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n  }\n\n  function coordsCharInner(cm, lineObj, lineNo, x, y) {\n    // Move y into line-local coordinate space\n    y -= heightAtLine(lineObj);\n    var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n    // When directly calling `measureCharPrepared`, we have to adjust\n    // for the widgets at this line.\n    var widgetHeight = widgetTopHeight(lineObj);\n    var begin = 0, end = lineObj.text.length, ltr = true;\n\n    var order = getOrder(lineObj, cm.doc.direction);\n    // If the line isn't plain left-to-right text, first figure out\n    // which bidi section the coordinates fall into.\n    if (order) {\n      var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n                   (cm, lineObj, lineNo, preparedMeasure, order, x, y);\n      ltr = part.level != 1;\n      // The awkward -1 offsets are needed because findFirst (called\n      // on these below) will treat its first bound as inclusive,\n      // second as exclusive, but we want to actually address the\n      // characters in the part's range\n      begin = ltr ? part.from : part.to - 1;\n      end = ltr ? part.to : part.from - 1;\n    }\n\n    // A binary search to find the first character whose bounding box\n    // starts after the coordinates. If we run across any whose box wrap\n    // the coordinates, store that.\n    var chAround = null, boxAround = null;\n    var ch = findFirst(function (ch) {\n      var box = measureCharPrepared(cm, preparedMeasure, ch);\n      box.top += widgetHeight; box.bottom += widgetHeight;\n      if (!boxIsAfter(box, x, y, false)) { return false }\n      if (box.top <= y && box.left <= x) {\n        chAround = ch;\n        boxAround = box;\n      }\n      return true\n    }, begin, end);\n\n    var baseX, sticky, outside = false;\n    // If a box around the coordinates was found, use that\n    if (boxAround) {\n      // Distinguish coordinates nearer to the left or right side of the box\n      var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n      ch = chAround + (atStart ? 0 : 1);\n      sticky = atStart ? \"after\" : \"before\";\n      baseX = atLeft ? boxAround.left : boxAround.right;\n    } else {\n      // (Adjust for extended bound, if necessary.)\n      if (!ltr && (ch == end || ch == begin)) { ch++; }\n      // To determine which side to associate with, get the box to the\n      // left of the character and compare it's vertical position to the\n      // coordinates\n      sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n        (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?\n        \"after\" : \"before\";\n      // Now get accurate coordinates for this place, in order to get a\n      // base X position\n      var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), \"line\", lineObj, preparedMeasure);\n      baseX = coords.left;\n      outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n    }\n\n    ch = skipExtendingChars(lineObj.text, ch, 1);\n    return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)\n  }\n\n  function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {\n    // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n    // situation, we can take this ordering to correspond to the visual\n    // ordering. This finds the first part whose end is after the given\n    // coordinates.\n    var index = findFirst(function (i) {\n      var part = order[i], ltr = part.level != 1;\n      return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n                                     \"line\", lineObj, preparedMeasure), x, y, true)\n    }, 0, order.length - 1);\n    var part = order[index];\n    // If this isn't the first part, the part's start is also after\n    // the coordinates, and the coordinates aren't on the same line as\n    // that start, move one part back.\n    if (index > 0) {\n      var ltr = part.level != 1;\n      var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n                               \"line\", lineObj, preparedMeasure);\n      if (boxIsAfter(start, x, y, true) && start.top > y)\n        { part = order[index - 1]; }\n    }\n    return part\n  }\n\n  function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n    // In a wrapped line, rtl text on wrapping boundaries can do things\n    // that don't correspond to the ordering in our `order` array at\n    // all, so a binary search doesn't work, and we want to return a\n    // part that only spans one line so that the binary search in\n    // coordsCharInner is safe. As such, we first find the extent of the\n    // wrapped line, and then do a flat search in which we discard any\n    // spans that aren't on the line.\n    var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n    var begin = ref.begin;\n    var end = ref.end;\n    if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n    var part = null, closestDist = null;\n    for (var i = 0; i < order.length; i++) {\n      var p = order[i];\n      if (p.from >= end || p.to <= begin) { continue }\n      var ltr = p.level != 1;\n      var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n      // Weigh against spans ending before this, so that they are only\n      // picked if nothing ends after\n      var dist = endX < x ? x - endX + 1e9 : endX - x;\n      if (!part || closestDist > dist) {\n        part = p;\n        closestDist = dist;\n      }\n    }\n    if (!part) { part = order[order.length - 1]; }\n    // Clip the part to the wrapped line.\n    if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n    if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n    return part\n  }\n\n  var measureText;\n  // Compute the default text height.\n  function textHeight(display) {\n    if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n    if (measureText == null) {\n      measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n      // Measure a bunch of lines, for browsers that compute\n      // fractional heights.\n      for (var i = 0; i < 49; ++i) {\n        measureText.appendChild(document.createTextNode(\"x\"));\n        measureText.appendChild(elt(\"br\"));\n      }\n      measureText.appendChild(document.createTextNode(\"x\"));\n    }\n    removeChildrenAndAdd(display.measure, measureText);\n    var height = measureText.offsetHeight / 50;\n    if (height > 3) { display.cachedTextHeight = height; }\n    removeChildren(display.measure);\n    return height || 1\n  }\n\n  // Compute the default character width.\n  function charWidth(display) {\n    if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n    var anchor = elt(\"span\", \"xxxxxxxxxx\");\n    var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n    removeChildrenAndAdd(display.measure, pre);\n    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n    if (width > 2) { display.cachedCharWidth = width; }\n    return width || 10\n  }\n\n  // Do a bulk-read of the DOM positions and sizes needed to draw the\n  // view, so that we don't interleave reading and writing to the DOM.\n  function getDimensions(cm) {\n    var d = cm.display, left = {}, width = {};\n    var gutterLeft = d.gutters.clientLeft;\n    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n      var id = cm.display.gutterSpecs[i].className;\n      left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n      width[id] = n.clientWidth;\n    }\n    return {fixedPos: compensateForHScroll(d),\n            gutterTotalWidth: d.gutters.offsetWidth,\n            gutterLeft: left,\n            gutterWidth: width,\n            wrapperWidth: d.wrapper.clientWidth}\n  }\n\n  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n  // but using getBoundingClientRect to get a sub-pixel-accurate\n  // result.\n  function compensateForHScroll(display) {\n    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n  }\n\n  // Returns a function that estimates the height of a line, to use as\n  // first approximation until the line becomes visible (and is thus\n  // properly measurable).\n  function estimateHeight(cm) {\n    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n    return function (line) {\n      if (lineIsHidden(cm.doc, line)) { return 0 }\n\n      var widgetsHeight = 0;\n      if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n        if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n      } }\n\n      if (wrapping)\n        { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n      else\n        { return widgetsHeight + th }\n    }\n  }\n\n  function estimateLineHeights(cm) {\n    var doc = cm.doc, est = estimateHeight(cm);\n    doc.iter(function (line) {\n      var estHeight = est(line);\n      if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n    });\n  }\n\n  // Given a mouse event, find the corresponding position. If liberal\n  // is false, it checks whether a gutter or scrollbar was clicked,\n  // and returns null if it was. forRect is used by rectangular\n  // selections, and tries to estimate a character position even for\n  // coordinates beyond the right of the text.\n  function posFromMouse(cm, e, liberal, forRect) {\n    var display = cm.display;\n    if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n    var x, y, space = display.lineSpace.getBoundingClientRect();\n    // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n    try { x = e.clientX - space.left; y = e.clientY - space.top; }\n    catch (e$1) { return null }\n    var coords = coordsChar(cm, x, y), line;\n    if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n    }\n    return coords\n  }\n\n  // Find the view element corresponding to a given line. Return null\n  // when the line isn't visible.\n  function findViewIndex(cm, n) {\n    if (n >= cm.display.viewTo) { return null }\n    n -= cm.display.viewFrom;\n    if (n < 0) { return null }\n    var view = cm.display.view;\n    for (var i = 0; i < view.length; i++) {\n      n -= view[i].size;\n      if (n < 0) { return i }\n    }\n  }\n\n  // Updates the display.view data structure for a given change to the\n  // document. From and to are in pre-change coordinates. Lendiff is\n  // the amount of lines added or subtracted by the change. This is\n  // used for changes that span multiple lines, or change the way\n  // lines are divided into visual lines. regLineChange (below)\n  // registers single-line changes.\n  function regChange(cm, from, to, lendiff) {\n    if (from == null) { from = cm.doc.first; }\n    if (to == null) { to = cm.doc.first + cm.doc.size; }\n    if (!lendiff) { lendiff = 0; }\n\n    var display = cm.display;\n    if (lendiff && to < display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers > from))\n      { display.updateLineNumbers = from; }\n\n    cm.curOp.viewChanged = true;\n\n    if (from >= display.viewTo) { // Change after\n      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n        { resetView(cm); }\n    } else if (to <= display.viewFrom) { // Change before\n      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n        resetView(cm);\n      } else {\n        display.viewFrom += lendiff;\n        display.viewTo += lendiff;\n      }\n    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n      resetView(cm);\n    } else if (from <= display.viewFrom) { // Top overlap\n      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cut) {\n        display.view = display.view.slice(cut.index);\n        display.viewFrom = cut.lineN;\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    } else if (to >= display.viewTo) { // Bottom overlap\n      var cut$1 = viewCuttingPoint(cm, from, from, -1);\n      if (cut$1) {\n        display.view = display.view.slice(0, cut$1.index);\n        display.viewTo = cut$1.lineN;\n      } else {\n        resetView(cm);\n      }\n    } else { // Gap in the middle\n      var cutTop = viewCuttingPoint(cm, from, from, -1);\n      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n      if (cutTop && cutBot) {\n        display.view = display.view.slice(0, cutTop.index)\n          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n          .concat(display.view.slice(cutBot.index));\n        display.viewTo += lendiff;\n      } else {\n        resetView(cm);\n      }\n    }\n\n    var ext = display.externalMeasured;\n    if (ext) {\n      if (to < ext.lineN)\n        { ext.lineN += lendiff; }\n      else if (from < ext.lineN + ext.size)\n        { display.externalMeasured = null; }\n    }\n  }\n\n  // Register a change to a single line. Type must be one of \"text\",\n  // \"gutter\", \"class\", \"widget\"\n  function regLineChange(cm, line, type) {\n    cm.curOp.viewChanged = true;\n    var display = cm.display, ext = cm.display.externalMeasured;\n    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n      { display.externalMeasured = null; }\n\n    if (line < display.viewFrom || line >= display.viewTo) { return }\n    var lineView = display.view[findViewIndex(cm, line)];\n    if (lineView.node == null) { return }\n    var arr = lineView.changes || (lineView.changes = []);\n    if (indexOf(arr, type) == -1) { arr.push(type); }\n  }\n\n  // Clear the view.\n  function resetView(cm) {\n    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n    cm.display.view = [];\n    cm.display.viewOffset = 0;\n  }\n\n  function viewCuttingPoint(cm, oldN, newN, dir) {\n    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n      { return {index: index, lineN: newN} }\n    var n = cm.display.viewFrom;\n    for (var i = 0; i < index; i++)\n      { n += view[i].size; }\n    if (n != oldN) {\n      if (dir > 0) {\n        if (index == view.length - 1) { return null }\n        diff = (n + view[index].size) - oldN;\n        index++;\n      } else {\n        diff = n - oldN;\n      }\n      oldN += diff; newN += diff;\n    }\n    while (visualLineNo(cm.doc, newN) != newN) {\n      if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n      index += dir;\n    }\n    return {index: index, lineN: newN}\n  }\n\n  // Force the view to cover a given range, adding empty view element\n  // or clipping off existing ones as needed.\n  function adjustView(cm, from, to) {\n    var display = cm.display, view = display.view;\n    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n      display.view = buildViewArray(cm, from, to);\n      display.viewFrom = from;\n    } else {\n      if (display.viewFrom > from)\n        { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n      else if (display.viewFrom < from)\n        { display.view = display.view.slice(findViewIndex(cm, from)); }\n      display.viewFrom = from;\n      if (display.viewTo < to)\n        { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n      else if (display.viewTo > to)\n        { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n    }\n    display.viewTo = to;\n  }\n\n  // Count the number of lines in the view whose DOM representation is\n  // out of date (or nonexistent).\n  function countDirtyView(cm) {\n    var view = cm.display.view, dirty = 0;\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n    }\n    return dirty\n  }\n\n  function updateSelection(cm) {\n    cm.display.input.showSelection(cm.display.input.prepareSelection());\n  }\n\n  function prepareSelection(cm, primary) {\n    if ( primary === void 0 ) primary = true;\n\n    var doc = cm.doc, result = {};\n    var curFragment = result.cursors = document.createDocumentFragment();\n    var selFragment = result.selection = document.createDocumentFragment();\n\n    var customCursor = cm.options.$customCursor;\n    if (customCursor) { primary = true; }\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      if (!primary && i == doc.sel.primIndex) { continue }\n      var range = doc.sel.ranges[i];\n      if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }\n      var collapsed = range.empty();\n      if (customCursor) {\n        var head = customCursor(cm, range);\n        if (head) { drawSelectionCursor(cm, head, curFragment); }\n      } else if (collapsed || cm.options.showCursorWhenSelecting) {\n        drawSelectionCursor(cm, range.head, curFragment);\n      }\n      if (!collapsed)\n        { drawSelectionRange(cm, range, selFragment); }\n    }\n    return result\n  }\n\n  // Draws a cursor for the given range\n  function drawSelectionCursor(cm, head, output) {\n    var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n    var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n    cursor.style.left = pos.left + \"px\";\n    cursor.style.top = pos.top + \"px\";\n    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n    if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n      var charPos = charCoords(cm, head, \"div\", null, null);\n      var width = charPos.right - charPos.left;\n      cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + \"px\";\n    }\n\n    if (pos.other) {\n      // Secondary cursor, shown when on a 'jump' in bi-directional text\n      var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n      otherCursor.style.display = \"\";\n      otherCursor.style.left = pos.other.left + \"px\";\n      otherCursor.style.top = pos.other.top + \"px\";\n      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n    }\n  }\n\n  function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n  // Draws the given range as a highlighted selection\n  function drawSelectionRange(cm, range, output) {\n    var display = cm.display, doc = cm.doc;\n    var fragment = document.createDocumentFragment();\n    var padding = paddingH(cm.display), leftSide = padding.left;\n    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n    var docLTR = doc.direction == \"ltr\";\n\n    function add(left, top, width, bottom) {\n      if (top < 0) { top = 0; }\n      top = Math.round(top);\n      bottom = Math.round(bottom);\n      fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n                             top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n                             height: \" + (bottom - top) + \"px\")));\n    }\n\n    function drawForLine(line, fromArg, toArg) {\n      var lineObj = getLine(doc, line);\n      var lineLen = lineObj.text.length;\n      var start, end;\n      function coords(ch, bias) {\n        return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n      }\n\n      function wrapX(pos, dir, side) {\n        var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n        var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n        var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n        return coords(ch, prop)[prop]\n      }\n\n      var order = getOrder(lineObj, doc.direction);\n      iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n        var ltr = dir == \"ltr\";\n        var fromPos = coords(from, ltr ? \"left\" : \"right\");\n        var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n        var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n        var first = i == 0, last = !order || i == order.length - 1;\n        if (toPos.top - fromPos.top <= 3) { // Single line\n          var openLeft = (docLTR ? openStart : openEnd) && first;\n          var openRight = (docLTR ? openEnd : openStart) && last;\n          var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n          var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n          add(left, fromPos.top, right - left, fromPos.bottom);\n        } else { // Multiple lines\n          var topLeft, topRight, botLeft, botRight;\n          if (ltr) {\n            topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n            topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n            botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n            botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n          } else {\n            topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n            topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n            botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n            botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n          }\n          add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n          if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n          add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n        }\n\n        if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n        if (cmpCoords(toPos, start) < 0) { start = toPos; }\n        if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n        if (cmpCoords(toPos, end) < 0) { end = toPos; }\n      });\n      return {start: start, end: end}\n    }\n\n    var sFrom = range.from(), sTo = range.to();\n    if (sFrom.line == sTo.line) {\n      drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n    } else {\n      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n      var singleVLine = visualLine(fromLine) == visualLine(toLine);\n      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n      if (singleVLine) {\n        if (leftEnd.top < rightStart.top - 2) {\n          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n        } else {\n          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n        }\n      }\n      if (leftEnd.bottom < rightStart.top)\n        { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n    }\n\n    output.appendChild(fragment);\n  }\n\n  // Cursor-blinking\n  function restartBlink(cm) {\n    if (!cm.state.focused) { return }\n    var display = cm.display;\n    clearInterval(display.blinker);\n    var on = true;\n    display.cursorDiv.style.visibility = \"\";\n    if (cm.options.cursorBlinkRate > 0)\n      { display.blinker = setInterval(function () {\n        if (!cm.hasFocus()) { onBlur(cm); }\n        display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n      }, cm.options.cursorBlinkRate); }\n    else if (cm.options.cursorBlinkRate < 0)\n      { display.cursorDiv.style.visibility = \"hidden\"; }\n  }\n\n  function ensureFocus(cm) {\n    if (!cm.hasFocus()) {\n      cm.display.input.focus();\n      if (!cm.state.focused) { onFocus(cm); }\n    }\n  }\n\n  function delayBlurEvent(cm) {\n    cm.state.delayingBlurEvent = true;\n    setTimeout(function () { if (cm.state.delayingBlurEvent) {\n      cm.state.delayingBlurEvent = false;\n      if (cm.state.focused) { onBlur(cm); }\n    } }, 100);\n  }\n\n  function onFocus(cm, e) {\n    if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }\n\n    if (cm.options.readOnly == \"nocursor\") { return }\n    if (!cm.state.focused) {\n      signal(cm, \"focus\", cm, e);\n      cm.state.focused = true;\n      addClass(cm.display.wrapper, \"CodeMirror-focused\");\n      // This test prevents this from firing when a context\n      // menu is closed (since the input reset would kill the\n      // select-all detection hack)\n      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n        cm.display.input.reset();\n        if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n      }\n      cm.display.input.receivedFocus();\n    }\n    restartBlink(cm);\n  }\n  function onBlur(cm, e) {\n    if (cm.state.delayingBlurEvent) { return }\n\n    if (cm.state.focused) {\n      signal(cm, \"blur\", cm, e);\n      cm.state.focused = false;\n      rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n    }\n    clearInterval(cm.display.blinker);\n    setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n  }\n\n  // Read the actual heights of the rendered lines, and update their\n  // stored heights to match.\n  function updateHeightsInViewport(cm) {\n    var display = cm.display;\n    var prevBottom = display.lineDiv.offsetTop;\n    var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);\n    var oldHeight = display.lineDiv.getBoundingClientRect().top;\n    var mustScroll = 0;\n    for (var i = 0; i < display.view.length; i++) {\n      var cur = display.view[i], wrapping = cm.options.lineWrapping;\n      var height = (void 0), width = 0;\n      if (cur.hidden) { continue }\n      oldHeight += cur.line.height;\n      if (ie && ie_version < 8) {\n        var bot = cur.node.offsetTop + cur.node.offsetHeight;\n        height = bot - prevBottom;\n        prevBottom = bot;\n      } else {\n        var box = cur.node.getBoundingClientRect();\n        height = box.bottom - box.top;\n        // Check that lines don't extend past the right of the current\n        // editor width\n        if (!wrapping && cur.text.firstChild)\n          { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n      }\n      var diff = cur.line.height - height;\n      if (diff > .005 || diff < -.005) {\n        if (oldHeight < viewTop) { mustScroll -= diff; }\n        updateLineHeight(cur.line, height);\n        updateWidgetHeight(cur.line);\n        if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n          { updateWidgetHeight(cur.rest[j]); } }\n      }\n      if (width > cm.display.sizerWidth) {\n        var chWidth = Math.ceil(width / charWidth(cm.display));\n        if (chWidth > cm.display.maxLineLength) {\n          cm.display.maxLineLength = chWidth;\n          cm.display.maxLine = cur.line;\n          cm.display.maxLineChanged = true;\n        }\n      }\n    }\n    if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }\n  }\n\n  // Read and store the height of line widgets associated with the\n  // given line.\n  function updateWidgetHeight(line) {\n    if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n      var w = line.widgets[i], parent = w.node.parentNode;\n      if (parent) { w.height = parent.offsetHeight; }\n    } }\n  }\n\n  // Compute the lines that are visible in a given viewport (defaults\n  // the the current scroll position). viewport may contain top,\n  // height, and ensure (see op.scrollToPos) properties.\n  function visibleLines(display, doc, viewport) {\n    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n    top = Math.floor(top - paddingTop(display));\n    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n    // forces those lines into the viewport (if possible).\n    if (viewport && viewport.ensure) {\n      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n      if (ensureFrom < from) {\n        from = ensureFrom;\n        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n        to = ensureTo;\n      }\n    }\n    return {from: from, to: Math.max(to, from + 1)}\n  }\n\n  // SCROLLING THINGS INTO VIEW\n\n  // If an editor sits on the top or bottom of the window, partially\n  // scrolled out of view, this ensures that the cursor is visible.\n  function maybeScrollWindow(cm, rect) {\n    if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n    var doc = display.wrapper.ownerDocument;\n    if (rect.top + box.top < 0) { doScroll = true; }\n    else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) { doScroll = false; }\n    if (doScroll != null && !phantom) {\n      var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n                         top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n                         height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n                         left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n      cm.display.lineSpace.appendChild(scrollNode);\n      scrollNode.scrollIntoView(doScroll);\n      cm.display.lineSpace.removeChild(scrollNode);\n    }\n  }\n\n  // Scroll a given position into view (immediately), verifying that\n  // it actually became visible (as line heights are accurately\n  // measured, the position of something may 'drift' during drawing).\n  function scrollPosIntoView(cm, pos, end, margin) {\n    if (margin == null) { margin = 0; }\n    var rect;\n    if (!cm.options.lineWrapping && pos == end) {\n      // Set pos and end to the cursor positions around the character pos sticks to\n      // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n      // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n      end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n      pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n    }\n    for (var limit = 0; limit < 5; limit++) {\n      var changed = false;\n      var coords = cursorCoords(cm, pos);\n      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n      rect = {left: Math.min(coords.left, endCoords.left),\n              top: Math.min(coords.top, endCoords.top) - margin,\n              right: Math.max(coords.left, endCoords.left),\n              bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n      var scrollPos = calculateScrollPos(cm, rect);\n      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n      if (scrollPos.scrollTop != null) {\n        updateScrollTop(cm, scrollPos.scrollTop);\n        if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n      }\n      if (scrollPos.scrollLeft != null) {\n        setScrollLeft(cm, scrollPos.scrollLeft);\n        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n      }\n      if (!changed) { break }\n    }\n    return rect\n  }\n\n  // Scroll a given set of coordinates into view (immediately).\n  function scrollIntoView(cm, rect) {\n    var scrollPos = calculateScrollPos(cm, rect);\n    if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n    if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n  }\n\n  // Calculate a new scroll position needed to scroll the given\n  // rectangle into view. Returns an object with scrollTop and\n  // scrollLeft properties. When these are undefined, the\n  // vertical/horizontal position does not need to be adjusted.\n  function calculateScrollPos(cm, rect) {\n    var display = cm.display, snapMargin = textHeight(cm.display);\n    if (rect.top < 0) { rect.top = 0; }\n    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n    var screen = displayHeight(cm), result = {};\n    if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n    var docBottom = cm.doc.height + paddingVert(display);\n    var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n    if (rect.top < screentop) {\n      result.scrollTop = atTop ? 0 : rect.top;\n    } else if (rect.bottom > screentop + screen) {\n      var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n      if (newTop != screentop) { result.scrollTop = newTop; }\n    }\n\n    var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n    var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n    var tooWide = rect.right - rect.left > screenw;\n    if (tooWide) { rect.right = rect.left + screenw; }\n    if (rect.left < 10)\n      { result.scrollLeft = 0; }\n    else if (rect.left < screenleft)\n      { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n    else if (rect.right > screenw + screenleft - 3)\n      { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n    return result\n  }\n\n  // Store a relative adjustment to the scroll position in the current\n  // operation (to be applied when the operation finishes).\n  function addToScrollTop(cm, top) {\n    if (top == null) { return }\n    resolveScrollToPos(cm);\n    cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n  }\n\n  // Make sure that at the end of the operation the current cursor is\n  // shown.\n  function ensureCursorVisible(cm) {\n    resolveScrollToPos(cm);\n    var cur = cm.getCursor();\n    cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n  }\n\n  function scrollToCoords(cm, x, y) {\n    if (x != null || y != null) { resolveScrollToPos(cm); }\n    if (x != null) { cm.curOp.scrollLeft = x; }\n    if (y != null) { cm.curOp.scrollTop = y; }\n  }\n\n  function scrollToRange(cm, range) {\n    resolveScrollToPos(cm);\n    cm.curOp.scrollToPos = range;\n  }\n\n  // When an operation has its scrollToPos property set, and another\n  // scroll action is applied before the end of the operation, this\n  // 'simulates' scrolling that position into view in a cheap way, so\n  // that the effect of intermediate scroll commands is not ignored.\n  function resolveScrollToPos(cm) {\n    var range = cm.curOp.scrollToPos;\n    if (range) {\n      cm.curOp.scrollToPos = null;\n      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n      scrollToCoordsRange(cm, from, to, range.margin);\n    }\n  }\n\n  function scrollToCoordsRange(cm, from, to, margin) {\n    var sPos = calculateScrollPos(cm, {\n      left: Math.min(from.left, to.left),\n      top: Math.min(from.top, to.top) - margin,\n      right: Math.max(from.right, to.right),\n      bottom: Math.max(from.bottom, to.bottom) + margin\n    });\n    scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n  }\n\n  // Sync the scrollable area and scrollbars, ensure the viewport\n  // covers the visible area.\n  function updateScrollTop(cm, val) {\n    if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n    if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n    setScrollTop(cm, val, true);\n    if (gecko) { updateDisplaySimple(cm); }\n    startWorker(cm, 100);\n  }\n\n  function setScrollTop(cm, val, forceScroll) {\n    val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));\n    if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n    cm.doc.scrollTop = val;\n    cm.display.scrollbars.setScrollTop(val);\n    if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n  }\n\n  // Sync scroller and scrollbar, ensure the gutter elements are\n  // aligned.\n  function setScrollLeft(cm, val, isScroller, forceScroll) {\n    val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));\n    if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n    cm.doc.scrollLeft = val;\n    alignHorizontally(cm);\n    if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n    cm.display.scrollbars.setScrollLeft(val);\n  }\n\n  // SCROLLBARS\n\n  // Prepare DOM reads needed to update the scrollbars. Done in one\n  // shot to minimize update/measure roundtrips.\n  function measureForScrollbars(cm) {\n    var d = cm.display, gutterW = d.gutters.offsetWidth;\n    var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n    return {\n      clientHeight: d.scroller.clientHeight,\n      viewHeight: d.wrapper.clientHeight,\n      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n      viewWidth: d.wrapper.clientWidth,\n      barLeft: cm.options.fixedGutter ? gutterW : 0,\n      docHeight: docH,\n      scrollHeight: docH + scrollGap(cm) + d.barHeight,\n      nativeBarWidth: d.nativeBarWidth,\n      gutterWidth: gutterW\n    }\n  }\n\n  var NativeScrollbars = function(place, scroll, cm) {\n    this.cm = cm;\n    var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n    var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n    vert.tabIndex = horiz.tabIndex = -1;\n    place(vert); place(horiz);\n\n    on(vert, \"scroll\", function () {\n      if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n    });\n    on(horiz, \"scroll\", function () {\n      if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n    });\n\n    this.checkedZeroWidth = false;\n    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n    if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n  };\n\n  NativeScrollbars.prototype.update = function (measure) {\n    var needsH = measure.scrollWidth > measure.clientWidth + 1;\n    var needsV = measure.scrollHeight > measure.clientHeight + 1;\n    var sWidth = measure.nativeBarWidth;\n\n    if (needsV) {\n      this.vert.style.display = \"block\";\n      this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n      var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n      // A bug in IE8 can cause this value to be negative, so guard it.\n      this.vert.firstChild.style.height =\n        Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n    } else {\n      this.vert.scrollTop = 0;\n      this.vert.style.display = \"\";\n      this.vert.firstChild.style.height = \"0\";\n    }\n\n    if (needsH) {\n      this.horiz.style.display = \"block\";\n      this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n      this.horiz.style.left = measure.barLeft + \"px\";\n      var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n      this.horiz.firstChild.style.width =\n        Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n    } else {\n      this.horiz.style.display = \"\";\n      this.horiz.firstChild.style.width = \"0\";\n    }\n\n    if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n      if (sWidth == 0) { this.zeroWidthHack(); }\n      this.checkedZeroWidth = true;\n    }\n\n    return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n  };\n\n  NativeScrollbars.prototype.setScrollLeft = function (pos) {\n    if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n    if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n  };\n\n  NativeScrollbars.prototype.setScrollTop = function (pos) {\n    if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n    if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n  };\n\n  NativeScrollbars.prototype.zeroWidthHack = function () {\n    var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n    this.horiz.style.height = this.vert.style.width = w;\n    this.horiz.style.visibility = this.vert.style.visibility = \"hidden\";\n    this.disableHoriz = new Delayed;\n    this.disableVert = new Delayed;\n  };\n\n  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n    bar.style.visibility = \"\";\n    function maybeDisable() {\n      // To find out whether the scrollbar is still visible, we\n      // check whether the element under the pixel in the bottom\n      // right corner of the scrollbar box is the scrollbar box\n      // itself (when the bar is still visible) or its filler child\n      // (when the bar is hidden). If it is still visible, we keep\n      // it enabled, if it's hidden, we disable pointer events.\n      var box = bar.getBoundingClientRect();\n      var elt = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n          : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n      if (elt != bar) { bar.style.visibility = \"hidden\"; }\n      else { delay.set(1000, maybeDisable); }\n    }\n    delay.set(1000, maybeDisable);\n  };\n\n  NativeScrollbars.prototype.clear = function () {\n    var parent = this.horiz.parentNode;\n    parent.removeChild(this.horiz);\n    parent.removeChild(this.vert);\n  };\n\n  var NullScrollbars = function () {};\n\n  NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n  NullScrollbars.prototype.setScrollLeft = function () {};\n  NullScrollbars.prototype.setScrollTop = function () {};\n  NullScrollbars.prototype.clear = function () {};\n\n  function updateScrollbars(cm, measure) {\n    if (!measure) { measure = measureForScrollbars(cm); }\n    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n    updateScrollbarsInner(cm, measure);\n    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n        { updateHeightsInViewport(cm); }\n      updateScrollbarsInner(cm, measureForScrollbars(cm));\n      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n    }\n  }\n\n  // Re-synchronize the fake scrollbars with the actual size of the\n  // content.\n  function updateScrollbarsInner(cm, measure) {\n    var d = cm.display;\n    var sizes = d.scrollbars.update(measure);\n\n    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n    d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n    if (sizes.right && sizes.bottom) {\n      d.scrollbarFiller.style.display = \"block\";\n      d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n      d.scrollbarFiller.style.width = sizes.right + \"px\";\n    } else { d.scrollbarFiller.style.display = \"\"; }\n    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n      d.gutterFiller.style.display = \"block\";\n      d.gutterFiller.style.height = sizes.bottom + \"px\";\n      d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n    } else { d.gutterFiller.style.display = \"\"; }\n  }\n\n  var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n  function initScrollbars(cm) {\n    if (cm.display.scrollbars) {\n      cm.display.scrollbars.clear();\n      if (cm.display.scrollbars.addClass)\n        { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n    }\n\n    cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n      // Prevent clicks in the scrollbars from killing focus\n      on(node, \"mousedown\", function () {\n        if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n      });\n      node.setAttribute(\"cm-not-content\", \"true\");\n    }, function (pos, axis) {\n      if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n      else { updateScrollTop(cm, pos); }\n    }, cm);\n    if (cm.display.scrollbars.addClass)\n      { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n  }\n\n  // Operations are used to wrap a series of changes to the editor\n  // state in such a way that each change won't have to update the\n  // cursor and display (which would be awkward, slow, and\n  // error-prone). Instead, display updates are batched and then all\n  // combined and executed at once.\n\n  var nextOpId = 0;\n  // Start a new operation.\n  function startOperation(cm) {\n    cm.curOp = {\n      cm: cm,\n      viewChanged: false,      // Flag that indicates that lines might need to be redrawn\n      startHeight: cm.doc.height, // Used to detect need to update scrollbar\n      forceUpdate: false,      // Used to force a redraw\n      updateInput: 0,       // Whether to reset the input textarea\n      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)\n      changeObjs: null,        // Accumulated changes, for firing change events\n      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n      selectionChanged: false, // Whether the selection needs to be redrawn\n      updateMaxLine: false,    // Set when the widest line needs to be determined anew\n      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n      scrollToPos: null,       // Used to scroll to a specific position\n      focus: false,\n      id: ++nextOpId,          // Unique ID\n      markArrays: null         // Used by addMarkedSpan\n    };\n    pushOperation(cm.curOp);\n  }\n\n  // Finish an operation, updating the display and signalling delayed events\n  function endOperation(cm) {\n    var op = cm.curOp;\n    if (op) { finishOperation(op, function (group) {\n      for (var i = 0; i < group.ops.length; i++)\n        { group.ops[i].cm.curOp = null; }\n      endOperations(group);\n    }); }\n  }\n\n  // The DOM updates done when an operation finishes are batched so\n  // that the minimum number of relayouts are required.\n  function endOperations(group) {\n    var ops = group.ops;\n    for (var i = 0; i < ops.length; i++) // Read DOM\n      { endOperation_R1(ops[i]); }\n    for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n      { endOperation_W1(ops[i$1]); }\n    for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n      { endOperation_R2(ops[i$2]); }\n    for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n      { endOperation_W2(ops[i$3]); }\n    for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n      { endOperation_finish(ops[i$4]); }\n  }\n\n  function endOperation_R1(op) {\n    var cm = op.cm, display = cm.display;\n    maybeClipScrollbars(cm);\n    if (op.updateMaxLine) { findMaxLine(cm); }\n\n    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n                         op.scrollToPos.to.line >= display.viewTo) ||\n      display.maxLineChanged && cm.options.lineWrapping;\n    op.update = op.mustUpdate &&\n      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n  }\n\n  function endOperation_W1(op) {\n    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n  }\n\n  function endOperation_R2(op) {\n    var cm = op.cm, display = cm.display;\n    if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n    op.barMeasure = measureForScrollbars(cm);\n\n    // If the max line changed since it was last measured, measure it,\n    // and ensure the document's width matches it.\n    // updateDisplay_W2 will use these properties to do the actual resizing\n    if (display.maxLineChanged && !cm.options.lineWrapping) {\n      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n      cm.display.sizerWidth = op.adjustWidthTo;\n      op.barMeasure.scrollWidth =\n        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n    }\n\n    if (op.updatedDisplay || op.selectionChanged)\n      { op.preparedSelection = display.input.prepareSelection(); }\n  }\n\n  function endOperation_W2(op) {\n    var cm = op.cm;\n\n    if (op.adjustWidthTo != null) {\n      cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n      if (op.maxScrollLeft < cm.doc.scrollLeft)\n        { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n      cm.display.maxLineChanged = false;\n    }\n\n    var takeFocus = op.focus && op.focus == activeElt(doc(cm));\n    if (op.preparedSelection)\n      { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n    if (op.updatedDisplay || op.startHeight != cm.doc.height)\n      { updateScrollbars(cm, op.barMeasure); }\n    if (op.updatedDisplay)\n      { setDocumentHeight(cm, op.barMeasure); }\n\n    if (op.selectionChanged) { restartBlink(cm); }\n\n    if (cm.state.focused && op.updateInput)\n      { cm.display.input.reset(op.typing); }\n    if (takeFocus) { ensureFocus(op.cm); }\n  }\n\n  function endOperation_finish(op) {\n    var cm = op.cm, display = cm.display, doc = cm.doc;\n\n    if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n    // Abort mouse wheel delta measurement, when scrolling explicitly\n    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n      { display.wheelStartX = display.wheelStartY = null; }\n\n    // Propagate the scroll position to the actual DOM scroller\n    if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n    if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n    // If we need to scroll a specific position into view, do so.\n    if (op.scrollToPos) {\n      var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n                                   clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n      maybeScrollWindow(cm, rect);\n    }\n\n    // Fire events for markers that are hidden/unidden by editing or\n    // undoing\n    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n    if (hidden) { for (var i = 0; i < hidden.length; ++i)\n      { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n    if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n      { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n    if (display.wrapper.offsetHeight)\n      { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n    // Fire change events, and delayed event handlers\n    if (op.changeObjs)\n      { signal(cm, \"changes\", cm, op.changeObjs); }\n    if (op.update)\n      { op.update.finish(); }\n  }\n\n  // Run the given function in an operation\n  function runInOp(cm, f) {\n    if (cm.curOp) { return f() }\n    startOperation(cm);\n    try { return f() }\n    finally { endOperation(cm); }\n  }\n  // Wraps a function in an operation. Returns the wrapped function.\n  function operation(cm, f) {\n    return function() {\n      if (cm.curOp) { return f.apply(cm, arguments) }\n      startOperation(cm);\n      try { return f.apply(cm, arguments) }\n      finally { endOperation(cm); }\n    }\n  }\n  // Used to add methods to editor and doc instances, wrapping them in\n  // operations.\n  function methodOp(f) {\n    return function() {\n      if (this.curOp) { return f.apply(this, arguments) }\n      startOperation(this);\n      try { return f.apply(this, arguments) }\n      finally { endOperation(this); }\n    }\n  }\n  function docMethodOp(f) {\n    return function() {\n      var cm = this.cm;\n      if (!cm || cm.curOp) { return f.apply(this, arguments) }\n      startOperation(cm);\n      try { return f.apply(this, arguments) }\n      finally { endOperation(cm); }\n    }\n  }\n\n  // HIGHLIGHT WORKER\n\n  function startWorker(cm, time) {\n    if (cm.doc.highlightFrontier < cm.display.viewTo)\n      { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n  }\n\n  function highlightWorker(cm) {\n    var doc = cm.doc;\n    if (doc.highlightFrontier >= cm.display.viewTo) { return }\n    var end = +new Date + cm.options.workTime;\n    var context = getContextBefore(cm, doc.highlightFrontier);\n    var changedLines = [];\n\n    doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n      if (context.line >= cm.display.viewFrom) { // Visible\n        var oldStyles = line.styles;\n        var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n        var highlighted = highlightLine(cm, line, context, true);\n        if (resetState) { context.state = resetState; }\n        line.styles = highlighted.styles;\n        var oldCls = line.styleClasses, newCls = highlighted.classes;\n        if (newCls) { line.styleClasses = newCls; }\n        else if (oldCls) { line.styleClasses = null; }\n        var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n        for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n        if (ischange) { changedLines.push(context.line); }\n        line.stateAfter = context.save();\n        context.nextLine();\n      } else {\n        if (line.text.length <= cm.options.maxHighlightLength)\n          { processLine(cm, line.text, context); }\n        line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n        context.nextLine();\n      }\n      if (+new Date > end) {\n        startWorker(cm, cm.options.workDelay);\n        return true\n      }\n    });\n    doc.highlightFrontier = context.line;\n    doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n    if (changedLines.length) { runInOp(cm, function () {\n      for (var i = 0; i < changedLines.length; i++)\n        { regLineChange(cm, changedLines[i], \"text\"); }\n    }); }\n  }\n\n  // DISPLAY DRAWING\n\n  var DisplayUpdate = function(cm, viewport, force) {\n    var display = cm.display;\n\n    this.viewport = viewport;\n    // Store some values that we'll need later (but don't want to force a relayout for)\n    this.visible = visibleLines(display, cm.doc, viewport);\n    this.editorIsHidden = !display.wrapper.offsetWidth;\n    this.wrapperHeight = display.wrapper.clientHeight;\n    this.wrapperWidth = display.wrapper.clientWidth;\n    this.oldDisplayWidth = displayWidth(cm);\n    this.force = force;\n    this.dims = getDimensions(cm);\n    this.events = [];\n  };\n\n  DisplayUpdate.prototype.signal = function (emitter, type) {\n    if (hasHandler(emitter, type))\n      { this.events.push(arguments); }\n  };\n  DisplayUpdate.prototype.finish = function () {\n    for (var i = 0; i < this.events.length; i++)\n      { signal.apply(null, this.events[i]); }\n  };\n\n  function maybeClipScrollbars(cm) {\n    var display = cm.display;\n    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n      display.heightForcer.style.height = scrollGap(cm) + \"px\";\n      display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n      display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n      display.scrollbarsClipped = true;\n    }\n  }\n\n  function selectionSnapshot(cm) {\n    if (cm.hasFocus()) { return null }\n    var active = activeElt(doc(cm));\n    if (!active || !contains(cm.display.lineDiv, active)) { return null }\n    var result = {activeElt: active};\n    if (window.getSelection) {\n      var sel = win(cm).getSelection();\n      if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n        result.anchorNode = sel.anchorNode;\n        result.anchorOffset = sel.anchorOffset;\n        result.focusNode = sel.focusNode;\n        result.focusOffset = sel.focusOffset;\n      }\n    }\n    return result\n  }\n\n  function restoreSelection(snapshot) {\n    if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(snapshot.activeElt.ownerDocument)) { return }\n    snapshot.activeElt.focus();\n    if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&\n        snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n      var doc = snapshot.activeElt.ownerDocument;\n      var sel = doc.defaultView.getSelection(), range = doc.createRange();\n      range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n      range.collapse(false);\n      sel.removeAllRanges();\n      sel.addRange(range);\n      sel.extend(snapshot.focusNode, snapshot.focusOffset);\n    }\n  }\n\n  // Does the actual updating of the line display. Bails out\n  // (returning false) when there is nothing to be done and forced is\n  // false.\n  function updateDisplayIfNeeded(cm, update) {\n    var display = cm.display, doc = cm.doc;\n\n    if (update.editorIsHidden) {\n      resetView(cm);\n      return false\n    }\n\n    // Bail out if the visible area is already rendered and nothing changed.\n    if (!update.force &&\n        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n        display.renderedView == display.view && countDirtyView(cm) == 0)\n      { return false }\n\n    if (maybeUpdateLineNumberWidth(cm)) {\n      resetView(cm);\n      update.dims = getDimensions(cm);\n    }\n\n    // Compute a suitable new viewport (from & to)\n    var end = doc.first + doc.size;\n    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n    if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n    if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n    if (sawCollapsedSpans) {\n      from = visualLineNo(cm.doc, from);\n      to = visualLineEndNo(cm.doc, to);\n    }\n\n    var different = from != display.viewFrom || to != display.viewTo ||\n      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n    adjustView(cm, from, to);\n\n    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n    // Position the mover div to align with the current scroll position\n    cm.display.mover.style.top = display.viewOffset + \"px\";\n\n    var toUpdate = countDirtyView(cm);\n    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n      { return false }\n\n    // For big changes, we hide the enclosing element during the\n    // update, since that speeds up the operations on most browsers.\n    var selSnapshot = selectionSnapshot(cm);\n    if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n    patchDisplay(cm, display.updateLineNumbers, update.dims);\n    if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n    display.renderedView = display.view;\n    // There might have been a widget with a focused element that got\n    // hidden or updated, if so re-focus it.\n    restoreSelection(selSnapshot);\n\n    // Prevent selection and cursors from interfering with the scroll\n    // width and height.\n    removeChildren(display.cursorDiv);\n    removeChildren(display.selectionDiv);\n    display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n    if (different) {\n      display.lastWrapHeight = update.wrapperHeight;\n      display.lastWrapWidth = update.wrapperWidth;\n      startWorker(cm, 400);\n    }\n\n    display.updateLineNumbers = null;\n\n    return true\n  }\n\n  function postUpdateDisplay(cm, update) {\n    var viewport = update.viewport;\n\n    for (var first = true;; first = false) {\n      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n        // Clip forced viewport to actual scrollable area.\n        if (viewport && viewport.top != null)\n          { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n        // Updated line heights might result in the drawn area not\n        // actually covering the viewport. Keep looping until it does.\n        update.visible = visibleLines(cm.display, cm.doc, viewport);\n        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n          { break }\n      } else if (first) {\n        update.visible = visibleLines(cm.display, cm.doc, viewport);\n      }\n      if (!updateDisplayIfNeeded(cm, update)) { break }\n      updateHeightsInViewport(cm);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      updateScrollbars(cm, barMeasure);\n      setDocumentHeight(cm, barMeasure);\n      update.force = false;\n    }\n\n    update.signal(cm, \"update\", cm);\n    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n      update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n    }\n  }\n\n  function updateDisplaySimple(cm, viewport) {\n    var update = new DisplayUpdate(cm, viewport);\n    if (updateDisplayIfNeeded(cm, update)) {\n      updateHeightsInViewport(cm);\n      postUpdateDisplay(cm, update);\n      var barMeasure = measureForScrollbars(cm);\n      updateSelection(cm);\n      updateScrollbars(cm, barMeasure);\n      setDocumentHeight(cm, barMeasure);\n      update.finish();\n    }\n  }\n\n  // Sync the actual display DOM structure with display.view, removing\n  // nodes for lines that are no longer in view, and creating the ones\n  // that are not there yet, and updating the ones that are out of\n  // date.\n  function patchDisplay(cm, updateNumbersFrom, dims) {\n    var display = cm.display, lineNumbers = cm.options.lineNumbers;\n    var container = display.lineDiv, cur = container.firstChild;\n\n    function rm(node) {\n      var next = node.nextSibling;\n      // Works around a throw-scroll bug in OS X Webkit\n      if (webkit && mac && cm.display.currentWheelTarget == node)\n        { node.style.display = \"none\"; }\n      else\n        { node.parentNode.removeChild(node); }\n      return next\n    }\n\n    var view = display.view, lineN = display.viewFrom;\n    // Loop over the elements in the view, syncing cur (the DOM nodes\n    // in display.lineDiv) with the view as we go.\n    for (var i = 0; i < view.length; i++) {\n      var lineView = view[i];\n      if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n        var node = buildLineElement(cm, lineView, lineN, dims);\n        container.insertBefore(node, cur);\n      } else { // Already drawn\n        while (cur != lineView.node) { cur = rm(cur); }\n        var updateNumber = lineNumbers && updateNumbersFrom != null &&\n          updateNumbersFrom <= lineN && lineView.lineNumber;\n        if (lineView.changes) {\n          if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n          updateLineForChanges(cm, lineView, lineN, dims);\n        }\n        if (updateNumber) {\n          removeChildren(lineView.lineNumber);\n          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n        }\n        cur = lineView.node.nextSibling;\n      }\n      lineN += lineView.size;\n    }\n    while (cur) { cur = rm(cur); }\n  }\n\n  function updateGutterSpace(display) {\n    var width = display.gutters.offsetWidth;\n    display.sizer.style.marginLeft = width + \"px\";\n    // Send an event to consumers responding to changes in gutter width.\n    signalLater(display, \"gutterChanged\", display);\n  }\n\n  function setDocumentHeight(cm, measure) {\n    cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n    cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n    cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n  }\n\n  // Re-align line numbers and gutter marks to compensate for\n  // horizontal scrolling.\n  function alignHorizontally(cm) {\n    var display = cm.display, view = display.view;\n    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n    var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n    for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n      if (cm.options.fixedGutter) {\n        if (view[i].gutter)\n          { view[i].gutter.style.left = left; }\n        if (view[i].gutterBackground)\n          { view[i].gutterBackground.style.left = left; }\n      }\n      var align = view[i].alignable;\n      if (align) { for (var j = 0; j < align.length; j++)\n        { align[j].style.left = left; } }\n    } }\n    if (cm.options.fixedGutter)\n      { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n  }\n\n  // Used to ensure that the line number gutter is still the right\n  // size for the current document size. Returns true when an update\n  // is needed.\n  function maybeUpdateLineNumberWidth(cm) {\n    if (!cm.options.lineNumbers) { return false }\n    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n    if (last.length != display.lineNumChars) {\n      var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n                                                 \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n      display.lineGutter.style.width = \"\";\n      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n      display.lineNumWidth = display.lineNumInnerWidth + padding;\n      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n      display.lineGutter.style.width = display.lineNumWidth + \"px\";\n      updateGutterSpace(cm.display);\n      return true\n    }\n    return false\n  }\n\n  function getGutters(gutters, lineNumbers) {\n    var result = [], sawLineNumbers = false;\n    for (var i = 0; i < gutters.length; i++) {\n      var name = gutters[i], style = null;\n      if (typeof name != \"string\") { style = name.style; name = name.className; }\n      if (name == \"CodeMirror-linenumbers\") {\n        if (!lineNumbers) { continue }\n        else { sawLineNumbers = true; }\n      }\n      result.push({className: name, style: style});\n    }\n    if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n    return result\n  }\n\n  // Rebuild the gutter elements, ensure the margin to the left of the\n  // code matches their width.\n  function renderGutters(display) {\n    var gutters = display.gutters, specs = display.gutterSpecs;\n    removeChildren(gutters);\n    display.lineGutter = null;\n    for (var i = 0; i < specs.length; ++i) {\n      var ref = specs[i];\n      var className = ref.className;\n      var style = ref.style;\n      var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n      if (style) { gElt.style.cssText = style; }\n      if (className == \"CodeMirror-linenumbers\") {\n        display.lineGutter = gElt;\n        gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n      }\n    }\n    gutters.style.display = specs.length ? \"\" : \"none\";\n    updateGutterSpace(display);\n  }\n\n  function updateGutters(cm) {\n    renderGutters(cm.display);\n    regChange(cm);\n    alignHorizontally(cm);\n  }\n\n  // The display handles the DOM integration, both for input reading\n  // and content drawing. It holds references to DOM nodes and\n  // display-related state.\n\n  function Display(place, doc, input, options) {\n    var d = this;\n    this.input = input;\n\n    // Covers bottom-right square when both scrollbars are present.\n    d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n    d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Covers bottom of gutter when coverGutterNextToScrollbar is on\n    // and h scrollbar is present.\n    d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n    d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n    // Will contain the actual code, positioned to cover the viewport.\n    d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n    // Elements are added to these to represent selection and cursors.\n    d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n    d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n    // A visibility: hidden element used to find the size of things.\n    d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n    // When lines outside of the viewport are measured, they are drawn in this.\n    d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n    // Wraps everything that needs to exist inside the vertically-padded coordinate system\n    d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n                      null, \"position: relative; outline: none\");\n    var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n    // Moved around its parent to cover visible view.\n    d.mover = elt(\"div\", [lines], null, \"position: relative\");\n    // Set to the height of the document, allowing scrolling.\n    d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n    d.sizerWidth = null;\n    // Behavior of elts with overflow: auto and padding is\n    // inconsistent across browsers. This is used to ensure the\n    // scrollable area is big enough.\n    d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n    // Will contain the gutters, if any.\n    d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n    d.lineGutter = null;\n    // Actual scrollable element.\n    d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n    d.scroller.setAttribute(\"tabIndex\", \"-1\");\n    // The element in which the editor lives.\n    d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n    // See #6982. FIXME remove when this has been fixed for a while in Chrome\n    if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = \"inset(0px)\"; }\n\n    // This attribute is respected by automatic translation systems such as Google Translate,\n    // and may also be respected by tools used by human translators.\n    d.wrapper.setAttribute('translate', 'no');\n\n    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n    if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n    if (place) {\n      if (place.appendChild) { place.appendChild(d.wrapper); }\n      else { place(d.wrapper); }\n    }\n\n    // Current rendered range (may be bigger than the view window).\n    d.viewFrom = d.viewTo = doc.first;\n    d.reportedViewFrom = d.reportedViewTo = doc.first;\n    // Information about the rendered lines.\n    d.view = [];\n    d.renderedView = null;\n    // Holds info about a single rendered line when it was rendered\n    // for measurement, while not in view.\n    d.externalMeasured = null;\n    // Empty space (in pixels) above the view\n    d.viewOffset = 0;\n    d.lastWrapHeight = d.lastWrapWidth = 0;\n    d.updateLineNumbers = null;\n\n    d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n    d.scrollbarsClipped = false;\n\n    // Used to only resize the line number gutter when necessary (when\n    // the amount of lines crosses a boundary that makes its width change)\n    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n    // Set to true when a non-horizontal-scrolling line widget is\n    // added. As an optimization, line widget aligning is skipped when\n    // this is false.\n    d.alignWidgets = false;\n\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n    // Tracks the maximum line length so that the horizontal scrollbar\n    // can be kept static when scrolling.\n    d.maxLine = null;\n    d.maxLineLength = 0;\n    d.maxLineChanged = false;\n\n    // Used for measuring wheel scrolling granularity\n    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n    // True when shift is held down.\n    d.shift = false;\n\n    // Used to track whether anything happened since the context menu\n    // was opened.\n    d.selForContextMenu = null;\n\n    d.activeTouch = null;\n\n    d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n    renderGutters(d);\n\n    input.init(d);\n  }\n\n  // Since the delta values reported on mouse wheel events are\n  // unstandardized between browsers and even browser versions, and\n  // generally horribly unpredictable, this code starts by measuring\n  // the scroll effect that the first few mouse wheel events have,\n  // and, from that, detects the way it can convert deltas to pixel\n  // offsets afterwards.\n  //\n  // The reason we want to know the amount a wheel event will scroll\n  // is that it gives us a chance to update the display before the\n  // actual scrolling happens, reducing flickering.\n\n  var wheelSamples = 0, wheelPixelsPerUnit = null;\n  // Fill in a browser-detected starting value on browsers where we\n  // know one. These don't have to be accurate -- the result of them\n  // being wrong would just be a slight flicker on the first wheel\n  // scroll (if it is large enough).\n  if (ie) { wheelPixelsPerUnit = -.53; }\n  else if (gecko) { wheelPixelsPerUnit = 15; }\n  else if (chrome) { wheelPixelsPerUnit = -.7; }\n  else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n  function wheelEventDelta(e) {\n    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n    else if (dy == null) { dy = e.wheelDelta; }\n    return {x: dx, y: dy}\n  }\n  function wheelEventPixels(e) {\n    var delta = wheelEventDelta(e);\n    delta.x *= wheelPixelsPerUnit;\n    delta.y *= wheelPixelsPerUnit;\n    return delta\n  }\n\n  function onScrollWheel(cm, e) {\n    // On Chrome 102, viewport updates somehow stop wheel-based\n    // scrolling. Turning off pointer events during the scroll seems\n    // to avoid the issue.\n    if (chrome && chrome_version == 102) {\n      if (cm.display.chromeScrollHack == null) { cm.display.sizer.style.pointerEvents = \"none\"; }\n      else { clearTimeout(cm.display.chromeScrollHack); }\n      cm.display.chromeScrollHack = setTimeout(function () {\n        cm.display.chromeScrollHack = null;\n        cm.display.sizer.style.pointerEvents = \"\";\n      }, 100);\n    }\n    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n    var pixelsPerUnit = wheelPixelsPerUnit;\n    if (e.deltaMode === 0) {\n      dx = e.deltaX;\n      dy = e.deltaY;\n      pixelsPerUnit = 1;\n    }\n\n    var display = cm.display, scroll = display.scroller;\n    // Quit if there's nothing to scroll here\n    var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n    var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n    if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n    // Webkit browsers on OS X abort momentum scrolls when the target\n    // of the scroll event is removed from the scrollable element.\n    // This hack (see related code in patchDisplay) makes sure the\n    // element is kept around.\n    if (dy && mac && webkit) {\n      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n        for (var i = 0; i < view.length; i++) {\n          if (view[i].node == cur) {\n            cm.display.currentWheelTarget = cur;\n            break outer\n          }\n        }\n      }\n    }\n\n    // On some browsers, horizontal scrolling will cause redraws to\n    // happen before the gutter has been realigned, causing it to\n    // wriggle around in a most unseemly way. When we have an\n    // estimated pixels/delta value, we just handle horizontal\n    // scrolling entirely here. It'll be slightly off from native, but\n    // better than glitching out.\n    if (dx && !gecko && !presto && pixelsPerUnit != null) {\n      if (dy && canScrollY)\n        { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }\n      setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));\n      // Only prevent default scrolling if vertical scrolling is\n      // actually possible. Otherwise, it causes vertical scroll\n      // jitter on OSX trackpads when deltaX is small and deltaY\n      // is large (issue #3579)\n      if (!dy || (dy && canScrollY))\n        { e_preventDefault(e); }\n      display.wheelStartX = null; // Abort measurement, if in progress\n      return\n    }\n\n    // 'Project' the visible viewport to cover the area that is being\n    // scrolled into view (if we know enough to estimate it).\n    if (dy && pixelsPerUnit != null) {\n      var pixels = dy * pixelsPerUnit;\n      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n      if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n      else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n      updateDisplaySimple(cm, {top: top, bottom: bot});\n    }\n\n    if (wheelSamples < 20 && e.deltaMode !== 0) {\n      if (display.wheelStartX == null) {\n        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n        display.wheelDX = dx; display.wheelDY = dy;\n        setTimeout(function () {\n          if (display.wheelStartX == null) { return }\n          var movedX = scroll.scrollLeft - display.wheelStartX;\n          var movedY = scroll.scrollTop - display.wheelStartY;\n          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n            (movedX && display.wheelDX && movedX / display.wheelDX);\n          display.wheelStartX = display.wheelStartY = null;\n          if (!sample) { return }\n          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n          ++wheelSamples;\n        }, 200);\n      } else {\n        display.wheelDX += dx; display.wheelDY += dy;\n      }\n    }\n  }\n\n  // Selection objects are immutable. A new one is created every time\n  // the selection changes. A selection is one or more non-overlapping\n  // (and non-touching) ranges, sorted, and an integer that indicates\n  // which one is the primary selection (the one that's scrolled into\n  // view, that getCursor returns, etc).\n  var Selection = function(ranges, primIndex) {\n    this.ranges = ranges;\n    this.primIndex = primIndex;\n  };\n\n  Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n  Selection.prototype.equals = function (other) {\n    if (other == this) { return true }\n    if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n    for (var i = 0; i < this.ranges.length; i++) {\n      var here = this.ranges[i], there = other.ranges[i];\n      if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n    }\n    return true\n  };\n\n  Selection.prototype.deepCopy = function () {\n    var out = [];\n    for (var i = 0; i < this.ranges.length; i++)\n      { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }\n    return new Selection(out, this.primIndex)\n  };\n\n  Selection.prototype.somethingSelected = function () {\n    for (var i = 0; i < this.ranges.length; i++)\n      { if (!this.ranges[i].empty()) { return true } }\n    return false\n  };\n\n  Selection.prototype.contains = function (pos, end) {\n    if (!end) { end = pos; }\n    for (var i = 0; i < this.ranges.length; i++) {\n      var range = this.ranges[i];\n      if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n        { return i }\n    }\n    return -1\n  };\n\n  var Range = function(anchor, head) {\n    this.anchor = anchor; this.head = head;\n  };\n\n  Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n  Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n  Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n  // Take an unsorted, potentially overlapping set of ranges, and\n  // build a selection out of it. 'Consumes' ranges array (modifying\n  // it).\n  function normalizeSelection(cm, ranges, primIndex) {\n    var mayTouch = cm && cm.options.selectionsMayTouch;\n    var prim = ranges[primIndex];\n    ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n    primIndex = indexOf(ranges, prim);\n    for (var i = 1; i < ranges.length; i++) {\n      var cur = ranges[i], prev = ranges[i - 1];\n      var diff = cmp(prev.to(), cur.from());\n      if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n        if (i <= primIndex) { --primIndex; }\n        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n      }\n    }\n    return new Selection(ranges, primIndex)\n  }\n\n  function simpleSelection(anchor, head) {\n    return new Selection([new Range(anchor, head || anchor)], 0)\n  }\n\n  // Compute the position of the end of a change (its 'to' property\n  // refers to the pre-change end).\n  function changeEnd(change) {\n    if (!change.text) { return change.to }\n    return Pos(change.from.line + change.text.length - 1,\n               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n  }\n\n  // Adjust a position to refer to the post-change position of the\n  // same text, or the end of the change if the change covers it.\n  function adjustForChange(pos, change) {\n    if (cmp(pos, change.from) < 0) { return pos }\n    if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n    if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n    return Pos(line, ch)\n  }\n\n  function computeSelAfterChange(doc, change) {\n    var out = [];\n    for (var i = 0; i < doc.sel.ranges.length; i++) {\n      var range = doc.sel.ranges[i];\n      out.push(new Range(adjustForChange(range.anchor, change),\n                         adjustForChange(range.head, change)));\n    }\n    return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n  }\n\n  function offsetPos(pos, old, nw) {\n    if (pos.line == old.line)\n      { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n    else\n      { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n  }\n\n  // Used by replaceSelections to allow moving the selection to the\n  // start or around the replaced test. Hint may be \"start\" or \"around\".\n  function computeReplacedSel(doc, changes, hint) {\n    var out = [];\n    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n    for (var i = 0; i < changes.length; i++) {\n      var change = changes[i];\n      var from = offsetPos(change.from, oldPrev, newPrev);\n      var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n      oldPrev = change.to;\n      newPrev = to;\n      if (hint == \"around\") {\n        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n        out[i] = new Range(inv ? to : from, inv ? from : to);\n      } else {\n        out[i] = new Range(from, from);\n      }\n    }\n    return new Selection(out, doc.sel.primIndex)\n  }\n\n  // Used to get the editor into a consistent state again when options change.\n\n  function loadMode(cm) {\n    cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n    resetModeState(cm);\n  }\n\n  function resetModeState(cm) {\n    cm.doc.iter(function (line) {\n      if (line.stateAfter) { line.stateAfter = null; }\n      if (line.styles) { line.styles = null; }\n    });\n    cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n    startWorker(cm, 100);\n    cm.state.modeGen++;\n    if (cm.curOp) { regChange(cm); }\n  }\n\n  // DOCUMENT DATA STRUCTURE\n\n  // By default, updates that start and end at the beginning of a line\n  // are treated specially, in order to make the association of line\n  // widgets and marker elements with the text behave more intuitive.\n  function isWholeLineUpdate(doc, change) {\n    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n      (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n  }\n\n  // Perform a change on the document data structure.\n  function updateDoc(doc, change, markedSpans, estimateHeight) {\n    function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n    function update(line, text, spans) {\n      updateLine(line, text, spans, estimateHeight);\n      signalLater(line, \"change\", line, change);\n    }\n    function linesFor(start, end) {\n      var result = [];\n      for (var i = start; i < end; ++i)\n        { result.push(new Line(text[i], spansFor(i), estimateHeight)); }\n      return result\n    }\n\n    var from = change.from, to = change.to, text = change.text;\n    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n    // Adjust the line structure\n    if (change.full) {\n      doc.insert(0, linesFor(0, text.length));\n      doc.remove(text.length, doc.size - text.length);\n    } else if (isWholeLineUpdate(doc, change)) {\n      // This is a whole-line replace. Treated specially to make\n      // sure line objects move the way they are supposed to.\n      var added = linesFor(0, text.length - 1);\n      update(lastLine, lastLine.text, lastSpans);\n      if (nlines) { doc.remove(from.line, nlines); }\n      if (added.length) { doc.insert(from.line, added); }\n    } else if (firstLine == lastLine) {\n      if (text.length == 1) {\n        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n      } else {\n        var added$1 = linesFor(1, text.length - 1);\n        added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n        doc.insert(from.line + 1, added$1);\n      }\n    } else if (text.length == 1) {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n      doc.remove(from.line + 1, nlines);\n    } else {\n      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n      var added$2 = linesFor(1, text.length - 1);\n      if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n      doc.insert(from.line + 1, added$2);\n    }\n\n    signalLater(doc, \"change\", doc, change);\n  }\n\n  // Call f for all linked documents.\n  function linkedDocs(doc, f, sharedHistOnly) {\n    function propagate(doc, skip, sharedHist) {\n      if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n        var rel = doc.linked[i];\n        if (rel.doc == skip) { continue }\n        var shared = sharedHist && rel.sharedHist;\n        if (sharedHistOnly && !shared) { continue }\n        f(rel.doc, shared);\n        propagate(rel.doc, doc, shared);\n      } }\n    }\n    propagate(doc, null, true);\n  }\n\n  // Attach a document to an editor.\n  function attachDoc(cm, doc) {\n    if (doc.cm) { throw new Error(\"This document is already in use.\") }\n    cm.doc = doc;\n    doc.cm = cm;\n    estimateLineHeights(cm);\n    loadMode(cm);\n    setDirectionClass(cm);\n    cm.options.direction = doc.direction;\n    if (!cm.options.lineWrapping) { findMaxLine(cm); }\n    cm.options.mode = doc.modeOption;\n    regChange(cm);\n  }\n\n  function setDirectionClass(cm) {\n  (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n  }\n\n  function directionChanged(cm) {\n    runInOp(cm, function () {\n      setDirectionClass(cm);\n      regChange(cm);\n    });\n  }\n\n  function History(prev) {\n    // Arrays of change events and selections. Doing something adds an\n    // event to done and clears undo. Undoing moves events from done\n    // to undone, redoing moves them in the other direction.\n    this.done = []; this.undone = [];\n    this.undoDepth = prev ? prev.undoDepth : Infinity;\n    // Used to track when changes can be merged into a single undo\n    // event\n    this.lastModTime = this.lastSelTime = 0;\n    this.lastOp = this.lastSelOp = null;\n    this.lastOrigin = this.lastSelOrigin = null;\n    // Used by the isClean() method\n    this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;\n  }\n\n  // Create a history change event from an updateDoc-style change\n  // object.\n  function historyChangeFromChange(doc, change) {\n    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n    linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n    return histChange\n  }\n\n  // Pop all selection events off the end of a history array. Stop at\n  // a change event.\n  function clearSelectionEvents(array) {\n    while (array.length) {\n      var last = lst(array);\n      if (last.ranges) { array.pop(); }\n      else { break }\n    }\n  }\n\n  // Find the top change event in the history. Pop off selection\n  // events that are in the way.\n  function lastChangeEvent(hist, force) {\n    if (force) {\n      clearSelectionEvents(hist.done);\n      return lst(hist.done)\n    } else if (hist.done.length && !lst(hist.done).ranges) {\n      return lst(hist.done)\n    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n      hist.done.pop();\n      return lst(hist.done)\n    }\n  }\n\n  // Register a change in the history. Merges changes that are within\n  // a single operation, or are close together with an origin that\n  // allows merging (starting with \"+\") into a single event.\n  function addChangeToHistory(doc, change, selAfter, opId) {\n    var hist = doc.history;\n    hist.undone.length = 0;\n    var time = +new Date, cur;\n    var last;\n\n    if ((hist.lastOp == opId ||\n         hist.lastOrigin == change.origin && change.origin &&\n         ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n          change.origin.charAt(0) == \"*\")) &&\n        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n      // Merge this change into the last event\n      last = lst(cur.changes);\n      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n        // Optimized case for simple insertion -- don't want to add\n        // new changesets for every character typed\n        last.to = changeEnd(change);\n      } else {\n        // Add new sub-event\n        cur.changes.push(historyChangeFromChange(doc, change));\n      }\n    } else {\n      // Can not be merged, start a new event.\n      var before = lst(hist.done);\n      if (!before || !before.ranges)\n        { pushSelectionToHistory(doc.sel, hist.done); }\n      cur = {changes: [historyChangeFromChange(doc, change)],\n             generation: hist.generation};\n      hist.done.push(cur);\n      while (hist.done.length > hist.undoDepth) {\n        hist.done.shift();\n        if (!hist.done[0].ranges) { hist.done.shift(); }\n      }\n    }\n    hist.done.push(selAfter);\n    hist.generation = ++hist.maxGeneration;\n    hist.lastModTime = hist.lastSelTime = time;\n    hist.lastOp = hist.lastSelOp = opId;\n    hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n    if (!last) { signal(doc, \"historyAdded\"); }\n  }\n\n  function selectionEventCanBeMerged(doc, origin, prev, sel) {\n    var ch = origin.charAt(0);\n    return ch == \"*\" ||\n      ch == \"+\" &&\n      prev.ranges.length == sel.ranges.length &&\n      prev.somethingSelected() == sel.somethingSelected() &&\n      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n  }\n\n  // Called whenever the selection changes, sets the new selection as\n  // the pending selection in the history, and pushes the old pending\n  // selection into the 'done' array when it was significantly\n  // different (in number of selected ranges, emptiness, or time).\n  function addSelectionToHistory(doc, sel, opId, options) {\n    var hist = doc.history, origin = options && options.origin;\n\n    // A new event is started when the previous origin does not match\n    // the current, or the origins don't allow matching. Origins\n    // starting with * are always merged, those starting with + are\n    // merged when similar and close together in time.\n    if (opId == hist.lastSelOp ||\n        (origin && hist.lastSelOrigin == origin &&\n         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n      { hist.done[hist.done.length - 1] = sel; }\n    else\n      { pushSelectionToHistory(sel, hist.done); }\n\n    hist.lastSelTime = +new Date;\n    hist.lastSelOrigin = origin;\n    hist.lastSelOp = opId;\n    if (options && options.clearRedo !== false)\n      { clearSelectionEvents(hist.undone); }\n  }\n\n  function pushSelectionToHistory(sel, dest) {\n    var top = lst(dest);\n    if (!(top && top.ranges && top.equals(sel)))\n      { dest.push(sel); }\n  }\n\n  // Used to store marked span information in the history.\n  function attachLocalSpans(doc, change, from, to) {\n    var existing = change[\"spans_\" + doc.id], n = 0;\n    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n      if (line.markedSpans)\n        { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n      ++n;\n    });\n  }\n\n  // When un/re-doing restores text containing marked spans, those\n  // that have been explicitly cleared should not be restored.\n  function removeClearedSpans(spans) {\n    if (!spans) { return null }\n    var out;\n    for (var i = 0; i < spans.length; ++i) {\n      if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n      else if (out) { out.push(spans[i]); }\n    }\n    return !out ? spans : out.length ? out : null\n  }\n\n  // Retrieve and filter the old marked spans stored in a change event.\n  function getOldSpans(doc, change) {\n    var found = change[\"spans_\" + doc.id];\n    if (!found) { return null }\n    var nw = [];\n    for (var i = 0; i < change.text.length; ++i)\n      { nw.push(removeClearedSpans(found[i])); }\n    return nw\n  }\n\n  // Used for un/re-doing changes from the history. Combines the\n  // result of computing the existing spans with the set of spans that\n  // existed in the history (so that deleting around a span and then\n  // undoing brings back the span).\n  function mergeOldSpans(doc, change) {\n    var old = getOldSpans(doc, change);\n    var stretched = stretchSpansOverChange(doc, change);\n    if (!old) { return stretched }\n    if (!stretched) { return old }\n\n    for (var i = 0; i < old.length; ++i) {\n      var oldCur = old[i], stretchCur = stretched[i];\n      if (oldCur && stretchCur) {\n        spans: for (var j = 0; j < stretchCur.length; ++j) {\n          var span = stretchCur[j];\n          for (var k = 0; k < oldCur.length; ++k)\n            { if (oldCur[k].marker == span.marker) { continue spans } }\n          oldCur.push(span);\n        }\n      } else if (stretchCur) {\n        old[i] = stretchCur;\n      }\n    }\n    return old\n  }\n\n  // Used both to provide a JSON-safe object in .getHistory, and, when\n  // detaching a document, to split the history in two\n  function copyHistoryArray(events, newGroup, instantiateSel) {\n    var copy = [];\n    for (var i = 0; i < events.length; ++i) {\n      var event = events[i];\n      if (event.ranges) {\n        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n        continue\n      }\n      var changes = event.changes, newChanges = [];\n      copy.push({changes: newChanges});\n      for (var j = 0; j < changes.length; ++j) {\n        var change = changes[j], m = (void 0);\n        newChanges.push({from: change.from, to: change.to, text: change.text});\n        if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n          if (indexOf(newGroup, Number(m[1])) > -1) {\n            lst(newChanges)[prop] = change[prop];\n            delete change[prop];\n          }\n        } } }\n      }\n    }\n    return copy\n  }\n\n  // The 'scroll' parameter given to many of these indicated whether\n  // the new cursor position should be scrolled into view after\n  // modifying the selection.\n\n  // If shift is held or the extend flag is set, extends a range to\n  // include a given position (and optionally a second position).\n  // Otherwise, simply returns the range between the given positions.\n  // Used for cursor motion and such.\n  function extendRange(range, head, other, extend) {\n    if (extend) {\n      var anchor = range.anchor;\n      if (other) {\n        var posBefore = cmp(head, anchor) < 0;\n        if (posBefore != (cmp(other, anchor) < 0)) {\n          anchor = head;\n          head = other;\n        } else if (posBefore != (cmp(head, other) < 0)) {\n          head = other;\n        }\n      }\n      return new Range(anchor, head)\n    } else {\n      return new Range(other || head, head)\n    }\n  }\n\n  // Extend the primary selection range, discard the rest.\n  function extendSelection(doc, head, other, options, extend) {\n    if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n    setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n  }\n\n  // Extend all selections (pos is an array of selections with length\n  // equal the number of selections)\n  function extendSelections(doc, heads, options) {\n    var out = [];\n    var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n    for (var i = 0; i < doc.sel.ranges.length; i++)\n      { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n    var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n    setSelection(doc, newSel, options);\n  }\n\n  // Updates a single range in the selection.\n  function replaceOneSelection(doc, i, range, options) {\n    var ranges = doc.sel.ranges.slice(0);\n    ranges[i] = range;\n    setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n  }\n\n  // Reset the selection to a single range.\n  function setSimpleSelection(doc, anchor, head, options) {\n    setSelection(doc, simpleSelection(anchor, head), options);\n  }\n\n  // Give beforeSelectionChange handlers a change to influence a\n  // selection update.\n  function filterSelectionChange(doc, sel, options) {\n    var obj = {\n      ranges: sel.ranges,\n      update: function(ranges) {\n        this.ranges = [];\n        for (var i = 0; i < ranges.length; i++)\n          { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n                                     clipPos(doc, ranges[i].head)); }\n      },\n      origin: options && options.origin\n    };\n    signal(doc, \"beforeSelectionChange\", doc, obj);\n    if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n    if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n    else { return sel }\n  }\n\n  function setSelectionReplaceHistory(doc, sel, options) {\n    var done = doc.history.done, last = lst(done);\n    if (last && last.ranges) {\n      done[done.length - 1] = sel;\n      setSelectionNoUndo(doc, sel, options);\n    } else {\n      setSelection(doc, sel, options);\n    }\n  }\n\n  // Set a new selection.\n  function setSelection(doc, sel, options) {\n    setSelectionNoUndo(doc, sel, options);\n    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n  }\n\n  function setSelectionNoUndo(doc, sel, options) {\n    if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n      { sel = filterSelectionChange(doc, sel, options); }\n\n    var bias = options && options.bias ||\n      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n    if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption(\"readOnly\") != \"nocursor\")\n      { ensureCursorVisible(doc.cm); }\n  }\n\n  function setSelectionInner(doc, sel) {\n    if (sel.equals(doc.sel)) { return }\n\n    doc.sel = sel;\n\n    if (doc.cm) {\n      doc.cm.curOp.updateInput = 1;\n      doc.cm.curOp.selectionChanged = true;\n      signalCursorActivity(doc.cm);\n    }\n    signalLater(doc, \"cursorActivity\", doc);\n  }\n\n  // Verify that the selection does not partially select any atomic\n  // marked ranges.\n  function reCheckSelection(doc) {\n    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n  }\n\n  // Return a selection that does not partially select any atomic\n  // ranges.\n  function skipAtomicInSelection(doc, sel, bias, mayClear) {\n    var out;\n    for (var i = 0; i < sel.ranges.length; i++) {\n      var range = sel.ranges[i];\n      var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n      var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n      var newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n      if (out || newAnchor != range.anchor || newHead != range.head) {\n        if (!out) { out = sel.ranges.slice(0, i); }\n        out[i] = new Range(newAnchor, newHead);\n      }\n    }\n    return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n  }\n\n  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n    var line = getLine(doc, pos.line);\n    if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n      var sp = line.markedSpans[i], m = sp.marker;\n\n      // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n      // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n      // is with selectLeft/Right\n      var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n      var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n      if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n          (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n        if (mayClear) {\n          signal(m, \"beforeCursorEnter\");\n          if (m.explicitlyCleared) {\n            if (!line.markedSpans) { break }\n            else {--i; continue}\n          }\n        }\n        if (!m.atomic) { continue }\n\n        if (oldPos) {\n          var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n          if (dir < 0 ? preventCursorRight : preventCursorLeft)\n            { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n          if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n            { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n        }\n\n        var far = m.find(dir < 0 ? -1 : 1);\n        if (dir < 0 ? preventCursorLeft : preventCursorRight)\n          { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n        return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n      }\n    } }\n    return pos\n  }\n\n  // Ensure a given position is not inside an atomic range.\n  function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n    var dir = bias || 1;\n    var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n        (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n        skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n        (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n    if (!found) {\n      doc.cantEdit = true;\n      return Pos(doc.first, 0)\n    }\n    return found\n  }\n\n  function movePos(doc, pos, dir, line) {\n    if (dir < 0 && pos.ch == 0) {\n      if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n      else { return null }\n    } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n      if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n      else { return null }\n    } else {\n      return new Pos(pos.line, pos.ch + dir)\n    }\n  }\n\n  function selectAll(cm) {\n    cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n  }\n\n  // UPDATING\n\n  // Allow \"beforeChange\" event handlers to influence a change\n  function filterChange(doc, change, update) {\n    var obj = {\n      canceled: false,\n      from: change.from,\n      to: change.to,\n      text: change.text,\n      origin: change.origin,\n      cancel: function () { return obj.canceled = true; }\n    };\n    if (update) { obj.update = function (from, to, text, origin) {\n      if (from) { obj.from = clipPos(doc, from); }\n      if (to) { obj.to = clipPos(doc, to); }\n      if (text) { obj.text = text; }\n      if (origin !== undefined) { obj.origin = origin; }\n    }; }\n    signal(doc, \"beforeChange\", doc, obj);\n    if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n    if (obj.canceled) {\n      if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n      return null\n    }\n    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n  }\n\n  // Apply a change to a document, and add it to the document's\n  // history, and propagating it to all linked documents.\n  function makeChange(doc, change, ignoreReadOnly) {\n    if (doc.cm) {\n      if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n      if (doc.cm.state.suppressEdits) { return }\n    }\n\n    if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n      change = filterChange(doc, change, true);\n      if (!change) { return }\n    }\n\n    // Possibly split or suppress the update based on the presence\n    // of read-only spans in its range.\n    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n    if (split) {\n      for (var i = split.length - 1; i >= 0; --i)\n        { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n    } else {\n      makeChangeInner(doc, change);\n    }\n  }\n\n  function makeChangeInner(doc, change) {\n    if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n    var selAfter = computeSelAfterChange(doc, change);\n    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n    var rebased = [];\n\n    linkedDocs(doc, function (doc, sharedHist) {\n      if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n        rebaseHist(doc.history, change);\n        rebased.push(doc.history);\n      }\n      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n    });\n  }\n\n  // Revert a change stored in a document's history.\n  function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n    var suppress = doc.cm && doc.cm.state.suppressEdits;\n    if (suppress && !allowSelectionOnly) { return }\n\n    var hist = doc.history, event, selAfter = doc.sel;\n    var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n    // Verify that there is a useable event (so that ctrl-z won't\n    // needlessly clear selection events)\n    var i = 0;\n    for (; i < source.length; i++) {\n      event = source[i];\n      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n        { break }\n    }\n    if (i == source.length) { return }\n    hist.lastOrigin = hist.lastSelOrigin = null;\n\n    for (;;) {\n      event = source.pop();\n      if (event.ranges) {\n        pushSelectionToHistory(event, dest);\n        if (allowSelectionOnly && !event.equals(doc.sel)) {\n          setSelection(doc, event, {clearRedo: false});\n          return\n        }\n        selAfter = event;\n      } else if (suppress) {\n        source.push(event);\n        return\n      } else { break }\n    }\n\n    // Build up a reverse change object to add to the opposite history\n    // stack (redo when undoing, and vice versa).\n    var antiChanges = [];\n    pushSelectionToHistory(selAfter, dest);\n    dest.push({changes: antiChanges, generation: hist.generation});\n    hist.generation = event.generation || ++hist.maxGeneration;\n\n    var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n    var loop = function ( i ) {\n      var change = event.changes[i];\n      change.origin = type;\n      if (filter && !filterChange(doc, change, false)) {\n        source.length = 0;\n        return {}\n      }\n\n      antiChanges.push(historyChangeFromChange(doc, change));\n\n      var after = i ? computeSelAfterChange(doc, change) : lst(source);\n      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n      if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n      var rebased = [];\n\n      // Propagate to the linked documents\n      linkedDocs(doc, function (doc, sharedHist) {\n        if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n          rebaseHist(doc.history, change);\n          rebased.push(doc.history);\n        }\n        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n      });\n    };\n\n    for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n      var returned = loop( i$1 );\n\n      if ( returned ) return returned.v;\n    }\n  }\n\n  // Sub-views need their line numbers shifted when text is added\n  // above or below them in the parent document.\n  function shiftDoc(doc, distance) {\n    if (distance == 0) { return }\n    doc.first += distance;\n    doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n      Pos(range.anchor.line + distance, range.anchor.ch),\n      Pos(range.head.line + distance, range.head.ch)\n    ); }), doc.sel.primIndex);\n    if (doc.cm) {\n      regChange(doc.cm, doc.first, doc.first - distance, distance);\n      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n        { regLineChange(doc.cm, l, \"gutter\"); }\n    }\n  }\n\n  // More lower-level change function, handling only a single document\n  // (not linked ones).\n  function makeChangeSingleDoc(doc, change, selAfter, spans) {\n    if (doc.cm && !doc.cm.curOp)\n      { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n    if (change.to.line < doc.first) {\n      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n      return\n    }\n    if (change.from.line > doc.lastLine()) { return }\n\n    // Clip the change to the size of this doc\n    if (change.from.line < doc.first) {\n      var shift = change.text.length - 1 - (doc.first - change.from.line);\n      shiftDoc(doc, shift);\n      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n                text: [lst(change.text)], origin: change.origin};\n    }\n    var last = doc.lastLine();\n    if (change.to.line > last) {\n      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n                text: [change.text[0]], origin: change.origin};\n    }\n\n    change.removed = getBetween(doc, change.from, change.to);\n\n    if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n    if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n    else { updateDoc(doc, change, spans); }\n    setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n    if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n      { doc.cantEdit = false; }\n  }\n\n  // Handle the interaction of a change to a document with the editor\n  // that this document is part of.\n  function makeChangeSingleDocInEditor(cm, change, spans) {\n    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n    var recomputeMaxLength = false, checkWidthStart = from.line;\n    if (!cm.options.lineWrapping) {\n      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n      doc.iter(checkWidthStart, to.line + 1, function (line) {\n        if (line == display.maxLine) {\n          recomputeMaxLength = true;\n          return true\n        }\n      });\n    }\n\n    if (doc.sel.contains(change.from, change.to) > -1)\n      { signalCursorActivity(cm); }\n\n    updateDoc(doc, change, spans, estimateHeight(cm));\n\n    if (!cm.options.lineWrapping) {\n      doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n        var len = lineLength(line);\n        if (len > display.maxLineLength) {\n          display.maxLine = line;\n          display.maxLineLength = len;\n          display.maxLineChanged = true;\n          recomputeMaxLength = false;\n        }\n      });\n      if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n    }\n\n    retreatFrontier(doc, from.line);\n    startWorker(cm, 400);\n\n    var lendiff = change.text.length - (to.line - from.line) - 1;\n    // Remember that these lines changed, for updating the display\n    if (change.full)\n      { regChange(cm); }\n    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n      { regLineChange(cm, from.line, \"text\"); }\n    else\n      { regChange(cm, from.line, to.line + 1, lendiff); }\n\n    var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n    if (changeHandler || changesHandler) {\n      var obj = {\n        from: from, to: to,\n        text: change.text,\n        removed: change.removed,\n        origin: change.origin\n      };\n      if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n      if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n    }\n    cm.display.selForContextMenu = null;\n  }\n\n  function replaceRange(doc, code, from, to, origin) {\n    var assign;\n\n    if (!to) { to = from; }\n    if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n    if (typeof code == \"string\") { code = doc.splitLines(code); }\n    makeChange(doc, {from: from, to: to, text: code, origin: origin});\n  }\n\n  // Rebasing/resetting history to deal with externally-sourced changes\n\n  function rebaseHistSelSingle(pos, from, to, diff) {\n    if (to < pos.line) {\n      pos.line += diff;\n    } else if (from < pos.line) {\n      pos.line = from;\n      pos.ch = 0;\n    }\n  }\n\n  // Tries to rebase an array of history events given a change in the\n  // document. If the change touches the same lines as the event, the\n  // event, and everything 'behind' it, is discarded. If the change is\n  // before the event, the event's positions are updated. Uses a\n  // copy-on-write scheme for the positions, to avoid having to\n  // reallocate them all on every rebase, but also avoid problems with\n  // shared position objects being unsafely updated.\n  function rebaseHistArray(array, from, to, diff) {\n    for (var i = 0; i < array.length; ++i) {\n      var sub = array[i], ok = true;\n      if (sub.ranges) {\n        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n        for (var j = 0; j < sub.ranges.length; j++) {\n          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n        }\n        continue\n      }\n      for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n        var cur = sub.changes[j$1];\n        if (to < cur.from.line) {\n          cur.from = Pos(cur.from.line + diff, cur.from.ch);\n          cur.to = Pos(cur.to.line + diff, cur.to.ch);\n        } else if (from <= cur.to.line) {\n          ok = false;\n          break\n        }\n      }\n      if (!ok) {\n        array.splice(0, i + 1);\n        i = 0;\n      }\n    }\n  }\n\n  function rebaseHist(hist, change) {\n    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n    rebaseHistArray(hist.done, from, to, diff);\n    rebaseHistArray(hist.undone, from, to, diff);\n  }\n\n  // Utility for applying a change to a line by handle or number,\n  // returning the number and optionally registering the line as\n  // changed.\n  function changeLine(doc, handle, changeType, op) {\n    var no = handle, line = handle;\n    if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n    else { no = lineNo(handle); }\n    if (no == null) { return null }\n    if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n    return line\n  }\n\n  // The document is represented as a BTree consisting of leaves, with\n  // chunk of lines in them, and branches, with up to ten leaves or\n  // other branch nodes below them. The top node is always a branch\n  // node, and is the document object itself (meaning it has\n  // additional methods and properties).\n  //\n  // All nodes have parent links. The tree is used both to go from\n  // line numbers to line objects, and to go from objects to numbers.\n  // It also indexes by height, and is used to convert between height\n  // and line object, and to find the total height of the document.\n  //\n  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n  function LeafChunk(lines) {\n    this.lines = lines;\n    this.parent = null;\n    var height = 0;\n    for (var i = 0; i < lines.length; ++i) {\n      lines[i].parent = this;\n      height += lines[i].height;\n    }\n    this.height = height;\n  }\n\n  LeafChunk.prototype = {\n    chunkSize: function() { return this.lines.length },\n\n    // Remove the n lines at offset 'at'.\n    removeInner: function(at, n) {\n      for (var i = at, e = at + n; i < e; ++i) {\n        var line = this.lines[i];\n        this.height -= line.height;\n        cleanUpLine(line);\n        signalLater(line, \"delete\");\n      }\n      this.lines.splice(at, n);\n    },\n\n    // Helper used to collapse a small branch into a single leaf.\n    collapse: function(lines) {\n      lines.push.apply(lines, this.lines);\n    },\n\n    // Insert the given array of lines at offset 'at', count them as\n    // having the given height.\n    insertInner: function(at, lines, height) {\n      this.height += height;\n      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n      for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }\n    },\n\n    // Used to iterate over a part of the tree.\n    iterN: function(at, n, op) {\n      for (var e = at + n; at < e; ++at)\n        { if (op(this.lines[at])) { return true } }\n    }\n  };\n\n  function BranchChunk(children) {\n    this.children = children;\n    var size = 0, height = 0;\n    for (var i = 0; i < children.length; ++i) {\n      var ch = children[i];\n      size += ch.chunkSize(); height += ch.height;\n      ch.parent = this;\n    }\n    this.size = size;\n    this.height = height;\n    this.parent = null;\n  }\n\n  BranchChunk.prototype = {\n    chunkSize: function() { return this.size },\n\n    removeInner: function(at, n) {\n      this.size -= n;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var rm = Math.min(n, sz - at), oldHeight = child.height;\n          child.removeInner(at, rm);\n          this.height -= oldHeight - child.height;\n          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n          if ((n -= rm) == 0) { break }\n          at = 0;\n        } else { at -= sz; }\n      }\n      // If the result is smaller than 25 lines, ensure that it is a\n      // single leaf node.\n      if (this.size - n < 25 &&\n          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n        var lines = [];\n        this.collapse(lines);\n        this.children = [new LeafChunk(lines)];\n        this.children[0].parent = this;\n      }\n    },\n\n    collapse: function(lines) {\n      for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }\n    },\n\n    insertInner: function(at, lines, height) {\n      this.size += lines.length;\n      this.height += height;\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at <= sz) {\n          child.insertInner(at, lines, height);\n          if (child.lines && child.lines.length > 50) {\n            // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n            // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n            var remaining = child.lines.length % 25 + 25;\n            for (var pos = remaining; pos < child.lines.length;) {\n              var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n              child.height -= leaf.height;\n              this.children.splice(++i, 0, leaf);\n              leaf.parent = this;\n            }\n            child.lines = child.lines.slice(0, remaining);\n            this.maybeSpill();\n          }\n          break\n        }\n        at -= sz;\n      }\n    },\n\n    // When a node has grown, check whether it should be split.\n    maybeSpill: function() {\n      if (this.children.length <= 10) { return }\n      var me = this;\n      do {\n        var spilled = me.children.splice(me.children.length - 5, 5);\n        var sibling = new BranchChunk(spilled);\n        if (!me.parent) { // Become the parent node\n          var copy = new BranchChunk(me.children);\n          copy.parent = me;\n          me.children = [copy, sibling];\n          me = copy;\n       } else {\n          me.size -= sibling.size;\n          me.height -= sibling.height;\n          var myIndex = indexOf(me.parent.children, me);\n          me.parent.children.splice(myIndex + 1, 0, sibling);\n        }\n        sibling.parent = me.parent;\n      } while (me.children.length > 10)\n      me.parent.maybeSpill();\n    },\n\n    iterN: function(at, n, op) {\n      for (var i = 0; i < this.children.length; ++i) {\n        var child = this.children[i], sz = child.chunkSize();\n        if (at < sz) {\n          var used = Math.min(n, sz - at);\n          if (child.iterN(at, used, op)) { return true }\n          if ((n -= used) == 0) { break }\n          at = 0;\n        } else { at -= sz; }\n      }\n    }\n  };\n\n  // Line widgets are block elements displayed above or below a line.\n\n  var LineWidget = function(doc, node, options) {\n    if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n      { this[opt] = options[opt]; } } }\n    this.doc = doc;\n    this.node = node;\n  };\n\n  LineWidget.prototype.clear = function () {\n    var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n    if (no == null || !ws) { return }\n    for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }\n    if (!ws.length) { line.widgets = null; }\n    var height = widgetHeight(this);\n    updateLineHeight(line, Math.max(0, line.height - height));\n    if (cm) {\n      runInOp(cm, function () {\n        adjustScrollWhenAboveVisible(cm, line, -height);\n        regLineChange(cm, no, \"widget\");\n      });\n      signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n    }\n  };\n\n  LineWidget.prototype.changed = function () {\n      var this$1 = this;\n\n    var oldH = this.height, cm = this.doc.cm, line = this.line;\n    this.height = null;\n    var diff = widgetHeight(this) - oldH;\n    if (!diff) { return }\n    if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n    if (cm) {\n      runInOp(cm, function () {\n        cm.curOp.forceUpdate = true;\n        adjustScrollWhenAboveVisible(cm, line, diff);\n        signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n      });\n    }\n  };\n  eventMixin(LineWidget);\n\n  function adjustScrollWhenAboveVisible(cm, line, diff) {\n    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n      { addToScrollTop(cm, diff); }\n  }\n\n  function addLineWidget(doc, handle, node, options) {\n    var widget = new LineWidget(doc, node, options);\n    var cm = doc.cm;\n    if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n    changeLine(doc, handle, \"widget\", function (line) {\n      var widgets = line.widgets || (line.widgets = []);\n      if (widget.insertAt == null) { widgets.push(widget); }\n      else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }\n      widget.line = line;\n      if (cm && !lineIsHidden(doc, line)) {\n        var aboveVisible = heightAtLine(line) < doc.scrollTop;\n        updateLineHeight(line, line.height + widgetHeight(widget));\n        if (aboveVisible) { addToScrollTop(cm, widget.height); }\n        cm.curOp.forceUpdate = true;\n      }\n      return true\n    });\n    if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n    return widget\n  }\n\n  // TEXTMARKERS\n\n  // Created with markText and setBookmark methods. A TextMarker is a\n  // handle that can be used to clear or find a marked position in the\n  // document. Line objects hold arrays (markedSpans) containing\n  // {from, to, marker} object pointing to such marker objects, and\n  // indicating that such a marker is present on that line. Multiple\n  // lines may point to the same marker when it spans across lines.\n  // The spans will have null for their from/to properties when the\n  // marker continues beyond the start/end of the line. Markers have\n  // links back to the lines they currently touch.\n\n  // Collapsed markers have unique ids, in order to be able to order\n  // them, which is needed for uniquely determining an outer marker\n  // when they overlap (they may nest, but not partially overlap).\n  var nextMarkerId = 0;\n\n  var TextMarker = function(doc, type) {\n    this.lines = [];\n    this.type = type;\n    this.doc = doc;\n    this.id = ++nextMarkerId;\n  };\n\n  // Clear the marker.\n  TextMarker.prototype.clear = function () {\n    if (this.explicitlyCleared) { return }\n    var cm = this.doc.cm, withOp = cm && !cm.curOp;\n    if (withOp) { startOperation(cm); }\n    if (hasHandler(this, \"clear\")) {\n      var found = this.find();\n      if (found) { signalLater(this, \"clear\", found.from, found.to); }\n    }\n    var min = null, max = null;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n      else if (cm) {\n        if (span.to != null) { max = lineNo(line); }\n        if (span.from != null) { min = lineNo(line); }\n      }\n      line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n        { updateLineHeight(line, textHeight(cm.display)); }\n    }\n    if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n      var visual = visualLine(this.lines[i$1]), len = lineLength(visual);\n      if (len > cm.display.maxLineLength) {\n        cm.display.maxLine = visual;\n        cm.display.maxLineLength = len;\n        cm.display.maxLineChanged = true;\n      }\n    } }\n\n    if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n    this.lines.length = 0;\n    this.explicitlyCleared = true;\n    if (this.atomic && this.doc.cantEdit) {\n      this.doc.cantEdit = false;\n      if (cm) { reCheckSelection(cm.doc); }\n    }\n    if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n    if (withOp) { endOperation(cm); }\n    if (this.parent) { this.parent.clear(); }\n  };\n\n  // Find the position of the marker in the document. Returns a {from,\n  // to} object by default. Side can be passed to get a specific side\n  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n  // Pos objects returned contain a line object, rather than a line\n  // number (used to prevent looking up the same line twice).\n  TextMarker.prototype.find = function (side, lineObj) {\n    if (side == null && this.type == \"bookmark\") { side = 1; }\n    var from, to;\n    for (var i = 0; i < this.lines.length; ++i) {\n      var line = this.lines[i];\n      var span = getMarkedSpanFor(line.markedSpans, this);\n      if (span.from != null) {\n        from = Pos(lineObj ? line : lineNo(line), span.from);\n        if (side == -1) { return from }\n      }\n      if (span.to != null) {\n        to = Pos(lineObj ? line : lineNo(line), span.to);\n        if (side == 1) { return to }\n      }\n    }\n    return from && {from: from, to: to}\n  };\n\n  // Signals that the marker's widget changed, and surrounding layout\n  // should be recomputed.\n  TextMarker.prototype.changed = function () {\n      var this$1 = this;\n\n    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n    if (!pos || !cm) { return }\n    runInOp(cm, function () {\n      var line = pos.line, lineN = lineNo(pos.line);\n      var view = findViewForLine(cm, lineN);\n      if (view) {\n        clearLineMeasurementCacheFor(view);\n        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n      }\n      cm.curOp.updateMaxLine = true;\n      if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n        var oldHeight = widget.height;\n        widget.height = null;\n        var dHeight = widgetHeight(widget) - oldHeight;\n        if (dHeight)\n          { updateLineHeight(line, line.height + dHeight); }\n      }\n      signalLater(cm, \"markerChanged\", cm, this$1);\n    });\n  };\n\n  TextMarker.prototype.attachLine = function (line) {\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp;\n      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n        { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n    }\n    this.lines.push(line);\n  };\n\n  TextMarker.prototype.detachLine = function (line) {\n    this.lines.splice(indexOf(this.lines, line), 1);\n    if (!this.lines.length && this.doc.cm) {\n      var op = this.doc.cm.curOp\n      ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n    }\n  };\n  eventMixin(TextMarker);\n\n  // Create a marker, wire it up to the right lines, and\n  function markText(doc, from, to, options, type) {\n    // Shared markers (across linked documents) are handled separately\n    // (markTextShared will call out to this again, once per\n    // document).\n    if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n    // Ensure we are in an operation.\n    if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n    var marker = new TextMarker(doc, type), diff = cmp(from, to);\n    if (options) { copyObj(options, marker, false); }\n    // Don't connect empty markers unless clearWhenEmpty is false\n    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n      { return marker }\n    if (marker.replacedWith) {\n      // Showing up as a widget implies collapsed (widget replaces text)\n      marker.collapsed = true;\n      marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n      if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n      if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n    }\n    if (marker.collapsed) {\n      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n        { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n      seeCollapsedSpans();\n    }\n\n    if (marker.addToHistory)\n      { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n    var curLine = from.line, cm = doc.cm, updateMaxLine;\n    doc.iter(curLine, to.line + 1, function (line) {\n      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n        { updateMaxLine = true; }\n      if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n      addMarkedSpan(line, new MarkedSpan(marker,\n                                         curLine == from.line ? from.ch : null,\n                                         curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);\n      ++curLine;\n    });\n    // lineIsHidden depends on the presence of the spans, so needs a second pass\n    if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n      if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n    }); }\n\n    if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n    if (marker.readOnly) {\n      seeReadOnlySpans();\n      if (doc.history.done.length || doc.history.undone.length)\n        { doc.clearHistory(); }\n    }\n    if (marker.collapsed) {\n      marker.id = ++nextMarkerId;\n      marker.atomic = true;\n    }\n    if (cm) {\n      // Sync editor state\n      if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n      if (marker.collapsed)\n        { regChange(cm, from.line, to.line + 1); }\n      else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n               marker.attributes || marker.title)\n        { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n      if (marker.atomic) { reCheckSelection(cm.doc); }\n      signalLater(cm, \"markerAdded\", cm, marker);\n    }\n    return marker\n  }\n\n  // SHARED TEXTMARKERS\n\n  // A shared marker spans multiple linked documents. It is\n  // implemented as a meta-marker-object controlling multiple normal\n  // markers.\n  var SharedTextMarker = function(markers, primary) {\n    this.markers = markers;\n    this.primary = primary;\n    for (var i = 0; i < markers.length; ++i)\n      { markers[i].parent = this; }\n  };\n\n  SharedTextMarker.prototype.clear = function () {\n    if (this.explicitlyCleared) { return }\n    this.explicitlyCleared = true;\n    for (var i = 0; i < this.markers.length; ++i)\n      { this.markers[i].clear(); }\n    signalLater(this, \"clear\");\n  };\n\n  SharedTextMarker.prototype.find = function (side, lineObj) {\n    return this.primary.find(side, lineObj)\n  };\n  eventMixin(SharedTextMarker);\n\n  function markTextShared(doc, from, to, options, type) {\n    options = copyObj(options);\n    options.shared = false;\n    var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n    var widget = options.widgetNode;\n    linkedDocs(doc, function (doc) {\n      if (widget) { options.widgetNode = widget.cloneNode(true); }\n      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n      for (var i = 0; i < doc.linked.length; ++i)\n        { if (doc.linked[i].isParent) { return } }\n      primary = lst(markers);\n    });\n    return new SharedTextMarker(markers, primary)\n  }\n\n  function findSharedMarkers(doc) {\n    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n  }\n\n  function copySharedMarkers(doc, markers) {\n    for (var i = 0; i < markers.length; i++) {\n      var marker = markers[i], pos = marker.find();\n      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n      if (cmp(mFrom, mTo)) {\n        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n        marker.markers.push(subMark);\n        subMark.parent = marker;\n      }\n    }\n  }\n\n  function detachSharedMarkers(markers) {\n    var loop = function ( i ) {\n      var marker = markers[i], linked = [marker.primary.doc];\n      linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n      for (var j = 0; j < marker.markers.length; j++) {\n        var subMarker = marker.markers[j];\n        if (indexOf(linked, subMarker.doc) == -1) {\n          subMarker.parent = null;\n          marker.markers.splice(j--, 1);\n        }\n      }\n    };\n\n    for (var i = 0; i < markers.length; i++) loop( i );\n  }\n\n  var nextDocId = 0;\n  var Doc = function(text, mode, firstLine, lineSep, direction) {\n    if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n    if (firstLine == null) { firstLine = 0; }\n\n    BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n    this.first = firstLine;\n    this.scrollTop = this.scrollLeft = 0;\n    this.cantEdit = false;\n    this.cleanGeneration = 1;\n    this.modeFrontier = this.highlightFrontier = firstLine;\n    var start = Pos(firstLine, 0);\n    this.sel = simpleSelection(start);\n    this.history = new History(null);\n    this.id = ++nextDocId;\n    this.modeOption = mode;\n    this.lineSep = lineSep;\n    this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n    this.extend = false;\n\n    if (typeof text == \"string\") { text = this.splitLines(text); }\n    updateDoc(this, {from: start, to: start, text: text});\n    setSelection(this, simpleSelection(start), sel_dontScroll);\n  };\n\n  Doc.prototype = createObj(BranchChunk.prototype, {\n    constructor: Doc,\n    // Iterate over the document. Supports two forms -- with only one\n    // argument, it calls that for each line in the document. With\n    // three, it iterates over the range given by the first two (with\n    // the second being non-inclusive).\n    iter: function(from, to, op) {\n      if (op) { this.iterN(from - this.first, to - from, op); }\n      else { this.iterN(this.first, this.first + this.size, from); }\n    },\n\n    // Non-public interface for adding and removing lines.\n    insert: function(at, lines) {\n      var height = 0;\n      for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n      this.insertInner(at - this.first, lines, height);\n    },\n    remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n    // From here, the methods are part of the public interface. Most\n    // are also available from CodeMirror (editor) instances.\n\n    getValue: function(lineSep) {\n      var lines = getLines(this, this.first, this.first + this.size);\n      if (lineSep === false) { return lines }\n      return lines.join(lineSep || this.lineSeparator())\n    },\n    setValue: docMethodOp(function(code) {\n      var top = Pos(this.first, 0), last = this.first + this.size - 1;\n      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n                        text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n      if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n      setSelection(this, simpleSelection(top), sel_dontScroll);\n    }),\n    replaceRange: function(code, from, to, origin) {\n      from = clipPos(this, from);\n      to = to ? clipPos(this, to) : from;\n      replaceRange(this, code, from, to, origin);\n    },\n    getRange: function(from, to, lineSep) {\n      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n      if (lineSep === false) { return lines }\n      if (lineSep === '') { return lines.join('') }\n      return lines.join(lineSep || this.lineSeparator())\n    },\n\n    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n    getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n    getLineNumber: function(line) {return lineNo(line)},\n\n    getLineHandleVisualStart: function(line) {\n      if (typeof line == \"number\") { line = getLine(this, line); }\n      return visualLine(line)\n    },\n\n    lineCount: function() {return this.size},\n    firstLine: function() {return this.first},\n    lastLine: function() {return this.first + this.size - 1},\n\n    clipPos: function(pos) {return clipPos(this, pos)},\n\n    getCursor: function(start) {\n      var range = this.sel.primary(), pos;\n      if (start == null || start == \"head\") { pos = range.head; }\n      else if (start == \"anchor\") { pos = range.anchor; }\n      else if (start == \"end\" || start == \"to\" || start === false) { pos = range.to(); }\n      else { pos = range.from(); }\n      return pos\n    },\n    listSelections: function() { return this.sel.ranges },\n    somethingSelected: function() {return this.sel.somethingSelected()},\n\n    setCursor: docMethodOp(function(line, ch, options) {\n      setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n    }),\n    setSelection: docMethodOp(function(anchor, head, options) {\n      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n    }),\n    extendSelection: docMethodOp(function(head, other, options) {\n      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n    }),\n    extendSelections: docMethodOp(function(heads, options) {\n      extendSelections(this, clipPosArray(this, heads), options);\n    }),\n    extendSelectionsBy: docMethodOp(function(f, options) {\n      var heads = map(this.sel.ranges, f);\n      extendSelections(this, clipPosArray(this, heads), options);\n    }),\n    setSelections: docMethodOp(function(ranges, primary, options) {\n      if (!ranges.length) { return }\n      var out = [];\n      for (var i = 0; i < ranges.length; i++)\n        { out[i] = new Range(clipPos(this, ranges[i].anchor),\n                           clipPos(this, ranges[i].head || ranges[i].anchor)); }\n      if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n      setSelection(this, normalizeSelection(this.cm, out, primary), options);\n    }),\n    addSelection: docMethodOp(function(anchor, head, options) {\n      var ranges = this.sel.ranges.slice(0);\n      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n      setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n    }),\n\n    getSelection: function(lineSep) {\n      var ranges = this.sel.ranges, lines;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        lines = lines ? lines.concat(sel) : sel;\n      }\n      if (lineSep === false) { return lines }\n      else { return lines.join(lineSep || this.lineSeparator()) }\n    },\n    getSelections: function(lineSep) {\n      var parts = [], ranges = this.sel.ranges;\n      for (var i = 0; i < ranges.length; i++) {\n        var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n        if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }\n        parts[i] = sel;\n      }\n      return parts\n    },\n    replaceSelection: function(code, collapse, origin) {\n      var dup = [];\n      for (var i = 0; i < this.sel.ranges.length; i++)\n        { dup[i] = code; }\n      this.replaceSelections(dup, collapse, origin || \"+input\");\n    },\n    replaceSelections: docMethodOp(function(code, collapse, origin) {\n      var changes = [], sel = this.sel;\n      for (var i = 0; i < sel.ranges.length; i++) {\n        var range = sel.ranges[i];\n        changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n      }\n      var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n      for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n        { makeChange(this, changes[i$1]); }\n      if (newSel) { setSelectionReplaceHistory(this, newSel); }\n      else if (this.cm) { ensureCursorVisible(this.cm); }\n    }),\n    undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n    redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n    setExtending: function(val) {this.extend = val;},\n    getExtending: function() {return this.extend},\n\n    historySize: function() {\n      var hist = this.history, done = 0, undone = 0;\n      for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n      for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n      return {undo: done, redo: undone}\n    },\n    clearHistory: function() {\n      var this$1 = this;\n\n      this.history = new History(this.history);\n      linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);\n    },\n\n    markClean: function() {\n      this.cleanGeneration = this.changeGeneration(true);\n    },\n    changeGeneration: function(forceSplit) {\n      if (forceSplit)\n        { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n      return this.history.generation\n    },\n    isClean: function (gen) {\n      return this.history.generation == (gen || this.cleanGeneration)\n    },\n\n    getHistory: function() {\n      return {done: copyHistoryArray(this.history.done),\n              undone: copyHistoryArray(this.history.undone)}\n    },\n    setHistory: function(histData) {\n      var hist = this.history = new History(this.history);\n      hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n    },\n\n    setGutterMarker: docMethodOp(function(line, gutterID, value) {\n      return changeLine(this, line, \"gutter\", function (line) {\n        var markers = line.gutterMarkers || (line.gutterMarkers = {});\n        markers[gutterID] = value;\n        if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n        return true\n      })\n    }),\n\n    clearGutter: docMethodOp(function(gutterID) {\n      var this$1 = this;\n\n      this.iter(function (line) {\n        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n          changeLine(this$1, line, \"gutter\", function () {\n            line.gutterMarkers[gutterID] = null;\n            if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n            return true\n          });\n        }\n      });\n    }),\n\n    lineInfo: function(line) {\n      var n;\n      if (typeof line == \"number\") {\n        if (!isLine(this, line)) { return null }\n        n = line;\n        line = getLine(this, line);\n        if (!line) { return null }\n      } else {\n        n = lineNo(line);\n        if (n == null) { return null }\n      }\n      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n              widgets: line.widgets}\n    },\n\n    addLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        if (!line[prop]) { line[prop] = cls; }\n        else if (classTest(cls).test(line[prop])) { return false }\n        else { line[prop] += \" \" + cls; }\n        return true\n      })\n    }),\n    removeLineClass: docMethodOp(function(handle, where, cls) {\n      return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n        var prop = where == \"text\" ? \"textClass\"\n                 : where == \"background\" ? \"bgClass\"\n                 : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n        var cur = line[prop];\n        if (!cur) { return false }\n        else if (cls == null) { line[prop] = null; }\n        else {\n          var found = cur.match(classTest(cls));\n          if (!found) { return false }\n          var end = found.index + found[0].length;\n          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n        }\n        return true\n      })\n    }),\n\n    addLineWidget: docMethodOp(function(handle, node, options) {\n      return addLineWidget(this, handle, node, options)\n    }),\n    removeLineWidget: function(widget) { widget.clear(); },\n\n    markText: function(from, to, options) {\n      return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n    },\n    setBookmark: function(pos, options) {\n      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n                      insertLeft: options && options.insertLeft,\n                      clearWhenEmpty: false, shared: options && options.shared,\n                      handleMouseEvents: options && options.handleMouseEvents};\n      pos = clipPos(this, pos);\n      return markText(this, pos, pos, realOpts, \"bookmark\")\n    },\n    findMarksAt: function(pos) {\n      pos = clipPos(this, pos);\n      var markers = [], spans = getLine(this, pos.line).markedSpans;\n      if (spans) { for (var i = 0; i < spans.length; ++i) {\n        var span = spans[i];\n        if ((span.from == null || span.from <= pos.ch) &&\n            (span.to == null || span.to >= pos.ch))\n          { markers.push(span.marker.parent || span.marker); }\n      } }\n      return markers\n    },\n    findMarks: function(from, to, filter) {\n      from = clipPos(this, from); to = clipPos(this, to);\n      var found = [], lineNo = from.line;\n      this.iter(from.line, to.line + 1, function (line) {\n        var spans = line.markedSpans;\n        if (spans) { for (var i = 0; i < spans.length; i++) {\n          var span = spans[i];\n          if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||\n                span.from == null && lineNo != from.line ||\n                span.from != null && lineNo == to.line && span.from >= to.ch) &&\n              (!filter || filter(span.marker)))\n            { found.push(span.marker.parent || span.marker); }\n        } }\n        ++lineNo;\n      });\n      return found\n    },\n    getAllMarks: function() {\n      var markers = [];\n      this.iter(function (line) {\n        var sps = line.markedSpans;\n        if (sps) { for (var i = 0; i < sps.length; ++i)\n          { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n      });\n      return markers\n    },\n\n    posFromIndex: function(off) {\n      var ch, lineNo = this.first, sepSize = this.lineSeparator().length;\n      this.iter(function (line) {\n        var sz = line.text.length + sepSize;\n        if (sz > off) { ch = off; return true }\n        off -= sz;\n        ++lineNo;\n      });\n      return clipPos(this, Pos(lineNo, ch))\n    },\n    indexFromPos: function (coords) {\n      coords = clipPos(this, coords);\n      var index = coords.ch;\n      if (coords.line < this.first || coords.ch < 0) { return 0 }\n      var sepSize = this.lineSeparator().length;\n      this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n        index += line.text.length + sepSize;\n      });\n      return index\n    },\n\n    copy: function(copyHistory) {\n      var doc = new Doc(getLines(this, this.first, this.first + this.size),\n                        this.modeOption, this.first, this.lineSep, this.direction);\n      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n      doc.sel = this.sel;\n      doc.extend = false;\n      if (copyHistory) {\n        doc.history.undoDepth = this.history.undoDepth;\n        doc.setHistory(this.getHistory());\n      }\n      return doc\n    },\n\n    linkedDoc: function(options) {\n      if (!options) { options = {}; }\n      var from = this.first, to = this.first + this.size;\n      if (options.from != null && options.from > from) { from = options.from; }\n      if (options.to != null && options.to < to) { to = options.to; }\n      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n      if (options.sharedHist) { copy.history = this.history\n      ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n      copySharedMarkers(copy, findSharedMarkers(this));\n      return copy\n    },\n    unlinkDoc: function(other) {\n      if (other instanceof CodeMirror) { other = other.doc; }\n      if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n        var link = this.linked[i];\n        if (link.doc != other) { continue }\n        this.linked.splice(i, 1);\n        other.unlinkDoc(this);\n        detachSharedMarkers(findSharedMarkers(this));\n        break\n      } }\n      // If the histories were shared, split them again\n      if (other.history == this.history) {\n        var splitIds = [other.id];\n        linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n        other.history = new History(null);\n        other.history.done = copyHistoryArray(this.history.done, splitIds);\n        other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n      }\n    },\n    iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n    getMode: function() {return this.mode},\n    getEditor: function() {return this.cm},\n\n    splitLines: function(str) {\n      if (this.lineSep) { return str.split(this.lineSep) }\n      return splitLinesAuto(str)\n    },\n    lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n    setDirection: docMethodOp(function (dir) {\n      if (dir != \"rtl\") { dir = \"ltr\"; }\n      if (dir == this.direction) { return }\n      this.direction = dir;\n      this.iter(function (line) { return line.order = null; });\n      if (this.cm) { directionChanged(this.cm); }\n    })\n  });\n\n  // Public alias.\n  Doc.prototype.eachLine = Doc.prototype.iter;\n\n  // Kludge to work around strange IE behavior where it'll sometimes\n  // re-fire a series of drag-related events right after the drop (#1551)\n  var lastDrop = 0;\n\n  function onDrop(e) {\n    var cm = this;\n    clearDragCursor(cm);\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n      { return }\n    e_preventDefault(e);\n    if (ie) { lastDrop = +new Date; }\n    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n    if (!pos || cm.isReadOnly()) { return }\n    // Might be a file drop, in which case we simply extract the text\n    // and insert it.\n    if (files && files.length && window.FileReader && window.File) {\n      var n = files.length, text = Array(n), read = 0;\n      var markAsReadAndPasteIfAllFilesAreRead = function () {\n        if (++read == n) {\n          operation(cm, function () {\n            pos = clipPos(cm.doc, pos);\n            var change = {from: pos, to: pos,\n                          text: cm.doc.splitLines(\n                              text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),\n                          origin: \"paste\"};\n            makeChange(cm.doc, change);\n            setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));\n          })();\n        }\n      };\n      var readTextFromFile = function (file, i) {\n        if (cm.options.allowDropFileTypes &&\n            indexOf(cm.options.allowDropFileTypes, file.type) == -1) {\n          markAsReadAndPasteIfAllFilesAreRead();\n          return\n        }\n        var reader = new FileReader;\n        reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };\n        reader.onload = function () {\n          var content = reader.result;\n          if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) {\n            markAsReadAndPasteIfAllFilesAreRead();\n            return\n          }\n          text[i] = content;\n          markAsReadAndPasteIfAllFilesAreRead();\n        };\n        reader.readAsText(file);\n      };\n      for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }\n    } else { // Normal drop\n      // Don't do a replace if the drop happened inside of the selected text.\n      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n        cm.state.draggingText(e);\n        // Ensure the editor is re-focused\n        setTimeout(function () { return cm.display.input.focus(); }, 20);\n        return\n      }\n      try {\n        var text$1 = e.dataTransfer.getData(\"Text\");\n        if (text$1) {\n          var selected;\n          if (cm.state.draggingText && !cm.state.draggingText.copy)\n            { selected = cm.listSelections(); }\n          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n          if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n            { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n          cm.replaceSelection(text$1, \"around\", \"paste\");\n          cm.display.input.focus();\n        }\n      }\n      catch(e$1){}\n    }\n  }\n\n  function onDragStart(cm, e) {\n    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n    e.dataTransfer.setData(\"Text\", cm.getSelection());\n    e.dataTransfer.effectAllowed = \"copyMove\";\n\n    // Use dummy image instead of default browsers image.\n    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n    if (e.dataTransfer.setDragImage && !safari) {\n      var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n      img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n      if (presto) {\n        img.width = img.height = 1;\n        cm.display.wrapper.appendChild(img);\n        // Force a relayout, or Opera won't use our image for some obscure reason\n        img._top = img.offsetTop;\n      }\n      e.dataTransfer.setDragImage(img, 0, 0);\n      if (presto) { img.parentNode.removeChild(img); }\n    }\n  }\n\n  function onDragOver(cm, e) {\n    var pos = posFromMouse(cm, e);\n    if (!pos) { return }\n    var frag = document.createDocumentFragment();\n    drawSelectionCursor(cm, pos, frag);\n    if (!cm.display.dragCursor) {\n      cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n      cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n    }\n    removeChildrenAndAdd(cm.display.dragCursor, frag);\n  }\n\n  function clearDragCursor(cm) {\n    if (cm.display.dragCursor) {\n      cm.display.lineSpace.removeChild(cm.display.dragCursor);\n      cm.display.dragCursor = null;\n    }\n  }\n\n  // These must be handled carefully, because naively registering a\n  // handler for each editor will cause the editors to never be\n  // garbage collected.\n\n  function forEachCodeMirror(f) {\n    if (!document.getElementsByClassName) { return }\n    var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n    for (var i = 0; i < byClass.length; i++) {\n      var cm = byClass[i].CodeMirror;\n      if (cm) { editors.push(cm); }\n    }\n    if (editors.length) { editors[0].operation(function () {\n      for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n    }); }\n  }\n\n  var globalsRegistered = false;\n  function ensureGlobalHandlers() {\n    if (globalsRegistered) { return }\n    registerGlobalHandlers();\n    globalsRegistered = true;\n  }\n  function registerGlobalHandlers() {\n    // When the window resizes, we need to refresh active editors.\n    var resizeTimer;\n    on(window, \"resize\", function () {\n      if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n        resizeTimer = null;\n        forEachCodeMirror(onResize);\n      }, 100); }\n    });\n    // When the window loses focus, we want to show the editor as blurred\n    on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n  }\n  // Called when the window resizes\n  function onResize(cm) {\n    var d = cm.display;\n    // Might be a text scaling operation, clear size caches.\n    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n    d.scrollbarsClipped = false;\n    cm.setSize();\n  }\n\n  var keyNames = {\n    3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n    19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n    36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n    46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n    106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n    173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n    221: \"]\", 222: \"'\", 224: \"Mod\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n    63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n  };\n\n  // Number keys\n  for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n  // Alphabetic keys\n  for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n  // Function keys\n  for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n  var keyMap = {};\n\n  keyMap.basic = {\n    \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n    \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n    \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n    \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n    \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n    \"Esc\": \"singleSelection\"\n  };\n  // Note that the save and find-related commands aren't defined by\n  // default. User code or addons can define them. Unknown commands\n  // are simply ignored.\n  keyMap.pcDefault = {\n    \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n    \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n    \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n    \"fallthrough\": \"basic\"\n  };\n  // Very basic readline/emacs-style bindings, which are standard on Mac.\n  keyMap.emacsy = {\n    \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n    \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\", \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\",\n    \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\",\n    \"Ctrl-T\": \"transposeChars\", \"Ctrl-O\": \"openLine\"\n  };\n  keyMap.macDefault = {\n    \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n    \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n    \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n    \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n    \"fallthrough\": [\"basic\", \"emacsy\"]\n  };\n  keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n  // KEYMAP DISPATCH\n\n  function normalizeKeyName(name) {\n    var parts = name.split(/-(?!$)/);\n    name = parts[parts.length - 1];\n    var alt, ctrl, shift, cmd;\n    for (var i = 0; i < parts.length - 1; i++) {\n      var mod = parts[i];\n      if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n      else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n      else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n      else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n      else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n    }\n    if (alt) { name = \"Alt-\" + name; }\n    if (ctrl) { name = \"Ctrl-\" + name; }\n    if (cmd) { name = \"Cmd-\" + name; }\n    if (shift) { name = \"Shift-\" + name; }\n    return name\n  }\n\n  // This is a kludge to keep keymaps mostly working as raw objects\n  // (backwards compatibility) while at the same time support features\n  // like normalization and multi-stroke key bindings. It compiles a\n  // new normalized keymap, and then updates the old object to reflect\n  // this.\n  function normalizeKeyMap(keymap) {\n    var copy = {};\n    for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n      var value = keymap[keyname];\n      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n      if (value == \"...\") { delete keymap[keyname]; continue }\n\n      var keys = map(keyname.split(\" \"), normalizeKeyName);\n      for (var i = 0; i < keys.length; i++) {\n        var val = (void 0), name = (void 0);\n        if (i == keys.length - 1) {\n          name = keys.join(\" \");\n          val = value;\n        } else {\n          name = keys.slice(0, i + 1).join(\" \");\n          val = \"...\";\n        }\n        var prev = copy[name];\n        if (!prev) { copy[name] = val; }\n        else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n      }\n      delete keymap[keyname];\n    } }\n    for (var prop in copy) { keymap[prop] = copy[prop]; }\n    return keymap\n  }\n\n  function lookupKey(key, map, handle, context) {\n    map = getKeyMap(map);\n    var found = map.call ? map.call(key, context) : map[key];\n    if (found === false) { return \"nothing\" }\n    if (found === \"...\") { return \"multi\" }\n    if (found != null && handle(found)) { return \"handled\" }\n\n    if (map.fallthrough) {\n      if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n        { return lookupKey(key, map.fallthrough, handle, context) }\n      for (var i = 0; i < map.fallthrough.length; i++) {\n        var result = lookupKey(key, map.fallthrough[i], handle, context);\n        if (result) { return result }\n      }\n    }\n  }\n\n  // Modifier key presses don't count as 'real' key presses for the\n  // purpose of keymap fallthrough.\n  function isModifierKey(value) {\n    var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n    return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n  }\n\n  function addModifierNames(name, event, noShift) {\n    var base = name;\n    if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Mod\") { name = \"Cmd-\" + name; }\n    if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n    return name\n  }\n\n  // Look up the name of a key as indicated by an event object.\n  function keyName(event, noShift) {\n    if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n    var name = keyNames[event.keyCode];\n    if (name == null || event.altGraphKey) { return false }\n    // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n    // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n    if (event.keyCode == 3 && event.code) { name = event.code; }\n    return addModifierNames(name, event, noShift)\n  }\n\n  function getKeyMap(val) {\n    return typeof val == \"string\" ? keyMap[val] : val\n  }\n\n  // Helper for deleting text near the selection(s), used to implement\n  // backspace, delete, and similar functionality.\n  function deleteNearSelection(cm, compute) {\n    var ranges = cm.doc.sel.ranges, kill = [];\n    // Build up a set of ranges to kill first, merging overlapping\n    // ranges.\n    for (var i = 0; i < ranges.length; i++) {\n      var toKill = compute(ranges[i]);\n      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n        var replaced = kill.pop();\n        if (cmp(replaced.from, toKill.from) < 0) {\n          toKill.from = replaced.from;\n          break\n        }\n      }\n      kill.push(toKill);\n    }\n    // Next, remove those actual ranges.\n    runInOp(cm, function () {\n      for (var i = kill.length - 1; i >= 0; i--)\n        { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n      ensureCursorVisible(cm);\n    });\n  }\n\n  function moveCharLogically(line, ch, dir) {\n    var target = skipExtendingChars(line.text, ch + dir, dir);\n    return target < 0 || target > line.text.length ? null : target\n  }\n\n  function moveLogically(line, start, dir) {\n    var ch = moveCharLogically(line, start.ch, dir);\n    return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n  }\n\n  function endOfLine(visually, cm, lineObj, lineNo, dir) {\n    if (visually) {\n      if (cm.doc.direction == \"rtl\") { dir = -dir; }\n      var order = getOrder(lineObj, cm.doc.direction);\n      if (order) {\n        var part = dir < 0 ? lst(order) : order[0];\n        var moveInStorageOrder = (dir < 0) == (part.level == 1);\n        var sticky = moveInStorageOrder ? \"after\" : \"before\";\n        var ch;\n        // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n        // it could be that the last bidi part is not on the last visual line,\n        // since visual lines contain content order-consecutive chunks.\n        // Thus, in rtl, we are looking for the first (content-order) character\n        // in the rtl chunk that is on the last line (that is, the same line\n        // as the last (content-order) character).\n        if (part.level > 0 || cm.doc.direction == \"rtl\") {\n          var prep = prepareMeasureForLine(cm, lineObj);\n          ch = dir < 0 ? lineObj.text.length - 1 : 0;\n          var targetTop = measureCharPrepared(cm, prep, ch).top;\n          ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n          if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n        } else { ch = dir < 0 ? part.to : part.from; }\n        return new Pos(lineNo, ch, sticky)\n      }\n    }\n    return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n  }\n\n  function moveVisually(cm, line, start, dir) {\n    var bidi = getOrder(line, cm.doc.direction);\n    if (!bidi) { return moveLogically(line, start, dir) }\n    if (start.ch >= line.text.length) {\n      start.ch = line.text.length;\n      start.sticky = \"before\";\n    } else if (start.ch <= 0) {\n      start.ch = 0;\n      start.sticky = \"after\";\n    }\n    var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n    if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n      // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n      // nothing interesting happens.\n      return moveLogically(line, start, dir)\n    }\n\n    var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n    var prep;\n    var getWrappedLineExtent = function (ch) {\n      if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n      prep = prep || prepareMeasureForLine(cm, line);\n      return wrappedLineExtentChar(cm, line, prep, ch)\n    };\n    var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n    if (cm.doc.direction == \"rtl\" || part.level == 1) {\n      var moveInStorageOrder = (part.level == 1) == (dir < 0);\n      var ch = mv(start, moveInStorageOrder ? 1 : -1);\n      if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n        // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n        var sticky = moveInStorageOrder ? \"before\" : \"after\";\n        return new Pos(start.line, ch, sticky)\n      }\n    }\n\n    // Case 3: Could not move within this bidi part in this visual line, so leave\n    // the current bidi part\n\n    var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n      var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n        ? new Pos(start.line, mv(ch, 1), \"before\")\n        : new Pos(start.line, ch, \"after\"); };\n\n      for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n        var part = bidi[partPos];\n        var moveInStorageOrder = (dir > 0) == (part.level != 1);\n        var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n        if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n        ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n        if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n      }\n    };\n\n    // Case 3a: Look for other bidi parts on the same visual line\n    var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n    if (res) { return res }\n\n    // Case 3b: Look for other bidi parts on the next visual line\n    var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n    if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n      res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n      if (res) { return res }\n    }\n\n    // Case 4: Nowhere to move\n    return null\n  }\n\n  // Commands are parameter-less actions that can be performed on an\n  // editor, mostly used for keybindings.\n  var commands = {\n    selectAll: selectAll,\n    singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n    killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n      if (range.empty()) {\n        var len = getLine(cm.doc, range.head.line).text.length;\n        if (range.head.ch == len && range.head.line < cm.lastLine())\n          { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n        else\n          { return {from: range.head, to: Pos(range.head.line, len)} }\n      } else {\n        return {from: range.from(), to: range.to()}\n      }\n    }); },\n    deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n      from: Pos(range.from().line, 0),\n      to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n    }); }); },\n    delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n      from: Pos(range.from().line, 0), to: range.from()\n    }); }); },\n    delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n      var top = cm.charCoords(range.head, \"div\").top + 5;\n      var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n      return {from: leftPos, to: range.from()}\n    }); },\n    delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n      var top = cm.charCoords(range.head, \"div\").top + 5;\n      var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n      return {from: range.from(), to: rightPos }\n    }); },\n    undo: function (cm) { return cm.undo(); },\n    redo: function (cm) { return cm.redo(); },\n    undoSelection: function (cm) { return cm.undoSelection(); },\n    redoSelection: function (cm) { return cm.redoSelection(); },\n    goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n    goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n    goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n      {origin: \"+move\", bias: 1}\n    ); },\n    goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n      {origin: \"+move\", bias: 1}\n    ); },\n    goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n      {origin: \"+move\", bias: -1}\n    ); },\n    goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n      return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n    }, sel_move); },\n    goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n      return cm.coordsChar({left: 0, top: top}, \"div\")\n    }, sel_move); },\n    goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n      var top = cm.cursorCoords(range.head, \"div\").top + 5;\n      var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n      if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n      return pos\n    }, sel_move); },\n    goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n    goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n    goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n    goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n    goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n    goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n    goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n    goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n    goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n    goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n    goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n    goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n    delCharBefore: function (cm) { return cm.deleteH(-1, \"codepoint\"); },\n    delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n    delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n    delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n    delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n    delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n    indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n    indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n    indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n    insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n    insertSoftTab: function (cm) {\n      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n      for (var i = 0; i < ranges.length; i++) {\n        var pos = ranges[i].from();\n        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n        spaces.push(spaceStr(tabSize - col % tabSize));\n      }\n      cm.replaceSelections(spaces);\n    },\n    defaultTab: function (cm) {\n      if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n      else { cm.execCommand(\"insertTab\"); }\n    },\n    // Swap the two chars left and right of each selection's head.\n    // Move cursor behind the two swapped characters afterwards.\n    //\n    // Doesn't consider line feeds a character.\n    // Doesn't scan more than one line above to find a character.\n    // Doesn't do anything on an empty line.\n    // Doesn't do anything with non-empty selections.\n    transposeChars: function (cm) { return runInOp(cm, function () {\n      var ranges = cm.listSelections(), newSel = [];\n      for (var i = 0; i < ranges.length; i++) {\n        if (!ranges[i].empty()) { continue }\n        var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n        if (line) {\n          if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n          if (cur.ch > 0) {\n            cur = new Pos(cur.line, cur.ch + 1);\n            cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n                            Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n          } else if (cur.line > cm.doc.first) {\n            var prev = getLine(cm.doc, cur.line - 1).text;\n            if (prev) {\n              cur = new Pos(cur.line, 1);\n              cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n                              prev.charAt(prev.length - 1),\n                              Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n            }\n          }\n        }\n        newSel.push(new Range(cur, cur));\n      }\n      cm.setSelections(newSel);\n    }); },\n    newlineAndIndent: function (cm) { return runInOp(cm, function () {\n      var sels = cm.listSelections();\n      for (var i = sels.length - 1; i >= 0; i--)\n        { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n      sels = cm.listSelections();\n      for (var i$1 = 0; i$1 < sels.length; i$1++)\n        { cm.indentLine(sels[i$1].from().line, null, true); }\n      ensureCursorVisible(cm);\n    }); },\n    openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n    toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n  };\n\n\n  function lineStart(cm, lineN) {\n    var line = getLine(cm.doc, lineN);\n    var visual = visualLine(line);\n    if (visual != line) { lineN = lineNo(visual); }\n    return endOfLine(true, cm, visual, lineN, 1)\n  }\n  function lineEnd(cm, lineN) {\n    var line = getLine(cm.doc, lineN);\n    var visual = visualLineEnd(line);\n    if (visual != line) { lineN = lineNo(visual); }\n    return endOfLine(true, cm, line, lineN, -1)\n  }\n  function lineStartSmart(cm, pos) {\n    var start = lineStart(cm, pos.line);\n    var line = getLine(cm.doc, start.line);\n    var order = getOrder(line, cm.doc.direction);\n    if (!order || order[0].level == 0) {\n      var firstNonWS = Math.max(start.ch, line.text.search(/\\S/));\n      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n      return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n    }\n    return start\n  }\n\n  // Run a handler that was bound to a key.\n  function doHandleBinding(cm, bound, dropShift) {\n    if (typeof bound == \"string\") {\n      bound = commands[bound];\n      if (!bound) { return false }\n    }\n    // Ensure previous input has been read, so that the handler sees a\n    // consistent view of the document\n    cm.display.input.ensurePolled();\n    var prevShift = cm.display.shift, done = false;\n    try {\n      if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n      if (dropShift) { cm.display.shift = false; }\n      done = bound(cm) != Pass;\n    } finally {\n      cm.display.shift = prevShift;\n      cm.state.suppressEdits = false;\n    }\n    return done\n  }\n\n  function lookupKeyForEditor(cm, name, handle) {\n    for (var i = 0; i < cm.state.keyMaps.length; i++) {\n      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n      if (result) { return result }\n    }\n    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n      || lookupKey(name, cm.options.keyMap, handle, cm)\n  }\n\n  // Note that, despite the name, this function is also used to check\n  // for bound mouse clicks.\n\n  var stopSeq = new Delayed;\n\n  function dispatchKey(cm, name, e, handle) {\n    var seq = cm.state.keySeq;\n    if (seq) {\n      if (isModifierKey(name)) { return \"handled\" }\n      if (/\\'$/.test(name))\n        { cm.state.keySeq = null; }\n      else\n        { stopSeq.set(50, function () {\n          if (cm.state.keySeq == seq) {\n            cm.state.keySeq = null;\n            cm.display.input.reset();\n          }\n        }); }\n      if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n    }\n    return dispatchKeyInner(cm, name, e, handle)\n  }\n\n  function dispatchKeyInner(cm, name, e, handle) {\n    var result = lookupKeyForEditor(cm, name, handle);\n\n    if (result == \"multi\")\n      { cm.state.keySeq = name; }\n    if (result == \"handled\")\n      { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n    if (result == \"handled\" || result == \"multi\") {\n      e_preventDefault(e);\n      restartBlink(cm);\n    }\n\n    return !!result\n  }\n\n  // Handle a key from the keydown event.\n  function handleKeyBinding(cm, e) {\n    var name = keyName(e, true);\n    if (!name) { return false }\n\n    if (e.shiftKey && !cm.state.keySeq) {\n      // First try to resolve full name (including 'Shift-'). Failing\n      // that, see if there is a cursor-motion command (starting with\n      // 'go') bound to the keyname without 'Shift-'.\n      return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n          || dispatchKey(cm, name, e, function (b) {\n               if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n                 { return doHandleBinding(cm, b) }\n             })\n    } else {\n      return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n    }\n  }\n\n  // Handle a key from the keypress event\n  function handleCharBinding(cm, e, ch) {\n    return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n  }\n\n  var lastStoppedKey = null;\n  function onKeyDown(e) {\n    var cm = this;\n    if (e.target && e.target != cm.display.input.getField()) { return }\n    cm.curOp.focus = activeElt(doc(cm));\n    if (signalDOMEvent(cm, e)) { return }\n    // IE does strange things with escape.\n    if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n    var code = e.keyCode;\n    cm.display.shift = code == 16 || e.shiftKey;\n    var handled = handleKeyBinding(cm, e);\n    if (presto) {\n      lastStoppedKey = handled ? code : null;\n      // Opera has no cut event... we try to at least catch the key combo\n      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n        { cm.replaceSelection(\"\", null, \"cut\"); }\n    }\n    if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)\n      { document.execCommand(\"cut\"); }\n\n    // Turn mouse into crosshair when Alt is held on Mac.\n    if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n      { showCrossHair(cm); }\n  }\n\n  function showCrossHair(cm) {\n    var lineDiv = cm.display.lineDiv;\n    addClass(lineDiv, \"CodeMirror-crosshair\");\n\n    function up(e) {\n      if (e.keyCode == 18 || !e.altKey) {\n        rmClass(lineDiv, \"CodeMirror-crosshair\");\n        off(document, \"keyup\", up);\n        off(document, \"mouseover\", up);\n      }\n    }\n    on(document, \"keyup\", up);\n    on(document, \"mouseover\", up);\n  }\n\n  function onKeyUp(e) {\n    if (e.keyCode == 16) { this.doc.sel.shift = false; }\n    signalDOMEvent(this, e);\n  }\n\n  function onKeyPress(e) {\n    var cm = this;\n    if (e.target && e.target != cm.display.input.getField()) { return }\n    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n    var keyCode = e.keyCode, charCode = e.charCode;\n    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n    // Some browsers fire keypress events for backspace\n    if (ch == \"\\x08\") { return }\n    if (handleCharBinding(cm, e, ch)) { return }\n    cm.display.input.onKeyPress(e);\n  }\n\n  var DOUBLECLICK_DELAY = 400;\n\n  var PastClick = function(time, pos, button) {\n    this.time = time;\n    this.pos = pos;\n    this.button = button;\n  };\n\n  PastClick.prototype.compare = function (time, pos, button) {\n    return this.time + DOUBLECLICK_DELAY > time &&\n      cmp(pos, this.pos) == 0 && button == this.button\n  };\n\n  var lastClick, lastDoubleClick;\n  function clickRepeat(pos, button) {\n    var now = +new Date;\n    if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n      lastClick = lastDoubleClick = null;\n      return \"triple\"\n    } else if (lastClick && lastClick.compare(now, pos, button)) {\n      lastDoubleClick = new PastClick(now, pos, button);\n      lastClick = null;\n      return \"double\"\n    } else {\n      lastClick = new PastClick(now, pos, button);\n      lastDoubleClick = null;\n      return \"single\"\n    }\n  }\n\n  // A mouse down can be a single click, double click, triple click,\n  // start of selection drag, start of text drag, new cursor\n  // (ctrl-click), rectangle drag (alt-drag), or xwin\n  // middle-click-paste. Or it might be a click on something we should\n  // not interfere with, such as a scrollbar or widget.\n  function onMouseDown(e) {\n    var cm = this, display = cm.display;\n    if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n    display.input.ensurePolled();\n    display.shift = e.shiftKey;\n\n    if (eventInWidget(display, e)) {\n      if (!webkit) {\n        // Briefly turn off draggability, to allow widgets to do\n        // normal dragging things.\n        display.scroller.draggable = false;\n        setTimeout(function () { return display.scroller.draggable = true; }, 100);\n      }\n      return\n    }\n    if (clickInGutter(cm, e)) { return }\n    var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n    win(cm).focus();\n\n    // #3261: make sure, that we're not starting a second selection\n    if (button == 1 && cm.state.selectingText)\n      { cm.state.selectingText(e); }\n\n    if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n    if (button == 1) {\n      if (pos) { leftButtonDown(cm, pos, repeat, e); }\n      else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n    } else if (button == 2) {\n      if (pos) { extendSelection(cm.doc, pos); }\n      setTimeout(function () { return display.input.focus(); }, 20);\n    } else if (button == 3) {\n      if (captureRightClick) { cm.display.input.onContextMenu(e); }\n      else { delayBlurEvent(cm); }\n    }\n  }\n\n  function handleMappedButton(cm, button, pos, repeat, event) {\n    var name = \"Click\";\n    if (repeat == \"double\") { name = \"Double\" + name; }\n    else if (repeat == \"triple\") { name = \"Triple\" + name; }\n    name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n    return dispatchKey(cm,  addModifierNames(name, event), event, function (bound) {\n      if (typeof bound == \"string\") { bound = commands[bound]; }\n      if (!bound) { return false }\n      var done = false;\n      try {\n        if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n        done = bound(cm, pos) != Pass;\n      } finally {\n        cm.state.suppressEdits = false;\n      }\n      return done\n    })\n  }\n\n  function configureMouse(cm, repeat, event) {\n    var option = cm.getOption(\"configureMouse\");\n    var value = option ? option(cm, repeat, event) : {};\n    if (value.unit == null) {\n      var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n      value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n    }\n    if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n    if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n    if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n    return value\n  }\n\n  function leftButtonDown(cm, pos, repeat, event) {\n    if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n    else { cm.curOp.focus = activeElt(doc(cm)); }\n\n    var behavior = configureMouse(cm, repeat, event);\n\n    var sel = cm.doc.sel, contained;\n    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n        repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n        (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n        (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n      { leftButtonStartDrag(cm, event, pos, behavior); }\n    else\n      { leftButtonSelect(cm, event, pos, behavior); }\n  }\n\n  // Start a text drag. When it ends, see if any dragging actually\n  // happen, and treat as a click if it didn't.\n  function leftButtonStartDrag(cm, event, pos, behavior) {\n    var display = cm.display, moved = false;\n    var dragEnd = operation(cm, function (e) {\n      if (webkit) { display.scroller.draggable = false; }\n      cm.state.draggingText = false;\n      if (cm.state.delayingBlurEvent) {\n        if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }\n        else { delayBlurEvent(cm); }\n      }\n      off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n      off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n      off(display.scroller, \"dragstart\", dragStart);\n      off(display.scroller, \"drop\", dragEnd);\n      if (!moved) {\n        e_preventDefault(e);\n        if (!behavior.addNew)\n          { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n        // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n        if ((webkit && !safari) || ie && ie_version == 9)\n          { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }\n        else\n          { display.input.focus(); }\n      }\n    });\n    var mouseMove = function(e2) {\n      moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n    };\n    var dragStart = function () { return moved = true; };\n    // Let the drag handler handle this.\n    if (webkit) { display.scroller.draggable = true; }\n    cm.state.draggingText = dragEnd;\n    dragEnd.copy = !behavior.moveOnDrag;\n    on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n    on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n    on(display.scroller, \"dragstart\", dragStart);\n    on(display.scroller, \"drop\", dragEnd);\n\n    cm.state.delayingBlurEvent = true;\n    setTimeout(function () { return display.input.focus(); }, 20);\n    // IE's approach to draggable\n    if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n  }\n\n  function rangeForUnit(cm, pos, unit) {\n    if (unit == \"char\") { return new Range(pos, pos) }\n    if (unit == \"word\") { return cm.findWordAt(pos) }\n    if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n    var result = unit(cm, pos);\n    return new Range(result.from, result.to)\n  }\n\n  // Normal selection, as opposed to text dragging.\n  function leftButtonSelect(cm, event, start, behavior) {\n    if (ie) { delayBlurEvent(cm); }\n    var display = cm.display, doc$1 = cm.doc;\n    e_preventDefault(event);\n\n    var ourRange, ourIndex, startSel = doc$1.sel, ranges = startSel.ranges;\n    if (behavior.addNew && !behavior.extend) {\n      ourIndex = doc$1.sel.contains(start);\n      if (ourIndex > -1)\n        { ourRange = ranges[ourIndex]; }\n      else\n        { ourRange = new Range(start, start); }\n    } else {\n      ourRange = doc$1.sel.primary();\n      ourIndex = doc$1.sel.primIndex;\n    }\n\n    if (behavior.unit == \"rectangle\") {\n      if (!behavior.addNew) { ourRange = new Range(start, start); }\n      start = posFromMouse(cm, event, true, true);\n      ourIndex = -1;\n    } else {\n      var range = rangeForUnit(cm, start, behavior.unit);\n      if (behavior.extend)\n        { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }\n      else\n        { ourRange = range; }\n    }\n\n    if (!behavior.addNew) {\n      ourIndex = 0;\n      setSelection(doc$1, new Selection([ourRange], 0), sel_mouse);\n      startSel = doc$1.sel;\n    } else if (ourIndex == -1) {\n      ourIndex = ranges.length;\n      setSelection(doc$1, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n                   {scroll: false, origin: \"*mouse\"});\n    } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n      setSelection(doc$1, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n                   {scroll: false, origin: \"*mouse\"});\n      startSel = doc$1.sel;\n    } else {\n      replaceOneSelection(doc$1, ourIndex, ourRange, sel_mouse);\n    }\n\n    var lastPos = start;\n    function extendTo(pos) {\n      if (cmp(lastPos, pos) == 0) { return }\n      lastPos = pos;\n\n      if (behavior.unit == \"rectangle\") {\n        var ranges = [], tabSize = cm.options.tabSize;\n        var startCol = countColumn(getLine(doc$1, start.line).text, start.ch, tabSize);\n        var posCol = countColumn(getLine(doc$1, pos.line).text, pos.ch, tabSize);\n        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n             line <= end; line++) {\n          var text = getLine(doc$1, line).text, leftPos = findColumn(text, left, tabSize);\n          if (left == right)\n            { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n          else if (text.length > leftPos)\n            { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n        }\n        if (!ranges.length) { ranges.push(new Range(start, start)); }\n        setSelection(doc$1, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n                     {origin: \"*mouse\", scroll: false});\n        cm.scrollIntoView(pos);\n      } else {\n        var oldRange = ourRange;\n        var range = rangeForUnit(cm, pos, behavior.unit);\n        var anchor = oldRange.anchor, head;\n        if (cmp(range.anchor, anchor) > 0) {\n          head = range.head;\n          anchor = minPos(oldRange.from(), range.anchor);\n        } else {\n          head = range.anchor;\n          anchor = maxPos(oldRange.to(), range.head);\n        }\n        var ranges$1 = startSel.ranges.slice(0);\n        ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc$1, anchor), head));\n        setSelection(doc$1, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n      }\n    }\n\n    var editorSize = display.wrapper.getBoundingClientRect();\n    // Used to ensure timeout re-tries don't fire when another extend\n    // happened in the meantime (clearTimeout isn't reliable -- at\n    // least on Chrome, the timeouts still happen even when cleared,\n    // if the clear happens after their scheduled firing time).\n    var counter = 0;\n\n    function extend(e) {\n      var curCount = ++counter;\n      var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n      if (!cur) { return }\n      if (cmp(cur, lastPos) != 0) {\n        cm.curOp.focus = activeElt(doc(cm));\n        extendTo(cur);\n        var visible = visibleLines(display, doc$1);\n        if (cur.line >= visible.to || cur.line < visible.from)\n          { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n      } else {\n        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n        if (outside) { setTimeout(operation(cm, function () {\n          if (counter != curCount) { return }\n          display.scroller.scrollTop += outside;\n          extend(e);\n        }), 50); }\n      }\n    }\n\n    function done(e) {\n      cm.state.selectingText = false;\n      counter = Infinity;\n      // If e is null or undefined we interpret this as someone trying\n      // to explicitly cancel the selection rather than the user\n      // letting go of the mouse button.\n      if (e) {\n        e_preventDefault(e);\n        display.input.focus();\n      }\n      off(display.wrapper.ownerDocument, \"mousemove\", move);\n      off(display.wrapper.ownerDocument, \"mouseup\", up);\n      doc$1.history.lastSelOrigin = null;\n    }\n\n    var move = operation(cm, function (e) {\n      if (e.buttons === 0 || !e_button(e)) { done(e); }\n      else { extend(e); }\n    });\n    var up = operation(cm, done);\n    cm.state.selectingText = up;\n    on(display.wrapper.ownerDocument, \"mousemove\", move);\n    on(display.wrapper.ownerDocument, \"mouseup\", up);\n  }\n\n  // Used when mouse-selecting to adjust the anchor to the proper side\n  // of a bidi jump depending on the visual position of the head.\n  function bidiSimplify(cm, range) {\n    var anchor = range.anchor;\n    var head = range.head;\n    var anchorLine = getLine(cm.doc, anchor.line);\n    if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n    var order = getOrder(anchorLine);\n    if (!order) { return range }\n    var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n    if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n    var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n    if (boundary == 0 || boundary == order.length) { return range }\n\n    // Compute the relative visual position of the head compared to the\n    // anchor (<0 is to the left, >0 to the right)\n    var leftSide;\n    if (head.line != anchor.line) {\n      leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n    } else {\n      var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n      var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n      if (headIndex == boundary - 1 || headIndex == boundary)\n        { leftSide = dir < 0; }\n      else\n        { leftSide = dir > 0; }\n    }\n\n    var usePart = order[boundary + (leftSide ? -1 : 0)];\n    var from = leftSide == (usePart.level == 1);\n    var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n    return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n  }\n\n\n  // Determines whether an event happened in the gutter, and fires the\n  // handlers for the corresponding event.\n  function gutterEvent(cm, e, type, prevent) {\n    var mX, mY;\n    if (e.touches) {\n      mX = e.touches[0].clientX;\n      mY = e.touches[0].clientY;\n    } else {\n      try { mX = e.clientX; mY = e.clientY; }\n      catch(e$1) { return false }\n    }\n    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n    if (prevent) { e_preventDefault(e); }\n\n    var display = cm.display;\n    var lineBox = display.lineDiv.getBoundingClientRect();\n\n    if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n    mY -= lineBox.top - display.viewOffset;\n\n    for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n      var g = display.gutters.childNodes[i];\n      if (g && g.getBoundingClientRect().right >= mX) {\n        var line = lineAtHeight(cm.doc, mY);\n        var gutter = cm.display.gutterSpecs[i];\n        signal(cm, type, cm, line, gutter.className, e);\n        return e_defaultPrevented(e)\n      }\n    }\n  }\n\n  function clickInGutter(cm, e) {\n    return gutterEvent(cm, e, \"gutterClick\", true)\n  }\n\n  // CONTEXT MENU HANDLING\n\n  // To make the context menu work, we need to briefly unhide the\n  // textarea (making it as unobtrusive as possible) to let the\n  // right-click take effect on it.\n  function onContextMenu(cm, e) {\n    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n    if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n    if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n  }\n\n  function contextMenuInGutter(cm, e) {\n    if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n    return gutterEvent(cm, e, \"gutterContextMenu\", false)\n  }\n\n  function themeChanged(cm) {\n    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n      cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n    clearCaches(cm);\n  }\n\n  var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n  var defaults = {};\n  var optionHandlers = {};\n\n  function defineOptions(CodeMirror) {\n    var optionHandlers = CodeMirror.optionHandlers;\n\n    function option(name, deflt, handle, notOnInit) {\n      CodeMirror.defaults[name] = deflt;\n      if (handle) { optionHandlers[name] =\n        notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n    }\n\n    CodeMirror.defineOption = option;\n\n    // Passed to option handlers when there is no old value.\n    CodeMirror.Init = Init;\n\n    // These two are, on init, called from the constructor because they\n    // have to be initialized before the editor can start at all.\n    option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n    option(\"mode\", null, function (cm, val) {\n      cm.doc.modeOption = val;\n      loadMode(cm);\n    }, true);\n\n    option(\"indentUnit\", 2, loadMode, true);\n    option(\"indentWithTabs\", false);\n    option(\"smartIndent\", true);\n    option(\"tabSize\", 4, function (cm) {\n      resetModeState(cm);\n      clearCaches(cm);\n      regChange(cm);\n    }, true);\n\n    option(\"lineSeparator\", null, function (cm, val) {\n      cm.doc.lineSep = val;\n      if (!val) { return }\n      var newBreaks = [], lineNo = cm.doc.first;\n      cm.doc.iter(function (line) {\n        for (var pos = 0;;) {\n          var found = line.text.indexOf(val, pos);\n          if (found == -1) { break }\n          pos = found + val.length;\n          newBreaks.push(Pos(lineNo, found));\n        }\n        lineNo++;\n      });\n      for (var i = newBreaks.length - 1; i >= 0; i--)\n        { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n    });\n    option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b\\u200e\\u200f\\u2028\\u2029\\u202d\\u202e\\u2066\\u2067\\u2069\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n      cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n      if (old != Init) { cm.refresh(); }\n    });\n    option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n    option(\"electricChars\", true);\n    option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n      throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n    }, true);\n    option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n    option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n    option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n    option(\"rtlMoveVisually\", !windows);\n    option(\"wholeLineUpdateBefore\", true);\n\n    option(\"theme\", \"default\", function (cm) {\n      themeChanged(cm);\n      updateGutters(cm);\n    }, true);\n    option(\"keyMap\", \"default\", function (cm, val, old) {\n      var next = getKeyMap(val);\n      var prev = old != Init && getKeyMap(old);\n      if (prev && prev.detach) { prev.detach(cm, next); }\n      if (next.attach) { next.attach(cm, prev || null); }\n    });\n    option(\"extraKeys\", null);\n    option(\"configureMouse\", null);\n\n    option(\"lineWrapping\", false, wrappingChanged, true);\n    option(\"gutters\", [], function (cm, val) {\n      cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n      updateGutters(cm);\n    }, true);\n    option(\"fixedGutter\", true, function (cm, val) {\n      cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n      cm.refresh();\n    }, true);\n    option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n    option(\"scrollbarStyle\", \"native\", function (cm) {\n      initScrollbars(cm);\n      updateScrollbars(cm);\n      cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n      cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n    }, true);\n    option(\"lineNumbers\", false, function (cm, val) {\n      cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n      updateGutters(cm);\n    }, true);\n    option(\"firstLineNumber\", 1, updateGutters, true);\n    option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n    option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n    option(\"resetSelectionOnContextMenu\", true);\n    option(\"lineWiseCopyCut\", true);\n    option(\"pasteLinesPerSelection\", true);\n    option(\"selectionsMayTouch\", false);\n\n    option(\"readOnly\", false, function (cm, val) {\n      if (val == \"nocursor\") {\n        onBlur(cm);\n        cm.display.input.blur();\n      }\n      cm.display.input.readOnlyChanged(val);\n    });\n\n    option(\"screenReaderLabel\", null, function (cm, val) {\n      val = (val === '') ? null : val;\n      cm.display.input.screenReaderLabelChanged(val);\n    });\n\n    option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n    option(\"dragDrop\", true, dragDropChanged);\n    option(\"allowDropFileTypes\", null);\n\n    option(\"cursorBlinkRate\", 530);\n    option(\"cursorScrollMargin\", 0);\n    option(\"cursorHeight\", 1, updateSelection, true);\n    option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n    option(\"workTime\", 100);\n    option(\"workDelay\", 100);\n    option(\"flattenSpans\", true, resetModeState, true);\n    option(\"addModeClass\", false, resetModeState, true);\n    option(\"pollInterval\", 100);\n    option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n    option(\"historyEventDelay\", 1250);\n    option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n    option(\"maxHighlightLength\", 10000, resetModeState, true);\n    option(\"moveInputWithCursor\", true, function (cm, val) {\n      if (!val) { cm.display.input.resetPosition(); }\n    });\n\n    option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n    option(\"autofocus\", null);\n    option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n    option(\"phrases\", null);\n  }\n\n  function dragDropChanged(cm, value, old) {\n    var wasOn = old && old != Init;\n    if (!value != !wasOn) {\n      var funcs = cm.display.dragFunctions;\n      var toggle = value ? on : off;\n      toggle(cm.display.scroller, \"dragstart\", funcs.start);\n      toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n      toggle(cm.display.scroller, \"dragover\", funcs.over);\n      toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n      toggle(cm.display.scroller, \"drop\", funcs.drop);\n    }\n  }\n\n  function wrappingChanged(cm) {\n    if (cm.options.lineWrapping) {\n      addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      cm.display.sizer.style.minWidth = \"\";\n      cm.display.sizerWidth = null;\n    } else {\n      rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n      findMaxLine(cm);\n    }\n    estimateLineHeights(cm);\n    regChange(cm);\n    clearCaches(cm);\n    setTimeout(function () { return updateScrollbars(cm); }, 100);\n  }\n\n  // A CodeMirror instance represents an editor. This is the object\n  // that user code is usually dealing with.\n\n  function CodeMirror(place, options) {\n    var this$1 = this;\n\n    if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n    this.options = options = options ? copyObj(options) : {};\n    // Determine effective options based on given values and defaults.\n    copyObj(defaults, options, false);\n\n    var doc = options.value;\n    if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n    else if (options.mode) { doc.modeOption = options.mode; }\n    this.doc = doc;\n\n    var input = new CodeMirror.inputStyles[options.inputStyle](this);\n    var display = this.display = new Display(place, doc, input, options);\n    display.wrapper.CodeMirror = this;\n    themeChanged(this);\n    if (options.lineWrapping)\n      { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n    initScrollbars(this);\n\n    this.state = {\n      keyMaps: [],  // stores maps added by addKeyMap\n      overlays: [], // highlighting overlays, as added by addOverlay\n      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info\n      overwrite: false,\n      delayingBlurEvent: false,\n      focused: false,\n      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n      pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n      selectingText: false,\n      draggingText: false,\n      highlight: new Delayed(), // stores highlight worker timeout\n      keySeq: null,  // Unfinished key sequence\n      specialChars: null\n    };\n\n    if (options.autofocus && !mobile) { display.input.focus(); }\n\n    // Override magic textarea content restore that IE sometimes does\n    // on our hidden textarea on reload\n    if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n    registerEventHandlers(this);\n    ensureGlobalHandlers();\n\n    startOperation(this);\n    this.curOp.forceUpdate = true;\n    attachDoc(this, doc);\n\n    if ((options.autofocus && !mobile) || this.hasFocus())\n      { setTimeout(function () {\n        if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }\n      }, 20); }\n    else\n      { onBlur(this); }\n\n    for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n      { optionHandlers[opt](this, options[opt], Init); } }\n    maybeUpdateLineNumberWidth(this);\n    if (options.finishInit) { options.finishInit(this); }\n    for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }\n    endOperation(this);\n    // Suppress optimizelegibility in Webkit, since it breaks text\n    // measuring on line wrapping boundaries.\n    if (webkit && options.lineWrapping &&\n        getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n      { display.lineDiv.style.textRendering = \"auto\"; }\n  }\n\n  // The default configuration options.\n  CodeMirror.defaults = defaults;\n  // Functions to run when options are changed.\n  CodeMirror.optionHandlers = optionHandlers;\n\n  // Attach the necessary event handlers when initializing the editor\n  function registerEventHandlers(cm) {\n    var d = cm.display;\n    on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n    // Older IE's will not fire a second mousedown for a double click\n    if (ie && ie_version < 11)\n      { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n        if (signalDOMEvent(cm, e)) { return }\n        var pos = posFromMouse(cm, e);\n        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n        e_preventDefault(e);\n        var word = cm.findWordAt(pos);\n        extendSelection(cm.doc, word.anchor, word.head);\n      })); }\n    else\n      { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n    // Some browsers fire contextmenu *after* opening the menu, at\n    // which point we can't mess with it anymore. Context menu is\n    // handled in onMouseDown for these browsers.\n    on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n    on(d.input.getField(), \"contextmenu\", function (e) {\n      if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }\n    });\n\n    // Used to suppress mouse event handling when a touch happens\n    var touchFinished, prevTouch = {end: 0};\n    function finishTouch() {\n      if (d.activeTouch) {\n        touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n        prevTouch = d.activeTouch;\n        prevTouch.end = +new Date;\n      }\n    }\n    function isMouseLikeTouchEvent(e) {\n      if (e.touches.length != 1) { return false }\n      var touch = e.touches[0];\n      return touch.radiusX <= 1 && touch.radiusY <= 1\n    }\n    function farAway(touch, other) {\n      if (other.left == null) { return true }\n      var dx = other.left - touch.left, dy = other.top - touch.top;\n      return dx * dx + dy * dy > 20 * 20\n    }\n    on(d.scroller, \"touchstart\", function (e) {\n      if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n        d.input.ensurePolled();\n        clearTimeout(touchFinished);\n        var now = +new Date;\n        d.activeTouch = {start: now, moved: false,\n                         prev: now - prevTouch.end <= 300 ? prevTouch : null};\n        if (e.touches.length == 1) {\n          d.activeTouch.left = e.touches[0].pageX;\n          d.activeTouch.top = e.touches[0].pageY;\n        }\n      }\n    });\n    on(d.scroller, \"touchmove\", function () {\n      if (d.activeTouch) { d.activeTouch.moved = true; }\n    });\n    on(d.scroller, \"touchend\", function (e) {\n      var touch = d.activeTouch;\n      if (touch && !eventInWidget(d, e) && touch.left != null &&\n          !touch.moved && new Date - touch.start < 300) {\n        var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n        if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n          { range = new Range(pos, pos); }\n        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n          { range = cm.findWordAt(pos); }\n        else // Triple tap\n          { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n        cm.setSelection(range.anchor, range.head);\n        cm.focus();\n        e_preventDefault(e);\n      }\n      finishTouch();\n    });\n    on(d.scroller, \"touchcancel\", finishTouch);\n\n    // Sync scrolling between fake scrollbars and real scrollable\n    // area, ensure viewport is updated when scrolling.\n    on(d.scroller, \"scroll\", function () {\n      if (d.scroller.clientHeight) {\n        updateScrollTop(cm, d.scroller.scrollTop);\n        setScrollLeft(cm, d.scroller.scrollLeft, true);\n        signal(cm, \"scroll\", cm);\n      }\n    });\n\n    // Listen to wheel events in order to try and update the viewport on time.\n    on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n    on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n    // Prevent wrapper from ever scrolling\n    on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n    d.dragFunctions = {\n      enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n      over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n      start: function (e) { return onDragStart(cm, e); },\n      drop: operation(cm, onDrop),\n      leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n    };\n\n    var inp = d.input.getField();\n    on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n    on(inp, \"keydown\", operation(cm, onKeyDown));\n    on(inp, \"keypress\", operation(cm, onKeyPress));\n    on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n    on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n  }\n\n  var initHooks = [];\n  CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n  // Indent the given line. The how parameter can be \"smart\",\n  // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n  // (typically set to true for forced single-line indents), empty\n  // lines are not indented, and places where the mode returns Pass\n  // are left alone.\n  function indentLine(cm, n, how, aggressive) {\n    var doc = cm.doc, state;\n    if (how == null) { how = \"add\"; }\n    if (how == \"smart\") {\n      // Fall back to \"prev\" when the mode doesn't have an indentation\n      // method.\n      if (!doc.mode.indent) { how = \"prev\"; }\n      else { state = getContextBefore(cm, n).state; }\n    }\n\n    var tabSize = cm.options.tabSize;\n    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n    if (line.stateAfter) { line.stateAfter = null; }\n    var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n    if (!aggressive && !/\\S/.test(line.text)) {\n      indentation = 0;\n      how = \"not\";\n    } else if (how == \"smart\") {\n      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n      if (indentation == Pass || indentation > 150) {\n        if (!aggressive) { return }\n        how = \"prev\";\n      }\n    }\n    if (how == \"prev\") {\n      if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n      else { indentation = 0; }\n    } else if (how == \"add\") {\n      indentation = curSpace + cm.options.indentUnit;\n    } else if (how == \"subtract\") {\n      indentation = curSpace - cm.options.indentUnit;\n    } else if (typeof how == \"number\") {\n      indentation = curSpace + how;\n    }\n    indentation = Math.max(0, indentation);\n\n    var indentString = \"\", pos = 0;\n    if (cm.options.indentWithTabs)\n      { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n    if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n    if (indentString != curSpaceString) {\n      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n      line.stateAfter = null;\n      return true\n    } else {\n      // Ensure that, if the cursor was in the whitespace at the start\n      // of the line, it is moved to the end of that space.\n      for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n        var range = doc.sel.ranges[i$1];\n        if (range.head.line == n && range.head.ch < curSpaceString.length) {\n          var pos$1 = Pos(n, curSpaceString.length);\n          replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n          break\n        }\n      }\n    }\n  }\n\n  // This will be set to a {lineWise: bool, text: [string]} object, so\n  // that, when pasting, we know what kind of selections the copied\n  // text was made out of.\n  var lastCopied = null;\n\n  function setLastCopied(newLastCopied) {\n    lastCopied = newLastCopied;\n  }\n\n  function applyTextInput(cm, inserted, deleted, sel, origin) {\n    var doc = cm.doc;\n    cm.display.shift = false;\n    if (!sel) { sel = doc.sel; }\n\n    var recent = +new Date - 200;\n    var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n    var textLines = splitLinesAuto(inserted), multiPaste = null;\n    // When pasting N lines into N selections, insert one line per selection\n    if (paste && sel.ranges.length > 1) {\n      if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n        if (sel.ranges.length % lastCopied.text.length == 0) {\n          multiPaste = [];\n          for (var i = 0; i < lastCopied.text.length; i++)\n            { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n        }\n      } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n        multiPaste = map(textLines, function (l) { return [l]; });\n      }\n    }\n\n    var updateInput = cm.curOp.updateInput;\n    // Normal behavior is to insert the new text into every selection\n    for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n      var range = sel.ranges[i$1];\n      var from = range.from(), to = range.to();\n      if (range.empty()) {\n        if (deleted && deleted > 0) // Handle deletion\n          { from = Pos(from.line, from.ch - deleted); }\n        else if (cm.state.overwrite && !paste) // Handle overwrite\n          { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n        else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == textLines.join(\"\\n\"))\n          { from = to = Pos(from.line, 0); }\n      }\n      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n                         origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n      makeChange(cm.doc, changeEvent);\n      signalLater(cm, \"inputRead\", cm, changeEvent);\n    }\n    if (inserted && !paste)\n      { triggerElectric(cm, inserted); }\n\n    ensureCursorVisible(cm);\n    if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n    cm.curOp.typing = true;\n    cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n  }\n\n  function handlePaste(e, cm) {\n    var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n    if (pasted) {\n      e.preventDefault();\n      if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())\n        { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n      return true\n    }\n  }\n\n  function triggerElectric(cm, inserted) {\n    // When an 'electric' character is inserted, immediately trigger a reindent\n    if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n    var sel = cm.doc.sel;\n\n    for (var i = sel.ranges.length - 1; i >= 0; i--) {\n      var range = sel.ranges[i];\n      if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }\n      var mode = cm.getModeAt(range.head);\n      var indented = false;\n      if (mode.electricChars) {\n        for (var j = 0; j < mode.electricChars.length; j++)\n          { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n            indented = indentLine(cm, range.head.line, \"smart\");\n            break\n          } }\n      } else if (mode.electricInput) {\n        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n          { indented = indentLine(cm, range.head.line, \"smart\"); }\n      }\n      if (indented) { signalLater(cm, \"electricInput\", cm, range.head.line); }\n    }\n  }\n\n  function copyableRanges(cm) {\n    var text = [], ranges = [];\n    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n      var line = cm.doc.sel.ranges[i].head.line;\n      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n      ranges.push(lineRange);\n      text.push(cm.getRange(lineRange.anchor, lineRange.head));\n    }\n    return {text: text, ranges: ranges}\n  }\n\n  function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n    field.setAttribute(\"autocorrect\", autocorrect ? \"on\" : \"off\");\n    field.setAttribute(\"autocapitalize\", autocapitalize ? \"on\" : \"off\");\n    field.setAttribute(\"spellcheck\", !!spellcheck);\n  }\n\n  function hiddenTextarea() {\n    var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none\");\n    var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n    // The textarea is kept positioned near the cursor to prevent the\n    // fact that it'll be scrolled into view on input from scrolling\n    // our fake cursor out of view. On webkit, when wrap=off, paste is\n    // very slow. So make the area wide instead.\n    if (webkit) { te.style.width = \"1000px\"; }\n    else { te.setAttribute(\"wrap\", \"off\"); }\n    // If border: 0; -- iOS fails to open keyboard (issue #1287)\n    if (ios) { te.style.border = \"1px solid black\"; }\n    return div\n  }\n\n  // The publicly visible API. Note that methodOp(f) means\n  // 'wrap f in an operation, performed on its `this` parameter'.\n\n  // This is not the complete set of editor methods. Most of the\n  // methods defined on the Doc type are also injected into\n  // CodeMirror.prototype, for backwards compatibility and\n  // convenience.\n\n  function addEditorMethods(CodeMirror) {\n    var optionHandlers = CodeMirror.optionHandlers;\n\n    var helpers = CodeMirror.helpers = {};\n\n    CodeMirror.prototype = {\n      constructor: CodeMirror,\n      focus: function(){win(this).focus(); this.display.input.focus();},\n\n      setOption: function(option, value) {\n        var options = this.options, old = options[option];\n        if (options[option] == value && option != \"mode\") { return }\n        options[option] = value;\n        if (optionHandlers.hasOwnProperty(option))\n          { operation(this, optionHandlers[option])(this, value, old); }\n        signal(this, \"optionChange\", this, option);\n      },\n\n      getOption: function(option) {return this.options[option]},\n      getDoc: function() {return this.doc},\n\n      addKeyMap: function(map, bottom) {\n        this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n      },\n      removeKeyMap: function(map) {\n        var maps = this.state.keyMaps;\n        for (var i = 0; i < maps.length; ++i)\n          { if (maps[i] == map || maps[i].name == map) {\n            maps.splice(i, 1);\n            return true\n          } }\n      },\n\n      addOverlay: methodOp(function(spec, options) {\n        var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n        if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n        insertSorted(this.state.overlays,\n                     {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n                      priority: (options && options.priority) || 0},\n                     function (overlay) { return overlay.priority; });\n        this.state.modeGen++;\n        regChange(this);\n      }),\n      removeOverlay: methodOp(function(spec) {\n        var overlays = this.state.overlays;\n        for (var i = 0; i < overlays.length; ++i) {\n          var cur = overlays[i].modeSpec;\n          if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n            overlays.splice(i, 1);\n            this.state.modeGen++;\n            regChange(this);\n            return\n          }\n        }\n      }),\n\n      indentLine: methodOp(function(n, dir, aggressive) {\n        if (typeof dir != \"string\" && typeof dir != \"number\") {\n          if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n          else { dir = dir ? \"add\" : \"subtract\"; }\n        }\n        if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n      }),\n      indentSelection: methodOp(function(how) {\n        var ranges = this.doc.sel.ranges, end = -1;\n        for (var i = 0; i < ranges.length; i++) {\n          var range = ranges[i];\n          if (!range.empty()) {\n            var from = range.from(), to = range.to();\n            var start = Math.max(end, from.line);\n            end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n            for (var j = start; j < end; ++j)\n              { indentLine(this, j, how); }\n            var newRanges = this.doc.sel.ranges;\n            if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n              { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n          } else if (range.head.line > end) {\n            indentLine(this, range.head.line, how, true);\n            end = range.head.line;\n            if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }\n          }\n        }\n      }),\n\n      // Fetch the parser token for a given character. Useful for hacks\n      // that want to inspect the mode state (say, for completion).\n      getTokenAt: function(pos, precise) {\n        return takeToken(this, pos, precise)\n      },\n\n      getLineTokens: function(line, precise) {\n        return takeToken(this, Pos(line), precise, true)\n      },\n\n      getTokenTypeAt: function(pos) {\n        pos = clipPos(this.doc, pos);\n        var styles = getLineStyles(this, getLine(this.doc, pos.line));\n        var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n        var type;\n        if (ch == 0) { type = styles[2]; }\n        else { for (;;) {\n          var mid = (before + after) >> 1;\n          if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n          else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n          else { type = styles[mid * 2 + 2]; break }\n        } }\n        var cut = type ? type.indexOf(\"overlay \") : -1;\n        return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n      },\n\n      getModeAt: function(pos) {\n        var mode = this.doc.mode;\n        if (!mode.innerMode) { return mode }\n        return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n      },\n\n      getHelper: function(pos, type) {\n        return this.getHelpers(pos, type)[0]\n      },\n\n      getHelpers: function(pos, type) {\n        var found = [];\n        if (!helpers.hasOwnProperty(type)) { return found }\n        var help = helpers[type], mode = this.getModeAt(pos);\n        if (typeof mode[type] == \"string\") {\n          if (help[mode[type]]) { found.push(help[mode[type]]); }\n        } else if (mode[type]) {\n          for (var i = 0; i < mode[type].length; i++) {\n            var val = help[mode[type][i]];\n            if (val) { found.push(val); }\n          }\n        } else if (mode.helperType && help[mode.helperType]) {\n          found.push(help[mode.helperType]);\n        } else if (help[mode.name]) {\n          found.push(help[mode.name]);\n        }\n        for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n          var cur = help._global[i$1];\n          if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n            { found.push(cur.val); }\n        }\n        return found\n      },\n\n      getStateAfter: function(line, precise) {\n        var doc = this.doc;\n        line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n        return getContextBefore(this, line + 1, precise).state\n      },\n\n      cursorCoords: function(start, mode) {\n        var pos, range = this.doc.sel.primary();\n        if (start == null) { pos = range.head; }\n        else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n        else { pos = start ? range.from() : range.to(); }\n        return cursorCoords(this, pos, mode || \"page\")\n      },\n\n      charCoords: function(pos, mode) {\n        return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n      },\n\n      coordsChar: function(coords, mode) {\n        coords = fromCoordSystem(this, coords, mode || \"page\");\n        return coordsChar(this, coords.left, coords.top)\n      },\n\n      lineAtHeight: function(height, mode) {\n        height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n        return lineAtHeight(this.doc, height + this.display.viewOffset)\n      },\n      heightAtLine: function(line, mode, includeWidgets) {\n        var end = false, lineObj;\n        if (typeof line == \"number\") {\n          var last = this.doc.first + this.doc.size - 1;\n          if (line < this.doc.first) { line = this.doc.first; }\n          else if (line > last) { line = last; end = true; }\n          lineObj = getLine(this.doc, line);\n        } else {\n          lineObj = line;\n        }\n        return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n          (end ? this.doc.height - heightAtLine(lineObj) : 0)\n      },\n\n      defaultTextHeight: function() { return textHeight(this.display) },\n      defaultCharWidth: function() { return charWidth(this.display) },\n\n      getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n      addWidget: function(pos, node, scroll, vert, horiz) {\n        var display = this.display;\n        pos = cursorCoords(this, clipPos(this.doc, pos));\n        var top = pos.bottom, left = pos.left;\n        node.style.position = \"absolute\";\n        node.setAttribute(\"cm-ignore-events\", \"true\");\n        this.display.input.setUneditable(node);\n        display.sizer.appendChild(node);\n        if (vert == \"over\") {\n          top = pos.top;\n        } else if (vert == \"above\" || vert == \"near\") {\n          var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n          hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n          // Default to positioning above (if specified and possible); otherwise default to positioning below\n          if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n            { top = pos.top - node.offsetHeight; }\n          else if (pos.bottom + node.offsetHeight <= vspace)\n            { top = pos.bottom; }\n          if (left + node.offsetWidth > hspace)\n            { left = hspace - node.offsetWidth; }\n        }\n        node.style.top = top + \"px\";\n        node.style.left = node.style.right = \"\";\n        if (horiz == \"right\") {\n          left = display.sizer.clientWidth - node.offsetWidth;\n          node.style.right = \"0px\";\n        } else {\n          if (horiz == \"left\") { left = 0; }\n          else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n          node.style.left = left + \"px\";\n        }\n        if (scroll)\n          { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n      },\n\n      triggerOnKeyDown: methodOp(onKeyDown),\n      triggerOnKeyPress: methodOp(onKeyPress),\n      triggerOnKeyUp: onKeyUp,\n      triggerOnMouseDown: methodOp(onMouseDown),\n\n      execCommand: function(cmd) {\n        if (commands.hasOwnProperty(cmd))\n          { return commands[cmd].call(null, this) }\n      },\n\n      triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n      findPosH: function(from, amount, unit, visually) {\n        var dir = 1;\n        if (amount < 0) { dir = -1; amount = -amount; }\n        var cur = clipPos(this.doc, from);\n        for (var i = 0; i < amount; ++i) {\n          cur = findPosH(this.doc, cur, dir, unit, visually);\n          if (cur.hitSide) { break }\n        }\n        return cur\n      },\n\n      moveH: methodOp(function(dir, unit) {\n        var this$1 = this;\n\n        this.extendSelectionsBy(function (range) {\n          if (this$1.display.shift || this$1.doc.extend || range.empty())\n            { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }\n          else\n            { return dir < 0 ? range.from() : range.to() }\n        }, sel_move);\n      }),\n\n      deleteH: methodOp(function(dir, unit) {\n        var sel = this.doc.sel, doc = this.doc;\n        if (sel.somethingSelected())\n          { doc.replaceSelection(\"\", null, \"+delete\"); }\n        else\n          { deleteNearSelection(this, function (range) {\n            var other = findPosH(doc, range.head, dir, unit, false);\n            return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}\n          }); }\n      }),\n\n      findPosV: function(from, amount, unit, goalColumn) {\n        var dir = 1, x = goalColumn;\n        if (amount < 0) { dir = -1; amount = -amount; }\n        var cur = clipPos(this.doc, from);\n        for (var i = 0; i < amount; ++i) {\n          var coords = cursorCoords(this, cur, \"div\");\n          if (x == null) { x = coords.left; }\n          else { coords.left = x; }\n          cur = findPosV(this, coords, dir, unit);\n          if (cur.hitSide) { break }\n        }\n        return cur\n      },\n\n      moveV: methodOp(function(dir, unit) {\n        var this$1 = this;\n\n        var doc = this.doc, goals = [];\n        var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n        doc.extendSelectionsBy(function (range) {\n          if (collapse)\n            { return dir < 0 ? range.from() : range.to() }\n          var headPos = cursorCoords(this$1, range.head, \"div\");\n          if (range.goalColumn != null) { headPos.left = range.goalColumn; }\n          goals.push(headPos.left);\n          var pos = findPosV(this$1, headPos, dir, unit);\n          if (unit == \"page\" && range == doc.sel.primary())\n            { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n          return pos\n        }, sel_move);\n        if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n          { doc.sel.ranges[i].goalColumn = goals[i]; } }\n      }),\n\n      // Find the word at the given position (as returned by coordsChar).\n      findWordAt: function(pos) {\n        var doc = this.doc, line = getLine(doc, pos.line).text;\n        var start = pos.ch, end = pos.ch;\n        if (line) {\n          var helper = this.getHelper(pos, \"wordChars\");\n          if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n          var startChar = line.charAt(start);\n          var check = isWordChar(startChar, helper)\n            ? function (ch) { return isWordChar(ch, helper); }\n            : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n            : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n          while (start > 0 && check(line.charAt(start - 1))) { --start; }\n          while (end < line.length && check(line.charAt(end))) { ++end; }\n        }\n        return new Range(Pos(pos.line, start), Pos(pos.line, end))\n      },\n\n      toggleOverwrite: function(value) {\n        if (value != null && value == this.state.overwrite) { return }\n        if (this.state.overwrite = !this.state.overwrite)\n          { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n        else\n          { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n        signal(this, \"overwriteToggle\", this, this.state.overwrite);\n      },\n      hasFocus: function() { return this.display.input.getField() == activeElt(doc(this)) },\n      isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n      scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n      getScrollInfo: function() {\n        var scroller = this.display.scroller;\n        return {left: scroller.scrollLeft, top: scroller.scrollTop,\n                height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n                width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n                clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n      },\n\n      scrollIntoView: methodOp(function(range, margin) {\n        if (range == null) {\n          range = {from: this.doc.sel.primary().head, to: null};\n          if (margin == null) { margin = this.options.cursorScrollMargin; }\n        } else if (typeof range == \"number\") {\n          range = {from: Pos(range, 0), to: null};\n        } else if (range.from == null) {\n          range = {from: range, to: null};\n        }\n        if (!range.to) { range.to = range.from; }\n        range.margin = margin || 0;\n\n        if (range.from.line != null) {\n          scrollToRange(this, range);\n        } else {\n          scrollToCoordsRange(this, range.from, range.to, range.margin);\n        }\n      }),\n\n      setSize: methodOp(function(width, height) {\n        var this$1 = this;\n\n        var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n        if (width != null) { this.display.wrapper.style.width = interpret(width); }\n        if (height != null) { this.display.wrapper.style.height = interpret(height); }\n        if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n        var lineNo = this.display.viewFrom;\n        this.doc.iter(lineNo, this.display.viewTo, function (line) {\n          if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n            { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, \"widget\"); break } } }\n          ++lineNo;\n        });\n        this.curOp.forceUpdate = true;\n        signal(this, \"refresh\", this);\n      }),\n\n      operation: function(f){return runInOp(this, f)},\n      startOperation: function(){return startOperation(this)},\n      endOperation: function(){return endOperation(this)},\n\n      refresh: methodOp(function() {\n        var oldHeight = this.display.cachedTextHeight;\n        regChange(this);\n        this.curOp.forceUpdate = true;\n        clearCaches(this);\n        scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n        updateGutterSpace(this.display);\n        if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)\n          { estimateLineHeights(this); }\n        signal(this, \"refresh\", this);\n      }),\n\n      swapDoc: methodOp(function(doc) {\n        var old = this.doc;\n        old.cm = null;\n        // Cancel the current text selection if any (#5821)\n        if (this.state.selectingText) { this.state.selectingText(); }\n        attachDoc(this, doc);\n        clearCaches(this);\n        this.display.input.reset();\n        scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n        this.curOp.forceScroll = true;\n        signalLater(this, \"swapDoc\", this, old);\n        return old\n      }),\n\n      phrase: function(phraseText) {\n        var phrases = this.options.phrases;\n        return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n      },\n\n      getInputField: function(){return this.display.input.getField()},\n      getWrapperElement: function(){return this.display.wrapper},\n      getScrollerElement: function(){return this.display.scroller},\n      getGutterElement: function(){return this.display.gutters}\n    };\n    eventMixin(CodeMirror);\n\n    CodeMirror.registerHelper = function(type, name, value) {\n      if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n      helpers[type][name] = value;\n    };\n    CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n      CodeMirror.registerHelper(type, name, value);\n      helpers[type]._global.push({pred: predicate, val: value});\n    };\n  }\n\n  // Used for horizontal relative motion. Dir is -1 or 1 (left or\n  // right), unit can be \"codepoint\", \"char\", \"column\" (like char, but\n  // doesn't cross line boundaries), \"word\" (across next word), or\n  // \"group\" (to the start of next group of word or\n  // non-word-non-whitespace chars). The visually param controls\n  // whether, in right-to-left text, direction 1 means to move towards\n  // the next index in the string, or towards the character to the right\n  // of the current position. The resulting position will have a\n  // hitSide=true property if it reached the end of the document.\n  function findPosH(doc, pos, dir, unit, visually) {\n    var oldPos = pos;\n    var origDir = dir;\n    var lineObj = getLine(doc, pos.line);\n    var lineDir = visually && doc.direction == \"rtl\" ? -dir : dir;\n    function findNextLine() {\n      var l = pos.line + lineDir;\n      if (l < doc.first || l >= doc.first + doc.size) { return false }\n      pos = new Pos(l, pos.ch, pos.sticky);\n      return lineObj = getLine(doc, l)\n    }\n    function moveOnce(boundToLine) {\n      var next;\n      if (unit == \"codepoint\") {\n        var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));\n        if (isNaN(ch)) {\n          next = null;\n        } else {\n          var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;\n          next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);\n        }\n      } else if (visually) {\n        next = moveVisually(doc.cm, lineObj, pos, dir);\n      } else {\n        next = moveLogically(lineObj, pos, dir);\n      }\n      if (next == null) {\n        if (!boundToLine && findNextLine())\n          { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }\n        else\n          { return false }\n      } else {\n        pos = next;\n      }\n      return true\n    }\n\n    if (unit == \"char\" || unit == \"codepoint\") {\n      moveOnce();\n    } else if (unit == \"column\") {\n      moveOnce(true);\n    } else if (unit == \"word\" || unit == \"group\") {\n      var sawType = null, group = unit == \"group\";\n      var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n      for (var first = true;; first = false) {\n        if (dir < 0 && !moveOnce(!first)) { break }\n        var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n        var type = isWordChar(cur, helper) ? \"w\"\n          : group && cur == \"\\n\" ? \"n\"\n          : !group || /\\s/.test(cur) ? null\n          : \"p\";\n        if (group && !first && !type) { type = \"s\"; }\n        if (sawType && sawType != type) {\n          if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n          break\n        }\n\n        if (type) { sawType = type; }\n        if (dir > 0 && !moveOnce(!first)) { break }\n      }\n    }\n    var result = skipAtomic(doc, pos, oldPos, origDir, true);\n    if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n    return result\n  }\n\n  // For relative vertical movement. Dir may be -1 or 1. Unit can be\n  // \"page\" or \"line\". The resulting position will have a hitSide=true\n  // property if it reached the end of the document.\n  function findPosV(cm, pos, dir, unit) {\n    var doc = cm.doc, x = pos.left, y;\n    if (unit == \"page\") {\n      var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight);\n      var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n      y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n    } else if (unit == \"line\") {\n      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n    }\n    var target;\n    for (;;) {\n      target = coordsChar(cm, x, y);\n      if (!target.outside) { break }\n      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n      y += dir * 5;\n    }\n    return target\n  }\n\n  // CONTENTEDITABLE INPUT STYLE\n\n  var ContentEditableInput = function(cm) {\n    this.cm = cm;\n    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n    this.polling = new Delayed();\n    this.composing = null;\n    this.gracePeriod = false;\n    this.readDOMTimeout = null;\n  };\n\n  ContentEditableInput.prototype.init = function (display) {\n      var this$1 = this;\n\n    var input = this, cm = input.cm;\n    var div = input.div = display.lineDiv;\n    div.contentEditable = true;\n    disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n    function belongsToInput(e) {\n      for (var t = e.target; t; t = t.parentNode) {\n        if (t == div) { return true }\n        if (/\\bCodeMirror-(?:line)?widget\\b/.test(t.className)) { break }\n      }\n      return false\n    }\n\n    on(div, \"paste\", function (e) {\n      if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n      // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n      if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n    });\n\n    on(div, \"compositionstart\", function (e) {\n      this$1.composing = {data: e.data, done: false};\n    });\n    on(div, \"compositionupdate\", function (e) {\n      if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n    });\n    on(div, \"compositionend\", function (e) {\n      if (this$1.composing) {\n        if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n        this$1.composing.done = true;\n      }\n    });\n\n    on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n    on(div, \"input\", function () {\n      if (!this$1.composing) { this$1.readFromDOMSoon(); }\n    });\n\n    function onCopyCut(e) {\n      if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }\n      if (cm.somethingSelected()) {\n        setLastCopied({lineWise: false, text: cm.getSelections()});\n        if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n      } else if (!cm.options.lineWiseCopyCut) {\n        return\n      } else {\n        var ranges = copyableRanges(cm);\n        setLastCopied({lineWise: true, text: ranges.text});\n        if (e.type == \"cut\") {\n          cm.operation(function () {\n            cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n            cm.replaceSelection(\"\", null, \"cut\");\n          });\n        }\n      }\n      if (e.clipboardData) {\n        e.clipboardData.clearData();\n        var content = lastCopied.text.join(\"\\n\");\n        // iOS exposes the clipboard API, but seems to discard content inserted into it\n        e.clipboardData.setData(\"Text\", content);\n        if (e.clipboardData.getData(\"Text\") == content) {\n          e.preventDefault();\n          return\n        }\n      }\n      // Old-fashioned briefly-focus-a-textarea hack\n      var kludge = hiddenTextarea(), te = kludge.firstChild;\n      disableBrowserMagic(te);\n      cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n      te.value = lastCopied.text.join(\"\\n\");\n      var hadFocus = activeElt(div.ownerDocument);\n      selectInput(te);\n      setTimeout(function () {\n        cm.display.lineSpace.removeChild(kludge);\n        hadFocus.focus();\n        if (hadFocus == div) { input.showPrimarySelection(); }\n      }, 50);\n    }\n    on(div, \"copy\", onCopyCut);\n    on(div, \"cut\", onCopyCut);\n  };\n\n  ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {\n    // Label for screenreaders, accessibility\n    if(label) {\n      this.div.setAttribute('aria-label', label);\n    } else {\n      this.div.removeAttribute('aria-label');\n    }\n  };\n\n  ContentEditableInput.prototype.prepareSelection = function () {\n    var result = prepareSelection(this.cm, false);\n    result.focus = activeElt(this.div.ownerDocument) == this.div;\n    return result\n  };\n\n  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n    if (!info || !this.cm.display.view.length) { return }\n    if (info.focus || takeFocus) { this.showPrimarySelection(); }\n    this.showMultipleSelections(info);\n  };\n\n  ContentEditableInput.prototype.getSelection = function () {\n    return this.cm.display.wrapper.ownerDocument.getSelection()\n  };\n\n  ContentEditableInput.prototype.showPrimarySelection = function () {\n    var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n    var from = prim.from(), to = prim.to();\n\n    if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n      sel.removeAllRanges();\n      return\n    }\n\n    var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n    var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n    if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n        cmp(minPos(curAnchor, curFocus), from) == 0 &&\n        cmp(maxPos(curAnchor, curFocus), to) == 0)\n      { return }\n\n    var view = cm.display.view;\n    var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n        {node: view[0].measure.map[2], offset: 0};\n    var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n    if (!end) {\n      var measure = view[view.length - 1].measure;\n      var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n      end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n    }\n\n    if (!start || !end) {\n      sel.removeAllRanges();\n      return\n    }\n\n    var old = sel.rangeCount && sel.getRangeAt(0), rng;\n    try { rng = range(start.node, start.offset, end.offset, end.node); }\n    catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n    if (rng) {\n      if (!gecko && cm.state.focused) {\n        sel.collapse(start.node, start.offset);\n        if (!rng.collapsed) {\n          sel.removeAllRanges();\n          sel.addRange(rng);\n        }\n      } else {\n        sel.removeAllRanges();\n        sel.addRange(rng);\n      }\n      if (old && sel.anchorNode == null) { sel.addRange(old); }\n      else if (gecko) { this.startGracePeriod(); }\n    }\n    this.rememberSelection();\n  };\n\n  ContentEditableInput.prototype.startGracePeriod = function () {\n      var this$1 = this;\n\n    clearTimeout(this.gracePeriod);\n    this.gracePeriod = setTimeout(function () {\n      this$1.gracePeriod = false;\n      if (this$1.selectionChanged())\n        { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n    }, 20);\n  };\n\n  ContentEditableInput.prototype.showMultipleSelections = function (info) {\n    removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n    removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n  };\n\n  ContentEditableInput.prototype.rememberSelection = function () {\n    var sel = this.getSelection();\n    this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n    this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n  };\n\n  ContentEditableInput.prototype.selectionInEditor = function () {\n    var sel = this.getSelection();\n    if (!sel.rangeCount) { return false }\n    var node = sel.getRangeAt(0).commonAncestorContainer;\n    return contains(this.div, node)\n  };\n\n  ContentEditableInput.prototype.focus = function () {\n    if (this.cm.options.readOnly != \"nocursor\") {\n      if (!this.selectionInEditor() || activeElt(this.div.ownerDocument) != this.div)\n        { this.showSelection(this.prepareSelection(), true); }\n      this.div.focus();\n    }\n  };\n  ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n  ContentEditableInput.prototype.getField = function () { return this.div };\n\n  ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n  ContentEditableInput.prototype.receivedFocus = function () {\n      var this$1 = this;\n\n    var input = this;\n    if (this.selectionInEditor())\n      { setTimeout(function () { return this$1.pollSelection(); }, 20); }\n    else\n      { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n    function poll() {\n      if (input.cm.state.focused) {\n        input.pollSelection();\n        input.polling.set(input.cm.options.pollInterval, poll);\n      }\n    }\n    this.polling.set(this.cm.options.pollInterval, poll);\n  };\n\n  ContentEditableInput.prototype.selectionChanged = function () {\n    var sel = this.getSelection();\n    return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n      sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n  };\n\n  ContentEditableInput.prototype.pollSelection = function () {\n    if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n    var sel = this.getSelection(), cm = this.cm;\n    // On Android Chrome (version 56, at least), backspacing into an\n    // uneditable block element will put the cursor in that element,\n    // and then, because it's not editable, hide the virtual keyboard.\n    // Because Android doesn't allow us to actually detect backspace\n    // presses in a sane way, this code checks for when that happens\n    // and simulates a backspace press in this case.\n    if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n      this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n      this.blur();\n      this.focus();\n      return\n    }\n    if (this.composing) { return }\n    this.rememberSelection();\n    var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n    var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n    if (anchor && head) { runInOp(cm, function () {\n      setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n      if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n    }); }\n  };\n\n  ContentEditableInput.prototype.pollContent = function () {\n    if (this.readDOMTimeout != null) {\n      clearTimeout(this.readDOMTimeout);\n      this.readDOMTimeout = null;\n    }\n\n    var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n    var from = sel.from(), to = sel.to();\n    if (from.ch == 0 && from.line > cm.firstLine())\n      { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n    if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n      { to = Pos(to.line + 1, 0); }\n    if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n    var fromIndex, fromLine, fromNode;\n    if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n      fromLine = lineNo(display.view[0].line);\n      fromNode = display.view[0].node;\n    } else {\n      fromLine = lineNo(display.view[fromIndex].line);\n      fromNode = display.view[fromIndex - 1].node.nextSibling;\n    }\n    var toIndex = findViewIndex(cm, to.line);\n    var toLine, toNode;\n    if (toIndex == display.view.length - 1) {\n      toLine = display.viewTo - 1;\n      toNode = display.lineDiv.lastChild;\n    } else {\n      toLine = lineNo(display.view[toIndex + 1].line) - 1;\n      toNode = display.view[toIndex + 1].node.previousSibling;\n    }\n\n    if (!fromNode) { return false }\n    var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n    var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n    while (newText.length > 1 && oldText.length > 1) {\n      if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n      else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n      else { break }\n    }\n\n    var cutFront = 0, cutEnd = 0;\n    var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n    while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n      { ++cutFront; }\n    var newBot = lst(newText), oldBot = lst(oldText);\n    var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n                             oldBot.length - (oldText.length == 1 ? cutFront : 0));\n    while (cutEnd < maxCutEnd &&\n           newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n      { ++cutEnd; }\n    // Try to move start of change to start of selection if ambiguous\n    if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n      while (cutFront && cutFront > from.ch &&\n             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n        cutFront--;\n        cutEnd++;\n      }\n    }\n\n    newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n    newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n    var chFrom = Pos(fromLine, cutFront);\n    var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n    if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n      replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n      return true\n    }\n  };\n\n  ContentEditableInput.prototype.ensurePolled = function () {\n    this.forceCompositionEnd();\n  };\n  ContentEditableInput.prototype.reset = function () {\n    this.forceCompositionEnd();\n  };\n  ContentEditableInput.prototype.forceCompositionEnd = function () {\n    if (!this.composing) { return }\n    clearTimeout(this.readDOMTimeout);\n    this.composing = null;\n    this.updateFromDOM();\n    this.div.blur();\n    this.div.focus();\n  };\n  ContentEditableInput.prototype.readFromDOMSoon = function () {\n      var this$1 = this;\n\n    if (this.readDOMTimeout != null) { return }\n    this.readDOMTimeout = setTimeout(function () {\n      this$1.readDOMTimeout = null;\n      if (this$1.composing) {\n        if (this$1.composing.done) { this$1.composing = null; }\n        else { return }\n      }\n      this$1.updateFromDOM();\n    }, 80);\n  };\n\n  ContentEditableInput.prototype.updateFromDOM = function () {\n      var this$1 = this;\n\n    if (this.cm.isReadOnly() || !this.pollContent())\n      { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n  };\n\n  ContentEditableInput.prototype.setUneditable = function (node) {\n    node.contentEditable = \"false\";\n  };\n\n  ContentEditableInput.prototype.onKeyPress = function (e) {\n    if (e.charCode == 0 || this.composing) { return }\n    e.preventDefault();\n    if (!this.cm.isReadOnly())\n      { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n  };\n\n  ContentEditableInput.prototype.readOnlyChanged = function (val) {\n    this.div.contentEditable = String(val != \"nocursor\");\n  };\n\n  ContentEditableInput.prototype.onContextMenu = function () {};\n  ContentEditableInput.prototype.resetPosition = function () {};\n\n  ContentEditableInput.prototype.needsContentAttribute = true;\n\n  function posToDOM(cm, pos) {\n    var view = findViewForLine(cm, pos.line);\n    if (!view || view.hidden) { return null }\n    var line = getLine(cm.doc, pos.line);\n    var info = mapFromLineView(view, line, pos.line);\n\n    var order = getOrder(line, cm.doc.direction), side = \"left\";\n    if (order) {\n      var partPos = getBidiPartAt(order, pos.ch);\n      side = partPos % 2 ? \"right\" : \"left\";\n    }\n    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n    result.offset = result.collapse == \"right\" ? result.end : result.start;\n    return result\n  }\n\n  function isInGutter(node) {\n    for (var scan = node; scan; scan = scan.parentNode)\n      { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n    return false\n  }\n\n  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n  function domTextBetween(cm, from, to, fromLine, toLine) {\n    var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n    function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n    function close() {\n      if (closing) {\n        text += lineSep;\n        if (extraLinebreak) { text += lineSep; }\n        closing = extraLinebreak = false;\n      }\n    }\n    function addText(str) {\n      if (str) {\n        close();\n        text += str;\n      }\n    }\n    function walk(node) {\n      if (node.nodeType == 1) {\n        var cmText = node.getAttribute(\"cm-text\");\n        if (cmText) {\n          addText(cmText);\n          return\n        }\n        var markerID = node.getAttribute(\"cm-marker\"), range;\n        if (markerID) {\n          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n          if (found.length && (range = found[0].find(0)))\n            { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }\n          return\n        }\n        if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n        var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n        if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n        if (isBlock) { close(); }\n        for (var i = 0; i < node.childNodes.length; i++)\n          { walk(node.childNodes[i]); }\n\n        if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n        if (isBlock) { closing = true; }\n      } else if (node.nodeType == 3) {\n        addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n      }\n    }\n    for (;;) {\n      walk(from);\n      if (from == to) { break }\n      from = from.nextSibling;\n      extraLinebreak = false;\n    }\n    return text\n  }\n\n  function domToPos(cm, node, offset) {\n    var lineNode;\n    if (node == cm.display.lineDiv) {\n      lineNode = cm.display.lineDiv.childNodes[offset];\n      if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n      node = null; offset = 0;\n    } else {\n      for (lineNode = node;; lineNode = lineNode.parentNode) {\n        if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n      }\n    }\n    for (var i = 0; i < cm.display.view.length; i++) {\n      var lineView = cm.display.view[i];\n      if (lineView.node == lineNode)\n        { return locateNodeInLineView(lineView, node, offset) }\n    }\n  }\n\n  function locateNodeInLineView(lineView, node, offset) {\n    var wrapper = lineView.text.firstChild, bad = false;\n    if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n    if (node == wrapper) {\n      bad = true;\n      node = wrapper.childNodes[offset];\n      offset = 0;\n      if (!node) {\n        var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n        return badPos(Pos(lineNo(line), line.text.length), bad)\n      }\n    }\n\n    var textNode = node.nodeType == 3 ? node : null, topNode = node;\n    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n      textNode = node.firstChild;\n      if (offset) { offset = textNode.nodeValue.length; }\n    }\n    while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n    var measure = lineView.measure, maps = measure.maps;\n\n    function find(textNode, topNode, offset) {\n      for (var i = -1; i < (maps ? maps.length : 0); i++) {\n        var map = i < 0 ? measure.map : maps[i];\n        for (var j = 0; j < map.length; j += 3) {\n          var curNode = map[j + 2];\n          if (curNode == textNode || curNode == topNode) {\n            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n            var ch = map[j] + offset;\n            if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }\n            return Pos(line, ch)\n          }\n        }\n      }\n    }\n    var found = find(textNode, topNode, offset);\n    if (found) { return badPos(found, bad) }\n\n    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n      found = find(after, after.firstChild, 0);\n      if (found)\n        { return badPos(Pos(found.line, found.ch - dist), bad) }\n      else\n        { dist += after.textContent.length; }\n    }\n    for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n      found = find(before, before.firstChild, -1);\n      if (found)\n        { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n      else\n        { dist$1 += before.textContent.length; }\n    }\n  }\n\n  // TEXTAREA INPUT STYLE\n\n  var TextareaInput = function(cm) {\n    this.cm = cm;\n    // See input.poll and input.reset\n    this.prevInput = \"\";\n\n    // Flag that indicates whether we expect input to appear real soon\n    // now (after some event like 'keypress' or 'input') and are\n    // polling intensively.\n    this.pollingFast = false;\n    // Self-resetting timeout for the poller\n    this.polling = new Delayed();\n    // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n    this.hasSelection = false;\n    this.composing = null;\n    this.resetting = false;\n  };\n\n  TextareaInput.prototype.init = function (display) {\n      var this$1 = this;\n\n    var input = this, cm = this.cm;\n    this.createField(display);\n    var te = this.textarea;\n\n    display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n    // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n    if (ios) { te.style.width = \"0px\"; }\n\n    on(te, \"input\", function () {\n      if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n      input.poll();\n    });\n\n    on(te, \"paste\", function (e) {\n      if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n      cm.state.pasteIncoming = +new Date;\n      input.fastPoll();\n    });\n\n    function prepareCopyCut(e) {\n      if (signalDOMEvent(cm, e)) { return }\n      if (cm.somethingSelected()) {\n        setLastCopied({lineWise: false, text: cm.getSelections()});\n      } else if (!cm.options.lineWiseCopyCut) {\n        return\n      } else {\n        var ranges = copyableRanges(cm);\n        setLastCopied({lineWise: true, text: ranges.text});\n        if (e.type == \"cut\") {\n          cm.setSelections(ranges.ranges, null, sel_dontScroll);\n        } else {\n          input.prevInput = \"\";\n          te.value = ranges.text.join(\"\\n\");\n          selectInput(te);\n        }\n      }\n      if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n    }\n    on(te, \"cut\", prepareCopyCut);\n    on(te, \"copy\", prepareCopyCut);\n\n    on(display.scroller, \"paste\", function (e) {\n      if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n      if (!te.dispatchEvent) {\n        cm.state.pasteIncoming = +new Date;\n        input.focus();\n        return\n      }\n\n      // Pass the `paste` event to the textarea so it's handled by its event listener.\n      var event = new Event(\"paste\");\n      event.clipboardData = e.clipboardData;\n      te.dispatchEvent(event);\n    });\n\n    // Prevent normal selection in the editor (we handle our own)\n    on(display.lineSpace, \"selectstart\", function (e) {\n      if (!eventInWidget(display, e)) { e_preventDefault(e); }\n    });\n\n    on(te, \"compositionstart\", function () {\n      var start = cm.getCursor(\"from\");\n      if (input.composing) { input.composing.range.clear(); }\n      input.composing = {\n        start: start,\n        range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n      };\n    });\n    on(te, \"compositionend\", function () {\n      if (input.composing) {\n        input.poll();\n        input.composing.range.clear();\n        input.composing = null;\n      }\n    });\n  };\n\n  TextareaInput.prototype.createField = function (_display) {\n    // Wraps and hides input textarea\n    this.wrapper = hiddenTextarea();\n    // The semihidden textarea that is focused when the editor is\n    // focused, and receives input.\n    this.textarea = this.wrapper.firstChild;\n    var opts = this.cm.options;\n    disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize);\n  };\n\n  TextareaInput.prototype.screenReaderLabelChanged = function (label) {\n    // Label for screenreaders, accessibility\n    if(label) {\n      this.textarea.setAttribute('aria-label', label);\n    } else {\n      this.textarea.removeAttribute('aria-label');\n    }\n  };\n\n  TextareaInput.prototype.prepareSelection = function () {\n    // Redraw the selection and/or cursor\n    var cm = this.cm, display = cm.display, doc = cm.doc;\n    var result = prepareSelection(cm);\n\n    // Move the hidden textarea near the cursor to prevent scrolling artifacts\n    if (cm.options.moveInputWithCursor) {\n      var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n                                          headPos.top + lineOff.top - wrapOff.top));\n      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n                                           headPos.left + lineOff.left - wrapOff.left));\n    }\n\n    return result\n  };\n\n  TextareaInput.prototype.showSelection = function (drawn) {\n    var cm = this.cm, display = cm.display;\n    removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n    removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n    if (drawn.teTop != null) {\n      this.wrapper.style.top = drawn.teTop + \"px\";\n      this.wrapper.style.left = drawn.teLeft + \"px\";\n    }\n  };\n\n  // Reset the input to correspond to the selection (or to be empty,\n  // when not typing and nothing is selected)\n  TextareaInput.prototype.reset = function (typing) {\n    if (this.contextMenuPending || this.composing && typing) { return }\n    var cm = this.cm;\n    this.resetting = true;\n    if (cm.somethingSelected()) {\n      this.prevInput = \"\";\n      var content = cm.getSelection();\n      this.textarea.value = content;\n      if (cm.state.focused) { selectInput(this.textarea); }\n      if (ie && ie_version >= 9) { this.hasSelection = content; }\n    } else if (!typing) {\n      this.prevInput = this.textarea.value = \"\";\n      if (ie && ie_version >= 9) { this.hasSelection = null; }\n    }\n    this.resetting = false;\n  };\n\n  TextareaInput.prototype.getField = function () { return this.textarea };\n\n  TextareaInput.prototype.supportsTouch = function () { return false };\n\n  TextareaInput.prototype.focus = function () {\n    if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt(this.textarea.ownerDocument) != this.textarea)) {\n      try { this.textarea.focus(); }\n      catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n    }\n  };\n\n  TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n  TextareaInput.prototype.resetPosition = function () {\n    this.wrapper.style.top = this.wrapper.style.left = 0;\n  };\n\n  TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n  // Poll for input changes, using the normal rate of polling. This\n  // runs as long as the editor is focused.\n  TextareaInput.prototype.slowPoll = function () {\n      var this$1 = this;\n\n    if (this.pollingFast) { return }\n    this.polling.set(this.cm.options.pollInterval, function () {\n      this$1.poll();\n      if (this$1.cm.state.focused) { this$1.slowPoll(); }\n    });\n  };\n\n  // When an event has just come in that is likely to add or change\n  // something in the input textarea, we poll faster, to ensure that\n  // the change appears on the screen quickly.\n  TextareaInput.prototype.fastPoll = function () {\n    var missed = false, input = this;\n    input.pollingFast = true;\n    function p() {\n      var changed = input.poll();\n      if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n      else {input.pollingFast = false; input.slowPoll();}\n    }\n    input.polling.set(20, p);\n  };\n\n  // Read input from the textarea, and update the document to match.\n  // When something is selected, it is present in the textarea, and\n  // selected (unless it is huge, in which case a placeholder is\n  // used). When nothing is selected, the cursor sits after previously\n  // seen text (can be empty), which is stored in prevInput (we must\n  // not reset the textarea when typing, because that breaks IME).\n  TextareaInput.prototype.poll = function () {\n      var this$1 = this;\n\n    var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n    // Since this is called a *lot*, try to bail out as cheaply as\n    // possible when it is clear that nothing happened. hasSelection\n    // will be the case when there is a lot of text in the textarea,\n    // in which case reading its value would be expensive.\n    if (this.contextMenuPending || this.resetting || !cm.state.focused ||\n        (hasSelection(input) && !prevInput && !this.composing) ||\n        cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n      { return false }\n\n    var text = input.value;\n    // If nothing changed, bail.\n    if (text == prevInput && !cm.somethingSelected()) { return false }\n    // Work around nonsensical selection resetting in IE9/10, and\n    // inexplicable appearance of private area unicode characters on\n    // some key combos in Mac (#2689).\n    if (ie && ie_version >= 9 && this.hasSelection === text ||\n        mac && /[\\uf700-\\uf7ff]/.test(text)) {\n      cm.display.input.reset();\n      return false\n    }\n\n    if (cm.doc.sel == cm.display.selForContextMenu) {\n      var first = text.charCodeAt(0);\n      if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n      if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n    }\n    // Find the part of the input that is actually new\n    var same = 0, l = Math.min(prevInput.length, text.length);\n    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n    runInOp(cm, function () {\n      applyTextInput(cm, text.slice(same), prevInput.length - same,\n                     null, this$1.composing ? \"*compose\" : null);\n\n      // Don't leave long text in the textarea, since it makes further polling slow\n      if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n      else { this$1.prevInput = text; }\n\n      if (this$1.composing) {\n        this$1.composing.range.clear();\n        this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n                                           {className: \"CodeMirror-composing\"});\n      }\n    });\n    return true\n  };\n\n  TextareaInput.prototype.ensurePolled = function () {\n    if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n  };\n\n  TextareaInput.prototype.onKeyPress = function () {\n    if (ie && ie_version >= 9) { this.hasSelection = null; }\n    this.fastPoll();\n  };\n\n  TextareaInput.prototype.onContextMenu = function (e) {\n    var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n    if (input.contextMenuPending) { input.contextMenuPending(); }\n    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n    if (!pos || presto) { return } // Opera is difficult.\n\n    // Reset the current text selection only if the click is done outside of the selection\n    // and 'resetSelectionOnContextMenu' option is true.\n    var reset = cm.options.resetSelectionOnContextMenu;\n    if (reset && cm.doc.sel.contains(pos) == -1)\n      { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n    var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n    var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n    input.wrapper.style.cssText = \"position: static\";\n    te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n      top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n      z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n    var oldScrollY;\n    if (webkit) { oldScrollY = te.ownerDocument.defaultView.scrollY; } // Work around Chrome issue (#2712)\n    display.input.focus();\n    if (webkit) { te.ownerDocument.defaultView.scrollTo(null, oldScrollY); }\n    display.input.reset();\n    // Adds \"Select all\" to context menu in FF\n    if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n    input.contextMenuPending = rehide;\n    display.selForContextMenu = cm.doc.sel;\n    clearTimeout(display.detectingSelectAll);\n\n    // Select-all will be greyed out if there's nothing to select, so\n    // this adds a zero-width space so that we can later check whether\n    // it got selected.\n    function prepareSelectAllHack() {\n      if (te.selectionStart != null) {\n        var selected = cm.somethingSelected();\n        var extval = \"\\u200b\" + (selected ? te.value : \"\");\n        te.value = \"\\u21da\"; // Used to catch context-menu undo\n        te.value = extval;\n        input.prevInput = selected ? \"\" : \"\\u200b\";\n        te.selectionStart = 1; te.selectionEnd = extval.length;\n        // Re-set this, in case some other handler touched the\n        // selection in the meantime.\n        display.selForContextMenu = cm.doc.sel;\n      }\n    }\n    function rehide() {\n      if (input.contextMenuPending != rehide) { return }\n      input.contextMenuPending = false;\n      input.wrapper.style.cssText = oldWrapperCSS;\n      te.style.cssText = oldCSS;\n      if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n      // Try to detect the user choosing select-all\n      if (te.selectionStart != null) {\n        if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n        var i = 0, poll = function () {\n          if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n              te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n            operation(cm, selectAll)(cm);\n          } else if (i++ < 10) {\n            display.detectingSelectAll = setTimeout(poll, 500);\n          } else {\n            display.selForContextMenu = null;\n            display.input.reset();\n          }\n        };\n        display.detectingSelectAll = setTimeout(poll, 200);\n      }\n    }\n\n    if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n    if (captureRightClick) {\n      e_stop(e);\n      var mouseup = function () {\n        off(window, \"mouseup\", mouseup);\n        setTimeout(rehide, 20);\n      };\n      on(window, \"mouseup\", mouseup);\n    } else {\n      setTimeout(rehide, 50);\n    }\n  };\n\n  TextareaInput.prototype.readOnlyChanged = function (val) {\n    if (!val) { this.reset(); }\n    this.textarea.disabled = val == \"nocursor\";\n    this.textarea.readOnly = !!val;\n  };\n\n  TextareaInput.prototype.setUneditable = function () {};\n\n  TextareaInput.prototype.needsContentAttribute = false;\n\n  function fromTextArea(textarea, options) {\n    options = options ? copyObj(options) : {};\n    options.value = textarea.value;\n    if (!options.tabindex && textarea.tabIndex)\n      { options.tabindex = textarea.tabIndex; }\n    if (!options.placeholder && textarea.placeholder)\n      { options.placeholder = textarea.placeholder; }\n    // Set autofocus to true if this textarea is focused, or if it has\n    // autofocus and no other element is focused.\n    if (options.autofocus == null) {\n      var hasFocus = activeElt(textarea.ownerDocument);\n      options.autofocus = hasFocus == textarea ||\n        textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n    }\n\n    function save() {textarea.value = cm.getValue();}\n\n    var realSubmit;\n    if (textarea.form) {\n      on(textarea.form, \"submit\", save);\n      // Deplorable hack to make the submit method do the right thing.\n      if (!options.leaveSubmitMethodAlone) {\n        var form = textarea.form;\n        realSubmit = form.submit;\n        try {\n          var wrappedSubmit = form.submit = function () {\n            save();\n            form.submit = realSubmit;\n            form.submit();\n            form.submit = wrappedSubmit;\n          };\n        } catch(e) {}\n      }\n    }\n\n    options.finishInit = function (cm) {\n      cm.save = save;\n      cm.getTextArea = function () { return textarea; };\n      cm.toTextArea = function () {\n        cm.toTextArea = isNaN; // Prevent this from being ran twice\n        save();\n        textarea.parentNode.removeChild(cm.getWrapperElement());\n        textarea.style.display = \"\";\n        if (textarea.form) {\n          off(textarea.form, \"submit\", save);\n          if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n            { textarea.form.submit = realSubmit; }\n        }\n      };\n    };\n\n    textarea.style.display = \"none\";\n    var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n      options);\n    return cm\n  }\n\n  function addLegacyProps(CodeMirror) {\n    CodeMirror.off = off;\n    CodeMirror.on = on;\n    CodeMirror.wheelEventPixels = wheelEventPixels;\n    CodeMirror.Doc = Doc;\n    CodeMirror.splitLines = splitLinesAuto;\n    CodeMirror.countColumn = countColumn;\n    CodeMirror.findColumn = findColumn;\n    CodeMirror.isWordChar = isWordCharBasic;\n    CodeMirror.Pass = Pass;\n    CodeMirror.signal = signal;\n    CodeMirror.Line = Line;\n    CodeMirror.changeEnd = changeEnd;\n    CodeMirror.scrollbarModel = scrollbarModel;\n    CodeMirror.Pos = Pos;\n    CodeMirror.cmpPos = cmp;\n    CodeMirror.modes = modes;\n    CodeMirror.mimeModes = mimeModes;\n    CodeMirror.resolveMode = resolveMode;\n    CodeMirror.getMode = getMode;\n    CodeMirror.modeExtensions = modeExtensions;\n    CodeMirror.extendMode = extendMode;\n    CodeMirror.copyState = copyState;\n    CodeMirror.startState = startState;\n    CodeMirror.innerMode = innerMode;\n    CodeMirror.commands = commands;\n    CodeMirror.keyMap = keyMap;\n    CodeMirror.keyName = keyName;\n    CodeMirror.isModifierKey = isModifierKey;\n    CodeMirror.lookupKey = lookupKey;\n    CodeMirror.normalizeKeyMap = normalizeKeyMap;\n    CodeMirror.StringStream = StringStream;\n    CodeMirror.SharedTextMarker = SharedTextMarker;\n    CodeMirror.TextMarker = TextMarker;\n    CodeMirror.LineWidget = LineWidget;\n    CodeMirror.e_preventDefault = e_preventDefault;\n    CodeMirror.e_stopPropagation = e_stopPropagation;\n    CodeMirror.e_stop = e_stop;\n    CodeMirror.addClass = addClass;\n    CodeMirror.contains = contains;\n    CodeMirror.rmClass = rmClass;\n    CodeMirror.keyNames = keyNames;\n  }\n\n  // EDITOR CONSTRUCTOR\n\n  defineOptions(CodeMirror);\n\n  addEditorMethods(CodeMirror);\n\n  // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n  var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n  for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n    { CodeMirror.prototype[prop] = (function(method) {\n      return function() {return method.apply(this.doc, arguments)}\n    })(Doc.prototype[prop]); } }\n\n  eventMixin(Doc);\n  CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n  // Extra arguments are stored as the mode's dependencies, which is\n  // used by (legacy) mechanisms like loadmode.js to automatically\n  // load a mode. (Preferred mechanism is the require/define calls.)\n  CodeMirror.defineMode = function(name/*, mode, …*/) {\n    if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n    defineMode.apply(this, arguments);\n  };\n\n  CodeMirror.defineMIME = defineMIME;\n\n  // Minimal default mode.\n  CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n  CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n  // EXTENSIONS\n\n  CodeMirror.defineExtension = function (name, func) {\n    CodeMirror.prototype[name] = func;\n  };\n  CodeMirror.defineDocExtension = function (name, func) {\n    Doc.prototype[name] = func;\n  };\n\n  CodeMirror.fromTextArea = fromTextArea;\n\n  addLegacyProps(CodeMirror);\n\n  CodeMirror.version = \"5.65.15\";\n\n  return CodeMirror;\n\n})));\n"
  },
  {
    "path": "web/assets/codemirror/fold/brace-fold.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nfunction bracketFolding(pairs) {\n  return function(cm, start) {\n    var line = start.line, lineText = cm.getLine(line);\n\n    function findOpening(pair) {\n      var tokenType;\n      for (var at = start.ch, pass = 0;;) {\n        var found = at <= 0 ? -1 : lineText.lastIndexOf(pair[0], at - 1);\n        if (found == -1) {\n          if (pass == 1) break;\n          pass = 1;\n          at = lineText.length;\n          continue;\n        }\n        if (pass == 1 && found < start.ch) break;\n        tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));\n        if (!/^(comment|string)/.test(tokenType)) return {ch: found + 1, tokenType: tokenType, pair: pair};\n        at = found - 1;\n      }\n    }\n\n    function findRange(found) {\n      var count = 1, lastLine = cm.lastLine(), end, startCh = found.ch, endCh\n      outer: for (var i = line; i <= lastLine; ++i) {\n        var text = cm.getLine(i), pos = i == line ? startCh : 0;\n        for (;;) {\n          var nextOpen = text.indexOf(found.pair[0], pos), nextClose = text.indexOf(found.pair[1], pos);\n          if (nextOpen < 0) nextOpen = text.length;\n          if (nextClose < 0) nextClose = text.length;\n          pos = Math.min(nextOpen, nextClose);\n          if (pos == text.length) break;\n          if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == found.tokenType) {\n            if (pos == nextOpen) ++count;\n            else if (!--count) { end = i; endCh = pos; break outer; }\n          }\n          ++pos;\n        }\n      }\n\n      if (end == null || line == end) return null\n      return {from: CodeMirror.Pos(line, startCh),\n              to: CodeMirror.Pos(end, endCh)};\n    }\n\n    var found = []\n    for (var i = 0; i < pairs.length; i++) {\n      var open = findOpening(pairs[i])\n      if (open) found.push(open)\n    }\n    found.sort(function(a, b) { return a.ch - b.ch })\n    for (var i = 0; i < found.length; i++) {\n      var range = findRange(found[i])\n      if (range) return range\n    }\n    return null\n  }\n}\n\nCodeMirror.registerHelper(\"fold\", \"brace\", bracketFolding([[\"{\", \"}\"], [\"[\", \"]\"]]));\n\nCodeMirror.registerHelper(\"fold\", \"brace-paren\", bracketFolding([[\"{\", \"}\"], [\"[\", \"]\"], [\"(\", \")\"]]));\n\nCodeMirror.registerHelper(\"fold\", \"import\", function(cm, start) {\n  function hasImport(line) {\n    if (line < cm.firstLine() || line > cm.lastLine()) return null;\n    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n    if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n    if (start.type != \"keyword\" || start.string != \"import\") return null;\n    // Now find closing semicolon, return its position\n    for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {\n      var text = cm.getLine(i), semi = text.indexOf(\";\");\n      if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};\n    }\n  }\n\n  var startLine = start.line, has = hasImport(startLine), prev;\n  if (!has || hasImport(startLine - 1) || ((prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1))\n    return null;\n  for (var end = has.end;;) {\n    var next = hasImport(end.line + 1);\n    if (next == null) break;\n    end = next.end;\n  }\n  return {from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)), to: end};\n});\n\nCodeMirror.registerHelper(\"fold\", \"include\", function(cm, start) {\n  function hasInclude(line) {\n    if (line < cm.firstLine() || line > cm.lastLine()) return null;\n    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n    if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n    if (start.type == \"meta\" && start.string.slice(0, 8) == \"#include\") return start.start + 8;\n  }\n\n  var startLine = start.line, has = hasInclude(startLine);\n  if (has == null || hasInclude(startLine - 1) != null) return null;\n  for (var end = startLine;;) {\n    var next = hasInclude(end + 1);\n    if (next == null) break;\n    ++end;\n  }\n  return {from: CodeMirror.Pos(startLine, has + 1),\n          to: cm.clipPos(CodeMirror.Pos(end))};\n});\n\n});\n"
  },
  {
    "path": "web/assets/codemirror/fold/foldcode.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  function doFold(cm, pos, options, force) {\n    if (options && options.call) {\n      var finder = options;\n      options = null;\n    } else {\n      var finder = getOption(cm, options, \"rangeFinder\");\n    }\n    if (typeof pos == \"number\") pos = CodeMirror.Pos(pos, 0);\n    var minSize = getOption(cm, options, \"minFoldSize\");\n\n    function getRange(allowFolded) {\n      var range = finder(cm, pos);\n      if (!range || range.to.line - range.from.line < minSize) return null;\n      if (force === \"fold\") return range;\n\n      var marks = cm.findMarksAt(range.from);\n      for (var i = 0; i < marks.length; ++i) {\n        if (marks[i].__isFold) {\n          if (!allowFolded) return null;\n          range.cleared = true;\n          marks[i].clear();\n        }\n      }\n      return range;\n    }\n\n    var range = getRange(true);\n    if (getOption(cm, options, \"scanUp\")) while (!range && pos.line > cm.firstLine()) {\n      pos = CodeMirror.Pos(pos.line - 1, 0);\n      range = getRange(false);\n    }\n    if (!range || range.cleared || force === \"unfold\") return;\n\n    var myWidget = makeWidget(cm, options, range);\n    CodeMirror.on(myWidget, \"mousedown\", function(e) {\n      myRange.clear();\n      CodeMirror.e_preventDefault(e);\n    });\n    var myRange = cm.markText(range.from, range.to, {\n      replacedWith: myWidget,\n      clearOnEnter: getOption(cm, options, \"clearOnEnter\"),\n      __isFold: true\n    });\n    myRange.on(\"clear\", function(from, to) {\n      CodeMirror.signal(cm, \"unfold\", cm, from, to);\n    });\n    CodeMirror.signal(cm, \"fold\", cm, range.from, range.to);\n  }\n\n  function makeWidget(cm, options, range) {\n    var widget = getOption(cm, options, \"widget\");\n\n    if (typeof widget == \"function\") {\n      widget = widget(range.from, range.to);\n    }\n\n    if (typeof widget == \"string\") {\n      var text = document.createTextNode(widget);\n      widget = document.createElement(\"span\");\n      widget.appendChild(text);\n      widget.className = \"CodeMirror-foldmarker\";\n    } else if (widget) {\n      widget = widget.cloneNode(true)\n    }\n    return widget;\n  }\n\n  // Clumsy backwards-compatible interface\n  CodeMirror.newFoldFunction = function(rangeFinder, widget) {\n    return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };\n  };\n\n  // New-style interface\n  CodeMirror.defineExtension(\"foldCode\", function(pos, options, force) {\n    doFold(this, pos, options, force);\n  });\n\n  CodeMirror.defineExtension(\"isFolded\", function(pos) {\n    var marks = this.findMarksAt(pos);\n    for (var i = 0; i < marks.length; ++i)\n      if (marks[i].__isFold) return true;\n  });\n\n  CodeMirror.commands.toggleFold = function(cm) {\n    cm.foldCode(cm.getCursor());\n  };\n  CodeMirror.commands.fold = function(cm) {\n    cm.foldCode(cm.getCursor(), null, \"fold\");\n  };\n  CodeMirror.commands.unfold = function(cm) {\n    cm.foldCode(cm.getCursor(), { scanUp: false }, \"unfold\");\n  };\n  CodeMirror.commands.foldAll = function(cm) {\n    cm.operation(function() {\n      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n        cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, \"fold\");\n    });\n  };\n  CodeMirror.commands.unfoldAll = function(cm) {\n    cm.operation(function() {\n      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n        cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, \"unfold\");\n    });\n  };\n\n  CodeMirror.registerHelper(\"fold\", \"combine\", function() {\n    var funcs = Array.prototype.slice.call(arguments, 0);\n    return function(cm, start) {\n      for (var i = 0; i < funcs.length; ++i) {\n        var found = funcs[i](cm, start);\n        if (found) return found;\n      }\n    };\n  });\n\n  CodeMirror.registerHelper(\"fold\", \"auto\", function(cm, start) {\n    var helpers = cm.getHelpers(start, \"fold\");\n    for (var i = 0; i < helpers.length; i++) {\n      var cur = helpers[i](cm, start);\n      if (cur) return cur;\n    }\n  });\n\n  var defaultOptions = {\n    rangeFinder: CodeMirror.fold.auto,\n    widget: \"\\u2194\",\n    minFoldSize: 0,\n    scanUp: false,\n    clearOnEnter: true\n  };\n\n  CodeMirror.defineOption(\"foldOptions\", null);\n\n  function getOption(cm, options, name) {\n    if (options && options[name] !== undefined)\n      return options[name];\n    var editorOptions = cm.options.foldOptions;\n    if (editorOptions && editorOptions[name] !== undefined)\n      return editorOptions[name];\n    return defaultOptions[name];\n  }\n\n  CodeMirror.defineExtension(\"foldOption\", function(options, name) {\n    return getOption(this, options, name);\n  });\n});\n"
  },
  {
    "path": "web/assets/codemirror/fold/foldgutter.css",
    "content": ".CodeMirror-foldmarker {\n  color: blue;\n  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n  font-family: arial;\n  line-height: .3;\n  cursor: pointer;\n}\n.CodeMirror-foldgutter {\n  width: .7em;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n  cursor: pointer;\n}\n.CodeMirror-foldgutter-open:after {\n  content: \"\\25BE\";\n}\n.CodeMirror-foldgutter-folded:after {\n  content: \"\\25B8\";\n}\n"
  },
  {
    "path": "web/assets/codemirror/fold/foldgutter.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"), require(\"./foldcode\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\", \"./foldcode\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n\n  CodeMirror.defineOption(\"foldGutter\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      cm.clearGutter(cm.state.foldGutter.options.gutter);\n      cm.state.foldGutter = null;\n      cm.off(\"gutterClick\", onGutterClick);\n      cm.off(\"changes\", onChange);\n      cm.off(\"viewportChange\", onViewportChange);\n      cm.off(\"fold\", onFold);\n      cm.off(\"unfold\", onFold);\n      cm.off(\"swapDoc\", onChange);\n      cm.off(\"optionChange\", optionChange);\n    }\n    if (val) {\n      cm.state.foldGutter = new State(parseOptions(val));\n      updateInViewport(cm);\n      cm.on(\"gutterClick\", onGutterClick);\n      cm.on(\"changes\", onChange);\n      cm.on(\"viewportChange\", onViewportChange);\n      cm.on(\"fold\", onFold);\n      cm.on(\"unfold\", onFold);\n      cm.on(\"swapDoc\", onChange);\n      cm.on(\"optionChange\", optionChange);\n    }\n  });\n\n  var Pos = CodeMirror.Pos;\n\n  function State(options) {\n    this.options = options;\n    this.from = this.to = 0;\n  }\n\n  function parseOptions(opts) {\n    if (opts === true) opts = {};\n    if (opts.gutter == null) opts.gutter = \"CodeMirror-foldgutter\";\n    if (opts.indicatorOpen == null) opts.indicatorOpen = \"CodeMirror-foldgutter-open\";\n    if (opts.indicatorFolded == null) opts.indicatorFolded = \"CodeMirror-foldgutter-folded\";\n    return opts;\n  }\n\n  function isFolded(cm, line) {\n    var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0));\n    for (var i = 0; i < marks.length; ++i) {\n      if (marks[i].__isFold) {\n        var fromPos = marks[i].find(-1);\n        if (fromPos && fromPos.line === line)\n          return marks[i];\n      }\n    }\n  }\n\n  function marker(spec) {\n    if (typeof spec == \"string\") {\n      var elt = document.createElement(\"div\");\n      elt.className = spec + \" CodeMirror-guttermarker-subtle\";\n      return elt;\n    } else {\n      return spec.cloneNode(true);\n    }\n  }\n\n  function updateFoldInfo(cm, from, to) {\n    var opts = cm.state.foldGutter.options, cur = from - 1;\n    var minSize = cm.foldOption(opts, \"minFoldSize\");\n    var func = cm.foldOption(opts, \"rangeFinder\");\n    // we can reuse the built-in indicator element if its className matches the new state\n    var clsFolded = typeof opts.indicatorFolded == \"string\" && classTest(opts.indicatorFolded);\n    var clsOpen = typeof opts.indicatorOpen == \"string\" && classTest(opts.indicatorOpen);\n    cm.eachLine(from, to, function(line) {\n      ++cur;\n      var mark = null;\n      var old = line.gutterMarkers;\n      if (old) old = old[opts.gutter];\n      if (isFolded(cm, cur)) {\n        if (clsFolded && old && clsFolded.test(old.className)) return;\n        mark = marker(opts.indicatorFolded);\n      } else {\n        var pos = Pos(cur, 0);\n        var range = func && func(cm, pos);\n        if (range && range.to.line - range.from.line >= minSize) {\n          if (clsOpen && old && clsOpen.test(old.className)) return;\n          mark = marker(opts.indicatorOpen);\n        }\n      }\n      if (!mark && !old) return;\n      cm.setGutterMarker(line, opts.gutter, mark);\n    });\n  }\n\n  // copied from CodeMirror/src/util/dom.js\n  function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n  function updateInViewport(cm) {\n    var vp = cm.getViewport(), state = cm.state.foldGutter;\n    if (!state) return;\n    cm.operation(function() {\n      updateFoldInfo(cm, vp.from, vp.to);\n    });\n    state.from = vp.from; state.to = vp.to;\n  }\n\n  function onGutterClick(cm, line, gutter) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    if (gutter != opts.gutter) return;\n    var folded = isFolded(cm, line);\n    if (folded) folded.clear();\n    else cm.foldCode(Pos(line, 0), opts);\n  }\n\n  function optionChange(cm, option) {\n    if (option == \"mode\") onChange(cm)\n  }\n\n  function onChange(cm) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    state.from = state.to = 0;\n    clearTimeout(state.changeUpdate);\n    state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);\n  }\n\n  function onViewportChange(cm) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var opts = state.options;\n    clearTimeout(state.changeUpdate);\n    state.changeUpdate = setTimeout(function() {\n      var vp = cm.getViewport();\n      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {\n        updateInViewport(cm);\n      } else {\n        cm.operation(function() {\n          if (vp.from < state.from) {\n            updateFoldInfo(cm, vp.from, state.from);\n            state.from = vp.from;\n          }\n          if (vp.to > state.to) {\n            updateFoldInfo(cm, state.to, vp.to);\n            state.to = vp.to;\n          }\n        });\n      }\n    }, opts.updateViewportTimeSpan || 400);\n  }\n\n  function onFold(cm, from) {\n    var state = cm.state.foldGutter;\n    if (!state) return;\n    var line = from.line;\n    if (line >= state.from && line < state.to)\n      updateFoldInfo(cm, line, line + 1);\n  }\n});\n"
  },
  {
    "path": "web/assets/codemirror/hint/javascript-hint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  var Pos = CodeMirror.Pos;\n\n  function forEach(arr, f) {\n    for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n  }\n\n  function arrayContains(arr, item) {\n    if (!Array.prototype.indexOf) {\n      var i = arr.length;\n      while (i--) {\n        if (arr[i] === item) {\n          return true;\n        }\n      }\n      return false;\n    }\n    return arr.indexOf(item) != -1;\n  }\n\n  function scriptHint(editor, keywords, getToken, options) {\n    // Find the token at the cursor\n    var cur = editor.getCursor(), token = getToken(editor, cur);\n    if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n    var innerMode = CodeMirror.innerMode(editor.getMode(), token.state);\n    if (innerMode.mode.helperType === \"json\") return;\n    token.state = innerMode.state;\n\n    // If it's not a 'word-style' token, ignore the token.\n    if (!/^[\\w$_]*$/.test(token.string)) {\n      token = {start: cur.ch, end: cur.ch, string: \"\", state: token.state,\n               type: token.string == \".\" ? \"property\" : null};\n    } else if (token.end > cur.ch) {\n      token.end = cur.ch;\n      token.string = token.string.slice(0, cur.ch - token.start);\n    }\n\n    var tprop = token;\n    // If it is a property, find out what it is a property of.\n    while (tprop.type == \"property\") {\n      tprop = getToken(editor, Pos(cur.line, tprop.start));\n      if (tprop.string != \".\") return;\n      tprop = getToken(editor, Pos(cur.line, tprop.start));\n      if (!context) var context = [];\n      context.push(tprop);\n    }\n    return {list: getCompletions(token, context, keywords, options),\n            from: Pos(cur.line, token.start),\n            to: Pos(cur.line, token.end)};\n  }\n\n  function javascriptHint(editor, options) {\n    return scriptHint(editor, javascriptKeywords,\n                      function (e, cur) {return e.getTokenAt(cur);},\n                      options);\n  };\n  CodeMirror.registerHelper(\"hint\", \"javascript\", javascriptHint);\n\n  function getCoffeeScriptToken(editor, cur) {\n  // This getToken, it is for coffeescript, imitates the behavior of\n  // getTokenAt method in javascript.js, that is, returning \"property\"\n  // type and treat \".\" as independent token.\n    var token = editor.getTokenAt(cur);\n    if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {\n      token.end = token.start;\n      token.string = '.';\n      token.type = \"property\";\n    }\n    else if (/^\\.[\\w$_]*$/.test(token.string)) {\n      token.type = \"property\";\n      token.start++;\n      token.string = token.string.replace(/\\./, '');\n    }\n    return token;\n  }\n\n  function coffeescriptHint(editor, options) {\n    return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n  }\n  CodeMirror.registerHelper(\"hint\", \"coffeescript\", coffeescriptHint);\n\n  var stringProps = (\"charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight \" +\n                     \"toUpperCase toLowerCase split concat match replace search\").split(\" \");\n  var arrayProps = (\"length concat join splice push pop shift unshift slice reverse sort indexOf \" +\n                    \"lastIndexOf every some filter forEach map reduce reduceRight \").split(\" \");\n  var funcProps = \"prototype apply call bind\".split(\" \");\n  var javascriptKeywords = (\"break case catch class const continue debugger default delete do else export extends false finally for function \" +\n                  \"if in import instanceof new null return super switch this throw true try typeof var void while with yield\").split(\" \");\n  var coffeescriptKeywords = (\"and break catch class continue delete do else extends false finally for \" +\n                  \"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes\").split(\" \");\n\n  function forAllProps(obj, callback) {\n    if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {\n      for (var name in obj) callback(name)\n    } else {\n      for (var o = obj; o; o = Object.getPrototypeOf(o))\n        Object.getOwnPropertyNames(o).forEach(callback)\n    }\n  }\n\n  function getCompletions(token, context, keywords, options) {\n    var found = [], start = token.string, global = options && options.globalScope || window;\n    function maybeAdd(str) {\n      if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n    }\n    function gatherCompletions(obj) {\n      if (typeof obj == \"string\") forEach(stringProps, maybeAdd);\n      else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n      else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n      forAllProps(obj, maybeAdd)\n    }\n\n    if (context && context.length) {\n      // If this is a property, see if it belongs to some object we can\n      // find in the current environment.\n      var obj = context.pop(), base;\n      if (obj.type && obj.type.indexOf(\"variable\") === 0) {\n        if (options && options.additionalContext)\n          base = options.additionalContext[obj.string];\n        if (!options || options.useGlobalScope !== false)\n          base = base || global[obj.string];\n      } else if (obj.type == \"string\") {\n        base = \"\";\n      } else if (obj.type == \"atom\") {\n        base = 1;\n      } else if (obj.type == \"function\") {\n        if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&\n            (typeof global.jQuery == 'function'))\n          base = global.jQuery();\n        else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))\n          base = global._();\n      }\n      while (base != null && context.length)\n        base = base[context.pop().string];\n      if (base != null) gatherCompletions(base);\n    } else {\n      // If not, just look in the global object, any local scope, and optional additional-context\n      // (reading into JS mode internals to get at the local and global variables)\n      for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n      for (var c = token.state.context; c; c = c.prev)\n        for (var v = c.vars; v; v = v.next) maybeAdd(v.name)\n      for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n      if (options && options.additionalContext != null)\n        for (var key in options.additionalContext)\n          maybeAdd(key);\n      if (!options || options.useGlobalScope !== false)\n        gatherCompletions(global);\n      forEach(keywords, maybeAdd);\n    }\n    return found;\n  }\n});\n"
  },
  {
    "path": "web/assets/codemirror/javascript.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n  var indentUnit = config.indentUnit;\n  var statementIndent = parserConfig.statementIndent;\n  var jsonldMode = parserConfig.jsonld;\n  var jsonMode = parserConfig.json || jsonldMode;\n  var trackScope = parserConfig.trackScope !== false\n  var isTS = parserConfig.typescript;\n  var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n  // Tokenizer\n\n  var keywords = function(){\n    function kw(type) {return {type: type, style: \"keyword\"};}\n    var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\"), D = kw(\"keyword d\");\n    var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n    return {\n      \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n      \"return\": D, \"break\": D, \"continue\": D, \"new\": kw(\"new\"), \"delete\": C, \"void\": C, \"throw\": C,\n      \"debugger\": kw(\"debugger\"), \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n      \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n      \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n      \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n      \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n      \"this\": kw(\"this\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n      \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C,\n      \"await\": C\n    };\n  }();\n\n  var isOperatorChar = /[+\\-*&%=<>!?|~^@]/;\n  var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n  function readRegexp(stream) {\n    var escaped = false, next, inSet = false;\n    while ((next = stream.next()) != null) {\n      if (!escaped) {\n        if (next == \"/\" && !inSet) return;\n        if (next == \"[\") inSet = true;\n        else if (inSet && next == \"]\") inSet = false;\n      }\n      escaped = !escaped && next == \"\\\\\";\n    }\n  }\n\n  // Used as scratch variables to communicate multiple values without\n  // consing up tons of objects.\n  var type, content;\n  function ret(tp, style, cont) {\n    type = tp; content = cont;\n    return style;\n  }\n  function tokenBase(stream, state) {\n    var ch = stream.next();\n    if (ch == '\"' || ch == \"'\") {\n      state.tokenize = tokenString(ch);\n      return state.tokenize(stream, state);\n    } else if (ch == \".\" && stream.match(/^\\d[\\d_]*(?:[eE][+\\-]?[\\d_]+)?/)) {\n      return ret(\"number\", \"number\");\n    } else if (ch == \".\" && stream.match(\"..\")) {\n      return ret(\"spread\", \"meta\");\n    } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n      return ret(ch);\n    } else if (ch == \"=\" && stream.eat(\">\")) {\n      return ret(\"=>\", \"operator\");\n    } else if (ch == \"0\" && stream.match(/^(?:x[\\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {\n      return ret(\"number\", \"number\");\n    } else if (/\\d/.test(ch)) {\n      stream.match(/^[\\d_]*(?:n|(?:\\.[\\d_]*)?(?:[eE][+\\-]?[\\d_]+)?)?/);\n      return ret(\"number\", \"number\");\n    } else if (ch == \"/\") {\n      if (stream.eat(\"*\")) {\n        state.tokenize = tokenComment;\n        return tokenComment(stream, state);\n      } else if (stream.eat(\"/\")) {\n        stream.skipToEnd();\n        return ret(\"comment\", \"comment\");\n      } else if (expressionAllowed(stream, state, 1)) {\n        readRegexp(stream);\n        stream.match(/^\\b(([gimyus])(?![gimyus]*\\2))+\\b/);\n        return ret(\"regexp\", \"string-2\");\n      } else {\n        stream.eat(\"=\");\n        return ret(\"operator\", \"operator\", stream.current());\n      }\n    } else if (ch == \"`\") {\n      state.tokenize = tokenQuasi;\n      return tokenQuasi(stream, state);\n    } else if (ch == \"#\" && stream.peek() == \"!\") {\n      stream.skipToEnd();\n      return ret(\"meta\", \"meta\");\n    } else if (ch == \"#\" && stream.eatWhile(wordRE)) {\n      return ret(\"variable\", \"property\")\n    } else if (ch == \"<\" && stream.match(\"!--\") ||\n               (ch == \"-\" && stream.match(\"->\") && !/\\S/.test(stream.string.slice(0, stream.start)))) {\n      stream.skipToEnd()\n      return ret(\"comment\", \"comment\")\n    } else if (isOperatorChar.test(ch)) {\n      if (ch != \">\" || !state.lexical || state.lexical.type != \">\") {\n        if (stream.eat(\"=\")) {\n          if (ch == \"!\" || ch == \"=\") stream.eat(\"=\")\n        } else if (/[<>*+\\-|&?]/.test(ch)) {\n          stream.eat(ch)\n          if (ch == \">\") stream.eat(ch)\n        }\n      }\n      if (ch == \"?\" && stream.eat(\".\")) return ret(\".\")\n      return ret(\"operator\", \"operator\", stream.current());\n    } else if (wordRE.test(ch)) {\n      stream.eatWhile(wordRE);\n      var word = stream.current()\n      if (state.lastType != \".\") {\n        if (keywords.propertyIsEnumerable(word)) {\n          var kw = keywords[word]\n          return ret(kw.type, kw.style, word)\n        }\n        if (word == \"async\" && stream.match(/^(\\s|\\/\\*([^*]|\\*(?!\\/))*?\\*\\/)*[\\[\\(\\w]/, false))\n          return ret(\"async\", \"keyword\", word)\n      }\n      return ret(\"variable\", \"variable\", word)\n    }\n  }\n\n  function tokenString(quote) {\n    return function(stream, state) {\n      var escaped = false, next;\n      if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n        state.tokenize = tokenBase;\n        return ret(\"jsonld-keyword\", \"meta\");\n      }\n      while ((next = stream.next()) != null) {\n        if (next == quote && !escaped) break;\n        escaped = !escaped && next == \"\\\\\";\n      }\n      if (!escaped) state.tokenize = tokenBase;\n      return ret(\"string\", \"string\");\n    };\n  }\n\n  function tokenComment(stream, state) {\n    var maybeEnd = false, ch;\n    while (ch = stream.next()) {\n      if (ch == \"/\" && maybeEnd) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      maybeEnd = (ch == \"*\");\n    }\n    return ret(\"comment\", \"comment\");\n  }\n\n  function tokenQuasi(stream, state) {\n    var escaped = false, next;\n    while ((next = stream.next()) != null) {\n      if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n        state.tokenize = tokenBase;\n        break;\n      }\n      escaped = !escaped && next == \"\\\\\";\n    }\n    return ret(\"quasi\", \"string-2\", stream.current());\n  }\n\n  var brackets = \"([{}])\";\n  // This is a crude lookahead trick to try and notice that we're\n  // parsing the argument patterns for a fat-arrow function before we\n  // actually hit the arrow token. It only works if the arrow is on\n  // the same line as the arguments and there's no strange noise\n  // (comments) in between. Fallback is to only notice when we hit the\n  // arrow, and not declare the arguments as locals for the arrow\n  // body.\n  function findFatArrow(stream, state) {\n    if (state.fatArrowAt) state.fatArrowAt = null;\n    var arrow = stream.string.indexOf(\"=>\", stream.start);\n    if (arrow < 0) return;\n\n    if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n      var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(stream.string.slice(stream.start, arrow))\n      if (m) arrow = m.index\n    }\n\n    var depth = 0, sawSomething = false;\n    for (var pos = arrow - 1; pos >= 0; --pos) {\n      var ch = stream.string.charAt(pos);\n      var bracket = brackets.indexOf(ch);\n      if (bracket >= 0 && bracket < 3) {\n        if (!depth) { ++pos; break; }\n        if (--depth == 0) { if (ch == \"(\") sawSomething = true; break; }\n      } else if (bracket >= 3 && bracket < 6) {\n        ++depth;\n      } else if (wordRE.test(ch)) {\n        sawSomething = true;\n      } else if (/[\"'\\/`]/.test(ch)) {\n        for (;; --pos) {\n          if (pos == 0) return\n          var next = stream.string.charAt(pos - 1)\n          if (next == ch && stream.string.charAt(pos - 2) != \"\\\\\") { pos--; break }\n        }\n      } else if (sawSomething && !depth) {\n        ++pos;\n        break;\n      }\n    }\n    if (sawSomething && !depth) state.fatArrowAt = pos;\n  }\n\n  // Parser\n\n  var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true,\n                     \"regexp\": true, \"this\": true, \"import\": true, \"jsonld-keyword\": true};\n\n  function JSLexical(indented, column, type, align, prev, info) {\n    this.indented = indented;\n    this.column = column;\n    this.type = type;\n    this.prev = prev;\n    this.info = info;\n    if (align != null) this.align = align;\n  }\n\n  function inScope(state, varname) {\n    if (!trackScope) return false\n    for (var v = state.localVars; v; v = v.next)\n      if (v.name == varname) return true;\n    for (var cx = state.context; cx; cx = cx.prev) {\n      for (var v = cx.vars; v; v = v.next)\n        if (v.name == varname) return true;\n    }\n  }\n\n  function parseJS(state, style, type, content, stream) {\n    var cc = state.cc;\n    // Communicate our context to the combinators.\n    // (Less wasteful than consing up a hundred closures on every call.)\n    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n    if (!state.lexical.hasOwnProperty(\"align\"))\n      state.lexical.align = true;\n\n    while(true) {\n      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n      if (combinator(type, content)) {\n        while(cc.length && cc[cc.length - 1].lex)\n          cc.pop()();\n        if (cx.marked) return cx.marked;\n        if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n        return style;\n      }\n    }\n  }\n\n  // Combinator utils\n\n  var cx = {state: null, column: null, marked: null, cc: null};\n  function pass() {\n    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n  }\n  function cont() {\n    pass.apply(null, arguments);\n    return true;\n  }\n  function inList(name, list) {\n    for (var v = list; v; v = v.next) if (v.name == name) return true\n    return false;\n  }\n  function register(varname) {\n    var state = cx.state;\n    cx.marked = \"def\";\n    if (!trackScope) return\n    if (state.context) {\n      if (state.lexical.info == \"var\" && state.context && state.context.block) {\n        // FIXME function decls are also not block scoped\n        var newContext = registerVarScoped(varname, state.context)\n        if (newContext != null) {\n          state.context = newContext\n          return\n        }\n      } else if (!inList(varname, state.localVars)) {\n        state.localVars = new Var(varname, state.localVars)\n        return\n      }\n    }\n    // Fall through means this is global\n    if (parserConfig.globalVars && !inList(varname, state.globalVars))\n      state.globalVars = new Var(varname, state.globalVars)\n  }\n  function registerVarScoped(varname, context) {\n    if (!context) {\n      return null\n    } else if (context.block) {\n      var inner = registerVarScoped(varname, context.prev)\n      if (!inner) return null\n      if (inner == context.prev) return context\n      return new Context(inner, context.vars, true)\n    } else if (inList(varname, context.vars)) {\n      return context\n    } else {\n      return new Context(context.prev, new Var(varname, context.vars), false)\n    }\n  }\n\n  function isModifier(name) {\n    return name == \"public\" || name == \"private\" || name == \"protected\" || name == \"abstract\" || name == \"readonly\"\n  }\n\n  // Combinators\n\n  function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }\n  function Var(name, next) { this.name = name; this.next = next }\n\n  var defaultVars = new Var(\"this\", new Var(\"arguments\", null))\n  function pushcontext() {\n    cx.state.context = new Context(cx.state.context, cx.state.localVars, false)\n    cx.state.localVars = defaultVars\n  }\n  function pushblockcontext() {\n    cx.state.context = new Context(cx.state.context, cx.state.localVars, true)\n    cx.state.localVars = null\n  }\n  pushcontext.lex = pushblockcontext.lex = true\n  function popcontext() {\n    cx.state.localVars = cx.state.context.vars\n    cx.state.context = cx.state.context.prev\n  }\n  popcontext.lex = true\n  function pushlex(type, info) {\n    var result = function() {\n      var state = cx.state, indent = state.indented;\n      if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n      else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n        indent = outer.indented;\n      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n    };\n    result.lex = true;\n    return result;\n  }\n  function poplex() {\n    var state = cx.state;\n    if (state.lexical.prev) {\n      if (state.lexical.type == \")\")\n        state.indented = state.lexical.indented;\n      state.lexical = state.lexical.prev;\n    }\n  }\n  poplex.lex = true;\n\n  function expect(wanted) {\n    function exp(type) {\n      if (type == wanted) return cont();\n      else if (wanted == \";\" || type == \"}\" || type == \")\" || type == \"]\") return pass();\n      else return cont(exp);\n    };\n    return exp;\n  }\n\n  function statement(type, value) {\n    if (type == \"var\") return cont(pushlex(\"vardef\", value), vardef, expect(\";\"), poplex);\n    if (type == \"keyword a\") return cont(pushlex(\"form\"), parenExpr, statement, poplex);\n    if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n    if (type == \"keyword d\") return cx.stream.match(/^\\s*$/, false) ? cont() : cont(pushlex(\"stat\"), maybeexpression, expect(\";\"), poplex);\n    if (type == \"debugger\") return cont(expect(\";\"));\n    if (type == \"{\") return cont(pushlex(\"}\"), pushblockcontext, block, poplex, popcontext);\n    if (type == \";\") return cont();\n    if (type == \"if\") {\n      if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n        cx.state.cc.pop()();\n      return cont(pushlex(\"form\"), parenExpr, statement, poplex, maybeelse);\n    }\n    if (type == \"function\") return cont(functiondef);\n    if (type == \"for\") return cont(pushlex(\"form\"), pushblockcontext, forspec, statement, popcontext, poplex);\n    if (type == \"class\" || (isTS && value == \"interface\")) {\n      cx.marked = \"keyword\"\n      return cont(pushlex(\"form\", type == \"class\" ? type : value), className, poplex)\n    }\n    if (type == \"variable\") {\n      if (isTS && value == \"declare\") {\n        cx.marked = \"keyword\"\n        return cont(statement)\n      } else if (isTS && (value == \"module\" || value == \"enum\" || value == \"type\") && cx.stream.match(/^\\s*\\w/, false)) {\n        cx.marked = \"keyword\"\n        if (value == \"enum\") return cont(enumdef);\n        else if (value == \"type\") return cont(typename, expect(\"operator\"), typeexpr, expect(\";\"));\n        else return cont(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), block, poplex, poplex)\n      } else if (isTS && value == \"namespace\") {\n        cx.marked = \"keyword\"\n        return cont(pushlex(\"form\"), expression, statement, poplex)\n      } else if (isTS && value == \"abstract\") {\n        cx.marked = \"keyword\"\n        return cont(statement)\n      } else {\n        return cont(pushlex(\"stat\"), maybelabel);\n      }\n    }\n    if (type == \"switch\") return cont(pushlex(\"form\"), parenExpr, expect(\"{\"), pushlex(\"}\", \"switch\"), pushblockcontext,\n                                      block, poplex, poplex, popcontext);\n    if (type == \"case\") return cont(expression, expect(\":\"));\n    if (type == \"default\") return cont(expect(\":\"));\n    if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);\n    if (type == \"export\") return cont(pushlex(\"stat\"), afterExport, poplex);\n    if (type == \"import\") return cont(pushlex(\"stat\"), afterImport, poplex);\n    if (type == \"async\") return cont(statement)\n    if (value == \"@\") return cont(expression, statement)\n    return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n  }\n  function maybeCatchBinding(type) {\n    if (type == \"(\") return cont(funarg, expect(\")\"))\n  }\n  function expression(type, value) {\n    return expressionInner(type, value, false);\n  }\n  function expressionNoComma(type, value) {\n    return expressionInner(type, value, true);\n  }\n  function parenExpr(type) {\n    if (type != \"(\") return pass()\n    return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex)\n  }\n  function expressionInner(type, value, noComma) {\n    if (cx.state.fatArrowAt == cx.stream.start) {\n      var body = noComma ? arrowBodyNoComma : arrowBody;\n      if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, expect(\"=>\"), body, popcontext);\n      else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n    }\n\n    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n    if (type == \"function\") return cont(functiondef, maybeop);\n    if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), classExpression, poplex); }\n    if (type == \"keyword c\" || type == \"async\") return cont(noComma ? expressionNoComma : expression);\n    if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeop);\n    if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n    if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n    if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n    if (type == \"quasi\") return pass(quasi, maybeop);\n    if (type == \"new\") return cont(maybeTarget(noComma));\n    return cont();\n  }\n  function maybeexpression(type) {\n    if (type.match(/[;\\}\\)\\],]/)) return pass();\n    return pass(expression);\n  }\n\n  function maybeoperatorComma(type, value) {\n    if (type == \",\") return cont(maybeexpression);\n    return maybeoperatorNoComma(type, value, false);\n  }\n  function maybeoperatorNoComma(type, value, noComma) {\n    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n    var expr = noComma == false ? expression : expressionNoComma;\n    if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n    if (type == \"operator\") {\n      if (/\\+\\+|--/.test(value) || isTS && value == \"!\") return cont(me);\n      if (isTS && value == \"<\" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\\s*\\(/, false))\n        return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, me);\n      if (value == \"?\") return cont(expression, expect(\":\"), expr);\n      return cont(expr);\n    }\n    if (type == \"quasi\") { return pass(quasi, me); }\n    if (type == \";\") return;\n    if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n    if (type == \".\") return cont(property, me);\n    if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n    if (isTS && value == \"as\") { cx.marked = \"keyword\"; return cont(typeexpr, me) }\n    if (type == \"regexp\") {\n      cx.state.lastType = cx.marked = \"operator\"\n      cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)\n      return cont(expr)\n    }\n  }\n  function quasi(type, value) {\n    if (type != \"quasi\") return pass();\n    if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n    return cont(maybeexpression, continueQuasi);\n  }\n  function continueQuasi(type) {\n    if (type == \"}\") {\n      cx.marked = \"string-2\";\n      cx.state.tokenize = tokenQuasi;\n      return cont(quasi);\n    }\n  }\n  function arrowBody(type) {\n    findFatArrow(cx.stream, cx.state);\n    return pass(type == \"{\" ? statement : expression);\n  }\n  function arrowBodyNoComma(type) {\n    findFatArrow(cx.stream, cx.state);\n    return pass(type == \"{\" ? statement : expressionNoComma);\n  }\n  function maybeTarget(noComma) {\n    return function(type) {\n      if (type == \".\") return cont(noComma ? targetNoComma : target);\n      else if (type == \"variable\" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)\n      else return pass(noComma ? expressionNoComma : expression);\n    };\n  }\n  function target(_, value) {\n    if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorComma); }\n  }\n  function targetNoComma(_, value) {\n    if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorNoComma); }\n  }\n  function maybelabel(type) {\n    if (type == \":\") return cont(poplex, statement);\n    return pass(maybeoperatorComma, expect(\";\"), poplex);\n  }\n  function property(type) {\n    if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n  }\n  function objprop(type, value) {\n    if (type == \"async\") {\n      cx.marked = \"property\";\n      return cont(objprop);\n    } else if (type == \"variable\" || cx.style == \"keyword\") {\n      cx.marked = \"property\";\n      if (value == \"get\" || value == \"set\") return cont(getterSetter);\n      var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params\n      if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\\s*:\\s*/, false)))\n        cx.state.fatArrowAt = cx.stream.pos + m[0].length\n      return cont(afterprop);\n    } else if (type == \"number\" || type == \"string\") {\n      cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n      return cont(afterprop);\n    } else if (type == \"jsonld-keyword\") {\n      return cont(afterprop);\n    } else if (isTS && isModifier(value)) {\n      cx.marked = \"keyword\"\n      return cont(objprop)\n    } else if (type == \"[\") {\n      return cont(expression, maybetype, expect(\"]\"), afterprop);\n    } else if (type == \"spread\") {\n      return cont(expressionNoComma, afterprop);\n    } else if (value == \"*\") {\n      cx.marked = \"keyword\";\n      return cont(objprop);\n    } else if (type == \":\") {\n      return pass(afterprop)\n    }\n  }\n  function getterSetter(type) {\n    if (type != \"variable\") return pass(afterprop);\n    cx.marked = \"property\";\n    return cont(functiondef);\n  }\n  function afterprop(type) {\n    if (type == \":\") return cont(expressionNoComma);\n    if (type == \"(\") return pass(functiondef);\n  }\n  function commasep(what, end, sep) {\n    function proceed(type, value) {\n      if (sep ? sep.indexOf(type) > -1 : type == \",\") {\n        var lex = cx.state.lexical;\n        if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n        return cont(function(type, value) {\n          if (type == end || value == end) return pass()\n          return pass(what)\n        }, proceed);\n      }\n      if (type == end || value == end) return cont();\n      if (sep && sep.indexOf(\";\") > -1) return pass(what)\n      return cont(expect(end));\n    }\n    return function(type, value) {\n      if (type == end || value == end) return cont();\n      return pass(what, proceed);\n    };\n  }\n  function contCommasep(what, end, info) {\n    for (var i = 3; i < arguments.length; i++)\n      cx.cc.push(arguments[i]);\n    return cont(pushlex(end, info), commasep(what, end), poplex);\n  }\n  function block(type) {\n    if (type == \"}\") return cont();\n    return pass(statement, block);\n  }\n  function maybetype(type, value) {\n    if (isTS) {\n      if (type == \":\") return cont(typeexpr);\n      if (value == \"?\") return cont(maybetype);\n    }\n  }\n  function maybetypeOrIn(type, value) {\n    if (isTS && (type == \":\" || value == \"in\")) return cont(typeexpr)\n  }\n  function mayberettype(type) {\n    if (isTS && type == \":\") {\n      if (cx.stream.match(/^\\s*\\w+\\s+is\\b/, false)) return cont(expression, isKW, typeexpr)\n      else return cont(typeexpr)\n    }\n  }\n  function isKW(_, value) {\n    if (value == \"is\") {\n      cx.marked = \"keyword\"\n      return cont()\n    }\n  }\n  function typeexpr(type, value) {\n    if (value == \"keyof\" || value == \"typeof\" || value == \"infer\" || value == \"readonly\") {\n      cx.marked = \"keyword\"\n      return cont(value == \"typeof\" ? expressionNoComma : typeexpr)\n    }\n    if (type == \"variable\" || value == \"void\") {\n      cx.marked = \"type\"\n      return cont(afterType)\n    }\n    if (value == \"|\" || value == \"&\") return cont(typeexpr)\n    if (type == \"string\" || type == \"number\" || type == \"atom\") return cont(afterType);\n    if (type == \"[\") return cont(pushlex(\"]\"), commasep(typeexpr, \"]\", \",\"), poplex, afterType)\n    if (type == \"{\") return cont(pushlex(\"}\"), typeprops, poplex, afterType)\n    if (type == \"(\") return cont(commasep(typearg, \")\"), maybeReturnType, afterType)\n    if (type == \"<\") return cont(commasep(typeexpr, \">\"), typeexpr)\n    if (type == \"quasi\") { return pass(quasiType, afterType); }\n  }\n  function maybeReturnType(type) {\n    if (type == \"=>\") return cont(typeexpr)\n  }\n  function typeprops(type) {\n    if (type.match(/[\\}\\)\\]]/)) return cont()\n    if (type == \",\" || type == \";\") return cont(typeprops)\n    return pass(typeprop, typeprops)\n  }\n  function typeprop(type, value) {\n    if (type == \"variable\" || cx.style == \"keyword\") {\n      cx.marked = \"property\"\n      return cont(typeprop)\n    } else if (value == \"?\" || type == \"number\" || type == \"string\") {\n      return cont(typeprop)\n    } else if (type == \":\") {\n      return cont(typeexpr)\n    } else if (type == \"[\") {\n      return cont(expect(\"variable\"), maybetypeOrIn, expect(\"]\"), typeprop)\n    } else if (type == \"(\") {\n      return pass(functiondecl, typeprop)\n    } else if (!type.match(/[;\\}\\)\\],]/)) {\n      return cont()\n    }\n  }\n  function quasiType(type, value) {\n    if (type != \"quasi\") return pass();\n    if (value.slice(value.length - 2) != \"${\") return cont(quasiType);\n    return cont(typeexpr, continueQuasiType);\n  }\n  function continueQuasiType(type) {\n    if (type == \"}\") {\n      cx.marked = \"string-2\";\n      cx.state.tokenize = tokenQuasi;\n      return cont(quasiType);\n    }\n  }\n  function typearg(type, value) {\n    if (type == \"variable\" && cx.stream.match(/^\\s*[?:]/, false) || value == \"?\") return cont(typearg)\n    if (type == \":\") return cont(typeexpr)\n    if (type == \"spread\") return cont(typearg)\n    return pass(typeexpr)\n  }\n  function afterType(type, value) {\n    if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n    if (value == \"|\" || type == \".\" || value == \"&\") return cont(typeexpr)\n    if (type == \"[\") return cont(typeexpr, expect(\"]\"), afterType)\n    if (value == \"extends\" || value == \"implements\") { cx.marked = \"keyword\"; return cont(typeexpr) }\n    if (value == \"?\") return cont(typeexpr, expect(\":\"), typeexpr)\n  }\n  function maybeTypeArgs(_, value) {\n    if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n  }\n  function typeparam() {\n    return pass(typeexpr, maybeTypeDefault)\n  }\n  function maybeTypeDefault(_, value) {\n    if (value == \"=\") return cont(typeexpr)\n  }\n  function vardef(_, value) {\n    if (value == \"enum\") {cx.marked = \"keyword\"; return cont(enumdef)}\n    return pass(pattern, maybetype, maybeAssign, vardefCont);\n  }\n  function pattern(type, value) {\n    if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(pattern) }\n    if (type == \"variable\") { register(value); return cont(); }\n    if (type == \"spread\") return cont(pattern);\n    if (type == \"[\") return contCommasep(eltpattern, \"]\");\n    if (type == \"{\") return contCommasep(proppattern, \"}\");\n  }\n  function proppattern(type, value) {\n    if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n      register(value);\n      return cont(maybeAssign);\n    }\n    if (type == \"variable\") cx.marked = \"property\";\n    if (type == \"spread\") return cont(pattern);\n    if (type == \"}\") return pass();\n    if (type == \"[\") return cont(expression, expect(']'), expect(':'), proppattern);\n    return cont(expect(\":\"), pattern, maybeAssign);\n  }\n  function eltpattern() {\n    return pass(pattern, maybeAssign)\n  }\n  function maybeAssign(_type, value) {\n    if (value == \"=\") return cont(expressionNoComma);\n  }\n  function vardefCont(type) {\n    if (type == \",\") return cont(vardef);\n  }\n  function maybeelse(type, value) {\n    if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n  }\n  function forspec(type, value) {\n    if (value == \"await\") return cont(forspec);\n    if (type == \"(\") return cont(pushlex(\")\"), forspec1, poplex);\n  }\n  function forspec1(type) {\n    if (type == \"var\") return cont(vardef, forspec2);\n    if (type == \"variable\") return cont(forspec2);\n    return pass(forspec2)\n  }\n  function forspec2(type, value) {\n    if (type == \")\") return cont()\n    if (type == \";\") return cont(forspec2)\n    if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression, forspec2) }\n    return pass(expression, forspec2)\n  }\n  function functiondef(type, value) {\n    if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n    if (type == \"variable\") {register(value); return cont(functiondef);}\n    if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, statement, popcontext);\n    if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondef)\n  }\n  function functiondecl(type, value) {\n    if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondecl);}\n    if (type == \"variable\") {register(value); return cont(functiondecl);}\n    if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, popcontext);\n    if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondecl)\n  }\n  function typename(type, value) {\n    if (type == \"keyword\" || type == \"variable\") {\n      cx.marked = \"type\"\n      return cont(typename)\n    } else if (value == \"<\") {\n      return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex)\n    }\n  }\n  function funarg(type, value) {\n    if (value == \"@\") cont(expression, funarg)\n    if (type == \"spread\") return cont(funarg);\n    if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(funarg); }\n    if (isTS && type == \"this\") return cont(maybetype, maybeAssign)\n    return pass(pattern, maybetype, maybeAssign);\n  }\n  function classExpression(type, value) {\n    // Class expressions may have an optional name.\n    if (type == \"variable\") return className(type, value);\n    return classNameAfter(type, value);\n  }\n  function className(type, value) {\n    if (type == \"variable\") {register(value); return cont(classNameAfter);}\n  }\n  function classNameAfter(type, value) {\n    if (value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, classNameAfter)\n    if (value == \"extends\" || value == \"implements\" || (isTS && type == \",\")) {\n      if (value == \"implements\") cx.marked = \"keyword\";\n      return cont(isTS ? typeexpr : expression, classNameAfter);\n    }\n    if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n  }\n  function classBody(type, value) {\n    if (type == \"async\" ||\n        (type == \"variable\" &&\n         (value == \"static\" || value == \"get\" || value == \"set\" || (isTS && isModifier(value))) &&\n         cx.stream.match(/^\\s+#?[\\w$\\xa1-\\uffff]/, false))) {\n      cx.marked = \"keyword\";\n      return cont(classBody);\n    }\n    if (type == \"variable\" || cx.style == \"keyword\") {\n      cx.marked = \"property\";\n      return cont(classfield, classBody);\n    }\n    if (type == \"number\" || type == \"string\") return cont(classfield, classBody);\n    if (type == \"[\")\n      return cont(expression, maybetype, expect(\"]\"), classfield, classBody)\n    if (value == \"*\") {\n      cx.marked = \"keyword\";\n      return cont(classBody);\n    }\n    if (isTS && type == \"(\") return pass(functiondecl, classBody)\n    if (type == \";\" || type == \",\") return cont(classBody);\n    if (type == \"}\") return cont();\n    if (value == \"@\") return cont(expression, classBody)\n  }\n  function classfield(type, value) {\n    if (value == \"!\") return cont(classfield)\n    if (value == \"?\") return cont(classfield)\n    if (type == \":\") return cont(typeexpr, maybeAssign)\n    if (value == \"=\") return cont(expressionNoComma)\n    var context = cx.state.lexical.prev, isInterface = context && context.info == \"interface\"\n    return pass(isInterface ? functiondecl : functiondef)\n  }\n  function afterExport(type, value) {\n    if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n    if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n    if (type == \"{\") return cont(commasep(exportField, \"}\"), maybeFrom, expect(\";\"));\n    return pass(statement);\n  }\n  function exportField(type, value) {\n    if (value == \"as\") { cx.marked = \"keyword\"; return cont(expect(\"variable\")); }\n    if (type == \"variable\") return pass(expressionNoComma, exportField);\n  }\n  function afterImport(type) {\n    if (type == \"string\") return cont();\n    if (type == \"(\") return pass(expression);\n    if (type == \".\") return pass(maybeoperatorComma);\n    return pass(importSpec, maybeMoreImports, maybeFrom);\n  }\n  function importSpec(type, value) {\n    if (type == \"{\") return contCommasep(importSpec, \"}\");\n    if (type == \"variable\") register(value);\n    if (value == \"*\") cx.marked = \"keyword\";\n    return cont(maybeAs);\n  }\n  function maybeMoreImports(type) {\n    if (type == \",\") return cont(importSpec, maybeMoreImports)\n  }\n  function maybeAs(_type, value) {\n    if (value == \"as\") { cx.marked = \"keyword\"; return cont(importSpec); }\n  }\n  function maybeFrom(_type, value) {\n    if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n  }\n  function arrayLiteral(type) {\n    if (type == \"]\") return cont();\n    return pass(commasep(expressionNoComma, \"]\"));\n  }\n  function enumdef() {\n    return pass(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), commasep(enummember, \"}\"), poplex, poplex)\n  }\n  function enummember() {\n    return pass(pattern, maybeAssign);\n  }\n\n  function isContinuedStatement(state, textAfter) {\n    return state.lastType == \"operator\" || state.lastType == \",\" ||\n      isOperatorChar.test(textAfter.charAt(0)) ||\n      /[,.]/.test(textAfter.charAt(0));\n  }\n\n  function expressionAllowed(stream, state, backUp) {\n    return state.tokenize == tokenBase &&\n      /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n      (state.lastType == \"quasi\" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n  }\n\n  // Interface\n\n  return {\n    startState: function(basecolumn) {\n      var state = {\n        tokenize: tokenBase,\n        lastType: \"sof\",\n        cc: [],\n        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n        localVars: parserConfig.localVars,\n        context: parserConfig.localVars && new Context(null, null, false),\n        indented: basecolumn || 0\n      };\n      if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n        state.globalVars = parserConfig.globalVars;\n      return state;\n    },\n\n    token: function(stream, state) {\n      if (stream.sol()) {\n        if (!state.lexical.hasOwnProperty(\"align\"))\n          state.lexical.align = false;\n        state.indented = stream.indentation();\n        findFatArrow(stream, state);\n      }\n      if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n      var style = state.tokenize(stream, state);\n      if (type == \"comment\") return style;\n      state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n      return parseJS(state, style, type, content, stream);\n    },\n\n    indent: function(state, textAfter) {\n      if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;\n      if (state.tokenize != tokenBase) return 0;\n      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top\n      // Kludge to prevent 'maybelse' from blocking lexical scope pops\n      if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n        var c = state.cc[i];\n        if (c == poplex) lexical = lexical.prev;\n        else if (c != maybeelse && c != popcontext) break;\n      }\n      while ((lexical.type == \"stat\" || lexical.type == \"form\") &&\n             (firstChar == \"}\" || ((top = state.cc[state.cc.length - 1]) &&\n                                   (top == maybeoperatorComma || top == maybeoperatorNoComma) &&\n                                   !/^[,\\.=+\\-*:?[\\(]/.test(textAfter))))\n        lexical = lexical.prev;\n      if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n        lexical = lexical.prev;\n      var type = lexical.type, closing = firstChar == type;\n\n      if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info.length + 1 : 0);\n      else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n      else if (type == \"form\") return lexical.indented + indentUnit;\n      else if (type == \"stat\")\n        return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n      else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n        return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n      else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n      else return lexical.indented + (closing ? 0 : indentUnit);\n    },\n\n    electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n    blockCommentStart: jsonMode ? null : \"/*\",\n    blockCommentEnd: jsonMode ? null : \"*/\",\n    blockCommentContinue: jsonMode ? null : \" * \",\n    lineComment: jsonMode ? null : \"//\",\n    fold: \"brace\",\n    closeBrackets: \"()[]{}''\\\"\\\"``\",\n\n    helperType: jsonMode ? \"json\" : \"javascript\",\n    jsonldMode: jsonldMode,\n    jsonMode: jsonMode,\n\n    expressionAllowed: expressionAllowed,\n\n    skipExpression: function(state) {\n      parseJS(state, \"atom\", \"atom\", \"true\", new CodeMirror.StringStream(\"\", 2, null))\n    }\n  };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", { name: \"javascript\", json: true });\nCodeMirror.defineMIME(\"application/x-json\", { name: \"javascript\", json: true });\nCodeMirror.defineMIME(\"application/manifest+json\", { name: \"javascript\", json: true })\nCodeMirror.defineMIME(\"application/ld+json\", { name: \"javascript\", jsonld: true });\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n"
  },
  {
    "path": "web/assets/codemirror/jshint.js",
    "content": "/*! 2.13.2 */\nvar JSHINT;\nif (typeof window === 'undefined') window = {};\n(function () {\nvar require;\nrequire=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\nvar identifierStartTable = [];\n\nfor (var i = 0; i < 128; i++) {\n  identifierStartTable[i] =\n    i === 36 ||           // $\n    i >= 65 && i <= 90 || // A-Z\n    i === 95 ||           // _\n    i >= 97 && i <= 122;  // a-z\n}\n\nvar identifierPartTable = [];\n\nfor (var i = 0; i < 128; i++) {\n  identifierPartTable[i] =\n    identifierStartTable[i] || // $, _, A-Z, a-z\n    i >= 48 && i <= 57;        // 0-9\n}\n\nmodule.exports = {\n  asciiIdentifierStartTable: identifierStartTable,\n  asciiIdentifierPartTable: identifierPartTable\n};\n\n},{}],2:[function(require,module,exports){\nmodule.exports = /^(?:[\\$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0525\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\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\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\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\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\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\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\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\\u16EE-\\u16F0\\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\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\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-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2D00-\\u2D25\\u2D30-\\u2D65\\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-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCB\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\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\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA2D\\uFA30-\\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])(?:[\\$0-9A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0525\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0621-\\u065E\\u0660-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0900-\\u0939\\u093C-\\u094E\\u0950-\\u0955\\u0958-\\u0963\\u0966-\\u096F\\u0971\\u0972\\u0979-\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C82\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0D02\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC\\u0EDD\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F8B\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\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\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17B3\\u17B6-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BAA\\u1BAE-\\u1BB9\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF2\\u1D00-\\u1DE6\\u1DFD-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u2094\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF1\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCB\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA65F\\uA662-\\uA66F\\uA67C\\uA67D\\uA67F-\\uA697\\uA6A0-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA2D\\uFA30-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])*$/;\n},{}],3:[function(require,module,exports){\nvar str = '183,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,903,1155,1156,1157,1158,1159,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1471,1473,1474,1476,1477,1479,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1648,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1763,1764,1767,1768,1770,1771,1772,1773,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1809,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,2027,2028,2029,2030,2031,2032,2033,2034,2035,2045,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2081,2082,2083,2085,2086,2087,2089,2090,2091,2092,2093,2137,2138,2139,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2362,2363,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2385,2386,2387,2388,2389,2390,2391,2402,2403,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2433,2434,2435,2492,2494,2495,2496,2497,2498,2499,2500,2503,2504,2507,2508,2509,2519,2530,2531,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2558,2561,2562,2563,2620,2622,2623,2624,2625,2626,2631,2632,2635,2636,2637,2641,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2677,2689,2690,2691,2748,2750,2751,2752,2753,2754,2755,2756,2757,2759,2760,2761,2763,2764,2765,2786,2787,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2810,2811,2812,2813,2814,2815,2817,2818,2819,2876,2878,2879,2880,2881,2882,2883,2884,2887,2888,2891,2892,2893,2902,2903,2914,2915,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2946,3006,3007,3008,3009,3010,3014,3015,3016,3018,3019,3020,3021,3031,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3072,3073,3074,3075,3076,3134,3135,3136,3137,3138,3139,3140,3142,3143,3144,3146,3147,3148,3149,3157,3158,3170,3171,3174,3175,3176,3177,3178,3179,3180,3181,3182,3183,3201,3202,3203,3260,3262,3263,3264,3265,3266,3267,3268,3270,3271,3272,3274,3275,3276,3277,3285,3286,3298,3299,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3328,3329,3330,3331,3387,3388,3390,3391,3392,3393,3394,3395,3396,3398,3399,3400,3402,3403,3404,3405,3415,3426,3427,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3458,3459,3530,3535,3536,3537,3538,3539,3540,3542,3544,3545,3546,3547,3548,3549,3550,3551,3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3570,3571,3633,3636,3637,3638,3639,3640,3641,3642,3655,3656,3657,3658,3659,3660,3661,3662,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3761,3764,3765,3766,3767,3768,3769,3771,3772,3784,3785,3786,3787,3788,3789,3792,3793,3794,3795,3796,3797,3798,3799,3800,3801,3864,3865,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3893,3895,3897,3902,3903,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3974,3975,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3993,3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4038,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4182,4183,4184,4185,4190,4191,4192,4194,4195,4196,4199,4200,4201,4202,4203,4204,4205,4209,4210,4211,4212,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4957,4958,4959,4969,4970,4971,4972,4973,4974,4975,4976,4977,5906,5907,5908,5938,5939,5940,5970,5971,6002,6003,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6109,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6155,6156,6157,6160,6161,6162,6163,6164,6165,6166,6167,6168,6169,6313,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6679,6680,6681,6682,6683,6741,6742,6743,6744,6745,6746,6747,6748,6749,6750,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761,6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,6780,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,6832,6833,6834,6835,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6912,6913,6914,6915,6916,6964,6965,6966,6967,6968,6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6992,6993,6994,6995,6996,6997,6998,6999,7000,7001,7019,7020,7021,7022,7023,7024,7025,7026,7027,7040,7041,7042,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7088,7089,7090,7091,7092,7093,7094,7095,7096,7097,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,7155,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213,7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7376,7377,7378,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400,7405,7410,7411,7412,7415,7416,7417,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7675,7676,7677,7678,7679,8204,8205,8255,8256,8276,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8417,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,11503,11504,11505,11647,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,12330,12331,12332,12333,12334,12335,12441,12442,42528,42529,42530,42531,42532,42533,42534,42535,42536,42537,42607,42612,42613,42614,42615,42616,42617,42618,42619,42620,42621,42654,42655,42736,42737,43010,43014,43019,43043,43044,43045,43046,43047,43136,43137,43188,43189,43190,43191,43192,43193,43194,43195,43196,43197,43198,43199,43200,43201,43202,43203,43204,43205,43216,43217,43218,43219,43220,43221,43222,43223,43224,43225,43232,43233,43234,43235,43236,43237,43238,43239,43240,43241,43242,43243,43244,43245,43246,43247,43248,43249,43263,43264,43265,43266,43267,43268,43269,43270,43271,43272,43273,43302,43303,43304,43305,43306,43307,43308,43309,43335,43336,43337,43338,43339,43340,43341,43342,43343,43344,43345,43346,43347,43392,43393,43394,43395,43443,43444,43445,43446,43447,43448,43449,43450,43451,43452,43453,43454,43455,43456,43472,43473,43474,43475,43476,43477,43478,43479,43480,43481,43493,43504,43505,43506,43507,43508,43509,43510,43511,43512,43513,43561,43562,43563,43564,43565,43566,43567,43568,43569,43570,43571,43572,43573,43574,43587,43596,43597,43600,43601,43602,43603,43604,43605,43606,43607,43608,43609,43643,43644,43645,43696,43698,43699,43700,43703,43704,43710,43711,43713,43755,43756,43757,43758,43759,43765,43766,44003,44004,44005,44006,44007,44008,44009,44010,44012,44013,44016,44017,44018,44019,44020,44021,44022,44023,44024,44025,64286,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65056,65057,65058,65059,65060,65061,65062,65063,65064,65065,65066,65067,65068,65069,65070,65071,65075,65076,65101,65102,65103,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65343';\nvar arr = str.split(',').map(function(code) {\n  return parseInt(code, 10);\n});\nmodule.exports = arr;\n},{}],4:[function(require,module,exports){\nvar str = '170,181,186,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,710,711,712,713,714,715,716,717,718,719,720,721,736,737,738,739,740,748,750,880,881,882,883,884,886,887,890,891,892,893,895,902,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1369,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1519,1520,1521,1522,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1749,1765,1766,1774,1775,1786,1787,1788,1791,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2230,2231,2232,2233,2234,2235,2236,2237,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2365,2384,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2437,2438,2439,2440,2441,2442,2443,2444,2447,2448,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2474,2475,2476,2477,2478,2479,2480,2482,2486,2487,2488,2489,2493,2510,2524,2525,2527,2528,2529,2544,2545,2556,2565,2566,2567,2568,2569,2570,2575,2576,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2602,2603,2604,2605,2606,2607,2608,2610,2611,2613,2614,2616,2617,2649,2650,2651,2652,2654,2674,2675,2676,2693,2694,2695,2696,2697,2698,2699,2700,2701,2703,2704,2705,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2730,2731,2732,2733,2734,2735,2736,2738,2739,2741,2742,2743,2744,2745,2749,2768,2784,2785,2809,2821,2822,2823,2824,2825,2826,2827,2828,2831,2832,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2858,2859,2860,2861,2862,2863,2864,2866,2867,2869,2870,2871,2872,2873,2877,2908,2909,2911,2912,2913,2929,2947,2949,2950,2951,2952,2953,2954,2958,2959,2960,2962,2963,2964,2965,2969,2970,2972,2974,2975,2979,2980,2984,2985,2986,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3000,3001,3024,3077,3078,3079,3080,3081,3082,3083,3084,3086,3087,3088,3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112,3114,3115,3116,3117,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3133,3160,3161,3162,3168,3169,3200,3205,3206,3207,3208,3209,3210,3211,3212,3214,3215,3216,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,3234,3235,3236,3237,3238,3239,3240,3242,3243,3244,3245,3246,3247,3248,3249,3250,3251,3253,3254,3255,3256,3257,3261,3294,3296,3297,3313,3314,3333,3334,3335,3336,3337,3338,3339,3340,3342,3343,3344,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3389,3406,3412,3413,3414,3423,3424,3425,3450,3451,3452,3453,3454,3455,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499,3500,3501,3502,3503,3504,3505,3507,3508,3509,3510,3511,3512,3513,3514,3515,3517,3520,3521,3522,3523,3524,3525,3526,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3634,3635,3648,3649,3650,3651,3652,3653,3654,3713,3714,3716,3719,3720,3722,3725,3732,3733,3734,3735,3737,3738,3739,3740,3741,3742,3743,3745,3746,3747,3749,3751,3754,3755,3757,3758,3759,3760,3762,3763,3773,3776,3777,3778,3779,3780,3782,3804,3805,3806,3807,3840,3904,3905,3906,3907,3908,3909,3910,3911,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,3944,3945,3946,3947,3948,3976,3977,3978,3979,3980,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,4125,4126,4127,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,4138,4159,4176,4177,4178,4179,4180,4181,4186,4187,4188,4189,4193,4197,4198,4206,4207,4208,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,4224,4225,4238,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4291,4292,4293,4295,4301,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,4490,4491,4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,4572,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4682,4683,4684,4685,4688,4689,4690,4691,4692,4693,4694,4696,4698,4699,4700,4701,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,4741,4742,4743,4744,4746,4747,4748,4749,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,4781,4782,4783,4784,4786,4787,4788,4789,4792,4793,4794,4795,4796,4797,4798,4800,4802,4803,4804,4805,4808,4809,4810,4811,4812,4813,4814,4815,4816,4817,4818,4819,4820,4821,4822,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,4880,4882,4883,4884,4885,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,4912,4913,4914,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,4992,4993,4994,4995,4996,4997,4998,4999,5000,5001,5002,5003,5004,5005,5006,5007,5024,5025,5026,5027,5028,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,5040,5041,5042,5043,5044,5045,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,5056,5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,5073,5074,5075,5076,5077,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,5104,5105,5106,5107,5108,5109,5112,5113,5114,5115,5116,5117,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149,5150,5151,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,5178,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,5193,5194,5195,5196,5197,5198,5199,5200,5201,5202,5203,5204,5205,5206,5207,5208,5209,5210,5211,5212,5213,5214,5215,5216,5217,5218,5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,5248,5249,5250,5251,5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299,5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440,5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488,5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552,5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600,5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632,5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648,5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664,5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712,5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728,5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5743,5744,5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776,5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5792,5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5870,5871,5872,5873,5874,5875,5876,5877,5878,5879,5880,5888,5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5902,5903,5904,5905,5920,5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5952,5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5998,5999,6000,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6103,6108,6176,6177,6178,6179,6180,6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212,6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259,6260,6261,6262,6263,6264,6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305,6306,6307,6308,6309,6310,6311,6312,6314,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334,6335,6336,6337,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6512,6513,6514,6515,6516,6528,6529,6530,6531,6532,6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6656,6657,6658,6659,6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,6737,6738,6739,6740,6823,6917,6918,6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6981,6982,6983,6984,6985,6986,6987,7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7086,7087,7098,7099,7100,7101,7102,7103,7104,7105,7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,7139,7140,7141,7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,7203,7245,7246,7247,7258,7259,7260,7261,7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7296,7297,7298,7299,7300,7301,7302,7303,7304,7312,7313,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7357,7358,7359,7401,7402,7403,7404,7406,7407,7408,7409,7413,7414,7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7960,7961,7962,7963,7964,7965,7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,8000,8001,8002,8003,8004,8005,8008,8009,8010,8011,8012,8013,8016,8017,8018,8019,8020,8021,8022,8023,8025,8027,8029,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8118,8119,8120,8121,8122,8123,8124,8126,8130,8131,8132,8134,8135,8136,8137,8138,8139,8140,8144,8145,8146,8147,8150,8151,8152,8153,8154,8155,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8178,8179,8180,8182,8183,8184,8185,8186,8187,8188,8305,8319,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8450,8455,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8469,8472,8473,8474,8475,8476,8477,8484,8486,8488,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8508,8509,8510,8511,8517,8518,8519,8520,8521,8526,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584,11264,11265,11266,11267,11268,11269,11270,11271,11272,11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288,11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304,11305,11306,11307,11308,11309,11310,11312,11313,11314,11315,11316,11317,11318,11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334,11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,11348,11349,11350,11351,11352,11353,11354,11355,11356,11357,11358,11360,11361,11362,11363,11364,11365,11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,11378,11379,11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395,11396,11397,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410,11411,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425,11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441,11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457,11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,11470,11471,11472,11473,11474,11475,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486,11487,11488,11489,11490,11491,11492,11499,11500,11501,11502,11506,11507,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,11530,11531,11532,11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548,11549,11550,11551,11552,11553,11554,11555,11556,11557,11559,11565,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578,11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,11592,11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,11605,11606,11607,11608,11609,11610,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622,11623,11631,11648,11649,11650,11651,11652,11653,11654,11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670,11680,11681,11682,11683,11684,11685,11686,11688,11689,11690,11691,11692,11693,11694,11696,11697,11698,11699,11700,11701,11702,11704,11705,11706,11707,11708,11709,11710,11712,11713,11714,11715,11716,11717,11718,11720,11721,11722,11723,11724,11725,11726,11728,11729,11730,11731,11732,11733,11734,11736,11737,11738,11739,11740,11741,11742,12293,12294,12295,12321,12322,12323,12324,12325,12326,12327,12328,12329,12337,12338,12339,12340,12341,12344,12345,12346,12347,12348,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12436,12437,12438,12443,12444,12445,12446,12447,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12540,12541,12542,12543,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12590,12591,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,12704,12705,12706,12707,12708,12709,12710,12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726,12727,12728,12729,12730,12784,12785,12786,12787,12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321,13322,13323,13324,13325,13326,13327,13328,13329,13330,13331,13332,13333,13334,13335,13336,13337,13338,13339,13340,13341,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351,13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382,13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398,13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414,13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430,13431,13432,13433,13434,13435,13436,13437,13438,13439,13440,13441,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,13458,13459,13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506,13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522,13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538,13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554,13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570,13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586,13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602,13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618,13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634,13635,13636,13637,13638,13639,13640,13641,13642,13643,13644,13645,13646,13647,13648,13649,13650,13651,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664,13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680,13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696,13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712,13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728,13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744,13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760,13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,13775,13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791,13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807,13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823,13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839,13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855,13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871,13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887,13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903,13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919,13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935,13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951,13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967,13968,13969,13970,13971,13972,13973,13974,13975,13976,13977,13978,13979,13980,13981,13982,13983,13984,13985,13986,13987,13988,13989,13990,13991,13992,13993,13994,13995,13996,13997,13998,13999,14000,14001,14002,14003,14004,14005,14006,14007,14008,14009,14010,14011,14012,14013,14014,14015,14016,14017,14018,14019,14020,14021,14022,14023,14024,14025,14026,14027,14028,14029,14030,14031,14032,14033,14034,14035,14036,14037,14038,14039,14040,14041,14042,14043,14044,14045,14046,14047,14048,14049,14050,14051,14052,14053,14054,14055,14056,14057,14058,14059,14060,14061,14062,14063,14064,14065,14066,14067,14068,14069,14070,14071,14072,14073,14074,14075,14076,14077,14078,14079,14080,14081,14082,14083,14084,14085,14086,14087,14088,14089,14090,14091,14092,14093,14094,14095,14096,14097,14098,14099,14100,14101,14102,14103,14104,14105,14106,14107,14108,14109,14110,14111,14112,14113,14114,14115,14116,14117,14118,14119,14120,14121,14122,14123,14124,14125,14126,14127,14128,14129,14130,14131,14132,14133,14134,14135,14136,14137,14138,14139,14140,14141,14142,14143,14144,14145,14146,14147,14148,14149,14150,14151,14152,14153,14154,14155,14156,14157,14158,14159,14160,14161,14162,14163,14164,14165,14166,14167,14168,14169,14170,14171,14172,14173,14174,14175,14176,14177,14178,14179,14180,14181,14182,14183,14184,14185,14186,14187,14188,14189,14190,14191,14192,14193,14194,14195,14196,14197,14198,14199,14200,14201,14202,14203,14204,14205,14206,14207,14208,14209,14210,14211,14212,14213,14214,14215,14216,14217,14218,14219,14220,14221,14222,14223,14224,14225,14226,14227,14228,14229,14230,14231,14232,14233,14234,14235,14236,14237,14238,14239,14240,14241,14242,14243,14244,14245,14246,14247,14248,14249,14250,14251,14252,14253,14254,14255,14256,14257,14258,14259,14260,14261,14262,14263,14264,14265,14266,14267,14268,14269,14270,14271,14272,14273,14274,14275,14276,14277,14278,14279,14280,14281,14282,14283,14284,14285,14286,14287,14288,14289,14290,14291,14292,14293,14294,14295,14296,14297,14298,14299,14300,14301,14302,14303,14304,14305,14306,14307,14308,14309,14310,14311,14312,14313,14314,14315,14316,14317,14318,14319,14320,14321,14322,14323,14324,14325,14326,14327,14328,14329,14330,14331,14332,14333,14334,14335,14336,14337,14338,14339,14340,14341,14342,14343,14344,14345,14346,14347,14348,14349,14350,14351,14352,14353,14354,14355,14356,14357,14358,14359,14360,14361,14362,14363,14364,14365,14366,14367,14368,14369,14370,14371,14372,14373,14374,14375,14376,14377,14378,14379,14380,14381,14382,14383,14384,14385,14386,14387,14388,14389,14390,14391,14392,14393,14394,14395,14396,14397,14398,14399,14400,14401,14402,14403,14404,14405,14406,14407,14408,14409,14410,14411,14412,14413,14414,14415,14416,14417,14418,14419,14420,14421,14422,14423,14424,14425,14426,14427,14428,14429,14430,14431,14432,14433,14434,14435,14436,14437,14438,14439,14440,14441,14442,14443,14444,14445,14446,14447,14448,14449,14450,14451,14452,14453,14454,14455,14456,14457,14458,14459,14460,14461,14462,14463,14464,14465,14466,14467,14468,14469,14470,14471,14472,14473,14474,14475,14476,14477,14478,14479,14480,14481,14482,14483,14484,14485,14486,14487,14488,14489,14490,14491,14492,14493,14494,14495,14496,14497,14498,14499,14500,14501,14502,14503,14504,14505,14506,14507,14508,14509,14510,14511,14512,14513,14514,14515,14516,14517,14518,14519,14520,14521,14522,14523,14524,14525,14526,14527,14528,14529,14530,14531,14532,14533,14534,14535,14536,14537,14538,14539,14540,14541,14542,14543,14544,14545,14546,14547,14548,14549,14550,14551,14552,14553,14554,14555,14556,14557,14558,14559,14560,14561,14562,14563,14564,14565,14566,14567,14568,14569,14570,14571,14572,14573,14574,14575,14576,14577,14578,14579,14580,14581,14582,14583,14584,14585,14586,14587,14588,14589,14590,14591,14592,14593,14594,14595,14596,14597,14598,14599,14600,14601,14602,14603,14604,14605,14606,14607,14608,14609,14610,14611,14612,14613,14614,14615,14616,14617,14618,14619,14620,14621,14622,14623,14624,14625,14626,14627,14628,14629,14630,14631,14632,14633,14634,14635,14636,14637,14638,14639,14640,14641,14642,14643,14644,14645,14646,14647,14648,14649,14650,14651,14652,14653,14654,14655,14656,14657,14658,14659,14660,14661,14662,14663,14664,14665,14666,14667,14668,14669,14670,14671,14672,14673,14674,14675,14676,14677,14678,14679,14680,14681,14682,14683,14684,14685,14686,14687,14688,14689,14690,14691,14692,14693,14694,14695,14696,14697,14698,14699,14700,14701,14702,14703,14704,14705,14706,14707,14708,14709,14710,14711,14712,14713,14714,14715,14716,14717,14718,14719,14720,14721,14722,14723,14724,14725,14726,14727,14728,14729,14730,14731,14732,14733,14734,14735,14736,14737,14738,14739,14740,14741,14742,14743,14744,14745,14746,14747,14748,14749,14750,14751,14752,14753,14754,14755,14756,14757,14758,14759,14760,14761,14762,14763,14764,14765,14766,14767,14768,14769,14770,14771,14772,14773,14774,14775,14776,14777,14778,14779,14780,14781,14782,14783,14784,14785,14786,14787,14788,14789,14790,14791,14792,14793,14794,14795,14796,14797,14798,14799,14800,14801,14802,14803,14804,14805,14806,14807,14808,14809,14810,14811,14812,14813,14814,14815,14816,14817,14818,14819,14820,14821,14822,14823,14824,14825,14826,14827,14828,14829,14830,14831,14832,14833,14834,14835,14836,14837,14838,14839,14840,14841,14842,14843,14844,14845,14846,14847,14848,14849,14850,14851,14852,14853,14854,14855,14856,14857,14858,14859,14860,14861,14862,14863,14864,14865,14866,14867,14868,14869,14870,14871,14872,14873,14874,14875,14876,14877,14878,14879,14880,14881,14882,14883,14884,14885,14886,14887,14888,14889,14890,14891,14892,14893,14894,14895,14896,14897,14898,14899,14900,14901,14902,14903,14904,14905,14906,14907,14908,14909,14910,14911,14912,14913,14914,14915,14916,14917,14918,14919,14920,14921,14922,14923,14924,14925,14926,14927,14928,14929,14930,14931,14932,14933,14934,14935,14936,14937,14938,14939,14940,14941,14942,14943,14944,14945,14946,14947,14948,14949,14950,14951,14952,14953,14954,14955,14956,14957,14958,14959,14960,14961,14962,14963,14964,14965,14966,14967,14968,14969,14970,14971,14972,14973,14974,14975,14976,14977,14978,14979,14980,14981,14982,14983,14984,14985,14986,14987,14988,14989,14990,14991,14992,14993,14994,14995,14996,14997,14998,14999,15000,15001,15002,15003,15004,15005,15006,15007,15008,15009,15010,15011,15012,15013,15014,15015,15016,15017,15018,15019,15020,15021,15022,15023,15024,15025,15026,15027,15028,15029,15030,15031,15032,15033,15034,15035,15036,15037,15038,15039,15040,15041,15042,15043,15044,15045,15046,15047,15048,15049,15050,15051,15052,15053,15054,15055,15056,15057,15058,15059,15060,15061,15062,15063,15064,15065,15066,15067,15068,15069,15070,15071,15072,15073,15074,15075,15076,15077,15078,15079,15080,15081,15082,15083,15084,15085,15086,15087,15088,15089,15090,15091,15092,15093,15094,15095,15096,15097,15098,15099,15100,15101,15102,15103,15104,15105,15106,15107,15108,15109,15110,15111,15112,15113,15114,15115,15116,15117,15118,15119,15120,15121,15122,15123,15124,15125,15126,15127,15128,15129,15130,15131,15132,15133,15134,15135,15136,15137,15138,15139,15140,15141,15142,15143,15144,15145,15146,15147,15148,15149,15150,15151,15152,15153,15154,15155,15156,15157,15158,15159,15160,15161,15162,15163,15164,15165,15166,15167,15168,15169,15170,15171,15172,15173,15174,15175,15176,15177,15178,15179,15180,15181,15182,15183,15184,15185,15186,15187,15188,15189,15190,15191,15192,15193,15194,15195,15196,15197,15198,15199,15200,15201,15202,15203,15204,15205,15206,15207,15208,15209,15210,15211,15212,15213,15214,15215,15216,15217,15218,15219,15220,15221,15222,15223,15224,15225,15226,15227,15228,15229,15230,15231,15232,15233,15234,15235,15236,15237,15238,15239,15240,15241,15242,15243,15244,15245,15246,15247,15248,15249,15250,15251,15252,15253,15254,15255,15256,15257,15258,15259,15260,15261,15262,15263,15264,15265,15266,15267,15268,15269,15270,15271,15272,15273,15274,15275,15276,15277,15278,15279,15280,15281,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,15300,15301,15302,15303,15304,15305,15306,15307,15308,15309,15310,15311,15312,15313,15314,15315,15316,15317,15318,15319,15320,15321,15322,15323,15324,15325,15326,15327,15328,15329,15330,15331,15332,15333,15334,15335,15336,15337,15338,15339,15340,15341,15342,15343,15344,15345,15346,15347,15348,15349,15350,15351,15352,15353,15354,15355,15356,15357,15358,15359,15360,15361,15362,15363,15364,15365,15366,15367,15368,15369,15370,15371,15372,15373,15374,15375,15376,15377,15378,15379,15380,15381,15382,15383,15384,15385,15386,15387,15388,15389,15390,15391,15392,15393,15394,15395,15396,15397,15398,15399,15400,15401,15402,15403,15404,15405,15406,15407,15408,15409,15410,15411,15412,15413,15414,15415,15416,15417,15418,15419,15420,15421,15422,15423,15424,15425,15426,15427,15428,15429,15430,15431,15432,15433,15434,15435,15436,15437,15438,15439,15440,15441,15442,15443,15444,15445,15446,15447,15448,15449,15450,15451,15452,15453,15454,15455,15456,15457,15458,15459,15460,15461,15462,15463,15464,15465,15466,15467,15468,15469,15470,15471,15472,15473,15474,15475,15476,15477,15478,15479,15480,15481,15482,15483,15484,15485,15486,15487,15488,15489,15490,15491,15492,15493,15494,15495,15496,15497,15498,15499,15500,15501,15502,15503,15504,15505,15506,15507,15508,15509,15510,15511,15512,15513,15514,15515,15516,15517,15518,15519,15520,15521,15522,15523,15524,15525,15526,15527,15528,15529,15530,15531,15532,15533,15534,15535,15536,15537,15538,15539,15540,15541,15542,15543,15544,15545,15546,15547,15548,15549,15550,15551,15552,15553,15554,15555,15556,15557,15558,15559,15560,15561,15562,15563,15564,15565,15566,15567,15568,15569,15570,15571,15572,15573,15574,15575,15576,15577,15578,15579,15580,15581,15582,15583,15584,15585,15586,15587,15588,15589,15590,15591,15592,15593,15594,15595,15596,15597,15598,15599,15600,15601,15602,15603,15604,15605,15606,15607,15608,15609,15610,15611,15612,15613,15614,15615,15616,15617,15618,15619,15620,15621,15622,15623,15624,15625,15626,15627,15628,15629,15630,15631,15632,15633,15634,15635,15636,15637,15638,15639,15640,15641,15642,15643,15644,15645,15646,15647,15648,15649,15650,15651,15652,15653,15654,15655,15656,15657,15658,15659,15660,15661,15662,15663,15664,15665,15666,15667,15668,15669,15670,15671,15672,15673,15674,15675,15676,15677,15678,15679,15680,15681,15682,15683,15684,15685,15686,15687,15688,15689,15690,15691,15692,15693,15694,15695,15696,15697,15698,15699,15700,15701,15702,15703,15704,15705,15706,15707,15708,15709,15710,15711,15712,15713,15714,15715,15716,15717,15718,15719,15720,15721,15722,15723,15724,15725,15726,15727,15728,15729,15730,15731,15732,15733,15734,15735,15736,15737,15738,15739,15740,15741,15742,15743,15744,15745,15746,15747,15748,15749,15750,15751,15752,15753,15754,15755,15756,15757,15758,15759,15760,15761,15762,15763,15764,15765,15766,15767,15768,15769,15770,15771,15772,15773,15774,15775,15776,15777,15778,15779,15780,15781,15782,15783,15784,15785,15786,15787,15788,15789,15790,15791,15792,15793,15794,15795,15796,15797,15798,15799,15800,15801,15802,15803,15804,15805,15806,15807,15808,15809,15810,15811,15812,15813,15814,15815,15816,15817,15818,15819,15820,15821,15822,15823,15824,15825,15826,15827,15828,15829,15830,15831,15832,15833,15834,15835,15836,15837,15838,15839,15840,15841,15842,15843,15844,15845,15846,15847,15848,15849,15850,15851,15852,15853,15854,15855,15856,15857,15858,15859,15860,15861,15862,15863,15864,15865,15866,15867,15868,15869,15870,15871,15872,15873,15874,15875,15876,15877,15878,15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15891,15892,15893,15894,15895,15896,15897,15898,15899,15900,15901,15902,15903,15904,15905,15906,15907,15908,15909,15910,15911,15912,15913,15914,15915,15916,15917,15918,15919,15920,15921,15922,15923,15924,15925,15926,15927,15928,15929,15930,15931,15932,15933,15934,15935,15936,15937,15938,15939,15940,15941,15942,15943,15944,15945,15946,15947,15948,15949,15950,15951,15952,15953,15954,15955,15956,15957,15958,15959,15960,15961,15962,15963,15964,15965,15966,15967,15968,15969,15970,15971,15972,15973,15974,15975,15976,15977,15978,15979,15980,15981,15982,15983,15984,15985,15986,15987,15988,15989,15990,15991,15992,15993,15994,15995,15996,15997,15998,15999,16000,16001,16002,16003,16004,16005,16006,16007,16008,16009,16010,16011,16012,16013,16014,16015,16016,16017,16018,16019,16020,16021,16022,16023,16024,16025,16026,16027,16028,16029,16030,16031,16032,16033,16034,16035,16036,16037,16038,16039,16040,16041,16042,16043,16044,16045,16046,16047,16048,16049,16050,16051,16052,16053,16054,16055,16056,16057,16058,16059,16060,16061,16062,16063,16064,16065,16066,16067,16068,16069,16070,16071,16072,16073,16074,16075,16076,16077,16078,16079,16080,16081,16082,16083,16084,16085,16086,16087,16088,16089,16090,16091,16092,16093,16094,16095,16096,16097,16098,16099,16100,16101,16102,16103,16104,16105,16106,16107,16108,16109,16110,16111,16112,16113,16114,16115,16116,16117,16118,16119,16120,16121,16122,16123,16124,16125,16126,16127,16128,16129,16130,16131,16132,16133,16134,16135,16136,16137,16138,16139,16140,16141,16142,16143,16144,16145,16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160,16161,16162,16163,16164,16165,16166,16167,16168,16169,16170,16171,16172,16173,16174,16175,16176,16177,16178,16179,16180,16181,16182,16183,16184,16185,16186,16187,16188,16189,16190,16191,16192,16193,16194,16195,16196,16197,16198,16199,16200,16201,16202,16203,16204,16205,16206,16207,16208,16209,16210,16211,16212,16213,16214,16215,16216,16217,16218,16219,16220,16221,16222,16223,16224,16225,16226,16227,16228,16229,16230,16231,16232,16233,16234,16235,16236,16237,16238,16239,16240,16241,16242,16243,16244,16245,16246,16247,16248,16249,16250,16251,16252,16253,16254,16255,16256,16257,16258,16259,16260,16261,16262,16263,16264,16265,16266,16267,16268,16269,16270,16271,16272,16273,16274,16275,16276,16277,16278,16279,16280,16281,16282,16283,16284,16285,16286,16287,16288,16289,16290,16291,16292,16293,16294,16295,16296,16297,16298,16299,16300,16301,16302,16303,16304,16305,16306,16307,16308,16309,16310,16311,16312,16313,16314,16315,16316,16317,16318,16319,16320,16321,16322,16323,16324,16325,16326,16327,16328,16329,16330,16331,16332,16333,16334,16335,16336,16337,16338,16339,16340,16341,16342,16343,16344,16345,16346,16347,16348,16349,16350,16351,16352,16353,16354,16355,16356,16357,16358,16359,16360,16361,16362,16363,16364,16365,16366,16367,16368,16369,16370,16371,16372,16373,16374,16375,16376,16377,16378,16379,16380,16381,16382,16383,16384,16385,16386,16387,16388,16389,16390,16391,16392,16393,16394,16395,16396,16397,16398,16399,16400,16401,16402,16403,16404,16405,16406,16407,16408,16409,16410,16411,16412,16413,16414,16415,16416,16417,16418,16419,16420,16421,16422,16423,16424,16425,16426,16427,16428,16429,16430,16431,16432,16433,16434,16435,16436,16437,16438,16439,16440,16441,16442,16443,16444,16445,16446,16447,16448,16449,16450,16451,16452,16453,16454,16455,16456,16457,16458,16459,16460,16461,16462,16463,16464,16465,16466,16467,16468,16469,16470,16471,16472,16473,16474,16475,16476,16477,16478,16479,16480,16481,16482,16483,16484,16485,16486,16487,16488,16489,16490,16491,16492,16493,16494,16495,16496,16497,16498,16499,16500,16501,16502,16503,16504,16505,16506,16507,16508,16509,16510,16511,16512,16513,16514,16515,16516,16517,16518,16519,16520,16521,16522,16523,16524,16525,16526,16527,16528,16529,16530,16531,16532,16533,16534,16535,16536,16537,16538,16539,16540,16541,16542,16543,16544,16545,16546,16547,16548,16549,16550,16551,16552,16553,16554,16555,16556,16557,16558,16559,16560,16561,16562,16563,16564,16565,16566,16567,16568,16569,16570,16571,16572,16573,16574,16575,16576,16577,16578,16579,16580,16581,16582,16583,16584,16585,16586,16587,16588,16589,16590,16591,16592,16593,16594,16595,16596,16597,16598,16599,16600,16601,16602,16603,16604,16605,16606,16607,16608,16609,16610,16611,16612,16613,16614,16615,16616,16617,16618,16619,16620,16621,16622,16623,16624,16625,16626,16627,16628,16629,16630,16631,16632,16633,16634,16635,16636,16637,16638,16639,16640,16641,16642,16643,16644,16645,16646,16647,16648,16649,16650,16651,16652,16653,16654,16655,16656,16657,16658,16659,16660,16661,16662,16663,16664,16665,16666,16667,16668,16669,16670,16671,16672,16673,16674,16675,16676,16677,16678,16679,16680,16681,16682,16683,16684,16685,16686,16687,16688,16689,16690,16691,16692,16693,16694,16695,16696,16697,16698,16699,16700,16701,16702,16703,16704,16705,16706,16707,16708,16709,16710,16711,16712,16713,16714,16715,16716,16717,16718,16719,16720,16721,16722,16723,16724,16725,16726,16727,16728,16729,16730,16731,16732,16733,16734,16735,16736,16737,16738,16739,16740,16741,16742,16743,16744,16745,16746,16747,16748,16749,16750,16751,16752,16753,16754,16755,16756,16757,16758,16759,16760,16761,16762,16763,16764,16765,16766,16767,16768,16769,16770,16771,16772,16773,16774,16775,16776,16777,16778,16779,16780,16781,16782,16783,16784,16785,16786,16787,16788,16789,16790,16791,16792,16793,16794,16795,16796,16797,16798,16799,16800,16801,16802,16803,16804,16805,16806,16807,16808,16809,16810,16811,16812,16813,16814,16815,16816,16817,16818,16819,16820,16821,16822,16823,16824,16825,16826,16827,16828,16829,16830,16831,16832,16833,16834,16835,16836,16837,16838,16839,16840,16841,16842,16843,16844,16845,16846,16847,16848,16849,16850,16851,16852,16853,16854,16855,16856,16857,16858,16859,16860,16861,16862,16863,16864,16865,16866,16867,16868,16869,16870,16871,16872,16873,16874,16875,16876,16877,16878,16879,16880,16881,16882,16883,16884,16885,16886,16887,16888,16889,16890,16891,16892,16893,16894,16895,16896,16897,16898,16899,16900,16901,16902,16903,16904,16905,16906,16907,16908,16909,16910,16911,16912,16913,16914,16915,16916,16917,16918,16919,16920,16921,16922,16923,16924,16925,16926,16927,16928,16929,16930,16931,16932,16933,16934,16935,16936,16937,16938,16939,16940,16941,16942,16943,16944,16945,16946,16947,16948,16949,16950,16951,16952,16953,16954,16955,16956,16957,16958,16959,16960,16961,16962,16963,16964,16965,16966,16967,16968,16969,16970,16971,16972,16973,16974,16975,16976,16977,16978,16979,16980,16981,16982,16983,16984,16985,16986,16987,16988,16989,16990,16991,16992,16993,16994,16995,16996,16997,16998,16999,17000,17001,17002,17003,17004,17005,17006,17007,17008,17009,17010,17011,17012,17013,17014,17015,17016,17017,17018,17019,17020,17021,17022,17023,17024,17025,17026,17027,17028,17029,17030,17031,17032,17033,17034,17035,17036,17037,17038,17039,17040,17041,17042,17043,17044,17045,17046,17047,17048,17049,17050,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,17062,17063,17064,17065,17066,17067,17068,17069,17070,17071,17072,17073,17074,17075,17076,17077,17078,17079,17080,17081,17082,17083,17084,17085,17086,17087,17088,17089,17090,17091,17092,17093,17094,17095,17096,17097,17098,17099,17100,17101,17102,17103,17104,17105,17106,17107,17108,17109,17110,17111,17112,17113,17114,17115,17116,17117,17118,17119,17120,17121,17122,17123,17124,17125,17126,17127,17128,17129,17130,17131,17132,17133,17134,17135,17136,17137,17138,17139,17140,17141,17142,17143,17144,17145,17146,17147,17148,17149,17150,17151,17152,17153,17154,17155,17156,17157,17158,17159,17160,17161,17162,17163,17164,17165,17166,17167,17168,17169,17170,17171,17172,17173,17174,17175,17176,17177,17178,17179,17180,17181,17182,17183,17184,17185,17186,17187,17188,17189,17190,17191,17192,17193,17194,17195,17196,17197,17198,17199,17200,17201,17202,17203,17204,17205,17206,17207,17208,17209,17210,17211,17212,17213,17214,17215,17216,17217,17218,17219,17220,17221,17222,17223,17224,17225,17226,17227,17228,17229,17230,17231,17232,17233,17234,17235,17236,17237,17238,17239,17240,17241,17242,17243,17244,17245,17246,17247,17248,17249,17250,17251,17252,17253,17254,17255,17256,17257,17258,17259,17260,17261,17262,17263,17264,17265,17266,17267,17268,17269,17270,17271,17272,17273,17274,17275,17276,17277,17278,17279,17280,17281,17282,17283,17284,17285,17286,17287,17288,17289,17290,17291,17292,17293,17294,17295,17296,17297,17298,17299,17300,17301,17302,17303,17304,17305,17306,17307,17308,17309,17310,17311,17312,17313,17314,17315,17316,17317,17318,17319,17320,17321,17322,17323,17324,17325,17326,17327,17328,17329,17330,17331,17332,17333,17334,17335,17336,17337,17338,17339,17340,17341,17342,17343,17344,17345,17346,17347,17348,17349,17350,17351,17352,17353,17354,17355,17356,17357,17358,17359,17360,17361,17362,17363,17364,17365,17366,17367,17368,17369,17370,17371,17372,17373,17374,17375,17376,17377,17378,17379,17380,17381,17382,17383,17384,17385,17386,17387,17388,17389,17390,17391,17392,17393,17394,17395,17396,17397,17398,17399,17400,17401,17402,17403,17404,17405,17406,17407,17408,17409,17410,17411,17412,17413,17414,17415,17416,17417,17418,17419,17420,17421,17422,17423,17424,17425,17426,17427,17428,17429,17430,17431,17432,17433,17434,17435,17436,17437,17438,17439,17440,17441,17442,17443,17444,17445,17446,17447,17448,17449,17450,17451,17452,17453,17454,17455,17456,17457,17458,17459,17460,17461,17462,17463,17464,17465,17466,17467,17468,17469,17470,17471,17472,17473,17474,17475,17476,17477,17478,17479,17480,17481,17482,17483,17484,17485,17486,17487,17488,17489,17490,17491,17492,17493,17494,17495,17496,17497,17498,17499,17500,17501,17502,17503,17504,17505,17506,17507,17508,17509,17510,17511,17512,17513,17514,17515,17516,17517,17518,17519,17520,17521,17522,17523,17524,17525,17526,17527,17528,17529,17530,17531,17532,17533,17534,17535,17536,17537,17538,17539,17540,17541,17542,17543,17544,17545,17546,17547,17548,17549,17550,17551,17552,17553,17554,17555,17556,17557,17558,17559,17560,17561,17562,17563,17564,17565,17566,17567,17568,17569,17570,17571,17572,17573,17574,17575,17576,17577,17578,17579,17580,17581,17582,17583,17584,17585,17586,17587,17588,17589,17590,17591,17592,17593,17594,17595,17596,17597,17598,17599,17600,17601,17602,17603,17604,17605,17606,17607,17608,17609,17610,17611,17612,17613,17614,17615,17616,17617,17618,17619,17620,17621,17622,17623,17624,17625,17626,17627,17628,17629,17630,17631,17632,17633,17634,17635,17636,17637,17638,17639,17640,17641,17642,17643,17644,17645,17646,17647,17648,17649,17650,17651,17652,17653,17654,17655,17656,17657,17658,17659,17660,17661,17662,17663,17664,17665,17666,17667,17668,17669,17670,17671,17672,17673,17674,17675,17676,17677,17678,17679,17680,17681,17682,17683,17684,17685,17686,17687,17688,17689,17690,17691,17692,17693,17694,17695,17696,17697,17698,17699,17700,17701,17702,17703,17704,17705,17706,17707,17708,17709,17710,17711,17712,17713,17714,17715,17716,17717,17718,17719,17720,17721,17722,17723,17724,17725,17726,17727,17728,17729,17730,17731,17732,17733,17734,17735,17736,17737,17738,17739,17740,17741,17742,17743,17744,17745,17746,17747,17748,17749,17750,17751,17752,17753,17754,17755,17756,17757,17758,17759,17760,17761,17762,17763,17764,17765,17766,17767,17768,17769,17770,17771,17772,17773,17774,17775,17776,17777,17778,17779,17780,17781,17782,17783,17784,17785,17786,17787,17788,17789,17790,17791,17792,17793,17794,17795,17796,17797,17798,17799,17800,17801,17802,17803,17804,17805,17806,17807,17808,17809,17810,17811,17812,17813,17814,17815,17816,17817,17818,17819,17820,17821,17822,17823,17824,17825,17826,17827,17828,17829,17830,17831,17832,17833,17834,17835,17836,17837,17838,17839,17840,17841,17842,17843,17844,17845,17846,17847,17848,17849,17850,17851,17852,17853,17854,17855,17856,17857,17858,17859,17860,17861,17862,17863,17864,17865,17866,17867,17868,17869,17870,17871,17872,17873,17874,17875,17876,17877,17878,17879,17880,17881,17882,17883,17884,17885,17886,17887,17888,17889,17890,17891,17892,17893,17894,17895,17896,17897,17898,17899,17900,17901,17902,17903,17904,17905,17906,17907,17908,17909,17910,17911,17912,17913,17914,17915,17916,17917,17918,17919,17920,17921,17922,17923,17924,17925,17926,17927,17928,17929,17930,17931,17932,17933,17934,17935,17936,17937,17938,17939,17940,17941,17942,17943,17944,17945,17946,17947,17948,17949,17950,17951,17952,17953,17954,17955,17956,17957,17958,17959,17960,17961,17962,17963,17964,17965,17966,17967,17968,17969,17970,17971,17972,17973,17974,17975,17976,17977,17978,17979,17980,17981,17982,17983,17984,17985,17986,17987,17988,17989,17990,17991,17992,17993,17994,17995,17996,17997,17998,17999,18000,18001,18002,18003,18004,18005,18006,18007,18008,18009,18010,18011,18012,18013,18014,18015,18016,18017,18018,18019,18020,18021,18022,18023,18024,18025,18026,18027,18028,18029,18030,18031,18032,18033,18034,18035,18036,18037,18038,18039,18040,18041,18042,18043,18044,18045,18046,18047,18048,18049,18050,18051,18052,18053,18054,18055,18056,18057,18058,18059,18060,18061,18062,18063,18064,18065,18066,18067,18068,18069,18070,18071,18072,18073,18074,18075,18076,18077,18078,18079,18080,18081,18082,18083,18084,18085,18086,18087,18088,18089,18090,18091,18092,18093,18094,18095,18096,18097,18098,18099,18100,18101,18102,18103,18104,18105,18106,18107,18108,18109,18110,18111,18112,18113,18114,18115,18116,18117,18118,18119,18120,18121,18122,18123,18124,18125,18126,18127,18128,18129,18130,18131,18132,18133,18134,18135,18136,18137,18138,18139,18140,18141,18142,18143,18144,18145,18146,18147,18148,18149,18150,18151,18152,18153,18154,18155,18156,18157,18158,18159,18160,18161,18162,18163,18164,18165,18166,18167,18168,18169,18170,18171,18172,18173,18174,18175,18176,18177,18178,18179,18180,18181,18182,18183,18184,18185,18186,18187,18188,18189,18190,18191,18192,18193,18194,18195,18196,18197,18198,18199,18200,18201,18202,18203,18204,18205,18206,18207,18208,18209,18210,18211,18212,18213,18214,18215,18216,18217,18218,18219,18220,18221,18222,18223,18224,18225,18226,18227,18228,18229,18230,18231,18232,18233,18234,18235,18236,18237,18238,18239,18240,18241,18242,18243,18244,18245,18246,18247,18248,18249,18250,18251,18252,18253,18254,18255,18256,18257,18258,18259,18260,18261,18262,18263,18264,18265,18266,18267,18268,18269,18270,18271,18272,18273,18274,18275,18276,18277,18278,18279,18280,18281,18282,18283,18284,18285,18286,18287,18288,18289,18290,18291,18292,18293,18294,18295,18296,18297,18298,18299,18300,18301,18302,18303,18304,18305,18306,18307,18308,18309,18310,18311,18312,18313,18314,18315,18316,18317,18318,18319,18320,18321,18322,18323,18324,18325,18326,18327,18328,18329,18330,18331,18332,18333,18334,18335,18336,18337,18338,18339,18340,18341,18342,18343,18344,18345,18346,18347,18348,18349,18350,18351,18352,18353,18354,18355,18356,18357,18358,18359,18360,18361,18362,18363,18364,18365,18366,18367,18368,18369,18370,18371,18372,18373,18374,18375,18376,18377,18378,18379,18380,18381,18382,18383,18384,18385,18386,18387,18388,18389,18390,18391,18392,18393,18394,18395,18396,18397,18398,18399,18400,18401,18402,18403,18404,18405,18406,18407,18408,18409,18410,18411,18412,18413,18414,18415,18416,18417,18418,18419,18420,18421,18422,18423,18424,18425,18426,18427,18428,18429,18430,18431,18432,18433,18434,18435,18436,18437,18438,18439,18440,18441,18442,18443,18444,18445,18446,18447,18448,18449,18450,18451,18452,18453,18454,18455,18456,18457,18458,18459,18460,18461,18462,18463,18464,18465,18466,18467,18468,18469,18470,18471,18472,18473,18474,18475,18476,18477,18478,18479,18480,18481,18482,18483,18484,18485,18486,18487,18488,18489,18490,18491,18492,18493,18494,18495,18496,18497,18498,18499,18500,18501,18502,18503,18504,18505,18506,18507,18508,18509,18510,18511,18512,18513,18514,18515,18516,18517,18518,18519,18520,18521,18522,18523,18524,18525,18526,18527,18528,18529,18530,18531,18532,18533,18534,18535,18536,18537,18538,18539,18540,18541,18542,18543,18544,18545,18546,18547,18548,18549,18550,18551,18552,18553,18554,18555,18556,18557,18558,18559,18560,18561,18562,18563,18564,18565,18566,18567,18568,18569,18570,18571,18572,18573,18574,18575,18576,18577,18578,18579,18580,18581,18582,18583,18584,18585,18586,18587,18588,18589,18590,18591,18592,18593,18594,18595,18596,18597,18598,18599,18600,18601,18602,18603,18604,18605,18606,18607,18608,18609,18610,18611,18612,18613,18614,18615,18616,18617,18618,18619,18620,18621,18622,18623,18624,18625,18626,18627,18628,18629,18630,18631,18632,18633,18634,18635,18636,18637,18638,18639,18640,18641,18642,18643,18644,18645,18646,18647,18648,18649,18650,18651,18652,18653,18654,18655,18656,18657,18658,18659,18660,18661,18662,18663,18664,18665,18666,18667,18668,18669,18670,18671,18672,18673,18674,18675,18676,18677,18678,18679,18680,18681,18682,18683,18684,18685,18686,18687,18688,18689,18690,18691,18692,18693,18694,18695,18696,18697,18698,18699,18700,18701,18702,18703,18704,18705,18706,18707,18708,18709,18710,18711,18712,18713,18714,18715,18716,18717,18718,18719,18720,18721,18722,18723,18724,18725,18726,18727,18728,18729,18730,18731,18732,18733,18734,18735,18736,18737,18738,18739,18740,18741,18742,18743,18744,18745,18746,18747,18748,18749,18750,18751,18752,18753,18754,18755,18756,18757,18758,18759,18760,18761,18762,18763,18764,18765,18766,18767,18768,18769,18770,18771,18772,18773,18774,18775,18776,18777,18778,18779,18780,18781,18782,18783,18784,18785,18786,18787,18788,18789,18790,18791,18792,18793,18794,18795,18796,18797,18798,18799,18800,18801,18802,18803,18804,18805,18806,18807,18808,18809,18810,18811,18812,18813,18814,18815,18816,18817,18818,18819,18820,18821,18822,18823,18824,18825,18826,18827,18828,18829,18830,18831,18832,18833,18834,18835,18836,18837,18838,18839,18840,18841,18842,18843,18844,18845,18846,18847,18848,18849,18850,18851,18852,18853,18854,18855,18856,18857,18858,18859,18860,18861,18862,18863,18864,18865,18866,18867,18868,18869,18870,18871,18872,18873,18874,18875,18876,18877,18878,18879,18880,18881,18882,18883,18884,18885,18886,18887,18888,18889,18890,18891,18892,18893,18894,18895,18896,18897,18898,18899,18900,18901,18902,18903,18904,18905,18906,18907,18908,18909,18910,18911,18912,18913,18914,18915,18916,18917,18918,18919,18920,18921,18922,18923,18924,18925,18926,18927,18928,18929,18930,18931,18932,18933,18934,18935,18936,18937,18938,18939,18940,18941,18942,18943,18944,18945,18946,18947,18948,18949,18950,18951,18952,18953,18954,18955,18956,18957,18958,18959,18960,18961,18962,18963,18964,18965,18966,18967,18968,18969,18970,18971,18972,18973,18974,18975,18976,18977,18978,18979,18980,18981,18982,18983,18984,18985,18986,18987,18988,18989,18990,18991,18992,18993,18994,18995,18996,18997,18998,18999,19000,19001,19002,19003,19004,19005,19006,19007,19008,19009,19010,19011,19012,19013,19014,19015,19016,19017,19018,19019,19020,19021,19022,19023,19024,19025,19026,19027,19028,19029,19030,19031,19032,19033,19034,19035,19036,19037,19038,19039,19040,19041,19042,19043,19044,19045,19046,19047,19048,19049,19050,19051,19052,19053,19054,19055,19056,19057,19058,19059,19060,19061,19062,19063,19064,19065,19066,19067,19068,19069,19070,19071,19072,19073,19074,19075,19076,19077,19078,19079,19080,19081,19082,19083,19084,19085,19086,19087,19088,19089,19090,19091,19092,19093,19094,19095,19096,19097,19098,19099,19100,19101,19102,19103,19104,19105,19106,19107,19108,19109,19110,19111,19112,19113,19114,19115,19116,19117,19118,19119,19120,19121,19122,19123,19124,19125,19126,19127,19128,19129,19130,19131,19132,19133,19134,19135,19136,19137,19138,19139,19140,19141,19142,19143,19144,19145,19146,19147,19148,19149,19150,19151,19152,19153,19154,19155,19156,19157,19158,19159,19160,19161,19162,19163,19164,19165,19166,19167,19168,19169,19170,19171,19172,19173,19174,19175,19176,19177,19178,19179,19180,19181,19182,19183,19184,19185,19186,19187,19188,19189,19190,19191,19192,19193,19194,19195,19196,19197,19198,19199,19200,19201,19202,19203,19204,19205,19206,19207,19208,19209,19210,19211,19212,19213,19214,19215,19216,19217,19218,19219,19220,19221,19222,19223,19224,19225,19226,19227,19228,19229,19230,19231,19232,19233,19234,19235,19236,19237,19238,19239,19240,19241,19242,19243,19244,19245,19246,19247,19248,19249,19250,19251,19252,19253,19254,19255,19256,19257,19258,19259,19260,19261,19262,19263,19264,19265,19266,19267,19268,19269,19270,19271,19272,19273,19274,19275,19276,19277,19278,19279,19280,19281,19282,19283,19284,19285,19286,19287,19288,19289,19290,19291,19292,19293,19294,19295,19296,19297,19298,19299,19300,19301,19302,19303,19304,19305,19306,19307,19308,19309,19310,19311,19312,19313,19314,19315,19316,19317,19318,19319,19320,19321,19322,19323,19324,19325,19326,19327,19328,19329,19330,19331,19332,19333,19334,19335,19336,19337,19338,19339,19340,19341,19342,19343,19344,19345,19346,19347,19348,19349,19350,19351,19352,19353,19354,19355,19356,19357,19358,19359,19360,19361,19362,19363,19364,19365,19366,19367,19368,19369,19370,19371,19372,19373,19374,19375,19376,19377,19378,19379,19380,19381,19382,19383,19384,19385,19386,19387,19388,19389,19390,19391,19392,19393,19394,19395,19396,19397,19398,19399,19400,19401,19402,19403,19404,19405,19406,19407,19408,19409,19410,19411,19412,19413,19414,19415,19416,19417,19418,19419,19420,19421,19422,19423,19424,19425,19426,19427,19428,19429,19430,19431,19432,19433,19434,19435,19436,19437,19438,19439,19440,19441,19442,19443,19444,19445,19446,19447,19448,19449,19450,19451,19452,19453,19454,19455,19456,19457,19458,19459,19460,19461,19462,19463,19464,19465,19466,19467,19468,19469,19470,19471,19472,19473,19474,19475,19476,19477,19478,19479,19480,19481,19482,19483,19484,19485,19486,19487,19488,19489,19490,19491,19492,19493,19494,19495,19496,19497,19498,19499,19500,19501,19502,19503,19504,19505,19506,19507,19508,19509,19510,19511,19512,19513,19514,19515,19516,19517,19518,19519,19520,19521,19522,19523,19524,19525,19526,19527,19528,19529,19530,19531,19532,19533,19534,19535,19536,19537,19538,19539,19540,19541,19542,19543,19544,19545,19546,19547,19548,19549,19550,19551,19552,19553,19554,19555,19556,19557,19558,19559,19560,19561,19562,19563,19564,19565,19566,19567,19568,19569,19570,19571,19572,19573,19574,19575,19576,19577,19578,19579,19580,19581,19582,19583,19584,19585,19586,19587,19588,19589,19590,19591,19592,19593,19594,19595,19596,19597,19598,19599,19600,19601,19602,19603,19604,19605,19606,19607,19608,19609,19610,19611,19612,19613,19614,19615,19616,19617,19618,19619,19620,19621,19622,19623,19624,19625,19626,19627,19628,19629,19630,19631,19632,19633,19634,19635,19636,19637,19638,19639,19640,19641,19642,19643,19644,19645,19646,19647,19648,19649,19650,19651,19652,19653,19654,19655,19656,19657,19658,19659,19660,19661,19662,19663,19664,19665,19666,19667,19668,19669,19670,19671,19672,19673,19674,19675,19676,19677,19678,19679,19680,19681,19682,19683,19684,19685,19686,19687,19688,19689,19690,19691,19692,19693,19694,19695,19696,19697,19698,19699,19700,19701,19702,19703,19704,19705,19706,19707,19708,19709,19710,19711,19712,19713,19714,19715,19716,19717,19718,19719,19720,19721,19722,19723,19724,19725,19726,19727,19728,19729,19730,19731,19732,19733,19734,19735,19736,19737,19738,19739,19740,19741,19742,19743,19744,19745,19746,19747,19748,19749,19750,19751,19752,19753,19754,19755,19756,19757,19758,19759,19760,19761,19762,19763,19764,19765,19766,19767,19768,19769,19770,19771,19772,19773,19774,19775,19776,19777,19778,19779,19780,19781,19782,19783,19784,19785,19786,19787,19788,19789,19790,19791,19792,19793,19794,19795,19796,19797,19798,19799,19800,19801,19802,19803,19804,19805,19806,19807,19808,19809,19810,19811,19812,19813,19814,19815,19816,19817,19818,19819,19820,19821,19822,19823,19824,19825,19826,19827,19828,19829,19830,19831,19832,19833,19834,19835,19836,19837,19838,19839,19840,19841,19842,19843,19844,19845,19846,19847,19848,19849,19850,19851,19852,19853,19854,19855,19856,19857,19858,19859,19860,19861,19862,19863,19864,19865,19866,19867,19868,19869,19870,19871,19872,19873,19874,19875,19876,19877,19878,19879,19880,19881,19882,19883,19884,19885,19886,19887,19888,19889,19890,19891,19892,19893,19968,19969,19970,19971,19972,19973,19974,19975,19976,19977,19978,19979,19980,19981,19982,19983,19984,19985,19986,19987,19988,19989,19990,19991,19992,19993,19994,19995,19996,19997,19998,19999,20000,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20094,20095,20096,20097,20098,20099,20100,20101,20102,20103,20104,20105,20106,20107,20108,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20119,20120,20121,20122,20123,20124,20125,20126,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20153,20154,20155,20156,20157,20158,20159,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185,20186,20187,20188,20189,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20200,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212,20213,20214,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20225,20226,20227,20228,20229,20230,20231,20232,20233,20234,20235,20236,20237,20238,20239,20240,20241,20242,20243,20244,20245,20246,20247,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20267,20268,20269,20270,20271,20272,20273,20274,20275,20276,20277,20278,20279,20280,20281,20282,20283,20284,20285,20286,20287,20288,20289,20290,20291,20292,20293,20294,20295,20296,20297,20298,20299,20300,20301,20302,20303,20304,20305,20306,20307,20308,20309,20310,20311,20312,20313,20314,20315,20316,20317,20318,20319,20320,20321,20322,20323,20324,20325,20326,20327,20328,20329,20330,20331,20332,20333,20334,20335,20336,20337,20338,20339,20340,20341,20342,20343,20344,20345,20346,20347,20348,20349,20350,20351,20352,20353,20354,20355,20356,20357,20358,20359,20360,20361,20362,20363,20364,20365,20366,20367,20368,20369,20370,20371,20372,20373,20374,20375,20376,20377,20378,20379,20380,20381,20382,20383,20384,20385,20386,20387,20388,20389,20390,20391,20392,20393,20394,20395,20396,20397,20398,20399,20400,20401,20402,20403,20404,20405,20406,20407,20408,20409,20410,20411,20412,20413,20414,20415,20416,20417,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20430,20431,20432,20433,20434,20435,20436,20437,20438,20439,20440,20441,20442,20443,20444,20445,20446,20447,20448,20449,20450,20451,20452,20453,20454,20455,20456,20457,20458,20459,20460,20461,20462,20463,20464,20465,20466,20467,20468,20469,20470,20471,20472,20473,20474,20475,20476,20477,20478,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20492,20493,20494,20495,20496,20497,20498,20499,20500,20501,20502,20503,20504,20505,20506,20507,20508,20509,20510,20511,20512,20513,20514,20515,20516,20517,20518,20519,20520,20521,20522,20523,20524,20525,20526,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20538,20539,20540,20541,20542,20543,20544,20545,20546,20547,20548,20549,20550,20551,20552,20553,20554,20555,20556,20557,20558,20559,20560,20561,20562,20563,20564,20565,20566,20567,20568,20569,20570,20571,20572,20573,20574,20575,20576,20577,20578,20579,20580,20581,20582,20583,20584,20585,20586,20587,20588,20589,20590,20591,20592,20593,20594,20595,20596,20597,20598,20599,20600,20601,20602,20603,20604,20605,20606,20607,20608,20609,20610,20611,20612,20613,20614,20615,20616,20617,20618,20619,20620,20621,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20643,20644,20645,20646,20647,20648,20649,20650,20651,20652,20653,20654,20655,20656,20657,20658,20659,20660,20661,20662,20663,20664,20665,20666,20667,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20687,20688,20689,20690,20691,20692,20693,20694,20695,20696,20697,20698,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20710,20711,20712,20713,20714,20715,20716,20717,20718,20719,20720,20721,20722,20723,20724,20725,20726,20727,20728,20729,20730,20731,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20742,20743,20744,20745,20746,20747,20748,20749,20750,20751,20752,20753,20754,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20769,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20799,20800,20801,20802,20803,20804,20805,20806,20807,20808,20809,20810,20811,20812,20813,20814,20815,20816,20817,20818,20819,20820,20821,20822,20823,20824,20825,20826,20827,20828,20829,20830,20831,20832,20833,20834,20835,20836,20837,20838,20839,20840,20841,20842,20843,20844,20845,20846,20847,20848,20849,20850,20851,20852,20853,20854,20855,20856,20857,20858,20859,20860,20861,20862,20863,20864,20865,20866,20867,20868,20869,20870,20871,20872,20873,20874,20875,20876,20877,20878,20879,20880,20881,20882,20883,20884,20885,20886,20887,20888,20889,20890,20891,20892,20893,20894,20895,20896,20897,20898,20899,20900,20901,20902,20903,20904,20905,20906,20907,20908,20909,20910,20911,20912,20913,20914,20915,20916,20917,20918,20919,20920,20921,20922,20923,20924,20925,20926,20927,20928,20929,20930,20931,20932,20933,20934,20935,20936,20937,20938,20939,20940,20941,20942,20943,20944,20945,20946,20947,20948,20949,20950,20951,20952,20953,20954,20955,20956,20957,20958,20959,20960,20961,20962,20963,20964,20965,20966,20967,20968,20969,20970,20971,20972,20973,20974,20975,20976,20977,20978,20979,20980,20981,20982,20983,20984,20985,20986,20987,20988,20989,20990,20991,20992,20993,20994,20995,20996,20997,20998,20999,21000,21001,21002,21003,21004,21005,21006,21007,21008,21009,21010,21011,21012,21013,21014,21015,21016,21017,21018,21019,21020,21021,21022,21023,21024,21025,21026,21027,21028,21029,21030,21031,21032,21033,21034,21035,21036,21037,21038,21039,21040,21041,21042,21043,21044,21045,21046,21047,21048,21049,21050,21051,21052,21053,21054,21055,21056,21057,21058,21059,21060,21061,21062,21063,21064,21065,21066,21067,21068,21069,21070,21071,21072,21073,21074,21075,21076,21077,21078,21079,21080,21081,21082,21083,21084,21085,21086,21087,21088,21089,21090,21091,21092,21093,21094,21095,21096,21097,21098,21099,21100,21101,21102,21103,21104,21105,21106,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21117,21118,21119,21120,21121,21122,21123,21124,21125,21126,21127,21128,21129,21130,21131,21132,21133,21134,21135,21136,21137,21138,21139,21140,21141,21142,21143,21144,21145,21146,21147,21148,21149,21150,21151,21152,21153,21154,21155,21156,21157,21158,21159,21160,21161,21162,21163,21164,21165,21166,21167,21168,21169,21170,21171,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21182,21183,21184,21185,21186,21187,21188,21189,21190,21191,21192,21193,21194,21195,21196,21197,21198,21199,21200,21201,21202,21203,21204,21205,21206,21207,21208,21209,21210,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21236,21237,21238,21239,21240,21241,21242,21243,21244,21245,21246,21247,21248,21249,21250,21251,21252,21253,21254,21255,21256,21257,21258,21259,21260,21261,21262,21263,21264,21265,21266,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,21279,21280,21281,21282,21283,21284,21285,21286,21287,21288,21289,21290,21291,21292,21293,21294,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21305,21306,21307,21308,21309,21310,21311,21312,21313,21314,21315,21316,21317,21318,21319,21320,21321,21322,21323,21324,21325,21326,21327,21328,21329,21330,21331,21332,21333,21334,21335,21336,21337,21338,21339,21340,21341,21342,21343,21344,21345,21346,21347,21348,21349,21350,21351,21352,21353,21354,21355,21356,21357,21358,21359,21360,21361,21362,21363,21364,21365,21366,21367,21368,21369,21370,21371,21372,21373,21374,21375,21376,21377,21378,21379,21380,21381,21382,21383,21384,21385,21386,21387,21388,21389,21390,21391,21392,21393,21394,21395,21396,21397,21398,21399,21400,21401,21402,21403,21404,21405,21406,21407,21408,21409,21410,21411,21412,21413,21414,21415,21416,21417,21418,21419,21420,21421,21422,21423,21424,21425,21426,21427,21428,21429,21430,21431,21432,21433,21434,21435,21436,21437,21438,21439,21440,21441,21442,21443,21444,21445,21446,21447,21448,21449,21450,21451,21452,21453,21454,21455,21456,21457,21458,21459,21460,21461,21462,21463,21464,21465,21466,21467,21468,21469,21470,21471,21472,21473,21474,21475,21476,21477,21478,21479,21480,21481,21482,21483,21484,21485,21486,21487,21488,21489,21490,21491,21492,21493,21494,21495,21496,21497,21498,21499,21500,21501,21502,21503,21504,21505,21506,21507,21508,21509,21510,21511,21512,21513,21514,21515,21516,21517,21518,21519,21520,21521,21522,21523,21524,21525,21526,21527,21528,21529,21530,21531,21532,21533,21534,21535,21536,21537,21538,21539,21540,21541,21542,21543,21544,21545,21546,21547,21548,21549,21550,21551,21552,21553,21554,21555,21556,21557,21558,21559,21560,21561,21562,21563,21564,21565,21566,21567,21568,21569,21570,21571,21572,21573,21574,21575,21576,21577,21578,21579,21580,21581,21582,21583,21584,21585,21586,21587,21588,21589,21590,21591,21592,21593,21594,21595,21596,21597,21598,21599,21600,21601,21602,21603,21604,21605,21606,21607,21608,21609,21610,21611,21612,21613,21614,21615,21616,21617,21618,21619,21620,21621,21622,21623,21624,21625,21626,21627,21628,21629,21630,21631,21632,21633,21634,21635,21636,21637,21638,21639,21640,21641,21642,21643,21644,21645,21646,21647,21648,21649,21650,21651,21652,21653,21654,21655,21656,21657,21658,21659,21660,21661,21662,21663,21664,21665,21666,21667,21668,21669,21670,21671,21672,21673,21674,21675,21676,21677,21678,21679,21680,21681,21682,21683,21684,21685,21686,21687,21688,21689,21690,21691,21692,21693,21694,21695,21696,21697,21698,21699,21700,21701,21702,21703,21704,21705,21706,21707,21708,21709,21710,21711,21712,21713,21714,21715,21716,21717,21718,21719,21720,21721,21722,21723,21724,21725,21726,21727,21728,21729,21730,21731,21732,21733,21734,21735,21736,21737,21738,21739,21740,21741,21742,21743,21744,21745,21746,21747,21748,21749,21750,21751,21752,21753,21754,21755,21756,21757,21758,21759,21760,21761,21762,21763,21764,21765,21766,21767,21768,21769,21770,21771,21772,21773,21774,21775,21776,21777,21778,21779,21780,21781,21782,21783,21784,21785,21786,21787,21788,21789,21790,21791,21792,21793,21794,21795,21796,21797,21798,21799,21800,21801,21802,21803,21804,21805,21806,21807,21808,21809,21810,21811,21812,21813,21814,21815,21816,21817,21818,21819,21820,21821,21822,21823,21824,21825,21826,21827,21828,21829,21830,21831,21832,21833,21834,21835,21836,21837,21838,21839,21840,21841,21842,21843,21844,21845,21846,21847,21848,21849,21850,21851,21852,21853,21854,21855,21856,21857,21858,21859,21860,21861,21862,21863,21864,21865,21866,21867,21868,21869,21870,21871,21872,21873,21874,21875,21876,21877,21878,21879,21880,21881,21882,21883,21884,21885,21886,21887,21888,21889,21890,21891,21892,21893,21894,21895,21896,21897,21898,21899,21900,21901,21902,21903,21904,21905,21906,21907,21908,21909,21910,21911,21912,21913,21914,21915,21916,21917,21918,21919,21920,21921,21922,21923,21924,21925,21926,21927,21928,21929,21930,21931,21932,21933,21934,21935,21936,21937,21938,21939,21940,21941,21942,21943,21944,21945,21946,21947,21948,21949,21950,21951,21952,21953,21954,21955,21956,21957,21958,21959,21960,21961,21962,21963,21964,21965,21966,21967,21968,21969,21970,21971,21972,21973,21974,21975,21976,21977,21978,21979,21980,21981,21982,21983,21984,21985,21986,21987,21988,21989,21990,21991,21992,21993,21994,21995,21996,21997,21998,21999,22000,22001,22002,22003,22004,22005,22006,22007,22008,22009,22010,22011,22012,22013,22014,22015,22016,22017,22018,22019,22020,22021,22022,22023,22024,22025,22026,22027,22028,22029,22030,22031,22032,22033,22034,22035,22036,22037,22038,22039,22040,22041,22042,22043,22044,22045,22046,22047,22048,22049,22050,22051,22052,22053,22054,22055,22056,22057,22058,22059,22060,22061,22062,22063,22064,22065,22066,22067,22068,22069,22070,22071,22072,22073,22074,22075,22076,22077,22078,22079,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22092,22093,22094,22095,22096,22097,22098,22099,22100,22101,22102,22103,22104,22105,22106,22107,22108,22109,22110,22111,22112,22113,22114,22115,22116,22117,22118,22119,22120,22121,22122,22123,22124,22125,22126,22127,22128,22129,22130,22131,22132,22133,22134,22135,22136,22137,22138,22139,22140,22141,22142,22143,22144,22145,22146,22147,22148,22149,22150,22151,22152,22153,22154,22155,22156,22157,22158,22159,22160,22161,22162,22163,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22179,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22191,22192,22193,22194,22195,22196,22197,22198,22199,22200,22201,22202,22203,22204,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22218,22219,22220,22221,22222,22223,22224,22225,22226,22227,22228,22229,22230,22231,22232,22233,22234,22235,22236,22237,22238,22239,22240,22241,22242,22243,22244,22245,22246,22247,22248,22249,22250,22251,22252,22253,22254,22255,22256,22257,22258,22259,22260,22261,22262,22263,22264,22265,22266,22267,22268,22269,22270,22271,22272,22273,22274,22275,22276,22277,22278,22279,22280,22281,22282,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22300,22301,22302,22303,22304,22305,22306,22307,22308,22309,22310,22311,22312,22313,22314,22315,22316,22317,22318,22319,22320,22321,22322,22323,22324,22325,22326,22327,22328,22329,22330,22331,22332,22333,22334,22335,22336,22337,22338,22339,22340,22341,22342,22343,22344,22345,22346,22347,22348,22349,22350,22351,22352,22353,22354,22355,22356,22357,22358,22359,22360,22361,22362,22363,22364,22365,22366,22367,22368,22369,22370,22371,22372,22373,22374,22375,22376,22377,22378,22379,22380,22381,22382,22383,22384,22385,22386,22387,22388,22389,22390,22391,22392,22393,22394,22395,22396,22397,22398,22399,22400,22401,22402,22403,22404,22405,22406,22407,22408,22409,22410,22411,22412,22413,22414,22415,22416,22417,22418,22419,22420,22421,22422,22423,22424,22425,22426,22427,22428,22429,22430,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22444,22445,22446,22447,22448,22449,22450,22451,22452,22453,22454,22455,22456,22457,22458,22459,22460,22461,22462,22463,22464,22465,22466,22467,22468,22469,22470,22471,22472,22473,22474,22475,22476,22477,22478,22479,22480,22481,22482,22483,22484,22485,22486,22487,22488,22489,22490,22491,22492,22493,22494,22495,22496,22497,22498,22499,22500,22501,22502,22503,22504,22505,22506,22507,22508,22509,22510,22511,22512,22513,22514,22515,22516,22517,22518,22519,22520,22521,22522,22523,22524,22525,22526,22527,22528,22529,22530,22531,22532,22533,22534,22535,22536,22537,22538,22539,22540,22541,22542,22543,22544,22545,22546,22547,22548,22549,22550,22551,22552,22553,22554,22555,22556,22557,22558,22559,22560,22561,22562,22563,22564,22565,22566,22567,22568,22569,22570,22571,22572,22573,22574,22575,22576,22577,22578,22579,22580,22581,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22596,22597,22598,22599,22600,22601,22602,22603,22604,22605,22606,22607,22608,22609,22610,22611,22612,22613,22614,22615,22616,22617,22618,22619,22620,22621,22622,22623,22624,22625,22626,22627,22628,22629,22630,22631,22632,22633,22634,22635,22636,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22654,22655,22656,22657,22658,22659,22660,22661,22662,22663,22664,22665,22666,22667,22668,22669,22670,22671,22672,22673,22674,22675,22676,22677,22678,22679,22680,22681,22682,22683,22684,22685,22686,22687,22688,22689,22690,22691,22692,22693,22694,22695,22696,22697,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22716,22717,22718,22719,22720,22721,22722,22723,22724,22725,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22737,22738,22739,22740,22741,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22756,22757,22758,22759,22760,22761,22762,22763,22764,22765,22766,22767,22768,22769,22770,22771,22772,22773,22774,22775,22776,22777,22778,22779,22780,22781,22782,22783,22784,22785,22786,22787,22788,22789,22790,22791,22792,22793,22794,22795,22796,22797,22798,22799,22800,22801,22802,22803,22804,22805,22806,22807,22808,22809,22810,22811,22812,22813,22814,22815,22816,22817,22818,22819,22820,22821,22822,22823,22824,22825,22826,22827,22828,22829,22830,22831,22832,22833,22834,22835,22836,22837,22838,22839,22840,22841,22842,22843,22844,22845,22846,22847,22848,22849,22850,22851,22852,22853,22854,22855,22856,22857,22858,22859,22860,22861,22862,22863,22864,22865,22866,22867,22868,22869,22870,22871,22872,22873,22874,22875,22876,22877,22878,22879,22880,22881,22882,22883,22884,22885,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22899,22900,22901,22902,22903,22904,22905,22906,22907,22908,22909,22910,22911,22912,22913,22914,22915,22916,22917,22918,22919,22920,22921,22922,22923,22924,22925,22926,22927,22928,22929,22930,22931,22932,22933,22934,22935,22936,22937,22938,22939,22940,22941,22942,22943,22944,22945,22946,22947,22948,22949,22950,22951,22952,22953,22954,22955,22956,22957,22958,22959,22960,22961,22962,22963,22964,22965,22966,22967,22968,22969,22970,22971,22972,22973,22974,22975,22976,22977,22978,22979,22980,22981,22982,22983,22984,22985,22986,22987,22988,22989,22990,22991,22992,22993,22994,22995,22996,22997,22998,22999,23000,23001,23002,23003,23004,23005,23006,23007,23008,23009,23010,23011,23012,23013,23014,23015,23016,23017,23018,23019,23020,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23033,23034,23035,23036,23037,23038,23039,23040,23041,23042,23043,23044,23045,23046,23047,23048,23049,23050,23051,23052,23053,23054,23055,23056,23057,23058,23059,23060,23061,23062,23063,23064,23065,23066,23067,23068,23069,23070,23071,23072,23073,23074,23075,23076,23077,23078,23079,23080,23081,23082,23083,23084,23085,23086,23087,23088,23089,23090,23091,23092,23093,23094,23095,23096,23097,23098,23099,23100,23101,23102,23103,23104,23105,23106,23107,23108,23109,23110,23111,23112,23113,23114,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23125,23126,23127,23128,23129,23130,23131,23132,23133,23134,23135,23136,23137,23138,23139,23140,23141,23142,23143,23144,23145,23146,23147,23148,23149,23150,23151,23152,23153,23154,23155,23156,23157,23158,23159,23160,23161,23162,23163,23164,23165,23166,23167,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23186,23187,23188,23189,23190,23191,23192,23193,23194,23195,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23210,23211,23212,23213,23214,23215,23216,23217,23218,23219,23220,23221,23222,23223,23224,23225,23226,23227,23228,23229,23230,23231,23232,23233,23234,23235,23236,23237,23238,23239,23240,23241,23242,23243,23244,23245,23246,23247,23248,23249,23250,23251,23252,23253,23254,23255,23256,23257,23258,23259,23260,23261,23262,23263,23264,23265,23266,23267,23268,23269,23270,23271,23272,23273,23274,23275,23276,23277,23278,23279,23280,23281,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23305,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23318,23319,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23346,23347,23348,23349,23350,23351,23352,23353,23354,23355,23356,23357,23358,23359,23360,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23376,23377,23378,23379,23380,23381,23382,23383,23384,23385,23386,23387,23388,23389,23390,23391,23392,23393,23394,23395,23396,23397,23398,23399,23400,23401,23402,23403,23404,23405,23406,23407,23408,23409,23410,23411,23412,23413,23414,23415,23416,23417,23418,23419,23420,23421,23422,23423,23424,23425,23426,23427,23428,23429,23430,23431,23432,23433,23434,23435,23436,23437,23438,23439,23440,23441,23442,23443,23444,23445,23446,23447,23448,23449,23450,23451,23452,23453,23454,23455,23456,23457,23458,23459,23460,23461,23462,23463,23464,23465,23466,23467,23468,23469,23470,23471,23472,23473,23474,23475,23476,23477,23478,23479,23480,23481,23482,23483,23484,23485,23486,23487,23488,23489,23490,23491,23492,23493,23494,23495,23496,23497,23498,23499,23500,23501,23502,23503,23504,23505,23506,23507,23508,23509,23510,23511,23512,23513,23514,23515,23516,23517,23518,23519,23520,23521,23522,23523,23524,23525,23526,23527,23528,23529,23530,23531,23532,23533,23534,23535,23536,23537,23538,23539,23540,23541,23542,23543,23544,23545,23546,23547,23548,23549,23550,23551,23552,23553,23554,23555,23556,23557,23558,23559,23560,23561,23562,23563,23564,23565,23566,23567,23568,23569,23570,23571,23572,23573,23574,23575,23576,23577,23578,23579,23580,23581,23582,23583,23584,23585,23586,23587,23588,23589,23590,23591,23592,23593,23594,23595,23596,23597,23598,23599,23600,23601,23602,23603,23604,23605,23606,23607,23608,23609,23610,23611,23612,23613,23614,23615,23616,23617,23618,23619,23620,23621,23622,23623,23624,23625,23626,23627,23628,23629,23630,23631,23632,23633,23634,23635,23636,23637,23638,23639,23640,23641,23642,23643,23644,23645,23646,23647,23648,23649,23650,23651,23652,23653,23654,23655,23656,23657,23658,23659,23660,23661,23662,23663,23664,23665,23666,23667,23668,23669,23670,23671,23672,23673,23674,23675,23676,23677,23678,23679,23680,23681,23682,23683,23684,23685,23686,23687,23688,23689,23690,23691,23692,23693,23694,23695,23696,23697,23698,23699,23700,23701,23702,23703,23704,23705,23706,23707,23708,23709,23710,23711,23712,23713,23714,23715,23716,23717,23718,23719,23720,23721,23722,23723,23724,23725,23726,23727,23728,23729,23730,23731,23732,23733,23734,23735,23736,23737,23738,23739,23740,23741,23742,23743,23744,23745,23746,23747,23748,23749,23750,23751,23752,23753,23754,23755,23756,23757,23758,23759,23760,23761,23762,23763,23764,23765,23766,23767,23768,23769,23770,23771,23772,23773,23774,23775,23776,23777,23778,23779,23780,23781,23782,23783,23784,23785,23786,23787,23788,23789,23790,23791,23792,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23803,23804,23805,23806,23807,23808,23809,23810,23811,23812,23813,23814,23815,23816,23817,23818,23819,23820,23821,23822,23823,23824,23825,23826,23827,23828,23829,23830,23831,23832,23833,23834,23835,23836,23837,23838,23839,23840,23841,23842,23843,23844,23845,23846,23847,23848,23849,23850,23851,23852,23853,23854,23855,23856,23857,23858,23859,23860,23861,23862,23863,23864,23865,23866,23867,23868,23869,23870,23871,23872,23873,23874,23875,23876,23877,23878,23879,23880,23881,23882,23883,23884,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23896,23897,23898,23899,23900,23901,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23913,23914,23915,23916,23917,23918,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23961,23962,23963,23964,23965,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23991,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24005,24006,24007,24008,24009,24010,24011,24012,24013,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24027,24028,24029,24030,24031,24032,24033,24034,24035,24036,24037,24038,24039,24040,24041,24042,24043,24044,24045,24046,24047,24048,24049,24050,24051,24052,24053,24054,24055,24056,24057,24058,24059,24060,24061,24062,24063,24064,24065,24066,24067,24068,24069,24070,24071,24072,24073,24074,24075,24076,24077,24078,24079,24080,24081,24082,24083,24084,24085,24086,24087,24088,24089,24090,24091,24092,24093,24094,24095,24096,24097,24098,24099,24100,24101,24102,24103,24104,24105,24106,24107,24108,24109,24110,24111,24112,24113,24114,24115,24116,24117,24118,24119,24120,24121,24122,24123,24124,24125,24126,24127,24128,24129,24130,24131,24132,24133,24134,24135,24136,24137,24138,24139,24140,24141,24142,24143,24144,24145,24146,24147,24148,24149,24150,24151,24152,24153,24154,24155,24156,24157,24158,24159,24160,24161,24162,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24178,24179,24180,24181,24182,24183,24184,24185,24186,24187,24188,24189,24190,24191,24192,24193,24194,24195,24196,24197,24198,24199,24200,24201,24202,24203,24204,24205,24206,24207,24208,24209,24210,24211,24212,24213,24214,24215,24216,24217,24218,24219,24220,24221,24222,24223,24224,24225,24226,24227,24228,24229,24230,24231,24232,24233,24234,24235,24236,24237,24238,24239,24240,24241,24242,24243,24244,24245,24246,24247,24248,24249,24250,24251,24252,24253,24254,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24265,24266,24267,24268,24269,24270,24271,24272,24273,24274,24275,24276,24277,24278,24279,24280,24281,24282,24283,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24296,24297,24298,24299,24300,24301,24302,24303,24304,24305,24306,24307,24308,24309,24310,24311,24312,24313,24314,24315,24316,24317,24318,24319,24320,24321,24322,24323,24324,24325,24326,24327,24328,24329,24330,24331,24332,24333,24334,24335,24336,24337,24338,24339,24340,24341,24342,24343,24344,24345,24346,24347,24348,24349,24350,24351,24352,24353,24354,24355,24356,24357,24358,24359,24360,24361,24362,24363,24364,24365,24366,24367,24368,24369,24370,24371,24372,24373,24374,24375,24376,24377,24378,24379,24380,24381,24382,24383,24384,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24400,24401,24402,24403,24404,24405,24406,24407,24408,24409,24410,24411,24412,24413,24414,24415,24416,24417,24418,24419,24420,24421,24422,24423,24424,24425,24426,24427,24428,24429,24430,24431,24432,24433,24434,24435,24436,24437,24438,24439,24440,24441,24442,24443,24444,24445,24446,24447,24448,24449,24450,24451,24452,24453,24454,24455,24456,24457,24458,24459,24460,24461,24462,24463,24464,24465,24466,24467,24468,24469,24470,24471,24472,24473,24474,24475,24476,24477,24478,24479,24480,24481,24482,24483,24484,24485,24486,24487,24488,24489,24490,24491,24492,24493,24494,24495,24496,24497,24498,24499,24500,24501,24502,24503,24504,24505,24506,24507,24508,24509,24510,24511,24512,24513,24514,24515,24516,24517,24518,24519,24520,24521,24522,24523,24524,24525,24526,24527,24528,24529,24530,24531,24532,24533,24534,24535,24536,24537,24538,24539,24540,24541,24542,24543,24544,24545,24546,24547,24548,24549,24550,24551,24552,24553,24554,24555,24556,24557,24558,24559,24560,24561,24562,24563,24564,24565,24566,24567,24568,24569,24570,24571,24572,24573,24574,24575,24576,24577,24578,24579,24580,24581,24582,24583,24584,24585,24586,24587,24588,24589,24590,24591,24592,24593,24594,24595,24596,24597,24598,24599,24600,24601,24602,24603,24604,24605,24606,24607,24608,24609,24610,24611,24612,24613,24614,24615,24616,24617,24618,24619,24620,24621,24622,24623,24624,24625,24626,24627,24628,24629,24630,24631,24632,24633,24634,24635,24636,24637,24638,24639,24640,24641,24642,24643,24644,24645,24646,24647,24648,24649,24650,24651,24652,24653,24654,24655,24656,24657,24658,24659,24660,24661,24662,24663,24664,24665,24666,24667,24668,24669,24670,24671,24672,24673,24674,24675,24676,24677,24678,24679,24680,24681,24682,24683,24684,24685,24686,24687,24688,24689,24690,24691,24692,24693,24694,24695,24696,24697,24698,24699,24700,24701,24702,24703,24704,24705,24706,24707,24708,24709,24710,24711,24712,24713,24714,24715,24716,24717,24718,24719,24720,24721,24722,24723,24724,24725,24726,24727,24728,24729,24730,24731,24732,24733,24734,24735,24736,24737,24738,24739,24740,24741,24742,24743,24744,24745,24746,24747,24748,24749,24750,24751,24752,24753,24754,24755,24756,24757,24758,24759,24760,24761,24762,24763,24764,24765,24766,24767,24768,24769,24770,24771,24772,24773,24774,24775,24776,24777,24778,24779,24780,24781,24782,24783,24784,24785,24786,24787,24788,24789,24790,24791,24792,24793,24794,24795,24796,24797,24798,24799,24800,24801,24802,24803,24804,24805,24806,24807,24808,24809,24810,24811,24812,24813,24814,24815,24816,24817,24818,24819,24820,24821,24822,24823,24824,24825,24826,24827,24828,24829,24830,24831,24832,24833,24834,24835,24836,24837,24838,24839,24840,24841,24842,24843,24844,24845,24846,24847,24848,24849,24850,24851,24852,24853,24854,24855,24856,24857,24858,24859,24860,24861,24862,24863,24864,24865,24866,24867,24868,24869,24870,24871,24872,24873,24874,24875,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24895,24896,24897,24898,24899,24900,24901,24902,24903,24904,24905,24906,24907,24908,24909,24910,24911,24912,24913,24914,24915,24916,24917,24918,24919,24920,24921,24922,24923,24924,24925,24926,24927,24928,24929,24930,24931,24932,24933,24934,24935,24936,24937,24938,24939,24940,24941,24942,24943,24944,24945,24946,24947,24948,24949,24950,24951,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24971,24972,24973,24974,24975,24976,24977,24978,24979,24980,24981,24982,24983,24984,24985,24986,24987,24988,24989,24990,24991,24992,24993,24994,24995,24996,24997,24998,24999,25000,25001,25002,25003,25004,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25015,25016,25017,25018,25019,25020,25021,25022,25023,25024,25025,25026,25027,25028,25029,25030,25031,25032,25033,25034,25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25062,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25077,25078,25079,25080,25081,25082,25083,25084,25085,25086,25087,25088,25089,25090,25091,25092,25093,25094,25095,25096,25097,25098,25099,25100,25101,25102,25103,25104,25105,25106,25107,25108,25109,25110,25111,25112,25113,25114,25115,25116,25117,25118,25119,25120,25121,25122,25123,25124,25125,25126,25127,25128,25129,25130,25131,25132,25133,25134,25135,25136,25137,25138,25139,25140,25141,25142,25143,25144,25145,25146,25147,25148,25149,25150,25151,25152,25153,25154,25155,25156,25157,25158,25159,25160,25161,25162,25163,25164,25165,25166,25167,25168,25169,25170,25171,25172,25173,25174,25175,25176,25177,25178,25179,25180,25181,25182,25183,25184,25185,25186,25187,25188,25189,25190,25191,25192,25193,25194,25195,25196,25197,25198,25199,25200,25201,25202,25203,25204,25205,25206,25207,25208,25209,25210,25211,25212,25213,25214,25215,25216,25217,25218,25219,25220,25221,25222,25223,25224,25225,25226,25227,25228,25229,25230,25231,25232,25233,25234,25235,25236,25237,25238,25239,25240,25241,25242,25243,25244,25245,25246,25247,25248,25249,25250,25251,25252,25253,25254,25255,25256,25257,25258,25259,25260,25261,25262,25263,25264,25265,25266,25267,25268,25269,25270,25271,25272,25273,25274,25275,25276,25277,25278,25279,25280,25281,25282,25283,25284,25285,25286,25287,25288,25289,25290,25291,25292,25293,25294,25295,25296,25297,25298,25299,25300,25301,25302,25303,25304,25305,25306,25307,25308,25309,25310,25311,25312,25313,25314,25315,25316,25317,25318,25319,25320,25321,25322,25323,25324,25325,25326,25327,25328,25329,25330,25331,25332,25333,25334,25335,25336,25337,25338,25339,25340,25341,25342,25343,25344,25345,25346,25347,25348,25349,25350,25351,25352,25353,25354,25355,25356,25357,25358,25359,25360,25361,25362,25363,25364,25365,25366,25367,25368,25369,25370,25371,25372,25373,25374,25375,25376,25377,25378,25379,25380,25381,25382,25383,25384,25385,25386,25387,25388,25389,25390,25391,25392,25393,25394,25395,25396,25397,25398,25399,25400,25401,25402,25403,25404,25405,25406,25407,25408,25409,25410,25411,25412,25413,25414,25415,25416,25417,25418,25419,25420,25421,25422,25423,25424,25425,25426,25427,25428,25429,25430,25431,25432,25433,25434,25435,25436,25437,25438,25439,25440,25441,25442,25443,25444,25445,25446,25447,25448,25449,25450,25451,25452,25453,25454,25455,25456,25457,25458,25459,25460,25461,25462,25463,25464,25465,25466,25467,25468,25469,25470,25471,25472,25473,25474,25475,25476,25477,25478,25479,25480,25481,25482,25483,25484,25485,25486,25487,25488,25489,25490,25491,25492,25493,25494,25495,25496,25497,25498,25499,25500,25501,25502,25503,25504,25505,25506,25507,25508,25509,25510,25511,25512,25513,25514,25515,25516,25517,25518,25519,25520,25521,25522,25523,25524,25525,25526,25527,25528,25529,25530,25531,25532,25533,25534,25535,25536,25537,25538,25539,25540,25541,25542,25543,25544,25545,25546,25547,25548,25549,25550,25551,25552,25553,25554,25555,25556,25557,25558,25559,25560,25561,25562,25563,25564,25565,25566,25567,25568,25569,25570,25571,25572,25573,25574,25575,25576,25577,25578,25579,25580,25581,25582,25583,25584,25585,25586,25587,25588,25589,25590,25591,25592,25593,25594,25595,25596,25597,25598,25599,25600,25601,25602,25603,25604,25605,25606,25607,25608,25609,25610,25611,25612,25613,25614,25615,25616,25617,25618,25619,25620,25621,25622,25623,25624,25625,25626,25627,25628,25629,25630,25631,25632,25633,25634,25635,25636,25637,25638,25639,25640,25641,25642,25643,25644,25645,25646,25647,25648,25649,25650,25651,25652,25653,25654,25655,25656,25657,25658,25659,25660,25661,25662,25663,25664,25665,25666,25667,25668,25669,25670,25671,25672,25673,25674,25675,25676,25677,25678,25679,25680,25681,25682,25683,25684,25685,25686,25687,25688,25689,25690,25691,25692,25693,25694,25695,25696,25697,25698,25699,25700,25701,25702,25703,25704,25705,25706,25707,25708,25709,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25720,25721,25722,25723,25724,25725,25726,25727,25728,25729,25730,25731,25732,25733,25734,25735,25736,25737,25738,25739,25740,25741,25742,25743,25744,25745,25746,25747,25748,25749,25750,25751,25752,25753,25754,25755,25756,25757,25758,25759,25760,25761,25762,25763,25764,25765,25766,25767,25768,25769,25770,25771,25772,25773,25774,25775,25776,25777,25778,25779,25780,25781,25782,25783,25784,25785,25786,25787,25788,25789,25790,25791,25792,25793,25794,25795,25796,25797,25798,25799,25800,25801,25802,25803,25804,25805,25806,25807,25808,25809,25810,25811,25812,25813,25814,25815,25816,25817,25818,25819,25820,25821,25822,25823,25824,25825,25826,25827,25828,25829,25830,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25856,25857,25858,25859,25860,25861,25862,25863,25864,25865,25866,25867,25868,25869,25870,25871,25872,25873,25874,25875,25876,25877,25878,25879,25880,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25893,25894,25895,25896,25897,25898,25899,25900,25901,25902,25903,25904,25905,25906,25907,25908,25909,25910,25911,25912,25913,25914,25915,25916,25917,25918,25919,25920,25921,25922,25923,25924,25925,25926,25927,25928,25929,25930,25931,25932,25933,25934,25935,25936,25937,25938,25939,25940,25941,25942,25943,25944,25945,25946,25947,25948,25949,25950,25951,25952,25953,25954,25955,25956,25957,25958,25959,25960,25961,25962,25963,25964,25965,25966,25967,25968,25969,25970,25971,25972,25973,25974,25975,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25991,25992,25993,25994,25995,25996,25997,25998,25999,26000,26001,26002,26003,26004,26005,26006,26007,26008,26009,26010,26011,26012,26013,26014,26015,26016,26017,26018,26019,26020,26021,26022,26023,26024,26025,26026,26027,26028,26029,26030,26031,26032,26033,26034,26035,26036,26037,26038,26039,26040,26041,26042,26043,26044,26045,26046,26047,26048,26049,26050,26051,26052,26053,26054,26055,26056,26057,26058,26059,26060,26061,26062,26063,26064,26065,26066,26067,26068,26069,26070,26071,26072,26073,26074,26075,26076,26077,26078,26079,26080,26081,26082,26083,26084,26085,26086,26087,26088,26089,26090,26091,26092,26093,26094,26095,26096,26097,26098,26099,26100,26101,26102,26103,26104,26105,26106,26107,26108,26109,26110,26111,26112,26113,26114,26115,26116,26117,26118,26119,26120,26121,26122,26123,26124,26125,26126,26127,26128,26129,26130,26131,26132,26133,26134,26135,26136,26137,26138,26139,26140,26141,26142,26143,26144,26145,26146,26147,26148,26149,26150,26151,26152,26153,26154,26155,26156,26157,26158,26159,26160,26161,26162,26163,26164,26165,26166,26167,26168,26169,26170,26171,26172,26173,26174,26175,26176,26177,26178,26179,26180,26181,26182,26183,26184,26185,26186,26187,26188,26189,26190,26191,26192,26193,26194,26195,26196,26197,26198,26199,26200,26201,26202,26203,26204,26205,26206,26207,26208,26209,26210,26211,26212,26213,26214,26215,26216,26217,26218,26219,26220,26221,26222,26223,26224,26225,26226,26227,26228,26229,26230,26231,26232,26233,26234,26235,26236,26237,26238,26239,26240,26241,26242,26243,26244,26245,26246,26247,26248,26249,26250,26251,26252,26253,26254,26255,26256,26257,26258,26259,26260,26261,26262,26263,26264,26265,26266,26267,26268,26269,26270,26271,26272,26273,26274,26275,26276,26277,26278,26279,26280,26281,26282,26283,26284,26285,26286,26287,26288,26289,26290,26291,26292,26293,26294,26295,26296,26297,26298,26299,26300,26301,26302,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26329,26330,26331,26332,26333,26334,26335,26336,26337,26338,26339,26340,26341,26342,26343,26344,26345,26346,26347,26348,26349,26350,26351,26352,26353,26354,26355,26356,26357,26358,26359,26360,26361,26362,26363,26364,26365,26366,26367,26368,26369,26370,26371,26372,26373,26374,26375,26376,26377,26378,26379,26380,26381,26382,26383,26384,26385,26386,26387,26388,26389,26390,26391,26392,26393,26394,26395,26396,26397,26398,26399,26400,26401,26402,26403,26404,26405,26406,26407,26408,26409,26410,26411,26412,26413,26414,26415,26416,26417,26418,26419,26420,26421,26422,26423,26424,26425,26426,26427,26428,26429,26430,26431,26432,26433,26434,26435,26436,26437,26438,26439,26440,26441,26442,26443,26444,26445,26446,26447,26448,26449,26450,26451,26452,26453,26454,26455,26456,26457,26458,26459,26460,26461,26462,26463,26464,26465,26466,26467,26468,26469,26470,26471,26472,26473,26474,26475,26476,26477,26478,26479,26480,26481,26482,26483,26484,26485,26486,26487,26488,26489,26490,26491,26492,26493,26494,26495,26496,26497,26498,26499,26500,26501,26502,26503,26504,26505,26506,26507,26508,26509,26510,26511,26512,26513,26514,26515,26516,26517,26518,26519,26520,26521,26522,26523,26524,26525,26526,26527,26528,26529,26530,26531,26532,26533,26534,26535,26536,26537,26538,26539,26540,26541,26542,26543,26544,26545,26546,26547,26548,26549,26550,26551,26552,26553,26554,26555,26556,26557,26558,26559,26560,26561,26562,26563,26564,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26575,26576,26577,26578,26579,26580,26581,26582,26583,26584,26585,26586,26587,26588,26589,26590,26591,26592,26593,26594,26595,26596,26597,26598,26599,26600,26601,26602,26603,26604,26605,26606,26607,26608,26609,26610,26611,26612,26613,26614,26615,26616,26617,26618,26619,26620,26621,26622,26623,26624,26625,26626,26627,26628,26629,26630,26631,26632,26633,26634,26635,26636,26637,26638,26639,26640,26641,26642,26643,26644,26645,26646,26647,26648,26649,26650,26651,26652,26653,26654,26655,26656,26657,26658,26659,26660,26661,26662,26663,26664,26665,26666,26667,26668,26669,26670,26671,26672,26673,26674,26675,26676,26677,26678,26679,26680,26681,26682,26683,26684,26685,26686,26687,26688,26689,26690,26691,26692,26693,26694,26695,26696,26697,26698,26699,26700,26701,26702,26703,26704,26705,26706,26707,26708,26709,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26720,26721,26722,26723,26724,26725,26726,26727,26728,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26761,26762,26763,26764,26765,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26788,26789,26790,26791,26792,26793,26794,26795,26796,26797,26798,26799,26800,26801,26802,26803,26804,26805,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26816,26817,26818,26819,26820,26821,26822,26823,26824,26825,26826,26827,26828,26829,26830,26831,26832,26833,26834,26835,26836,26837,26838,26839,26840,26841,26842,26843,26844,26845,26846,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,26871,26872,26873,26874,26875,26876,26877,26878,26879,26880,26881,26882,26883,26884,26885,26886,26887,26888,26889,26890,26891,26892,26893,26894,26895,26896,26897,26898,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26911,26912,26913,26914,26915,26916,26917,26918,26919,26920,26921,26922,26923,26924,26925,26926,26927,26928,26929,26930,26931,26932,26933,26934,26935,26936,26937,26938,26939,26940,26941,26942,26943,26944,26945,26946,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26964,26965,26966,26967,26968,26969,26970,26971,26972,26973,26974,26975,26976,26977,26978,26979,26980,26981,26982,26983,26984,26985,26986,26987,26988,26989,26990,26991,26992,26993,26994,26995,26996,26997,26998,26999,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015,27016,27017,27018,27019,27020,27021,27022,27023,27024,27025,27026,27027,27028,27029,27030,27031,27032,27033,27034,27035,27036,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27047,27048,27049,27050,27051,27052,27053,27054,27055,27056,27057,27058,27059,27060,27061,27062,27063,27064,27065,27066,27067,27068,27069,27070,27071,27072,27073,27074,27075,27076,27077,27078,27079,27080,27081,27082,27083,27084,27085,27086,27087,27088,27089,27090,27091,27092,27093,27094,27095,27096,27097,27098,27099,27100,27101,27102,27103,27104,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27117,27118,27119,27120,27121,27122,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27133,27134,27135,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27146,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27159,27160,27161,27162,27163,27164,27165,27166,27167,27168,27169,27170,27171,27172,27173,27174,27175,27176,27177,27178,27179,27180,27181,27182,27183,27184,27185,27186,27187,27188,27189,27190,27191,27192,27193,27194,27195,27196,27197,27198,27199,27200,27201,27202,27203,27204,27205,27206,27207,27208,27209,27210,27211,27212,27213,27214,27215,27216,27217,27218,27219,27220,27221,27222,27223,27224,27225,27226,27227,27228,27229,27230,27231,27232,27233,27234,27235,27236,27237,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27249,27250,27251,27252,27253,27254,27255,27256,27257,27258,27259,27260,27261,27262,27263,27264,27265,27266,27267,27268,27269,27270,27271,27272,27273,27274,27275,27276,27277,27278,27279,27280,27281,27282,27283,27284,27285,27286,27287,27288,27289,27290,27291,27292,27293,27294,27295,27296,27297,27298,27299,27300,27301,27302,27303,27304,27305,27306,27307,27308,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27424,27425,27426,27427,27428,27429,27430,27431,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27442,27443,27444,27445,27446,27447,27448,27449,27450,27451,27452,27453,27454,27455,27456,27457,27458,27459,27460,27461,27462,27463,27464,27465,27466,27467,27468,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27481,27482,27483,27484,27485,27486,27487,27488,27489,27490,27491,27492,27493,27494,27495,27496,27497,27498,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27513,27514,27515,27516,27517,27518,27519,27520,27521,27522,27523,27524,27525,27526,27527,27528,27529,27530,27531,27532,27533,27534,27535,27536,27537,27538,27539,27540,27541,27542,27543,27544,27545,27546,27547,27548,27549,27550,27551,27552,27553,27554,27555,27556,27557,27558,27559,27560,27561,27562,27563,27564,27565,27566,27567,27568,27569,27570,27571,27572,27573,27574,27575,27576,27577,27578,27579,27580,27581,27582,27583,27584,27585,27586,27587,27588,27589,27590,27591,27592,27593,27594,27595,27596,27597,27598,27599,27600,27601,27602,27603,27604,27605,27606,27607,27608,27609,27610,27611,27612,27613,27614,27615,27616,27617,27618,27619,27620,27621,27622,27623,27624,27625,27626,27627,27628,27629,27630,27631,27632,27633,27634,27635,27636,27637,27638,27639,27640,27641,27642,27643,27644,27645,27646,27647,27648,27649,27650,27651,27652,27653,27654,27655,27656,27657,27658,27659,27660,27661,27662,27663,27664,27665,27666,27667,27668,27669,27670,27671,27672,27673,27674,27675,27676,27677,27678,27679,27680,27681,27682,27683,27684,27685,27686,27687,27688,27689,27690,27691,27692,27693,27694,27695,27696,27697,27698,27699,27700,27701,27702,27703,27704,27705,27706,27707,27708,27709,27710,27711,27712,27713,27714,27715,27716,27717,27718,27719,27720,27721,27722,27723,27724,27725,27726,27727,27728,27729,27730,27731,27732,27733,27734,27735,27736,27737,27738,27739,27740,27741,27742,27743,27744,27745,27746,27747,27748,27749,27750,27751,27752,27753,27754,27755,27756,27757,27758,27759,27760,27761,27762,27763,27764,27765,27766,27767,27768,27769,27770,27771,27772,27773,27774,27775,27776,27777,27778,27779,27780,27781,27782,27783,27784,27785,27786,27787,27788,27789,27790,27791,27792,27793,27794,27795,27796,27797,27798,27799,27800,27801,27802,27803,27804,27805,27806,27807,27808,27809,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820,27821,27822,27823,27824,27825,27826,27827,27828,27829,27830,27831,27832,27833,27834,27835,27836,27837,27838,27839,27840,27841,27842,27843,27844,27845,27846,27847,27848,27849,27850,27851,27852,27853,27854,27855,27856,27857,27858,27859,27860,27861,27862,27863,27864,27865,27866,27867,27868,27869,27870,27871,27872,27873,27874,27875,27876,27877,27878,27879,27880,27881,27882,27883,27884,27885,27886,27887,27888,27889,27890,27891,27892,27893,27894,27895,27896,27897,27898,27899,27900,27901,27902,27903,27904,27905,27906,27907,27908,27909,27910,27911,27912,27913,27914,27915,27916,27917,27918,27919,27920,27921,27922,27923,27924,27925,27926,27927,27928,27929,27930,27931,27932,27933,27934,27935,27936,27937,27938,27939,27940,27941,27942,27943,27944,27945,27946,27947,27948,27949,27950,27951,27952,27953,27954,27955,27956,27957,27958,27959,27960,27961,27962,27963,27964,27965,27966,27967,27968,27969,27970,27971,27972,27973,27974,27975,27976,27977,27978,27979,27980,27981,27982,27983,27984,27985,27986,27987,27988,27989,27990,27991,27992,27993,27994,27995,27996,27997,27998,27999,28000,28001,28002,28003,28004,28005,28006,28007,28008,28009,28010,28011,28012,28013,28014,28015,28016,28017,28018,28019,28020,28021,28022,28023,28024,28025,28026,28027,28028,28029,28030,28031,28032,28033,28034,28035,28036,28037,28038,28039,28040,28041,28042,28043,28044,28045,28046,28047,28048,28049,28050,28051,28052,28053,28054,28055,28056,28057,28058,28059,28060,28061,28062,28063,28064,28065,28066,28067,28068,28069,28070,28071,28072,28073,28074,28075,28076,28077,28078,28079,28080,28081,28082,28083,28084,28085,28086,28087,28088,28089,28090,28091,28092,28093,28094,28095,28096,28097,28098,28099,28100,28101,28102,28103,28104,28105,28106,28107,28108,28109,28110,28111,28112,28113,28114,28115,28116,28117,28118,28119,28120,28121,28122,28123,28124,28125,28126,28127,28128,28129,28130,28131,28132,28133,28134,28135,28136,28137,28138,28139,28140,28141,28142,28143,28144,28145,28146,28147,28148,28149,28150,28151,28152,28153,28154,28155,28156,28157,28158,28159,28160,28161,28162,28163,28164,28165,28166,28167,28168,28169,28170,28171,28172,28173,28174,28175,28176,28177,28178,28179,28180,28181,28182,28183,28184,28185,28186,28187,28188,28189,28190,28191,28192,28193,28194,28195,28196,28197,28198,28199,28200,28201,28202,28203,28204,28205,28206,28207,28208,28209,28210,28211,28212,28213,28214,28215,28216,28217,28218,28219,28220,28221,28222,28223,28224,28225,28226,28227,28228,28229,28230,28231,28232,28233,28234,28235,28236,28237,28238,28239,28240,28241,28242,28243,28244,28245,28246,28247,28248,28249,28250,28251,28252,28253,28254,28255,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28267,28268,28269,28270,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28286,28287,28288,28289,28290,28291,28292,28293,28294,28295,28296,28297,28298,28299,28300,28301,28302,28303,28304,28305,28306,28307,28308,28309,28310,28311,28312,28313,28314,28315,28316,28317,28318,28319,28320,28321,28322,28323,28324,28325,28326,28327,28328,28329,28330,28331,28332,28333,28334,28335,28336,28337,28338,28339,28340,28341,28342,28343,28344,28345,28346,28347,28348,28349,28350,28351,28352,28353,28354,28355,28356,28357,28358,28359,28360,28361,28362,28363,28364,28365,28366,28367,28368,28369,28370,28371,28372,28373,28374,28375,28376,28377,28378,28379,28380,28381,28382,28383,28384,28385,28386,28387,28388,28389,28390,28391,28392,28393,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28404,28405,28406,28407,28408,28409,28410,28411,28412,28413,28414,28415,28416,28417,28418,28419,28420,28421,28422,28423,28424,28425,28426,28427,28428,28429,28430,28431,28432,28433,28434,28435,28436,28437,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28448,28449,28450,28451,28452,28453,28454,28455,28456,28457,28458,28459,28460,28461,28462,28463,28464,28465,28466,28467,28468,28469,28470,28471,28472,28473,28474,28475,28476,28477,28478,28479,28480,28481,28482,28483,28484,28485,28486,28487,28488,28489,28490,28491,28492,28493,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28504,28505,28506,28507,28508,28509,28510,28511,28512,28513,28514,28515,28516,28517,28518,28519,28520,28521,28522,28523,28524,28525,28526,28527,28528,28529,28530,28531,28532,28533,28534,28535,28536,28537,28538,28539,28540,28541,28542,28543,28544,28545,28546,28547,28548,28549,28550,28551,28552,28553,28554,28555,28556,28557,28558,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28572,28573,28574,28575,28576,28577,28578,28579,28580,28581,28582,28583,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28595,28596,28597,28598,28599,28600,28601,28602,28603,28604,28605,28606,28607,28608,28609,28610,28611,28612,28613,28614,28615,28616,28617,28618,28619,28620,28621,28622,28623,28624,28625,28626,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28638,28639,28640,28641,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28654,28655,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28689,28690,28691,28692,28693,28694,28695,28696,28697,28698,28699,28700,28701,28702,28703,28704,28705,28706,28707,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28725,28726,28727,28728,28729,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28748,28749,28750,28751,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28766,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28779,28780,28781,28782,28783,28784,28785,28786,28787,28788,28789,28790,28791,28792,28793,28794,28795,28796,28797,28798,28799,28800,28801,28802,28803,28804,28805,28806,28807,28808,28809,28810,28811,28812,28813,28814,28815,28816,28817,28818,28819,28820,28821,28822,28823,28824,28825,28826,28827,28828,28829,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28843,28844,28845,28846,28847,28848,28849,28850,28851,28852,28853,28854,28855,28856,28857,28858,28859,28860,28861,28862,28863,28864,28865,28866,28867,28868,28869,28870,28871,28872,28873,28874,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28888,28889,28890,28891,28892,28893,28894,28895,28896,28897,28898,28899,28900,28901,28902,28903,28904,28905,28906,28907,28908,28909,28910,28911,28912,28913,28914,28915,28916,28917,28918,28919,28920,28921,28922,28923,28924,28925,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28937,28938,28939,28940,28941,28942,28943,28944,28945,28946,28947,28948,28949,28950,28951,28952,28953,28954,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28966,28967,28968,28969,28970,28971,28972,28973,28974,28975,28976,28977,28978,28979,28980,28981,28982,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28997,28998,28999,29000,29001,29002,29003,29004,29005,29006,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29020,29021,29022,29023,29024,29025,29026,29027,29028,29029,29030,29031,29032,29033,29034,29035,29036,29037,29038,29039,29040,29041,29042,29043,29044,29045,29046,29047,29048,29049,29050,29051,29052,29053,29054,29055,29056,29057,29058,29059,29060,29061,29062,29063,29064,29065,29066,29067,29068,29069,29070,29071,29072,29073,29074,29075,29076,29077,29078,29079,29080,29081,29082,29083,29084,29085,29086,29087,29088,29089,29090,29091,29092,29093,29094,29095,29096,29097,29098,29099,29100,29101,29102,29103,29104,29105,29106,29107,29108,29109,29110,29111,29112,29113,29114,29115,29116,29117,29118,29119,29120,29121,29122,29123,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29134,29135,29136,29137,29138,29139,29140,29141,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29152,29153,29154,29155,29156,29157,29158,29159,29160,29161,29162,29163,29164,29165,29166,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29177,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29190,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29213,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29224,29225,29226,29227,29228,29229,29230,29231,29232,29233,29234,29235,29236,29237,29238,29239,29240,29241,29242,29243,29244,29245,29246,29247,29248,29249,29250,29251,29252,29253,29254,29255,29256,29257,29258,29259,29260,29261,29262,29263,29264,29265,29266,29267,29268,29269,29270,29271,29272,29273,29274,29275,29276,29277,29278,29279,29280,29281,29282,29283,29284,29285,29286,29287,29288,29289,29290,29291,29292,29293,29294,29295,29296,29297,29298,29299,29300,29301,29302,29303,29304,29305,29306,29307,29308,29309,29310,29311,29312,29313,29314,29315,29316,29317,29318,29319,29320,29321,29322,29323,29324,29325,29326,29327,29328,29329,29330,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29343,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29356,29357,29358,29359,29360,29361,29362,29363,29364,29365,29366,29367,29368,29369,29370,29371,29372,29373,29374,29375,29376,29377,29378,29379,29380,29381,29382,29383,29384,29385,29386,29387,29388,29389,29390,29391,29392,29393,29394,29395,29396,29397,29398,29399,29400,29401,29402,29403,29404,29405,29406,29407,29408,29409,29410,29411,29412,29413,29414,29415,29416,29417,29418,29419,29420,29421,29422,29423,29424,29425,29426,29427,29428,29429,29430,29431,29432,29433,29434,29435,29436,29437,29438,29439,29440,29441,29442,29443,29444,29445,29446,29447,29448,29449,29450,29451,29452,29453,29454,29455,29456,29457,29458,29459,29460,29461,29462,29463,29464,29465,29466,29467,29468,29469,29470,29471,29472,29473,29474,29475,29476,29477,29478,29479,29480,29481,29482,29483,29484,29485,29486,29487,29488,29489,29490,29491,29492,29493,29494,29495,29496,29497,29498,29499,29500,29501,29502,29503,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29517,29518,29519,29520,29521,29522,29523,29524,29525,29526,29527,29528,29529,29530,29531,29532,29533,29534,29535,29536,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29548,29549,29550,29551,29552,29553,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29566,29567,29568,29569,29570,29571,29572,29573,29574,29575,29576,29577,29578,29579,29580,29581,29582,29583,29584,29585,29586,29587,29588,29589,29590,29591,29592,29593,29594,29595,29596,29597,29598,29599,29600,29601,29602,29603,29604,29605,29606,29607,29608,29609,29610,29611,29612,29613,29614,29615,29616,29617,29618,29619,29620,29621,29622,29623,29624,29625,29626,29627,29628,29629,29630,29631,29632,29633,29634,29635,29636,29637,29638,29639,29640,29641,29642,29643,29644,29645,29646,29647,29648,29649,29650,29651,29652,29653,29654,29655,29656,29657,29658,29659,29660,29661,29662,29663,29664,29665,29666,29667,29668,29669,29670,29671,29672,29673,29674,29675,29676,29677,29678,29679,29680,29681,29682,29683,29684,29685,29686,29687,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29699,29700,29701,29702,29703,29704,29705,29706,29707,29708,29709,29710,29711,29712,29713,29714,29715,29716,29717,29718,29719,29720,29721,29722,29723,29724,29725,29726,29727,29728,29729,29730,29731,29732,29733,29734,29735,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29746,29747,29748,29749,29750,29751,29752,29753,29754,29755,29756,29757,29758,29759,29760,29761,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29781,29782,29783,29784,29785,29786,29787,29788,29789,29790,29791,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29805,29806,29807,29808,29809,29810,29811,29812,29813,29814,29815,29816,29817,29818,29819,29820,29821,29822,29823,29824,29825,29826,29827,29828,29829,29830,29831,29832,29833,29834,29835,29836,29837,29838,29839,29840,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29852,29853,29854,29855,29856,29857,29858,29859,29860,29861,29862,29863,29864,29865,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29882,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29906,29907,29908,29909,29910,29911,29912,29913,29914,29915,29916,29917,29918,29919,29920,29921,29922,29923,29924,29925,29926,29927,29928,29929,29930,29931,29932,29933,29934,29935,29936,29937,29938,29939,29940,29941,29942,29943,29944,29945,29946,29947,29948,29949,29950,29951,29952,29953,29954,29955,29956,29957,29958,29959,29960,29961,29962,29963,29964,29965,29966,29967,29968,29969,29970,29971,29972,29973,29974,29975,29976,29977,29978,29979,29980,29981,29982,29983,29984,29985,29986,29987,29988,29989,29990,29991,29992,29993,29994,29995,29996,29997,29998,29999,30000,30001,30002,30003,30004,30005,30006,30007,30008,30009,30010,30011,30012,30013,30014,30015,30016,30017,30018,30019,30020,30021,30022,30023,30024,30025,30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30041,30042,30043,30044,30045,30046,30047,30048,30049,30050,30051,30052,30053,30054,30055,30056,30057,30058,30059,30060,30061,30062,30063,30064,30065,30066,30067,30068,30069,30070,30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30089,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30100,30101,30102,30103,30104,30105,30106,30107,30108,30109,30110,30111,30112,30113,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30124,30125,30126,30127,30128,30129,30130,30131,30132,30133,30134,30135,30136,30137,30138,30139,30140,30141,30142,30143,30144,30145,30146,30147,30148,30149,30150,30151,30152,30153,30154,30155,30156,30157,30158,30159,30160,30161,30162,30163,30164,30165,30166,30167,30168,30169,30170,30171,30172,30173,30174,30175,30176,30177,30178,30179,30180,30181,30182,30183,30184,30185,30186,30187,30188,30189,30190,30191,30192,30193,30194,30195,30196,30197,30198,30199,30200,30201,30202,30203,30204,30205,30206,30207,30208,30209,30210,30211,30212,30213,30214,30215,30216,30217,30218,30219,30220,30221,30222,30223,30224,30225,30226,30227,30228,30229,30230,30231,30232,30233,30234,30235,30236,30237,30238,30239,30240,30241,30242,30243,30244,30245,30246,30247,30248,30249,30250,30251,30252,30253,30254,30255,30256,30257,30258,30259,30260,30261,30262,30263,30264,30265,30266,30267,30268,30269,30270,30271,30272,30273,30274,30275,30276,30277,30278,30279,30280,30281,30282,30283,30284,30285,30286,30287,30288,30289,30290,30291,30292,30293,30294,30295,30296,30297,30298,30299,30300,30301,30302,30303,30304,30305,30306,30307,30308,30309,30310,30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,30323,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,30335,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30351,30352,30353,30354,30355,30356,30357,30358,30359,30360,30361,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30372,30373,30374,30375,30376,30377,30378,30379,30380,30381,30382,30383,30384,30385,30386,30387,30388,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30399,30400,30401,30402,30403,30404,30405,30406,30407,30408,30409,30410,30411,30412,30413,30414,30415,30416,30417,30418,30419,30420,30421,30422,30423,30424,30425,30426,30427,30428,30429,30430,30431,30432,30433,30434,30435,30436,30437,30438,30439,30440,30441,30442,30443,30444,30445,30446,30447,30448,30449,30450,30451,30452,30453,30454,30455,30456,30457,30458,30459,30460,30461,30462,30463,30464,30465,30466,30467,30468,30469,30470,30471,30472,30473,30474,30475,30476,30477,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30489,30490,30491,30492,30493,30494,30495,30496,30497,30498,30499,30500,30501,30502,30503,30504,30505,30506,30507,30508,30509,30510,30511,30512,30513,30514,30515,30516,30517,30518,30519,30520,30521,30522,30523,30524,30525,30526,30527,30528,30529,30530,30531,30532,30533,30534,30535,30536,30537,30538,30539,30540,30541,30542,30543,30544,30545,30546,30547,30548,30549,30550,30551,30552,30553,30554,30555,30556,30557,30558,30559,30560,30561,30562,30563,30564,30565,30566,30567,30568,30569,30570,30571,30572,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30585,30586,30587,30588,30589,30590,30591,30592,30593,30594,30595,30596,30597,30598,30599,30600,30601,30602,30603,30604,30605,30606,30607,30608,30609,30610,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30623,30624,30625,30626,30627,30628,30629,30630,30631,30632,30633,30634,30635,30636,30637,30638,30639,30640,30641,30642,30643,30644,30645,30646,30647,30648,30649,30650,30651,30652,30653,30654,30655,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30669,30670,30671,30672,30673,30674,30675,30676,30677,30678,30679,30680,30681,30682,30683,30684,30685,30686,30687,30688,30689,30690,30691,30692,30693,30694,30695,30696,30697,30698,30699,30700,30701,30702,30703,30704,30705,30706,30707,30708,30709,30710,30711,30712,30713,30714,30715,30716,30717,30718,30719,30720,30721,30722,30723,30724,30725,30726,30727,30728,30729,30730,30731,30732,30733,30734,30735,30736,30737,30738,30739,30740,30741,30742,30743,30744,30745,30746,30747,30748,30749,30750,30751,30752,30753,30754,30755,30756,30757,30758,30759,30760,30761,30762,30763,30764,30765,30766,30767,30768,30769,30770,30771,30772,30773,30774,30775,30776,30777,30778,30779,30780,30781,30782,30783,30784,30785,30786,30787,30788,30789,30790,30791,30792,30793,30794,30795,30796,30797,30798,30799,30800,30801,30802,30803,30804,30805,30806,30807,30808,30809,30810,30811,30812,30813,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30826,30827,30828,30829,30830,30831,30832,30833,30834,30835,30836,30837,30838,30839,30840,30841,30842,30843,30844,30845,30846,30847,30848,30849,30850,30851,30852,30853,30854,30855,30856,30857,30858,30859,30860,30861,30862,30863,30864,30865,30866,30867,30868,30869,30870,30871,30872,30873,30874,30875,30876,30877,30878,30879,30880,30881,30882,30883,30884,30885,30886,30887,30888,30889,30890,30891,30892,30893,30894,30895,30896,30897,30898,30899,30900,30901,30902,30903,30904,30905,30906,30907,30908,30909,30910,30911,30912,30913,30914,30915,30916,30917,30918,30919,30920,30921,30922,30923,30924,30925,30926,30927,30928,30929,30930,30931,30932,30933,30934,30935,30936,30937,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30952,30953,30954,30955,30956,30957,30958,30959,30960,30961,30962,30963,30964,30965,30966,30967,30968,30969,30970,30971,30972,30973,30974,30975,30976,30977,30978,30979,30980,30981,30982,30983,30984,30985,30986,30987,30988,30989,30990,30991,30992,30993,30994,30995,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31006,31007,31008,31009,31010,31011,31012,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31028,31029,31030,31031,31032,31033,31034,31035,31036,31037,31038,31039,31040,31041,31042,31043,31044,31045,31046,31047,31048,31049,31050,31051,31052,31053,31054,31055,31056,31057,31058,31059,31060,31061,31062,31063,31064,31065,31066,31067,31068,31069,31070,31071,31072,31073,31074,31075,31076,31077,31078,31079,31080,31081,31082,31083,31084,31085,31086,31087,31088,31089,31090,31091,31092,31093,31094,31095,31096,31097,31098,31099,31100,31101,31102,31103,31104,31105,31106,31107,31108,31109,31110,31111,31112,31113,31114,31115,31116,31117,31118,31119,31120,31121,31122,31123,31124,31125,31126,31127,31128,31129,31130,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31143,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31155,31156,31157,31158,31159,31160,31161,31162,31163,31164,31165,31166,31167,31168,31169,31170,31171,31172,31173,31174,31175,31176,31177,31178,31179,31180,31181,31182,31183,31184,31185,31186,31187,31188,31189,31190,31191,31192,31193,31194,31195,31196,31197,31198,31199,31200,31201,31202,31203,31204,31205,31206,31207,31208,31209,31210,31211,31212,31213,31214,31215,31216,31217,31218,31219,31220,31221,31222,31223,31224,31225,31226,31227,31228,31229,31230,31231,31232,31233,31234,31235,31236,31237,31238,31239,31240,31241,31242,31243,31244,31245,31246,31247,31248,31249,31250,31251,31252,31253,31254,31255,31256,31257,31258,31259,31260,31261,31262,31263,31264,31265,31266,31267,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31283,31284,31285,31286,31287,31288,31289,31290,31291,31292,31293,31294,31295,31296,31297,31298,31299,31300,31301,31302,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31313,31314,31315,31316,31317,31318,31319,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31344,31345,31346,31347,31348,31349,31350,31351,31352,31353,31354,31355,31356,31357,31358,31359,31360,31361,31362,31363,31364,31365,31366,31367,31368,31369,31370,31371,31372,31373,31374,31375,31376,31377,31378,31379,31380,31381,31382,31383,31384,31385,31386,31387,31388,31389,31390,31391,31392,31393,31394,31395,31396,31397,31398,31399,31400,31401,31402,31403,31404,31405,31406,31407,31408,31409,31410,31411,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31423,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31435,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31446,31447,31448,31449,31450,31451,31452,31453,31454,31455,31456,31457,31458,31459,31460,31461,31462,31463,31464,31465,31466,31467,31468,31469,31470,31471,31472,31473,31474,31475,31476,31477,31478,31479,31480,31481,31482,31483,31484,31485,31486,31487,31488,31489,31490,31491,31492,31493,31494,31495,31496,31497,31498,31499,31500,31501,31502,31503,31504,31505,31506,31507,31508,31509,31510,31511,31512,31513,31514,31515,31516,31517,31518,31519,31520,31521,31522,31523,31524,31525,31526,31527,31528,31529,31530,31531,31532,31533,31534,31535,31536,31537,31538,31539,31540,31541,31542,31543,31544,31545,31546,31547,31548,31549,31550,31551,31552,31553,31554,31555,31556,31557,31558,31559,31560,31561,31562,31563,31564,31565,31566,31567,31568,31569,31570,31571,31572,31573,31574,31575,31576,31577,31578,31579,31580,31581,31582,31583,31584,31585,31586,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31598,31599,31600,31601,31602,31603,31604,31605,31606,31607,31608,31609,31610,31611,31612,31613,31614,31615,31616,31617,31618,31619,31620,31621,31622,31623,31624,31625,31626,31627,31628,31629,31630,31631,31632,31633,31634,31635,31636,31637,31638,31639,31640,31641,31642,31643,31644,31645,31646,31647,31648,31649,31650,31651,31652,31653,31654,31655,31656,31657,31658,31659,31660,31661,31662,31663,31664,31665,31666,31667,31668,31669,31670,31671,31672,31673,31674,31675,31676,31677,31678,31679,31680,31681,31682,31683,31684,31685,31686,31687,31688,31689,31690,31691,31692,31693,31694,31695,31696,31697,31698,31699,31700,31701,31702,31703,31704,31705,31706,31707,31708,31709,31710,31711,31712,31713,31714,31715,31716,31717,31718,31719,31720,31721,31722,31723,31724,31725,31726,31727,31728,31729,31730,31731,31732,31733,31734,31735,31736,31737,31738,31739,31740,31741,31742,31743,31744,31745,31746,31747,31748,31749,31750,31751,31752,31753,31754,31755,31756,31757,31758,31759,31760,31761,31762,31763,31764,31765,31766,31767,31768,31769,31770,31771,31772,31773,31774,31775,31776,31777,31778,31779,31780,31781,31782,31783,31784,31785,31786,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31800,31801,31802,31803,31804,31805,31806,31807,31808,31809,31810,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31821,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31859,31860,31861,31862,31863,31864,31865,31866,31867,31868,31869,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31881,31882,31883,31884,31885,31886,31887,31888,31889,31890,31891,31892,31893,31894,31895,31896,31897,31898,31899,31900,31901,31902,31903,31904,31905,31906,31907,31908,31909,31910,31911,31912,31913,31914,31915,31916,31917,31918,31919,31920,31921,31922,31923,31924,31925,31926,31927,31928,31929,31930,31931,31932,31933,31934,31935,31936,31937,31938,31939,31940,31941,31942,31943,31944,31945,31946,31947,31948,31949,31950,31951,31952,31953,31954,31955,31956,31957,31958,31959,31960,31961,31962,31963,31964,31965,31966,31967,31968,31969,31970,31971,31972,31973,31974,31975,31976,31977,31978,31979,31980,31981,31982,31983,31984,31985,31986,31987,31988,31989,31990,31991,31992,31993,31994,31995,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32032,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32110,32111,32112,32113,32114,32115,32116,32117,32118,32119,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32166,32167,32168,32169,32170,32171,32172,32173,32174,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32315,32316,32317,32318,32319,32320,32321,32322,32323,32324,32325,32326,32327,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32386,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32411,32412,32413,32414,32415,32416,32417,32418,32419,32420,32421,32422,32423,32424,32425,32426,32427,32428,32429,32430,32431,32432,32433,32434,32435,32436,32437,32438,32439,32440,32441,32442,32443,32444,32445,32446,32447,32448,32449,32450,32451,32452,32453,32454,32455,32456,32457,32458,32459,32460,32461,32462,32463,32464,32465,32466,32467,32468,32469,32470,32471,32472,32473,32474,32475,32476,32477,32478,32479,32480,32481,32482,32483,32484,32485,32486,32487,32488,32489,32490,32491,32492,32493,32494,32495,32496,32497,32498,32499,32500,32501,32502,32503,32504,32505,32506,32507,32508,32509,32510,32511,32512,32513,32514,32515,32516,32517,32518,32519,32520,32521,32522,32523,32524,32525,32526,32527,32528,32529,32530,32531,32532,32533,32534,32535,32536,32537,32538,32539,32540,32541,32542,32543,32544,32545,32546,32547,32548,32549,32550,32551,32552,32553,32554,32555,32556,32557,32558,32559,32560,32561,32562,32563,32564,32565,32566,32567,32568,32569,32570,32571,32572,32573,32574,32575,32576,32577,32578,32579,32580,32581,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32592,32593,32594,32595,32596,32597,32598,32599,32600,32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660,32661,32662,32663,32664,32665,32666,32667,32668,32669,32670,32671,32672,32673,32674,32675,32676,32677,32678,32679,32680,32681,32682,32683,32684,32685,32686,32687,32688,32689,32690,32691,32692,32693,32694,32695,32696,32697,32698,32699,32700,32701,32702,32703,32704,32705,32706,32707,32708,32709,32710,32711,32712,32713,32714,32715,32716,32717,32718,32719,32720,32721,32722,32723,32724,32725,32726,32727,32728,32729,32730,32731,32732,32733,32734,32735,32736,32737,32738,32739,32740,32741,32742,32743,32744,32745,32746,32747,32748,32749,32750,32751,32752,32753,32754,32755,32756,32757,32758,32759,32760,32761,32762,32763,32764,32765,32766,32767,32768,32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,32781,32782,32783,32784,32785,32786,32787,32788,32789,32790,32791,32792,32793,32794,32795,32796,32797,32798,32799,32800,32801,32802,32803,32804,32805,32806,32807,32808,32809,32810,32811,32812,32813,32814,32815,32816,32817,32818,32819,32820,32821,32822,32823,32824,32825,32826,32827,32828,32829,32830,32831,32832,32833,32834,32835,32836,32837,32838,32839,32840,32841,32842,32843,32844,32845,32846,32847,32848,32849,32850,32851,32852,32853,32854,32855,32856,32857,32858,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32873,32874,32875,32876,32877,32878,32879,32880,32881,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,32894,32895,32896,32897,32898,32899,32900,32901,32902,32903,32904,32905,32906,32907,32908,32909,32910,32911,32912,32913,32914,32915,32916,32917,32918,32919,32920,32921,32922,32923,32924,32925,32926,32927,32928,32929,32930,32931,32932,32933,32934,32935,32936,32937,32938,32939,32940,32941,32942,32943,32944,32945,32946,32947,32948,32949,32950,32951,32952,32953,32954,32955,32956,32957,32958,32959,32960,32961,32962,32963,32964,32965,32966,32967,32968,32969,32970,32971,32972,32973,32974,32975,32976,32977,32978,32979,32980,32981,32982,32983,32984,32985,32986,32987,32988,32989,32990,32991,32992,32993,32994,32995,32996,32997,32998,32999,33000,33001,33002,33003,33004,33005,33006,33007,33008,33009,33010,33011,33012,33013,33014,33015,33016,33017,33018,33019,33020,33021,33022,33023,33024,33025,33026,33027,33028,33029,33030,33031,33032,33033,33034,33035,33036,33037,33038,33039,33040,33041,33042,33043,33044,33045,33046,33047,33048,33049,33050,33051,33052,33053,33054,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33068,33069,33070,33071,33072,33073,33074,33075,33076,33077,33078,33079,33080,33081,33082,33083,33084,33085,33086,33087,33088,33089,33090,33091,33092,33093,33094,33095,33096,33097,33098,33099,33100,33101,33102,33103,33104,33105,33106,33107,33108,33109,33110,33111,33112,33113,33114,33115,33116,33117,33118,33119,33120,33121,33122,33123,33124,33125,33126,33127,33128,33129,33130,33131,33132,33133,33134,33135,33136,33137,33138,33139,33140,33141,33142,33143,33144,33145,33146,33147,33148,33149,33150,33151,33152,33153,33154,33155,33156,33157,33158,33159,33160,33161,33162,33163,33164,33165,33166,33167,33168,33169,33170,33171,33172,33173,33174,33175,33176,33177,33178,33179,33180,33181,33182,33183,33184,33185,33186,33187,33188,33189,33190,33191,33192,33193,33194,33195,33196,33197,33198,33199,33200,33201,33202,33203,33204,33205,33206,33207,33208,33209,33210,33211,33212,33213,33214,33215,33216,33217,33218,33219,33220,33221,33222,33223,33224,33225,33226,33227,33228,33229,33230,33231,33232,33233,33234,33235,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33251,33252,33253,33254,33255,33256,33257,33258,33259,33260,33261,33262,33263,33264,33265,33266,33267,33268,33269,33270,33271,33272,33273,33274,33275,33276,33277,33278,33279,33280,33281,33282,33283,33284,33285,33286,33287,33288,33289,33290,33291,33292,33293,33294,33295,33296,33297,33298,33299,33300,33301,33302,33303,33304,33305,33306,33307,33308,33309,33310,33311,33312,33313,33314,33315,33316,33317,33318,33319,33320,33321,33322,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348,33349,33350,33351,33352,33353,33354,33355,33356,33357,33358,33359,33360,33361,33362,33363,33364,33365,33366,33367,33368,33369,33370,33371,33372,33373,33374,33375,33376,33377,33378,33379,33380,33381,33382,33383,33384,33385,33386,33387,33388,33389,33390,33391,33392,33393,33394,33395,33396,33397,33398,33399,33400,33401,33402,33403,33404,33405,33406,33407,33408,33409,33410,33411,33412,33413,33414,33415,33416,33417,33418,33419,33420,33421,33422,33423,33424,33425,33426,33427,33428,33429,33430,33431,33432,33433,33434,33435,33436,33437,33438,33439,33440,33441,33442,33443,33444,33445,33446,33447,33448,33449,33450,33451,33452,33453,33454,33455,33456,33457,33458,33459,33460,33461,33462,33463,33464,33465,33466,33467,33468,33469,33470,33471,33472,33473,33474,33475,33476,33477,33478,33479,33480,33481,33482,33483,33484,33485,33486,33487,33488,33489,33490,33491,33492,33493,33494,33495,33496,33497,33498,33499,33500,33501,33502,33503,33504,33505,33506,33507,33508,33509,33510,33511,33512,33513,33514,33515,33516,33517,33518,33519,33520,33521,33522,33523,33524,33525,33526,33527,33528,33529,33530,33531,33532,33533,33534,33535,33536,33537,33538,33539,33540,33541,33542,33543,33544,33545,33546,33547,33548,33549,33550,33551,33552,33553,33554,33555,33556,33557,33558,33559,33560,33561,33562,33563,33564,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33575,33576,33577,33578,33579,33580,33581,33582,33583,33584,33585,33586,33587,33588,33589,33590,33591,33592,33593,33594,33595,33596,33597,33598,33599,33600,33601,33602,33603,33604,33605,33606,33607,33608,33609,33610,33611,33612,33613,33614,33615,33616,33617,33618,33619,33620,33621,33622,33623,33624,33625,33626,33627,33628,33629,33630,33631,33632,33633,33634,33635,33636,33637,33638,33639,33640,33641,33642,33643,33644,33645,33646,33647,33648,33649,33650,33651,33652,33653,33654,33655,33656,33657,33658,33659,33660,33661,33662,33663,33664,33665,33666,33667,33668,33669,33670,33671,33672,33673,33674,33675,33676,33677,33678,33679,33680,33681,33682,33683,33684,33685,33686,33687,33688,33689,33690,33691,33692,33693,33694,33695,33696,33697,33698,33699,33700,33701,33702,33703,33704,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33717,33718,33719,33720,33721,33722,33723,33724,33725,33726,33727,33728,33729,33730,33731,33732,33733,33734,33735,33736,33737,33738,33739,33740,33741,33742,33743,33744,33745,33746,33747,33748,33749,33750,33751,33752,33753,33754,33755,33756,33757,33758,33759,33760,33761,33762,33763,33764,33765,33766,33767,33768,33769,33770,33771,33772,33773,33774,33775,33776,33777,33778,33779,33780,33781,33782,33783,33784,33785,33786,33787,33788,33789,33790,33791,33792,33793,33794,33795,33796,33797,33798,33799,33800,33801,33802,33803,33804,33805,33806,33807,33808,33809,33810,33811,33812,33813,33814,33815,33816,33817,33818,33819,33820,33821,33822,33823,33824,33825,33826,33827,33828,33829,33830,33831,33832,33833,33834,33835,33836,33837,33838,33839,33840,33841,33842,33843,33844,33845,33846,33847,33848,33849,33850,33851,33852,33853,33854,33855,33856,33857,33858,33859,33860,33861,33862,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33873,33874,33875,33876,33877,33878,33879,33880,33881,33882,33883,33884,33885,33886,33887,33888,33889,33890,33891,33892,33893,33894,33895,33896,33897,33898,33899,33900,33901,33902,33903,33904,33905,33906,33907,33908,33909,33910,33911,33912,33913,33914,33915,33916,33917,33918,33919,33920,33921,33922,33923,33924,33925,33926,33927,33928,33929,33930,33931,33932,33933,33934,33935,33936,33937,33938,33939,33940,33941,33942,33943,33944,33945,33946,33947,33948,33949,33950,33951,33952,33953,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33967,33968,33969,33970,33971,33972,33973,33974,33975,33976,33977,33978,33979,33980,33981,33982,33983,33984,33985,33986,33987,33988,33989,33990,33991,33992,33993,33994,33995,33996,33997,33998,33999,34000,34001,34002,34003,34004,34005,34006,34007,34008,34009,34010,34011,34012,34013,34014,34015,34016,34017,34018,34019,34020,34021,34022,34023,34024,34025,34026,34027,34028,34029,34030,34031,34032,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34044,34045,34046,34047,34048,34049,34050,34051,34052,34053,34054,34055,34056,34057,34058,34059,34060,34061,34062,34063,34064,34065,34066,34067,34068,34069,34070,34071,34072,34073,34074,34075,34076,34077,34078,34079,34080,34081,34082,34083,34084,34085,34086,34087,34088,34089,34090,34091,34092,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34103,34104,34105,34106,34107,34108,34109,34110,34111,34112,34113,34114,34115,34116,34117,34118,34119,34120,34121,34122,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34134,34135,34136,34137,34138,34139,34140,34141,34142,34143,34144,34145,34146,34147,34148,34149,34150,34151,34152,34153,34154,34155,34156,34157,34158,34159,34160,34161,34162,34163,34164,34165,34166,34167,34168,34169,34170,34171,34172,34173,34174,34175,34176,34177,34178,34179,34180,34181,34182,34183,34184,34185,34186,34187,34188,34189,34190,34191,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34203,34204,34205,34206,34207,34208,34209,34210,34211,34212,34213,34214,34215,34216,34217,34218,34219,34220,34221,34222,34223,34224,34225,34226,34227,34228,34229,34230,34231,34232,34233,34234,34235,34236,34237,34238,34239,34240,34241,34242,34243,34244,34245,34246,34247,34248,34249,34250,34251,34252,34253,34254,34255,34256,34257,34258,34259,34260,34261,34262,34263,34264,34265,34266,34267,34268,34269,34270,34271,34272,34273,34274,34275,34276,34277,34278,34279,34280,34281,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,34297,34298,34299,34300,34301,34302,34303,34304,34305,34306,34307,34308,34309,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34321,34322,34323,34324,34325,34326,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34343,34344,34345,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34360,34361,34362,34363,34364,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34381,34382,34383,34384,34385,34386,34387,34388,34389,34390,34391,34392,34393,34394,34395,34396,34397,34398,34399,34400,34401,34402,34403,34404,34405,34406,34407,34408,34409,34410,34411,34412,34413,34414,34415,34416,34417,34418,34419,34420,34421,34422,34423,34424,34425,34426,34427,34428,34429,34430,34431,34432,34433,34434,34435,34436,34437,34438,34439,34440,34441,34442,34443,34444,34445,34446,34447,34448,34449,34450,34451,34452,34453,34454,34455,34456,34457,34458,34459,34460,34461,34462,34463,34464,34465,34466,34467,34468,34469,34470,34471,34472,34473,34474,34475,34476,34477,34478,34479,34480,34481,34482,34483,34484,34485,34486,34487,34488,34489,34490,34491,34492,34493,34494,34495,34496,34497,34498,34499,34500,34501,34502,34503,34504,34505,34506,34507,34508,34509,34510,34511,34512,34513,34514,34515,34516,34517,34518,34519,34520,34521,34522,34523,34524,34525,34526,34527,34528,34529,34530,34531,34532,34533,34534,34535,34536,34537,34538,34539,34540,34541,34542,34543,34544,34545,34546,34547,34548,34549,34550,34551,34552,34553,34554,34555,34556,34557,34558,34559,34560,34561,34562,34563,34564,34565,34566,34567,34568,34569,34570,34571,34572,34573,34574,34575,34576,34577,34578,34579,34580,34581,34582,34583,34584,34585,34586,34587,34588,34589,34590,34591,34592,34593,34594,34595,34596,34597,34598,34599,34600,34601,34602,34603,34604,34605,34606,34607,34608,34609,34610,34611,34612,34613,34614,34615,34616,34617,34618,34619,34620,34621,34622,34623,34624,34625,34626,34627,34628,34629,34630,34631,34632,34633,34634,34635,34636,34637,34638,34639,34640,34641,34642,34643,34644,34645,34646,34647,34648,34649,34650,34651,34652,34653,34654,34655,34656,34657,34658,34659,34660,34661,34662,34663,34664,34665,34666,34667,34668,34669,34670,34671,34672,34673,34674,34675,34676,34677,34678,34679,34680,34681,34682,34683,34684,34685,34686,34687,34688,34689,34690,34691,34692,34693,34694,34695,34696,34697,34698,34699,34700,34701,34702,34703,34704,34705,34706,34707,34708,34709,34710,34711,34712,34713,34714,34715,34716,34717,34718,34719,34720,34721,34722,34723,34724,34725,34726,34727,34728,34729,34730,34731,34732,34733,34734,34735,34736,34737,34738,34739,34740,34741,34742,34743,34744,34745,34746,34747,34748,34749,34750,34751,34752,34753,34754,34755,34756,34757,34758,34759,34760,34761,34762,34763,34764,34765,34766,34767,34768,34769,34770,34771,34772,34773,34774,34775,34776,34777,34778,34779,34780,34781,34782,34783,34784,34785,34786,34787,34788,34789,34790,34791,34792,34793,34794,34795,34796,34797,34798,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34809,34810,34811,34812,34813,34814,34815,34816,34817,34818,34819,34820,34821,34822,34823,34824,34825,34826,34827,34828,34829,34830,34831,34832,34833,34834,34835,34836,34837,34838,34839,34840,34841,34842,34843,34844,34845,34846,34847,34848,34849,34850,34851,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34866,34867,34868,34869,34870,34871,34872,34873,34874,34875,34876,34877,34878,34879,34880,34881,34882,34883,34884,34885,34886,34887,34888,34889,34890,34891,34892,34893,34894,34895,34896,34897,34898,34899,34900,34901,34902,34903,34904,34905,34906,34907,34908,34909,34910,34911,34912,34913,34914,34915,34916,34917,34918,34919,34920,34921,34922,34923,34924,34925,34926,34927,34928,34929,34930,34931,34932,34933,34934,34935,34936,34937,34938,34939,34940,34941,34942,34943,34944,34945,34946,34947,34948,34949,34950,34951,34952,34953,34954,34955,34956,34957,34958,34959,34960,34961,34962,34963,34964,34965,34966,34967,34968,34969,34970,34971,34972,34973,34974,34975,34976,34977,34978,34979,34980,34981,34982,34983,34984,34985,34986,34987,34988,34989,34990,34991,34992,34993,34994,34995,34996,34997,34998,34999,35000,35001,35002,35003,35004,35005,35006,35007,35008,35009,35010,35011,35012,35013,35014,35015,35016,35017,35018,35019,35020,35021,35022,35023,35024,35025,35026,35027,35028,35029,35030,35031,35032,35033,35034,35035,35036,35037,35038,35039,35040,35041,35042,35043,35044,35045,35046,35047,35048,35049,35050,35051,35052,35053,35054,35055,35056,35057,35058,35059,35060,35061,35062,35063,35064,35065,35066,35067,35068,35069,35070,35071,35072,35073,35074,35075,35076,35077,35078,35079,35080,35081,35082,35083,35084,35085,35086,35087,35088,35089,35090,35091,35092,35093,35094,35095,35096,35097,35098,35099,35100,35101,35102,35103,35104,35105,35106,35107,35108,35109,35110,35111,35112,35113,35114,35115,35116,35117,35118,35119,35120,35121,35122,35123,35124,35125,35126,35127,35128,35129,35130,35131,35132,35133,35134,35135,35136,35137,35138,35139,35140,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35166,35167,35168,35169,35170,35171,35172,35173,35174,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35195,35196,35197,35198,35199,35200,35201,35202,35203,35204,35205,35206,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35265,35266,35267,35268,35269,35270,35271,35272,35273,35274,35275,35276,35277,35278,35279,35280,35281,35282,35283,35284,35285,35286,35287,35288,35289,35290,35291,35292,35293,35294,35295,35296,35297,35298,35299,35300,35301,35302,35303,35304,35305,35306,35307,35308,35309,35310,35311,35312,35313,35314,35315,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35328,35329,35330,35331,35332,35333,35334,35335,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35390,35391,35392,35393,35394,35395,35396,35397,35398,35399,35400,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35449,35450,35451,35452,35453,35454,35455,35456,35457,35458,35459,35460,35461,35462,35463,35464,35465,35466,35467,35468,35469,35470,35471,35472,35473,35474,35475,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35591,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35622,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35686,35687,35688,35689,35690,35691,35692,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35744,35745,35746,35747,35748,35749,35750,35751,35752,35753,35754,35755,35756,35757,35758,35759,35760,35761,35762,35763,35764,35765,35766,35767,35768,35769,35770,35771,35772,35773,35774,35775,35776,35777,35778,35779,35780,35781,35782,35783,35784,35785,35786,35787,35788,35789,35790,35791,35792,35793,35794,35795,35796,35797,35798,35799,35800,35801,35802,35803,35804,35805,35806,35807,35808,35809,35810,35811,35812,35813,35814,35815,35816,35817,35818,35819,35820,35821,35822,35823,35824,35825,35826,35827,35828,35829,35830,35831,35832,35833,35834,35835,35836,35837,35838,35839,35840,35841,35842,35843,35844,35845,35846,35847,35848,35849,35850,35851,35852,35853,35854,35855,35856,35857,35858,35859,35860,35861,35862,35863,35864,35865,35866,35867,35868,35869,35870,35871,35872,35873,35874,35875,35876,35877,35878,35879,35880,35881,35882,35883,35884,35885,35886,35887,35888,35889,35890,35891,35892,35893,35894,35895,35896,35897,35898,35899,35900,35901,35902,35903,35904,35905,35906,35907,35908,35909,35910,35911,35912,35913,35914,35915,35916,35917,35918,35919,35920,35921,35922,35923,35924,35925,35926,35927,35928,35929,35930,35931,35932,35933,35934,35935,35936,35937,35938,35939,35940,35941,35942,35943,35944,35945,35946,35947,35948,35949,35950,35951,35952,35953,35954,35955,35956,35957,35958,35959,35960,35961,35962,35963,35964,35965,35966,35967,35968,35969,35970,35971,35972,35973,35974,35975,35976,35977,35978,35979,35980,35981,35982,35983,35984,35985,35986,35987,35988,35989,35990,35991,35992,35993,35994,35995,35996,35997,35998,35999,36000,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36125,36126,36127,36128,36129,36130,36131,36132,36133,36134,36135,36136,36137,36138,36139,36140,36141,36142,36143,36144,36145,36146,36147,36148,36149,36150,36151,36152,36153,36154,36155,36156,36157,36158,36159,36160,36161,36162,36163,36164,36165,36166,36167,36168,36169,36170,36171,36172,36173,36174,36175,36176,36177,36178,36179,36180,36181,36182,36183,36184,36185,36186,36187,36188,36189,36190,36191,36192,36193,36194,36195,36196,36197,36198,36199,36200,36201,36202,36203,36204,36205,36206,36207,36208,36209,36210,36211,36212,36213,36214,36215,36216,36217,36218,36219,36220,36221,36222,36223,36224,36225,36226,36227,36228,36229,36230,36231,36232,36233,36234,36235,36236,36237,36238,36239,36240,36241,36242,36243,36244,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36255,36256,36257,36258,36259,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36273,36274,36275,36276,36277,36278,36279,36280,36281,36282,36283,36284,36285,36286,36287,36288,36289,36290,36291,36292,36293,36294,36295,36296,36297,36298,36299,36300,36301,36302,36303,36304,36305,36306,36307,36308,36309,36310,36311,36312,36313,36314,36315,36316,36317,36318,36319,36320,36321,36322,36323,36324,36325,36326,36327,36328,36329,36330,36331,36332,36333,36334,36335,36336,36337,36338,36339,36340,36341,36342,36343,36344,36345,36346,36347,36348,36349,36350,36351,36352,36353,36354,36355,36356,36357,36358,36359,36360,36361,36362,36363,36364,36365,36366,36367,36368,36369,36370,36371,36372,36373,36374,36375,36376,36377,36378,36379,36380,36381,36382,36383,36384,36385,36386,36387,36388,36389,36390,36391,36392,36393,36394,36395,36396,36397,36398,36399,36400,36401,36402,36403,36404,36405,36406,36407,36408,36409,36410,36411,36412,36413,36414,36415,36416,36417,36418,36419,36420,36421,36422,36423,36424,36425,36426,36427,36428,36429,36430,36431,36432,36433,36434,36435,36436,36437,36438,36439,36440,36441,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36454,36455,36456,36457,36458,36459,36460,36461,36462,36463,36464,36465,36466,36467,36468,36469,36470,36471,36472,36473,36474,36475,36476,36477,36478,36479,36480,36481,36482,36483,36484,36485,36486,36487,36488,36489,36490,36491,36492,36493,36494,36495,36496,36497,36498,36499,36500,36501,36502,36503,36504,36505,36506,36507,36508,36509,36510,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36523,36524,36525,36526,36527,36528,36529,36530,36531,36532,36533,36534,36535,36536,36537,36538,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36558,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36710,36711,36712,36713,36714,36715,36716,36717,36718,36719,36720,36721,36722,36723,36724,36725,36726,36727,36728,36729,36730,36731,36732,36733,36734,36735,36736,36737,36738,36739,36740,36741,36742,36743,36744,36745,36746,36747,36748,36749,36750,36751,36752,36753,36754,36755,36756,36757,36758,36759,36760,36761,36762,36763,36764,36765,36766,36767,36768,36769,36770,36771,36772,36773,36774,36775,36776,36777,36778,36779,36780,36781,36782,36783,36784,36785,36786,36787,36788,36789,36790,36791,36792,36793,36794,36795,36796,36797,36798,36799,36800,36801,36802,36803,36804,36805,36806,36807,36808,36809,36810,36811,36812,36813,36814,36815,36816,36817,36818,36819,36820,36821,36822,36823,36824,36825,36826,36827,36828,36829,36830,36831,36832,36833,36834,36835,36836,36837,36838,36839,36840,36841,36842,36843,36844,36845,36846,36847,36848,36849,36850,36851,36852,36853,36854,36855,36856,36857,36858,36859,36860,36861,36862,36863,36864,36865,36866,36867,36868,36869,36870,36871,36872,36873,36874,36875,36876,36877,36878,36879,36880,36881,36882,36883,36884,36885,36886,36887,36888,36889,36890,36891,36892,36893,36894,36895,36896,36897,36898,36899,36900,36901,36902,36903,36904,36905,36906,36907,36908,36909,36910,36911,36912,36913,36914,36915,36916,36917,36918,36919,36920,36921,36922,36923,36924,36925,36926,36927,36928,36929,36930,36931,36932,36933,36934,36935,36936,36937,36938,36939,36940,36941,36942,36943,36944,36945,36946,36947,36948,36949,36950,36951,36952,36953,36954,36955,36956,36957,36958,36959,36960,36961,36962,36963,36964,36965,36966,36967,36968,36969,36970,36971,36972,36973,36974,36975,36976,36977,36978,36979,36980,36981,36982,36983,36984,36985,36986,36987,36988,36989,36990,36991,36992,36993,36994,36995,36996,36997,36998,36999,37000,37001,37002,37003,37004,37005,37006,37007,37008,37009,37010,37011,37012,37013,37014,37015,37016,37017,37018,37019,37020,37021,37022,37023,37024,37025,37026,37027,37028,37029,37030,37031,37032,37033,37034,37035,37036,37037,37038,37039,37040,37041,37042,37043,37044,37045,37046,37047,37048,37049,37050,37051,37052,37053,37054,37055,37056,37057,37058,37059,37060,37061,37062,37063,37064,37065,37066,37067,37068,37069,37070,37071,37072,37073,37074,37075,37076,37077,37078,37079,37080,37081,37082,37083,37084,37085,37086,37087,37088,37089,37090,37091,37092,37093,37094,37095,37096,37097,37098,37099,37100,37101,37102,37103,37104,37105,37106,37107,37108,37109,37110,37111,37112,37113,37114,37115,37116,37117,37118,37119,37120,37121,37122,37123,37124,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37145,37146,37147,37148,37149,37150,37151,37152,37153,37154,37155,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37167,37168,37169,37170,37171,37172,37173,37174,37175,37176,37177,37178,37179,37180,37181,37182,37183,37184,37185,37186,37187,37188,37189,37190,37191,37192,37193,37194,37195,37196,37197,37198,37199,37200,37201,37202,37203,37204,37205,37206,37207,37208,37209,37210,37211,37212,37213,37214,37215,37216,37217,37218,37219,37220,37221,37222,37223,37224,37225,37226,37227,37228,37229,37230,37231,37232,37233,37234,37235,37236,37237,37238,37239,37240,37241,37242,37243,37244,37245,37246,37247,37248,37249,37250,37251,37252,37253,37254,37255,37256,37257,37258,37259,37260,37261,37262,37263,37264,37265,37266,37267,37268,37269,37270,37271,37272,37273,37274,37275,37276,37277,37278,37279,37280,37281,37282,37283,37284,37285,37286,37287,37288,37289,37290,37291,37292,37293,37294,37295,37296,37297,37298,37299,37300,37301,37302,37303,37304,37305,37306,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37319,37320,37321,37322,37323,37324,37325,37326,37327,37328,37329,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37340,37341,37342,37343,37344,37345,37346,37347,37348,37349,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37492,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37518,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,37544,37545,37546,37547,37548,37549,37550,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37576,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37694,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37738,37739,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37775,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37834,37835,37836,37837,37838,37839,37840,37841,37842,37843,37844,37845,37846,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37950,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37995,37996,37997,37998,37999,38000,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38021,38022,38023,38024,38025,38026,38027,38028,38029,38030,38031,38032,38033,38034,38035,38036,38037,38038,38039,38040,38041,38042,38043,38044,38045,38046,38047,38048,38049,38050,38051,38052,38053,38054,38055,38056,38057,38058,38059,38060,38061,38062,38063,38064,38065,38066,38067,38068,38069,38070,38071,38072,38073,38074,38075,38076,38077,38078,38079,38080,38081,38082,38083,38084,38085,38086,38087,38088,38089,38090,38091,38092,38093,38094,38095,38096,38097,38098,38099,38100,38101,38102,38103,38104,38105,38106,38107,38108,38109,38110,38111,38112,38113,38114,38115,38116,38117,38118,38119,38120,38121,38122,38123,38124,38125,38126,38127,38128,38129,38130,38131,38132,38133,38134,38135,38136,38137,38138,38139,38140,38141,38142,38143,38144,38145,38146,38147,38148,38149,38150,38151,38152,38153,38154,38155,38156,38157,38158,38159,38160,38161,38162,38163,38164,38165,38166,38167,38168,38169,38170,38171,38172,38173,38174,38175,38176,38177,38178,38179,38180,38181,38182,38183,38184,38185,38186,38187,38188,38189,38190,38191,38192,38193,38194,38195,38196,38197,38198,38199,38200,38201,38202,38203,38204,38205,38206,38207,38208,38209,38210,38211,38212,38213,38214,38215,38216,38217,38218,38219,38220,38221,38222,38223,38224,38225,38226,38227,38228,38229,38230,38231,38232,38233,38234,38235,38236,38237,38238,38239,38240,38241,38242,38243,38244,38245,38246,38247,38248,38249,38250,38251,38252,38253,38254,38255,38256,38257,38258,38259,38260,38261,38262,38263,38264,38265,38266,38267,38268,38269,38270,38271,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38376,38377,38378,38379,38380,38381,38382,38383,38384,38385,38386,38387,38388,38389,38390,38391,38392,38393,38394,38395,38396,38397,38398,38399,38400,38401,38402,38403,38404,38405,38406,38407,38408,38409,38410,38411,38412,38413,38414,38415,38416,38417,38418,38419,38420,38421,38422,38423,38424,38425,38426,38427,38428,38429,38430,38431,38432,38433,38434,38435,38436,38437,38438,38439,38440,38441,38442,38443,38444,38445,38446,38447,38448,38449,38450,38451,38452,38453,38454,38455,38456,38457,38458,38459,38460,38461,38462,38463,38464,38465,38466,38467,38468,38469,38470,38471,38472,38473,38474,38475,38476,38477,38478,38479,38480,38481,38482,38483,38484,38485,38486,38487,38488,38489,38490,38491,38492,38493,38494,38495,38496,38497,38498,38499,38500,38501,38502,38503,38504,38505,38506,38507,38508,38509,38510,38511,38512,38513,38514,38515,38516,38517,38518,38519,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38533,38534,38535,38536,38537,38538,38539,38540,38541,38542,38543,38544,38545,38546,38547,38548,38549,38550,38551,38552,38553,38554,38555,38556,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38567,38568,38569,38570,38571,38572,38573,38574,38575,38576,38577,38578,38579,38580,38581,38582,38583,38584,38585,38586,38587,38588,38589,38590,38591,38592,38593,38594,38595,38596,38597,38598,38599,38600,38601,38602,38603,38604,38605,38606,38607,38608,38609,38610,38611,38612,38613,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38624,38625,38626,38627,38628,38629,38630,38631,38632,38633,38634,38635,38636,38637,38638,38639,38640,38641,38642,38643,38644,38645,38646,38647,38648,38649,38650,38651,38652,38653,38654,38655,38656,38657,38658,38659,38660,38661,38662,38663,38664,38665,38666,38667,38668,38669,38670,38671,38672,38673,38674,38675,38676,38677,38678,38679,38680,38681,38682,38683,38684,38685,38686,38687,38688,38689,38690,38691,38692,38693,38694,38695,38696,38697,38698,38699,38700,38701,38702,38703,38704,38705,38706,38707,38708,38709,38710,38711,38712,38713,38714,38715,38716,38717,38718,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38738,38739,38740,38741,38742,38743,38744,38745,38746,38747,38748,38749,38750,38751,38752,38753,38754,38755,38756,38757,38758,38759,38760,38761,38762,38763,38764,38765,38766,38767,38768,38769,38770,38771,38772,38773,38774,38775,38776,38777,38778,38779,38780,38781,38782,38783,38784,38785,38786,38787,38788,38789,38790,38791,38792,38793,38794,38795,38796,38797,38798,38799,38800,38801,38802,38803,38804,38805,38806,38807,38808,38809,38810,38811,38812,38813,38814,38815,38816,38817,38818,38819,38820,38821,38822,38823,38824,38825,38826,38827,38828,38829,38830,38831,38832,38833,38834,38835,38836,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38886,38887,38888,38889,38890,38891,38892,38893,38894,38895,38896,38897,38898,38899,38900,38901,38902,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,39023,39024,39025,39026,39027,39028,39029,39030,39031,39032,39033,39034,39035,39036,39037,39038,39039,39040,39041,39042,39043,39044,39045,39046,39047,39048,39049,39050,39051,39052,39053,39054,39055,39056,39057,39058,39059,39060,39061,39062,39063,39064,39065,39066,39067,39068,39069,39070,39071,39072,39073,39074,39075,39076,39077,39078,39079,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39118,39119,39120,39121,39122,39123,39124,39125,39126,39127,39128,39129,39130,39131,39132,39133,39134,39135,39136,39137,39138,39139,39140,39141,39142,39143,39144,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,39176,39177,39178,39179,39180,39181,39182,39183,39184,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39214,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39252,39253,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39267,39268,39269,39270,39271,39272,39273,39274,39275,39276,39277,39278,39279,39280,39281,39282,39283,39284,39285,39286,39287,39288,39289,39290,39291,39292,39293,39294,39295,39296,39297,39298,39299,39300,39301,39302,39303,39304,39305,39306,39307,39308,39309,39310,39311,39312,39313,39314,39315,39316,39317,39318,39319,39320,39321,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39333,39334,39335,39336,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39532,39533,39534,39535,39536,39537,39538,39539,39540,39541,39542,39543,39544,39545,39546,39547,39548,39549,39550,39551,39552,39553,39554,39555,39556,39557,39558,39559,39560,39561,39562,39563,39564,39565,39566,39567,39568,39569,39570,39571,39572,39573,39574,39575,39576,39577,39578,39579,39580,39581,39582,39583,39584,39585,39586,39587,39588,39589,39590,39591,39592,39593,39594,39595,39596,39597,39598,39599,39600,39601,39602,39603,39604,39605,39606,39607,39608,39609,39610,39611,39612,39613,39614,39615,39616,39617,39618,39619,39620,39621,39622,39623,39624,39625,39626,39627,39628,39629,39630,39631,39632,39633,39634,39635,39636,39637,39638,39639,39640,39641,39642,39643,39644,39645,39646,39647,39648,39649,39650,39651,39652,39653,39654,39655,39656,39657,39658,39659,39660,39661,39662,39663,39664,39665,39666,39667,39668,39669,39670,39671,39672,39673,39674,39675,39676,39677,39678,39679,39680,39681,39682,39683,39684,39685,39686,39687,39688,39689,39690,39691,39692,39693,39694,39695,39696,39697,39698,39699,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39711,39712,39713,39714,39715,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39727,39728,39729,39730,39731,39732,39733,39734,39735,39736,39737,39738,39739,39740,39741,39742,39743,39744,39745,39746,39747,39748,39749,39750,39751,39752,39753,39754,39755,39756,39757,39758,39759,39760,39761,39762,39763,39764,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,39996,39997,39998,39999,40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40060,40061,40062,40063,40064,40065,40066,40067,40068,40069,40070,40071,40072,40073,40074,40075,40076,40077,40078,40079,40080,40081,40082,40083,40084,40085,40086,40087,40088,40089,40090,40091,40092,40093,40094,40095,40096,40097,40098,40099,40100,40101,40102,40103,40104,40105,40106,40107,40108,40109,40110,40111,40112,40113,40114,40115,40116,40117,40118,40119,40120,40121,40122,40123,40124,40125,40126,40127,40128,40129,40130,40131,40132,40133,40134,40135,40136,40137,40138,40139,40140,40141,40142,40143,40144,40145,40146,40147,40148,40149,40150,40151,40152,40153,40154,40155,40156,40157,40158,40159,40160,40161,40162,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40479,40480,40481,40482,40483,40484,40485,40486,40487,40488,40489,40490,40491,40492,40493,40494,40495,40496,40497,40498,40499,40500,40501,40502,40503,40504,40505,40506,40507,40508,40509,40510,40511,40512,40513,40514,40515,40516,40517,40518,40519,40520,40521,40522,40523,40524,40525,40526,40527,40528,40529,40530,40531,40532,40533,40534,40535,40536,40537,40538,40539,40540,40541,40542,40543,40544,40545,40546,40547,40548,40549,40550,40551,40552,40553,40554,40555,40556,40557,40558,40559,40560,40561,40562,40563,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40574,40575,40576,40577,40578,40579,40580,40581,40582,40583,40584,40585,40586,40587,40588,40589,40590,40591,40592,40593,40594,40595,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40606,40607,40608,40609,40610,40611,40612,40613,40614,40615,40616,40617,40618,40619,40620,40621,40622,40623,40624,40625,40626,40627,40628,40629,40630,40631,40632,40633,40634,40635,40636,40637,40638,40639,40640,40641,40642,40643,40644,40645,40646,40647,40648,40649,40650,40651,40652,40653,40654,40655,40656,40657,40658,40659,40660,40661,40662,40663,40664,40665,40666,40667,40668,40669,40670,40671,40672,40673,40674,40675,40676,40677,40678,40679,40680,40681,40682,40683,40684,40685,40686,40687,40688,40689,40690,40691,40692,40693,40694,40695,40696,40697,40698,40699,40700,40701,40702,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40715,40716,40717,40718,40719,40720,40721,40722,40723,40724,40725,40726,40727,40728,40729,40730,40731,40732,40733,40734,40735,40736,40737,40738,40739,40740,40741,40742,40743,40744,40745,40746,40747,40748,40749,40750,40751,40752,40753,40754,40755,40756,40757,40758,40759,40760,40761,40762,40763,40764,40765,40766,40767,40768,40769,40770,40771,40772,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40784,40785,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40831,40832,40833,40834,40835,40836,40837,40838,40839,40840,40841,40842,40843,40844,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40857,40858,40859,40860,40861,40862,40863,40864,40865,40866,40867,40868,40869,40870,40871,40872,40873,40874,40875,40876,40877,40878,40879,40880,40881,40882,40883,40884,40885,40886,40887,40888,40889,40890,40891,40892,40893,40894,40895,40896,40897,40898,40899,40900,40901,40902,40903,40904,40905,40906,40907,40908,40909,40910,40911,40912,40913,40914,40915,40916,40917,40918,40919,40920,40921,40922,40923,40924,40925,40926,40927,40928,40929,40930,40931,40932,40933,40934,40935,40936,40937,40938,40939,40940,40941,40942,40943,40960,40961,40962,40963,40964,40965,40966,40967,40968,40969,40970,40971,40972,40973,40974,40975,40976,40977,40978,40979,40980,40981,40982,40983,40984,40985,40986,40987,40988,40989,40990,40991,40992,40993,40994,40995,40996,40997,40998,40999,41000,41001,41002,41003,41004,41005,41006,41007,41008,41009,41010,41011,41012,41013,41014,41015,41016,41017,41018,41019,41020,41021,41022,41023,41024,41025,41026,41027,41028,41029,41030,41031,41032,41033,41034,41035,41036,41037,41038,41039,41040,41041,41042,41043,41044,41045,41046,41047,41048,41049,41050,41051,41052,41053,41054,41055,41056,41057,41058,41059,41060,41061,41062,41063,41064,41065,41066,41067,41068,41069,41070,41071,41072,41073,41074,41075,41076,41077,41078,41079,41080,41081,41082,41083,41084,41085,41086,41087,41088,41089,41090,41091,41092,41093,41094,41095,41096,41097,41098,41099,41100,41101,41102,41103,41104,41105,41106,41107,41108,41109,41110,41111,41112,41113,41114,41115,41116,41117,41118,41119,41120,41121,41122,41123,41124,41125,41126,41127,41128,41129,41130,41131,41132,41133,41134,41135,41136,41137,41138,41139,41140,41141,41142,41143,41144,41145,41146,41147,41148,41149,41150,41151,41152,41153,41154,41155,41156,41157,41158,41159,41160,41161,41162,41163,41164,41165,41166,41167,41168,41169,41170,41171,41172,41173,41174,41175,41176,41177,41178,41179,41180,41181,41182,41183,41184,41185,41186,41187,41188,41189,41190,41191,41192,41193,41194,41195,41196,41197,41198,41199,41200,41201,41202,41203,41204,41205,41206,41207,41208,41209,41210,41211,41212,41213,41214,41215,41216,41217,41218,41219,41220,41221,41222,41223,41224,41225,41226,41227,41228,41229,41230,41231,41232,41233,41234,41235,41236,41237,41238,41239,41240,41241,41242,41243,41244,41245,41246,41247,41248,41249,41250,41251,41252,41253,41254,41255,41256,41257,41258,41259,41260,41261,41262,41263,41264,41265,41266,41267,41268,41269,41270,41271,41272,41273,41274,41275,41276,41277,41278,41279,41280,41281,41282,41283,41284,41285,41286,41287,41288,41289,41290,41291,41292,41293,41294,41295,41296,41297,41298,41299,41300,41301,41302,41303,41304,41305,41306,41307,41308,41309,41310,41311,41312,41313,41314,41315,41316,41317,41318,41319,41320,41321,41322,41323,41324,41325,41326,41327,41328,41329,41330,41331,41332,41333,41334,41335,41336,41337,41338,41339,41340,41341,41342,41343,41344,41345,41346,41347,41348,41349,41350,41351,41352,41353,41354,41355,41356,41357,41358,41359,41360,41361,41362,41363,41364,41365,41366,41367,41368,41369,41370,41371,41372,41373,41374,41375,41376,41377,41378,41379,41380,41381,41382,41383,41384,41385,41386,41387,41388,41389,41390,41391,41392,41393,41394,41395,41396,41397,41398,41399,41400,41401,41402,41403,41404,41405,41406,41407,41408,41409,41410,41411,41412,41413,41414,41415,41416,41417,41418,41419,41420,41421,41422,41423,41424,41425,41426,41427,41428,41429,41430,41431,41432,41433,41434,41435,41436,41437,41438,41439,41440,41441,41442,41443,41444,41445,41446,41447,41448,41449,41450,41451,41452,41453,41454,41455,41456,41457,41458,41459,41460,41461,41462,41463,41464,41465,41466,41467,41468,41469,41470,41471,41472,41473,41474,41475,41476,41477,41478,41479,41480,41481,41482,41483,41484,41485,41486,41487,41488,41489,41490,41491,41492,41493,41494,41495,41496,41497,41498,41499,41500,41501,41502,41503,41504,41505,41506,41507,41508,41509,41510,41511,41512,41513,41514,41515,41516,41517,41518,41519,41520,41521,41522,41523,41524,41525,41526,41527,41528,41529,41530,41531,41532,41533,41534,41535,41536,41537,41538,41539,41540,41541,41542,41543,41544,41545,41546,41547,41548,41549,41550,41551,41552,41553,41554,41555,41556,41557,41558,41559,41560,41561,41562,41563,41564,41565,41566,41567,41568,41569,41570,41571,41572,41573,41574,41575,41576,41577,41578,41579,41580,41581,41582,41583,41584,41585,41586,41587,41588,41589,41590,41591,41592,41593,41594,41595,41596,41597,41598,41599,41600,41601,41602,41603,41604,41605,41606,41607,41608,41609,41610,41611,41612,41613,41614,41615,41616,41617,41618,41619,41620,41621,41622,41623,41624,41625,41626,41627,41628,41629,41630,41631,41632,41633,41634,41635,41636,41637,41638,41639,41640,41641,41642,41643,41644,41645,41646,41647,41648,41649,41650,41651,41652,41653,41654,41655,41656,41657,41658,41659,41660,41661,41662,41663,41664,41665,41666,41667,41668,41669,41670,41671,41672,41673,41674,41675,41676,41677,41678,41679,41680,41681,41682,41683,41684,41685,41686,41687,41688,41689,41690,41691,41692,41693,41694,41695,41696,41697,41698,41699,41700,41701,41702,41703,41704,41705,41706,41707,41708,41709,41710,41711,41712,41713,41714,41715,41716,41717,41718,41719,41720,41721,41722,41723,41724,41725,41726,41727,41728,41729,41730,41731,41732,41733,41734,41735,41736,41737,41738,41739,41740,41741,41742,41743,41744,41745,41746,41747,41748,41749,41750,41751,41752,41753,41754,41755,41756,41757,41758,41759,41760,41761,41762,41763,41764,41765,41766,41767,41768,41769,41770,41771,41772,41773,41774,41775,41776,41777,41778,41779,41780,41781,41782,41783,41784,41785,41786,41787,41788,41789,41790,41791,41792,41793,41794,41795,41796,41797,41798,41799,41800,41801,41802,41803,41804,41805,41806,41807,41808,41809,41810,41811,41812,41813,41814,41815,41816,41817,41818,41819,41820,41821,41822,41823,41824,41825,41826,41827,41828,41829,41830,41831,41832,41833,41834,41835,41836,41837,41838,41839,41840,41841,41842,41843,41844,41845,41846,41847,41848,41849,41850,41851,41852,41853,41854,41855,41856,41857,41858,41859,41860,41861,41862,41863,41864,41865,41866,41867,41868,41869,41870,41871,41872,41873,41874,41875,41876,41877,41878,41879,41880,41881,41882,41883,41884,41885,41886,41887,41888,41889,41890,41891,41892,41893,41894,41895,41896,41897,41898,41899,41900,41901,41902,41903,41904,41905,41906,41907,41908,41909,41910,41911,41912,41913,41914,41915,41916,41917,41918,41919,41920,41921,41922,41923,41924,41925,41926,41927,41928,41929,41930,41931,41932,41933,41934,41935,41936,41937,41938,41939,41940,41941,41942,41943,41944,41945,41946,41947,41948,41949,41950,41951,41952,41953,41954,41955,41956,41957,41958,41959,41960,41961,41962,41963,41964,41965,41966,41967,41968,41969,41970,41971,41972,41973,41974,41975,41976,41977,41978,41979,41980,41981,41982,41983,41984,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,41997,41998,41999,42000,42001,42002,42003,42004,42005,42006,42007,42008,42009,42010,42011,42012,42013,42014,42015,42016,42017,42018,42019,42020,42021,42022,42023,42024,42025,42026,42027,42028,42029,42030,42031,42032,42033,42034,42035,42036,42037,42038,42039,42040,42041,42042,42043,42044,42045,42046,42047,42048,42049,42050,42051,42052,42053,42054,42055,42056,42057,42058,42059,42060,42061,42062,42063,42064,42065,42066,42067,42068,42069,42070,42071,42072,42073,42074,42075,42076,42077,42078,42079,42080,42081,42082,42083,42084,42085,42086,42087,42088,42089,42090,42091,42092,42093,42094,42095,42096,42097,42098,42099,42100,42101,42102,42103,42104,42105,42106,42107,42108,42109,42110,42111,42112,42113,42114,42115,42116,42117,42118,42119,42120,42121,42122,42123,42124,42192,42193,42194,42195,42196,42197,42198,42199,42200,42201,42202,42203,42204,42205,42206,42207,42208,42209,42210,42211,42212,42213,42214,42215,42216,42217,42218,42219,42220,42221,42222,42223,42224,42225,42226,42227,42228,42229,42230,42231,42232,42233,42234,42235,42236,42237,42240,42241,42242,42243,42244,42245,42246,42247,42248,42249,42250,42251,42252,42253,42254,42255,42256,42257,42258,42259,42260,42261,42262,42263,42264,42265,42266,42267,42268,42269,42270,42271,42272,42273,42274,42275,42276,42277,42278,42279,42280,42281,42282,42283,42284,42285,42286,42287,42288,42289,42290,42291,42292,42293,42294,42295,42296,42297,42298,42299,42300,42301,42302,42303,42304,42305,42306,42307,42308,42309,42310,42311,42312,42313,42314,42315,42316,42317,42318,42319,42320,42321,42322,42323,42324,42325,42326,42327,42328,42329,42330,42331,42332,42333,42334,42335,42336,42337,42338,42339,42340,42341,42342,42343,42344,42345,42346,42347,42348,42349,42350,42351,42352,42353,42354,42355,42356,42357,42358,42359,42360,42361,42362,42363,42364,42365,42366,42367,42368,42369,42370,42371,42372,42373,42374,42375,42376,42377,42378,42379,42380,42381,42382,42383,42384,42385,42386,42387,42388,42389,42390,42391,42392,42393,42394,42395,42396,42397,42398,42399,42400,42401,42402,42403,42404,42405,42406,42407,42408,42409,42410,42411,42412,42413,42414,42415,42416,42417,42418,42419,42420,42421,42422,42423,42424,42425,42426,42427,42428,42429,42430,42431,42432,42433,42434,42435,42436,42437,42438,42439,42440,42441,42442,42443,42444,42445,42446,42447,42448,42449,42450,42451,42452,42453,42454,42455,42456,42457,42458,42459,42460,42461,42462,42463,42464,42465,42466,42467,42468,42469,42470,42471,42472,42473,42474,42475,42476,42477,42478,42479,42480,42481,42482,42483,42484,42485,42486,42487,42488,42489,42490,42491,42492,42493,42494,42495,42496,42497,42498,42499,42500,42501,42502,42503,42504,42505,42506,42507,42508,42512,42513,42514,42515,42516,42517,42518,42519,42520,42521,42522,42523,42524,42525,42526,42527,42538,42539,42560,42561,42562,42563,42564,42565,42566,42567,42568,42569,42570,42571,42572,42573,42574,42575,42576,42577,42578,42579,42580,42581,42582,42583,42584,42585,42586,42587,42588,42589,42590,42591,42592,42593,42594,42595,42596,42597,42598,42599,42600,42601,42602,42603,42604,42605,42606,42623,42624,42625,42626,42627,42628,42629,42630,42631,42632,42633,42634,42635,42636,42637,42638,42639,42640,42641,42642,42643,42644,42645,42646,42647,42648,42649,42650,42651,42652,42653,42656,42657,42658,42659,42660,42661,42662,42663,42664,42665,42666,42667,42668,42669,42670,42671,42672,42673,42674,42675,42676,42677,42678,42679,42680,42681,42682,42683,42684,42685,42686,42687,42688,42689,42690,42691,42692,42693,42694,42695,42696,42697,42698,42699,42700,42701,42702,42703,42704,42705,42706,42707,42708,42709,42710,42711,42712,42713,42714,42715,42716,42717,42718,42719,42720,42721,42722,42723,42724,42725,42726,42727,42728,42729,42730,42731,42732,42733,42734,42735,42775,42776,42777,42778,42779,42780,42781,42782,42783,42786,42787,42788,42789,42790,42791,42792,42793,42794,42795,42796,42797,42798,42799,42800,42801,42802,42803,42804,42805,42806,42807,42808,42809,42810,42811,42812,42813,42814,42815,42816,42817,42818,42819,42820,42821,42822,42823,42824,42825,42826,42827,42828,42829,42830,42831,42832,42833,42834,42835,42836,42837,42838,42839,42840,42841,42842,42843,42844,42845,42846,42847,42848,42849,42850,42851,42852,42853,42854,42855,42856,42857,42858,42859,42860,42861,42862,42863,42864,42865,42866,42867,42868,42869,42870,42871,42872,42873,42874,42875,42876,42877,42878,42879,42880,42881,42882,42883,42884,42885,42886,42887,42888,42891,42892,42893,42894,42895,42896,42897,42898,42899,42900,42901,42902,42903,42904,42905,42906,42907,42908,42909,42910,42911,42912,42913,42914,42915,42916,42917,42918,42919,42920,42921,42922,42923,42924,42925,42926,42927,42928,42929,42930,42931,42932,42933,42934,42935,42936,42937,42999,43000,43001,43002,43003,43004,43005,43006,43007,43008,43009,43011,43012,43013,43015,43016,43017,43018,43020,43021,43022,43023,43024,43025,43026,43027,43028,43029,43030,43031,43032,43033,43034,43035,43036,43037,43038,43039,43040,43041,43042,43072,43073,43074,43075,43076,43077,43078,43079,43080,43081,43082,43083,43084,43085,43086,43087,43088,43089,43090,43091,43092,43093,43094,43095,43096,43097,43098,43099,43100,43101,43102,43103,43104,43105,43106,43107,43108,43109,43110,43111,43112,43113,43114,43115,43116,43117,43118,43119,43120,43121,43122,43123,43138,43139,43140,43141,43142,43143,43144,43145,43146,43147,43148,43149,43150,43151,43152,43153,43154,43155,43156,43157,43158,43159,43160,43161,43162,43163,43164,43165,43166,43167,43168,43169,43170,43171,43172,43173,43174,43175,43176,43177,43178,43179,43180,43181,43182,43183,43184,43185,43186,43187,43250,43251,43252,43253,43254,43255,43259,43261,43262,43274,43275,43276,43277,43278,43279,43280,43281,43282,43283,43284,43285,43286,43287,43288,43289,43290,43291,43292,43293,43294,43295,43296,43297,43298,43299,43300,43301,43312,43313,43314,43315,43316,43317,43318,43319,43320,43321,43322,43323,43324,43325,43326,43327,43328,43329,43330,43331,43332,43333,43334,43360,43361,43362,43363,43364,43365,43366,43367,43368,43369,43370,43371,43372,43373,43374,43375,43376,43377,43378,43379,43380,43381,43382,43383,43384,43385,43386,43387,43388,43396,43397,43398,43399,43400,43401,43402,43403,43404,43405,43406,43407,43408,43409,43410,43411,43412,43413,43414,43415,43416,43417,43418,43419,43420,43421,43422,43423,43424,43425,43426,43427,43428,43429,43430,43431,43432,43433,43434,43435,43436,43437,43438,43439,43440,43441,43442,43471,43488,43489,43490,43491,43492,43494,43495,43496,43497,43498,43499,43500,43501,43502,43503,43514,43515,43516,43517,43518,43520,43521,43522,43523,43524,43525,43526,43527,43528,43529,43530,43531,43532,43533,43534,43535,43536,43537,43538,43539,43540,43541,43542,43543,43544,43545,43546,43547,43548,43549,43550,43551,43552,43553,43554,43555,43556,43557,43558,43559,43560,43584,43585,43586,43588,43589,43590,43591,43592,43593,43594,43595,43616,43617,43618,43619,43620,43621,43622,43623,43624,43625,43626,43627,43628,43629,43630,43631,43632,43633,43634,43635,43636,43637,43638,43642,43646,43647,43648,43649,43650,43651,43652,43653,43654,43655,43656,43657,43658,43659,43660,43661,43662,43663,43664,43665,43666,43667,43668,43669,43670,43671,43672,43673,43674,43675,43676,43677,43678,43679,43680,43681,43682,43683,43684,43685,43686,43687,43688,43689,43690,43691,43692,43693,43694,43695,43697,43701,43702,43705,43706,43707,43708,43709,43712,43714,43739,43740,43741,43744,43745,43746,43747,43748,43749,43750,43751,43752,43753,43754,43762,43763,43764,43777,43778,43779,43780,43781,43782,43785,43786,43787,43788,43789,43790,43793,43794,43795,43796,43797,43798,43808,43809,43810,43811,43812,43813,43814,43816,43817,43818,43819,43820,43821,43822,43824,43825,43826,43827,43828,43829,43830,43831,43832,43833,43834,43835,43836,43837,43838,43839,43840,43841,43842,43843,43844,43845,43846,43847,43848,43849,43850,43851,43852,43853,43854,43855,43856,43857,43858,43859,43860,43861,43862,43863,43864,43865,43866,43868,43869,43870,43871,43872,43873,43874,43875,43876,43877,43888,43889,43890,43891,43892,43893,43894,43895,43896,43897,43898,43899,43900,43901,43902,43903,43904,43905,43906,43907,43908,43909,43910,43911,43912,43913,43914,43915,43916,43917,43918,43919,43920,43921,43922,43923,43924,43925,43926,43927,43928,43929,43930,43931,43932,43933,43934,43935,43936,43937,43938,43939,43940,43941,43942,43943,43944,43945,43946,43947,43948,43949,43950,43951,43952,43953,43954,43955,43956,43957,43958,43959,43960,43961,43962,43963,43964,43965,43966,43967,43968,43969,43970,43971,43972,43973,43974,43975,43976,43977,43978,43979,43980,43981,43982,43983,43984,43985,43986,43987,43988,43989,43990,43991,43992,43993,43994,43995,43996,43997,43998,43999,44000,44001,44002,44032,44033,44034,44035,44036,44037,44038,44039,44040,44041,44042,44043,44044,44045,44046,44047,44048,44049,44050,44051,44052,44053,44054,44055,44056,44057,44058,44059,44060,44061,44062,44063,44064,44065,44066,44067,44068,44069,44070,44071,44072,44073,44074,44075,44076,44077,44078,44079,44080,44081,44082,44083,44084,44085,44086,44087,44088,44089,44090,44091,44092,44093,44094,44095,44096,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44107,44108,44109,44110,44111,44112,44113,44114,44115,44116,44117,44118,44119,44120,44121,44122,44123,44124,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44144,44145,44146,44147,44148,44149,44150,44151,44152,44153,44154,44155,44156,44157,44158,44159,44160,44161,44162,44163,44164,44165,44166,44167,44168,44169,44170,44171,44172,44173,44174,44175,44176,44177,44178,44179,44180,44181,44182,44183,44184,44185,44186,44187,44188,44189,44190,44191,44192,44193,44194,44195,44196,44197,44198,44199,44200,44201,44202,44203,44204,44205,44206,44207,44208,44209,44210,44211,44212,44213,44214,44215,44216,44217,44218,44219,44220,44221,44222,44223,44224,44225,44226,44227,44228,44229,44230,44231,44232,44233,44234,44235,44236,44237,44238,44239,44240,44241,44242,44243,44244,44245,44246,44247,44248,44249,44250,44251,44252,44253,44254,44255,44256,44257,44258,44259,44260,44261,44262,44263,44264,44265,44266,44267,44268,44269,44270,44271,44272,44273,44274,44275,44276,44277,44278,44279,44280,44281,44282,44283,44284,44285,44286,44287,44288,44289,44290,44291,44292,44293,44294,44295,44296,44297,44298,44299,44300,44301,44302,44303,44304,44305,44306,44307,44308,44309,44310,44311,44312,44313,44314,44315,44316,44317,44318,44319,44320,44321,44322,44323,44324,44325,44326,44327,44328,44329,44330,44331,44332,44333,44334,44335,44336,44337,44338,44339,44340,44341,44342,44343,44344,44345,44346,44347,44348,44349,44350,44351,44352,44353,44354,44355,44356,44357,44358,44359,44360,44361,44362,44363,44364,44365,44366,44367,44368,44369,44370,44371,44372,44373,44374,44375,44376,44377,44378,44379,44380,44381,44382,44383,44384,44385,44386,44387,44388,44389,44390,44391,44392,44393,44394,44395,44396,44397,44398,44399,44400,44401,44402,44403,44404,44405,44406,44407,44408,44409,44410,44411,44412,44413,44414,44415,44416,44417,44418,44419,44420,44421,44422,44423,44424,44425,44426,44427,44428,44429,44430,44431,44432,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44444,44445,44446,44447,44448,44449,44450,44451,44452,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44471,44472,44473,44474,44475,44476,44477,44478,44479,44480,44481,44482,44483,44484,44485,44486,44487,44488,44489,44490,44491,44492,44493,44494,44495,44496,44497,44498,44499,44500,44501,44502,44503,44504,44505,44506,44507,44508,44509,44510,44511,44512,44513,44514,44515,44516,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44536,44537,44538,44539,44540,44541,44542,44543,44544,44545,44546,44547,44548,44549,44550,44551,44552,44553,44554,44555,44556,44557,44558,44559,44560,44561,44562,44563,44564,44565,44566,44567,44568,44569,44570,44571,44572,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44592,44593,44594,44595,44596,44597,44598,44599,44600,44601,44602,44603,44604,44605,44606,44607,44608,44609,44610,44611,44612,44613,44614,44615,44616,44617,44618,44619,44620,44621,44622,44623,44624,44625,44626,44627,44628,44629,44630,44631,44632,44633,44634,44635,44636,44637,44638,44639,44640,44641,44642,44643,44644,44645,44646,44647,44648,44649,44650,44651,44652,44653,44654,44655,44656,44657,44658,44659,44660,44661,44662,44663,44664,44665,44666,44667,44668,44669,44670,44671,44672,44673,44674,44675,44676,44677,44678,44679,44680,44681,44682,44683,44684,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44732,44733,44734,44735,44736,44737,44738,44739,44740,44741,44742,44743,44744,44745,44746,44747,44748,44749,44750,44751,44752,44753,44754,44755,44756,44757,44758,44759,44760,44761,44762,44763,44764,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44776,44777,44778,44779,44780,44781,44782,44783,44784,44785,44786,44787,44788,44789,44790,44791,44792,44793,44794,44795,44796,44797,44798,44799,44800,44801,44802,44803,44804,44805,44806,44807,44808,44809,44810,44811,44812,44813,44814,44815,44816,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,44836,44837,44838,44839,44840,44841,44842,44843,44844,44845,44846,44847,44848,44849,44850,44851,44852,44853,44854,44855,44856,44857,44858,44859,44860,44861,44862,44863,44864,44865,44866,44867,44868,44869,44870,44871,44872,44873,44874,44875,44876,44877,44878,44879,44880,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44892,44893,44894,44895,44896,44897,44898,44899,44900,44901,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44921,44922,44923,44924,44925,44926,44927,44928,44929,44930,44931,44932,44933,44934,44935,44936,44937,44938,44939,44940,44941,44942,44943,44944,44945,44946,44947,44948,44949,44950,44951,44952,44953,44954,44955,44956,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44984,44985,44986,44987,44988,44989,44990,44991,44992,44993,44994,44995,44996,44997,44998,44999,45000,45001,45002,45003,45004,45005,45006,45007,45008,45009,45010,45011,45012,45013,45014,45015,45016,45017,45018,45019,45020,45021,45022,45023,45024,45025,45026,45027,45028,45029,45030,45031,45032,45033,45034,45035,45036,45037,45038,45039,45040,45041,45042,45043,45044,45045,45046,45047,45048,45049,45050,45051,45052,45053,45054,45055,45056,45057,45058,45059,45060,45061,45062,45063,45064,45065,45066,45067,45068,45069,45070,45071,45072,45073,45074,45075,45076,45077,45078,45079,45080,45081,45082,45083,45084,45085,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45096,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45124,45125,45126,45127,45128,45129,45130,45131,45132,45133,45134,45135,45136,45137,45138,45139,45140,45141,45142,45143,45144,45145,45146,45147,45148,45149,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45180,45181,45182,45183,45184,45185,45186,45187,45188,45189,45190,45191,45192,45193,45194,45195,45196,45197,45198,45199,45200,45201,45202,45203,45204,45205,45206,45207,45208,45209,45210,45211,45212,45213,45214,45215,45216,45217,45218,45219,45220,45221,45222,45223,45224,45225,45226,45227,45228,45229,45230,45231,45232,45233,45234,45235,45236,45237,45238,45239,45240,45241,45242,45243,45244,45245,45246,45247,45248,45249,45250,45251,45252,45253,45254,45255,45256,45257,45258,45259,45260,45261,45262,45263,45264,45265,45266,45267,45268,45269,45270,45271,45272,45273,45274,45275,45276,45277,45278,45279,45280,45281,45282,45283,45284,45285,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45320,45321,45322,45323,45324,45325,45326,45327,45328,45329,45330,45331,45332,45333,45334,45335,45336,45337,45338,45339,45340,45341,45342,45343,45344,45345,45346,45347,45348,45349,45350,45351,45352,45353,45354,45355,45356,45357,45358,45359,45360,45361,45362,45363,45364,45365,45366,45367,45368,45369,45370,45371,45372,45373,45374,45375,45376,45377,45378,45379,45380,45381,45382,45383,45384,45385,45386,45387,45388,45389,45390,45391,45392,45393,45394,45395,45396,45397,45398,45399,45400,45401,45402,45403,45404,45405,45406,45407,45408,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45432,45433,45434,45435,45436,45437,45438,45439,45440,45441,45442,45443,45444,45445,45446,45447,45448,45449,45450,45451,45452,45453,45454,45455,45456,45457,45458,45459,45460,45461,45462,45463,45464,45465,45466,45467,45468,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45480,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45516,45517,45518,45519,45520,45521,45522,45523,45524,45525,45526,45527,45528,45529,45530,45531,45532,45533,45534,45535,45536,45537,45538,45539,45540,45541,45542,45543,45544,45545,45546,45547,45548,45549,45550,45551,45552,45553,45554,45555,45556,45557,45558,45559,45560,45561,45562,45563,45564,45565,45566,45567,45568,45569,45570,45571,45572,45573,45574,45575,45576,45577,45578,45579,45580,45581,45582,45583,45584,45585,45586,45587,45588,45589,45590,45591,45592,45593,45594,45595,45596,45597,45598,45599,45600,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45620,45621,45622,45623,45624,45625,45626,45627,45628,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45656,45657,45658,45659,45660,45661,45662,45663,45664,45665,45666,45667,45668,45669,45670,45671,45672,45673,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45684,45685,45686,45687,45688,45689,45690,45691,45692,45693,45694,45695,45696,45697,45698,45699,45700,45701,45702,45703,45704,45705,45706,45707,45708,45709,45710,45711,45712,45713,45714,45715,45716,45717,45718,45719,45720,45721,45722,45723,45724,45725,45726,45727,45728,45729,45730,45731,45732,45733,45734,45735,45736,45737,45738,45739,45740,45741,45742,45743,45744,45745,45746,45747,45748,45749,45750,45751,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45768,45769,45770,45771,45772,45773,45774,45775,45776,45777,45778,45779,45780,45781,45782,45783,45784,45785,45786,45787,45788,45789,45790,45791,45792,45793,45794,45795,45796,45797,45798,45799,45800,45801,45802,45803,45804,45805,45806,45807,45808,45809,45810,45811,45812,45813,45814,45815,45816,45817,45818,45819,45820,45821,45822,45823,45824,45825,45826,45827,45828,45829,45830,45831,45832,45833,45834,45835,45836,45837,45838,45839,45840,45841,45842,45843,45844,45845,45846,45847,45848,45849,45850,45851,45852,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45908,45909,45910,45911,45912,45913,45914,45915,45916,45917,45918,45919,45920,45921,45922,45923,45924,45925,45926,45927,45928,45929,45930,45931,45932,45933,45934,45935,45936,45937,45938,45939,45940,45941,45942,45943,45944,45945,45946,45947,45948,45949,45950,45951,45952,45953,45954,45955,45956,45957,45958,45959,45960,45961,45962,45963,45964,45965,45966,45967,45968,45969,45970,45971,45972,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45984,45985,45986,45987,45988,45989,45990,45991,45992,45993,45994,45995,45996,45997,45998,45999,46000,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46020,46021,46022,46023,46024,46025,46026,46027,46028,46029,46030,46031,46032,46033,46034,46035,46036,46037,46038,46039,46040,46041,46042,46043,46044,46045,46046,46047,46048,46049,46050,46051,46052,46053,46054,46055,46056,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46076,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46096,46097,46098,46099,46100,46101,46102,46103,46104,46105,46106,46107,46108,46109,46110,46111,46112,46113,46114,46115,46116,46117,46118,46119,46120,46121,46122,46123,46124,46125,46126,46127,46128,46129,46130,46131,46132,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46160,46161,46162,46163,46164,46165,46166,46167,46168,46169,46170,46171,46172,46173,46174,46175,46176,46177,46178,46179,46180,46181,46182,46183,46184,46185,46186,46187,46188,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46208,46209,46210,46211,46212,46213,46214,46215,46216,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46237,46238,46239,46240,46241,46242,46243,46244,46245,46246,46247,46248,46249,46250,46251,46252,46253,46254,46255,46256,46257,46258,46259,46260,46261,46262,46263,46264,46265,46266,46267,46268,46269,46270,46271,46272,46273,46274,46275,46276,46277,46278,46279,46280,46281,46282,46283,46284,46285,46286,46287,46288,46289,46290,46291,46292,46293,46294,46295,46296,46297,46298,46299,46300,46301,46302,46303,46304,46305,46306,46307,46308,46309,46310,46311,46312,46313,46314,46315,46316,46317,46318,46319,46320,46321,46322,46323,46324,46325,46326,46327,46328,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46356,46357,46358,46359,46360,46361,46362,46363,46364,46365,46366,46367,46368,46369,46370,46371,46372,46373,46374,46375,46376,46377,46378,46379,46380,46381,46382,46383,46384,46385,46386,46387,46388,46389,46390,46391,46392,46393,46394,46395,46396,46397,46398,46399,46400,46401,46402,46403,46404,46405,46406,46407,46408,46409,46410,46411,46412,46413,46414,46415,46416,46417,46418,46419,46420,46421,46422,46423,46424,46425,46426,46427,46428,46429,46430,46431,46432,46433,46434,46435,46436,46437,46438,46439,46440,46441,46442,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46496,46497,46498,46499,46500,46501,46502,46503,46504,46505,46506,46507,46508,46509,46510,46511,46512,46513,46514,46515,46516,46517,46518,46519,46520,46521,46522,46523,46524,46525,46526,46527,46528,46529,46530,46531,46532,46533,46534,46535,46536,46537,46538,46539,46540,46541,46542,46543,46544,46545,46546,46547,46548,46549,46550,46551,46552,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46572,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46608,46609,46610,46611,46612,46613,46614,46615,46616,46617,46618,46619,46620,46621,46622,46623,46624,46625,46626,46627,46628,46629,46630,46631,46632,46633,46634,46635,46636,46637,46638,46639,46640,46641,46642,46643,46644,46645,46646,46647,46648,46649,46650,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46664,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46692,46693,46694,46695,46696,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46748,46749,46750,46751,46752,46753,46754,46755,46756,46757,46758,46759,46760,46761,46762,46763,46764,46765,46766,46767,46768,46769,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46804,46805,46806,46807,46808,46809,46810,46811,46812,46813,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46832,46833,46834,46835,46836,46837,46838,46839,46840,46841,46842,46843,46844,46845,46846,46847,46848,46849,46850,46851,46852,46853,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46888,46889,46890,46891,46892,46893,46894,46895,46896,46897,46898,46899,46900,46901,46902,46903,46904,46905,46906,46907,46908,46909,46910,46911,46912,46913,46914,46915,46916,46917,46918,46919,46920,46921,46922,46923,46924,46925,46926,46927,46928,46929,46930,46931,46932,46933,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46944,46945,46946,46947,46948,46949,46950,46951,46952,46953,46954,46955,46956,46957,46958,46959,46960,46961,46962,46963,46964,46965,46966,46967,46968,46969,46970,46971,46972,46973,46974,46975,46976,46977,46978,46979,46980,46981,46982,46983,46984,46985,46986,46987,46988,46989,46990,46991,46992,46993,46994,46995,46996,46997,46998,46999,47000,47001,47002,47003,47004,47005,47006,47007,47008,47009,47010,47011,47012,47013,47014,47015,47016,47017,47018,47019,47020,47021,47022,47023,47024,47025,47026,47027,47028,47029,47030,47031,47032,47033,47034,47035,47036,47037,47038,47039,47040,47041,47042,47043,47044,47045,47046,47047,47048,47049,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47084,47085,47086,47087,47088,47089,47090,47091,47092,47093,47094,47095,47096,47097,47098,47099,47100,47101,47102,47103,47104,47105,47106,47107,47108,47109,47110,47111,47112,47113,47114,47115,47116,47117,47118,47119,47120,47121,47122,47123,47124,47125,47126,47127,47128,47129,47130,47131,47132,47133,47134,47135,47136,47137,47138,47139,47140,47141,47142,47143,47144,47145,47146,47147,47148,47149,47150,47151,47152,47153,47154,47155,47156,47157,47158,47159,47160,47161,47162,47163,47164,47165,47166,47167,47168,47169,47170,47171,47172,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47185,47186,47187,47188,47189,47190,47191,47192,47193,47194,47195,47196,47197,47198,47199,47200,47201,47202,47203,47204,47205,47206,47207,47208,47209,47210,47211,47212,47213,47214,47215,47216,47217,47218,47219,47220,47221,47222,47223,47224,47225,47226,47227,47228,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47245,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,47264,47265,47266,47267,47268,47269,47270,47271,47272,47273,47274,47275,47276,47277,47278,47279,47280,47281,47282,47283,47284,47285,47286,47287,47288,47289,47290,47291,47292,47293,47294,47295,47296,47297,47298,47299,47300,47301,47302,47303,47304,47305,47306,47307,47308,47309,47310,47311,47312,47313,47314,47315,47316,47317,47318,47319,47320,47321,47322,47323,47324,47325,47326,47327,47328,47329,47330,47331,47332,47333,47334,47335,47336,47337,47338,47339,47340,47341,47342,47343,47344,47345,47346,47347,47348,47349,47350,47351,47352,47353,47354,47355,47356,47357,47358,47359,47360,47361,47362,47363,47364,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47384,47385,47386,47387,47388,47389,47390,47391,47392,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47420,47421,47422,47423,47424,47425,47426,47427,47428,47429,47430,47431,47432,47433,47434,47435,47436,47437,47438,47439,47440,47441,47442,47443,47444,47445,47446,47447,47448,47449,47450,47451,47452,47453,47454,47455,47456,47457,47458,47459,47460,47461,47462,47463,47464,47465,47466,47467,47468,47469,47470,47471,47472,47473,47474,47475,47476,47477,47478,47479,47480,47481,47482,47483,47484,47485,47486,47487,47488,47489,47490,47491,47492,47493,47494,47495,47496,47497,47498,47499,47500,47501,47502,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47532,47533,47534,47535,47536,47537,47538,47539,47540,47541,47542,47543,47544,47545,47546,47547,47548,47549,47550,47551,47552,47553,47554,47555,47556,47557,47558,47559,47560,47561,47562,47563,47564,47565,47566,47567,47568,47569,47570,47571,47572,47573,47574,47575,47576,47577,47578,47579,47580,47581,47582,47583,47584,47585,47586,47587,47588,47589,47590,47591,47592,47593,47594,47595,47596,47597,47598,47599,47600,47601,47602,47603,47604,47605,47606,47607,47608,47609,47610,47611,47612,47613,47614,47615,47616,47617,47618,47619,47620,47621,47622,47623,47624,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47637,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47672,47673,47674,47675,47676,47677,47678,47679,47680,47681,47682,47683,47684,47685,47686,47687,47688,47689,47690,47691,47692,47693,47694,47695,47696,47697,47698,47699,47700,47701,47702,47703,47704,47705,47706,47707,47708,47709,47710,47711,47712,47713,47714,47715,47716,47717,47718,47719,47720,47721,47722,47723,47724,47725,47726,47727,47728,47729,47730,47731,47732,47733,47734,47735,47736,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47747,47748,47749,47750,47751,47752,47753,47754,47755,47756,47757,47758,47759,47760,47761,47762,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47784,47785,47786,47787,47788,47789,47790,47791,47792,47793,47794,47795,47796,47797,47798,47799,47800,47801,47802,47803,47804,47805,47806,47807,47808,47809,47810,47811,47812,47813,47814,47815,47816,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47832,47833,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47868,47869,47870,47871,47872,47873,47874,47875,47876,47877,47878,47879,47880,47881,47882,47883,47884,47885,47886,47887,47888,47889,47890,47891,47892,47893,47894,47895,47896,47897,47898,47899,47900,47901,47902,47903,47904,47905,47906,47907,47908,47909,47910,47911,47912,47913,47914,47915,47916,47917,47918,47919,47920,47921,47922,47923,47924,47925,47926,47927,47928,47929,47930,47931,47932,47933,47934,47935,47936,47937,47938,47939,47940,47941,47942,47943,47944,47945,47946,47947,47948,47949,47950,47951,47952,47953,47954,47955,47956,47957,47958,47959,47960,47961,47962,47963,47964,47965,47966,47967,47968,47969,47970,47971,47972,47973,47974,47975,47976,47977,47978,47979,47980,47981,47982,47983,47984,47985,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48000,48001,48002,48003,48004,48005,48006,48007,48008,48009,48010,48011,48012,48013,48014,48015,48016,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48036,48037,48038,48039,48040,48041,48042,48043,48044,48045,48046,48047,48048,48049,48050,48051,48052,48053,48054,48055,48056,48057,48058,48059,48060,48061,48062,48063,48064,48065,48066,48067,48068,48069,48070,48071,48072,48073,48074,48075,48076,48077,48078,48079,48080,48081,48082,48083,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48120,48121,48122,48123,48124,48125,48126,48127,48128,48129,48130,48131,48132,48133,48134,48135,48136,48137,48138,48139,48140,48141,48142,48143,48144,48145,48146,48147,48148,48149,48150,48151,48152,48153,48154,48155,48156,48157,48158,48159,48160,48161,48162,48163,48164,48165,48166,48167,48168,48169,48170,48171,48172,48173,48174,48175,48176,48177,48178,48179,48180,48181,48182,48183,48184,48185,48186,48187,48188,48189,48190,48191,48192,48193,48194,48195,48196,48197,48198,48199,48200,48201,48202,48203,48204,48205,48206,48207,48208,48209,48210,48211,48212,48213,48214,48215,48216,48217,48218,48219,48220,48221,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48260,48261,48262,48263,48264,48265,48266,48267,48268,48269,48270,48271,48272,48273,48274,48275,48276,48277,48278,48279,48280,48281,48282,48283,48284,48285,48286,48287,48288,48289,48290,48291,48292,48293,48294,48295,48296,48297,48298,48299,48300,48301,48302,48303,48304,48305,48306,48307,48308,48309,48310,48311,48312,48313,48314,48315,48316,48317,48318,48319,48320,48321,48322,48323,48324,48325,48326,48327,48328,48329,48330,48331,48332,48333,48334,48335,48336,48337,48338,48339,48340,48341,48342,48343,48344,48345,48346,48347,48348,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48372,48373,48374,48375,48376,48377,48378,48379,48380,48381,48382,48383,48384,48385,48386,48387,48388,48389,48390,48391,48392,48393,48394,48395,48396,48397,48398,48399,48400,48401,48402,48403,48404,48405,48406,48407,48408,48409,48410,48411,48412,48413,48414,48415,48416,48417,48418,48419,48420,48421,48422,48423,48424,48425,48426,48427,48428,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,48442,48443,48444,48445,48446,48447,48448,48449,48450,48451,48452,48453,48454,48455,48456,48457,48458,48459,48460,48461,48462,48463,48464,48465,48466,48467,48468,48469,48470,48471,48472,48473,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48484,48485,48486,48487,48488,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48512,48513,48514,48515,48516,48517,48518,48519,48520,48521,48522,48523,48524,48525,48526,48527,48528,48529,48530,48531,48532,48533,48534,48535,48536,48537,48538,48539,48540,48541,48542,48543,48544,48545,48546,48547,48548,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48560,48561,48562,48563,48564,48565,48566,48567,48568,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48596,48597,48598,48599,48600,48601,48602,48603,48604,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48617,48618,48619,48620,48621,48622,48623,48624,48625,48626,48627,48628,48629,48630,48631,48632,48633,48634,48635,48636,48637,48638,48639,48640,48641,48642,48643,48644,48645,48646,48647,48648,48649,48650,48651,48652,48653,48654,48655,48656,48657,48658,48659,48660,48661,48662,48663,48664,48665,48666,48667,48668,48669,48670,48671,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48708,48709,48710,48711,48712,48713,48714,48715,48716,48717,48718,48719,48720,48721,48722,48723,48724,48725,48726,48727,48728,48729,48730,48731,48732,48733,48734,48735,48736,48737,48738,48739,48740,48741,48742,48743,48744,48745,48746,48747,48748,48749,48750,48751,48752,48753,48754,48755,48756,48757,48758,48759,48760,48761,48762,48763,48764,48765,48766,48767,48768,48769,48770,48771,48772,48773,48774,48775,48776,48777,48778,48779,48780,48781,48782,48783,48784,48785,48786,48787,48788,48789,48790,48791,48792,48793,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48808,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48848,48849,48850,48851,48852,48853,48854,48855,48856,48857,48858,48859,48860,48861,48862,48863,48864,48865,48866,48867,48868,48869,48870,48871,48872,48873,48874,48875,48876,48877,48878,48879,48880,48881,48882,48883,48884,48885,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48897,48898,48899,48900,48901,48902,48903,48904,48905,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48920,48921,48922,48923,48924,48925,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48960,48961,48962,48963,48964,48965,48966,48967,48968,48969,48970,48971,48972,48973,48974,48975,48976,48977,48978,48979,48980,48981,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49000,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49044,49045,49046,49047,49048,49049,49050,49051,49052,49053,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49072,49073,49074,49075,49076,49077,49078,49079,49080,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49093,49094,49095,49096,49097,49098,49099,49100,49101,49102,49103,49104,49105,49106,49107,49108,49109,49110,49111,49112,49113,49114,49115,49116,49117,49118,49119,49120,49121,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49212,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49233,49234,49235,49236,49237,49238,49239,49240,49241,49242,49243,49244,49245,49246,49247,49248,49249,49250,49251,49252,49253,49254,49255,49256,49257,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49296,49297,49298,49299,49300,49301,49302,49303,49304,49305,49306,49307,49308,49309,49310,49311,49312,49313,49314,49315,49316,49317,49318,49319,49320,49321,49322,49323,49324,49325,49326,49327,49328,49329,49330,49331,49332,49333,49334,49335,49336,49337,49338,49339,49340,49341,49342,49343,49344,49345,49346,49347,49348,49349,49350,49351,49352,49353,49354,49355,49356,49357,49358,49359,49360,49361,49362,49363,49364,49365,49366,49367,49368,49369,49370,49371,49372,49373,49374,49375,49376,49377,49378,49379,49380,49381,49382,49383,49384,49385,49386,49387,49388,49389,49390,49391,49392,49393,49394,49395,49396,49397,49398,49399,49400,49401,49402,49403,49404,49405,49406,49407,49408,49409,49410,49411,49412,49413,49414,49415,49416,49417,49418,49419,49420,49421,49422,49423,49424,49425,49426,49427,49428,49429,49430,49431,49432,49433,49434,49435,49436,49437,49438,49439,49440,49441,49442,49443,49444,49445,49446,49447,49448,49449,49450,49451,49452,49453,49454,49455,49456,49457,49458,49459,49460,49461,49462,49463,49464,49465,49466,49467,49468,49469,49470,49471,49472,49473,49474,49475,49476,49477,49478,49479,49480,49481,49482,49483,49484,49485,49486,49487,49488,49489,49490,49491,49492,49493,49494,49495,49496,49497,49498,49499,49500,49501,49502,49503,49504,49505,49506,49507,49508,49509,49510,49511,49512,49513,49514,49515,49516,49517,49518,49519,49520,49521,49522,49523,49524,49525,49526,49527,49528,49529,49530,49531,49532,49533,49534,49535,49536,49537,49538,49539,49540,49541,49542,49543,49544,49545,49546,49547,49548,49549,49550,49551,49552,49553,49554,49555,49556,49557,49558,49559,49560,49561,49562,49563,49564,49565,49566,49567,49568,49569,49570,49571,49572,49573,49574,49575,49576,49577,49578,49579,49580,49581,49582,49583,49584,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49597,49598,49599,49600,49601,49602,49603,49604,49605,49606,49607,49608,49609,49610,49611,49612,49613,49614,49615,49616,49617,49618,49619,49620,49621,49622,49623,49624,49625,49626,49627,49628,49629,49630,49631,49632,49633,49634,49635,49636,49637,49638,49639,49640,49641,49642,49643,49644,49645,49646,49647,49648,49649,49650,49651,49652,49653,49654,49655,49656,49657,49658,49659,49660,49661,49662,49663,49664,49665,49666,49667,49668,49669,49670,49671,49672,49673,49674,49675,49676,49677,49678,49679,49680,49681,49682,49683,49684,49685,49686,49687,49688,49689,49690,49691,49692,49693,49694,49695,49696,49697,49698,49699,49700,49701,49702,49703,49704,49705,49706,49707,49708,49709,49710,49711,49712,49713,49714,49715,49716,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,49734,49735,49736,49737,49738,49739,49740,49741,49742,49743,49744,49745,49746,49747,49748,49749,49750,49751,49752,49753,49754,49755,49756,49757,49758,49759,49760,49761,49762,49763,49764,49765,49766,49767,49768,49769,49770,49771,49772,49773,49774,49775,49776,49777,49778,49779,49780,49781,49782,49783,49784,49785,49786,49787,49788,49789,49790,49791,49792,49793,49794,49795,49796,49797,49798,49799,49800,49801,49802,49803,49804,49805,49806,49807,49808,49809,49810,49811,49812,49813,49814,49815,49816,49817,49818,49819,49820,49821,49822,49823,49824,49825,49826,49827,49828,49829,49830,49831,49832,49833,49834,49835,49836,49837,49838,49839,49840,49841,49842,49843,49844,49845,49846,49847,49848,49849,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49884,49885,49886,49887,49888,49889,49890,49891,49892,49893,49894,49895,49896,49897,49898,49899,49900,49901,49902,49903,49904,49905,49906,49907,49908,49909,49910,49911,49912,49913,49914,49915,49916,49917,49918,49919,49920,49921,49922,49923,49924,49925,49926,49927,49928,49929,49930,49931,49932,49933,49934,49935,49936,49937,49938,49939,49940,49941,49942,49943,49944,49945,49946,49947,49948,49949,49950,49951,49952,49953,49954,49955,49956,49957,49958,49959,49960,49961,49962,49963,49964,49965,49966,49967,49968,49969,49970,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49989,49990,49991,49992,49993,49994,49995,49996,49997,49998,49999,50000,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50024,50025,50026,50027,50028,50029,50030,50031,50032,50033,50034,50035,50036,50037,50038,50039,50040,50041,50042,50043,50044,50045,50046,50047,50048,50049,50050,50051,50052,50053,50054,50055,50056,50057,50058,50059,50060,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50112,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50136,50137,50138,50139,50140,50141,50142,50143,50144,50145,50146,50147,50148,50149,50150,50151,50152,50153,50154,50155,50156,50157,50158,50159,50160,50161,50162,50163,50164,50165,50166,50167,50168,50169,50170,50171,50172,50173,50174,50175,50176,50177,50178,50179,50180,50181,50182,50183,50184,50185,50186,50187,50188,50189,50190,50191,50192,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,50203,50204,50205,50206,50207,50208,50209,50210,50211,50212,50213,50214,50215,50216,50217,50218,50219,50220,50221,50222,50223,50224,50225,50226,50227,50228,50229,50230,50231,50232,50233,50234,50235,50236,50237,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50248,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50276,50277,50278,50279,50280,50281,50282,50283,50284,50285,50286,50287,50288,50289,50290,50291,50292,50293,50294,50295,50296,50297,50298,50299,50300,50301,50302,50303,50304,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50324,50325,50326,50327,50328,50329,50330,50331,50332,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50360,50361,50362,50363,50364,50365,50366,50367,50368,50369,50370,50371,50372,50373,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,50400,50401,50402,50403,50404,50405,50406,50407,50408,50409,50410,50411,50412,50413,50414,50415,50416,50417,50418,50419,50420,50421,50422,50423,50424,50425,50426,50427,50428,50429,50430,50431,50432,50433,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50444,50445,50446,50447,50448,50449,50450,50451,50452,50453,50454,50455,50456,50457,50458,50459,50460,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50472,50473,50474,50475,50476,50477,50478,50479,50480,50481,50482,50483,50484,50485,50486,50487,50488,50489,50490,50491,50492,50493,50494,50495,50496,50497,50498,50499,50500,50501,50502,50503,50504,50505,50506,50507,50508,50509,50510,50511,50512,50513,50514,50515,50516,50517,50518,50519,50520,50521,50522,50523,50524,50525,50526,50527,50528,50529,50530,50531,50532,50533,50534,50535,50536,50537,50538,50539,50540,50541,50542,50543,50544,50545,50546,50547,50548,50549,50550,50551,50552,50553,50554,50555,50556,50557,50558,50559,50560,50561,50562,50563,50564,50565,50566,50567,50568,50569,50570,50571,50572,50573,50574,50575,50576,50577,50578,50579,50580,50581,50582,50583,50584,50585,50586,50587,50588,50589,50590,50591,50592,50593,50594,50595,50596,50597,50598,50599,50600,50601,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50612,50613,50614,50615,50616,50617,50618,50619,50620,50621,50622,50623,50624,50625,50626,50627,50628,50629,50630,50631,50632,50633,50634,50635,50636,50637,50638,50639,50640,50641,50642,50643,50644,50645,50646,50647,50648,50649,50650,50651,50652,50653,50654,50655,50656,50657,50658,50659,50660,50661,50662,50663,50664,50665,50666,50667,50668,50669,50670,50671,50672,50673,50674,50675,50676,50677,50678,50679,50680,50681,50682,50683,50684,50685,50686,50687,50688,50689,50690,50691,50692,50693,50694,50695,50696,50697,50698,50699,50700,50701,50702,50703,50704,50705,50706,50707,50708,50709,50710,50711,50712,50713,50714,50715,50716,50717,50718,50719,50720,50721,50722,50723,50724,50725,50726,50727,50728,50729,50730,50731,50732,50733,50734,50735,50736,50737,50738,50739,50740,50741,50742,50743,50744,50745,50746,50747,50748,50749,50750,50751,50752,50753,50754,50755,50756,50757,50758,50759,50760,50761,50762,50763,50764,50765,50766,50767,50768,50769,50770,50771,50772,50773,50774,50775,50776,50777,50778,50779,50780,50781,50782,50783,50784,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50796,50797,50798,50799,50800,50801,50802,50803,50804,50805,50806,50807,50808,50809,50810,50811,50812,50813,50814,50815,50816,50817,50818,50819,50820,50821,50822,50823,50824,50825,50826,50827,50828,50829,50830,50831,50832,50833,50834,50835,50836,50837,50838,50839,50840,50841,50842,50843,50844,50845,50846,50847,50848,50849,50850,50851,50852,50853,50854,50855,50856,50857,50858,50859,50860,50861,50862,50863,50864,50865,50866,50867,50868,50869,50870,50871,50872,50873,50874,50875,50876,50877,50878,50879,50880,50881,50882,50883,50884,50885,50886,50887,50888,50889,50890,50891,50892,50893,50894,50895,50896,50897,50898,50899,50900,50901,50902,50903,50904,50905,50906,50907,50908,50909,50910,50911,50912,50913,50914,50915,50916,50917,50918,50919,50920,50921,50922,50923,50924,50925,50926,50927,50928,50929,50930,50931,50932,50933,50934,50935,50936,50937,50938,50939,50940,50941,50942,50943,50944,50945,50946,50947,50948,50949,50950,50951,50952,50953,50954,50955,50956,50957,50958,50959,50960,50961,50962,50963,50964,50965,50966,50967,50968,50969,50970,50971,50972,50973,50974,50975,50976,50977,50978,50979,50980,50981,50982,50983,50984,50985,50986,50987,50988,50989,50990,50991,50992,50993,50994,50995,50996,50997,50998,50999,51000,51001,51002,51003,51004,51005,51006,51007,51008,51009,51010,51011,51012,51013,51014,51015,51016,51017,51018,51019,51020,51021,51022,51023,51024,51025,51026,51027,51028,51029,51030,51031,51032,51033,51034,51035,51036,51037,51038,51039,51040,51041,51042,51043,51044,51045,51046,51047,51048,51049,51050,51051,51052,51053,51054,51055,51056,51057,51058,51059,51060,51061,51062,51063,51064,51065,51066,51067,51068,51069,51070,51071,51072,51073,51074,51075,51076,51077,51078,51079,51080,51081,51082,51083,51084,51085,51086,51087,51088,51089,51090,51091,51092,51093,51094,51095,51096,51097,51098,51099,51100,51101,51102,51103,51104,51105,51106,51107,51108,51109,51110,51111,51112,51113,51114,51115,51116,51117,51118,51119,51120,51121,51122,51123,51124,51125,51126,51127,51128,51129,51130,51131,51132,51133,51134,51135,51136,51137,51138,51139,51140,51141,51142,51143,51144,51145,51146,51147,51148,51149,51150,51151,51152,51153,51154,51155,51156,51157,51158,51159,51160,51161,51162,51163,51164,51165,51166,51167,51168,51169,51170,51171,51172,51173,51174,51175,51176,51177,51178,51179,51180,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,51195,51196,51197,51198,51199,51200,51201,51202,51203,51204,51205,51206,51207,51208,51209,51210,51211,51212,51213,51214,51215,51216,51217,51218,51219,51220,51221,51222,51223,51224,51225,51226,51227,51228,51229,51230,51231,51232,51233,51234,51235,51236,51237,51238,51239,51240,51241,51242,51243,51244,51245,51246,51247,51248,51249,51250,51251,51252,51253,51254,51255,51256,51257,51258,51259,51260,51261,51262,51263,51264,51265,51266,51267,51268,51269,51270,51271,51272,51273,51274,51275,51276,51277,51278,51279,51280,51281,51282,51283,51284,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51312,51313,51314,51315,51316,51317,51318,51319,51320,51321,51322,51323,51324,51325,51326,51327,51328,51329,51330,51331,51332,51333,51334,51335,51336,51337,51338,51339,51340,51341,51342,51343,51344,51345,51346,51347,51348,51349,51350,51351,51352,51353,51354,51355,51356,51357,51358,51359,51360,51361,51362,51363,51364,51365,51366,51367,51368,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51388,51389,51390,51391,51392,51393,51394,51395,51396,51397,51398,51399,51400,51401,51402,51403,51404,51405,51406,51407,51408,51409,51410,51411,51412,51413,51414,51415,51416,51417,51418,51419,51420,51421,51422,51423,51424,51425,51426,51427,51428,51429,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51445,51446,51447,51448,51449,51450,51451,51452,51453,51454,51455,51456,51457,51458,51459,51460,51461,51462,51463,51464,51465,51466,51467,51468,51469,51470,51471,51472,51473,51474,51475,51476,51477,51478,51479,51480,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,51500,51501,51502,51503,51504,51505,51506,51507,51508,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,51528,51529,51530,51531,51532,51533,51534,51535,51536,51537,51538,51539,51540,51541,51542,51543,51544,51545,51546,51547,51548,51549,51550,51551,51552,51553,51554,51555,51556,51557,51558,51559,51560,51561,51562,51563,51564,51565,51566,51567,51568,51569,51570,51571,51572,51573,51574,51575,51576,51577,51578,51579,51580,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51592,51593,51594,51595,51596,51597,51598,51599,51600,51601,51602,51603,51604,51605,51606,51607,51608,51609,51610,51611,51612,51613,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51648,51649,51650,51651,51652,51653,51654,51655,51656,51657,51658,51659,51660,51661,51662,51663,51664,51665,51666,51667,51668,51669,51670,51671,51672,51673,51674,51675,51676,51677,51678,51679,51680,51681,51682,51683,51684,51685,51686,51687,51688,51689,51690,51691,51692,51693,51694,51695,51696,51697,51698,51699,51700,51701,51702,51703,51704,51705,51706,51707,51708,51709,51710,51711,51712,51713,51714,51715,51716,51717,51718,51719,51720,51721,51722,51723,51724,51725,51726,51727,51728,51729,51730,51731,51732,51733,51734,51735,51736,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,51750,51751,51752,51753,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,51783,51784,51785,51786,51787,51788,51789,51790,51791,51792,51793,51794,51795,51796,51797,51798,51799,51800,51801,51802,51803,51804,51805,51806,51807,51808,51809,51810,51811,51812,51813,51814,51815,51816,51817,51818,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51837,51838,51839,51840,51841,51842,51843,51844,51845,51846,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51864,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51900,51901,51902,51903,51904,51905,51906,51907,51908,51909,51910,51911,51912,51913,51914,51915,51916,51917,51918,51919,51920,51921,51922,51923,51924,51925,51926,51927,51928,51929,51930,51931,51932,51933,51934,51935,51936,51937,51938,51939,51940,51941,51942,51943,51944,51945,51946,51947,51948,51949,51950,51951,51952,51953,51954,51955,51956,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51976,51977,51978,51979,51980,51981,51982,51983,51984,51985,51986,51987,51988,51989,51990,51991,51992,51993,51994,51995,51996,51997,51998,51999,52000,52001,52002,52003,52004,52005,52006,52007,52008,52009,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52033,52034,52035,52036,52037,52038,52039,52040,52041,52042,52043,52044,52045,52046,52047,52048,52049,52050,52051,52052,52053,52054,52055,52056,52057,52058,52059,52060,52061,52062,52063,52064,52065,52066,52067,52068,52069,52070,52071,52072,52073,52074,52075,52076,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52088,52089,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52124,52125,52126,52127,52128,52129,52130,52131,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52152,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52180,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,52192,52193,52194,52195,52196,52197,52198,52199,52200,52201,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52236,52237,52238,52239,52240,52241,52242,52243,52244,52245,52246,52247,52248,52249,52250,52251,52252,52253,52254,52255,52256,52257,52258,52259,52260,52261,52262,52263,52264,52265,52266,52267,52268,52269,52270,52271,52272,52273,52274,52275,52276,52277,52278,52279,52280,52281,52282,52283,52284,52285,52286,52287,52288,52289,52290,52291,52292,52293,52294,52295,52296,52297,52298,52299,52300,52301,52302,52303,52304,52305,52306,52307,52308,52309,52310,52311,52312,52313,52314,52315,52316,52317,52318,52319,52320,52321,52322,52323,52324,52325,52326,52327,52328,52329,52330,52331,52332,52333,52334,52335,52336,52337,52338,52339,52340,52341,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,52372,52373,52374,52375,52376,52377,52378,52379,52380,52381,52382,52383,52384,52385,52386,52387,52388,52389,52390,52391,52392,52393,52394,52395,52396,52397,52398,52399,52400,52401,52402,52403,52404,52405,52406,52407,52408,52409,52410,52411,52412,52413,52414,52415,52416,52417,52418,52419,52420,52421,52422,52423,52424,52425,52426,52427,52428,52429,52430,52431,52432,52433,52434,52435,52436,52437,52438,52439,52440,52441,52442,52443,52444,52445,52446,52447,52448,52449,52450,52451,52452,52453,52454,52455,52456,52457,52458,52459,52460,52461,52462,52463,52464,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,52478,52479,52480,52481,52482,52483,52484,52485,52486,52487,52488,52489,52490,52491,52492,52493,52494,52495,52496,52497,52498,52499,52500,52501,52502,52503,52504,52505,52506,52507,52508,52509,52510,52511,52512,52513,52514,52515,52516,52517,52518,52519,52520,52521,52522,52523,52524,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52537,52538,52539,52540,52541,52542,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52572,52573,52574,52575,52576,52577,52578,52579,52580,52581,52582,52583,52584,52585,52586,52587,52588,52589,52590,52591,52592,52593,52594,52595,52596,52597,52598,52599,52600,52601,52602,52603,52604,52605,52606,52607,52608,52609,52610,52611,52612,52613,52614,52615,52616,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52628,52629,52630,52631,52632,52633,52634,52635,52636,52637,52638,52639,52640,52641,52642,52643,52644,52645,52646,52647,52648,52649,52650,52651,52652,52653,52654,52655,52656,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52676,52677,52678,52679,52680,52681,52682,52683,52684,52685,52686,52687,52688,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,52706,52707,52708,52709,52710,52711,52712,52713,52714,52715,52716,52717,52718,52719,52720,52721,52722,52723,52724,52725,52726,52727,52728,52729,52730,52731,52732,52733,52734,52735,52736,52737,52738,52739,52740,52741,52742,52743,52744,52745,52746,52747,52748,52749,52750,52751,52752,52753,52754,52755,52756,52757,52758,52759,52760,52761,52762,52763,52764,52765,52766,52767,52768,52769,52770,52771,52772,52773,52774,52775,52776,52777,52778,52779,52780,52781,52782,52783,52784,52785,52786,52787,52788,52789,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52824,52825,52826,52827,52828,52829,52830,52831,52832,52833,52834,52835,52836,52837,52838,52839,52840,52841,52842,52843,52844,52845,52846,52847,52848,52849,52850,52851,52852,52853,52854,52855,52856,52857,52858,52859,52860,52861,52862,52863,52864,52865,52866,52867,52868,52869,52870,52871,52872,52873,52874,52875,52876,52877,52878,52879,52880,52881,52882,52883,52884,52885,52886,52887,52888,52889,52890,52891,52892,52893,52894,52895,52896,52897,52898,52899,52900,52901,52902,52903,52904,52905,52906,52907,52908,52909,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,52923,52924,52925,52926,52927,52928,52929,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52964,52965,52966,52967,52968,52969,52970,52971,52972,52973,52974,52975,52976,52977,52978,52979,52980,52981,52982,52983,52984,52985,52986,52987,52988,52989,52990,52991,52992,52993,52994,52995,52996,52997,52998,52999,53000,53001,53002,53003,53004,53005,53006,53007,53008,53009,53010,53011,53012,53013,53014,53015,53016,53017,53018,53019,53020,53021,53022,53023,53024,53025,53026,53027,53028,53029,53030,53031,53032,53033,53034,53035,53036,53037,53038,53039,53040,53041,53042,53043,53044,53045,53046,53047,53048,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53076,53077,53078,53079,53080,53081,53082,53083,53084,53085,53086,53087,53088,53089,53090,53091,53092,53093,53094,53095,53096,53097,53098,53099,53100,53101,53102,53103,53104,53105,53106,53107,53108,53109,53110,53111,53112,53113,53114,53115,53116,53117,53118,53119,53120,53121,53122,53123,53124,53125,53126,53127,53128,53129,53130,53131,53132,53133,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53153,53154,53155,53156,53157,53158,53159,53160,53161,53162,53163,53164,53165,53166,53167,53168,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53188,53189,53190,53191,53192,53193,53194,53195,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53216,53217,53218,53219,53220,53221,53222,53223,53224,53225,53226,53227,53228,53229,53230,53231,53232,53233,53234,53235,53236,53237,53238,53239,53240,53241,53242,53243,53244,53245,53246,53247,53248,53249,53250,53251,53252,53253,53254,53255,53256,53257,53258,53259,53260,53261,53262,53263,53264,53265,53266,53267,53268,53269,53270,53271,53272,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,53293,53294,53295,53296,53297,53298,53299,53300,53301,53302,53303,53304,53305,53306,53307,53308,53309,53310,53311,53312,53313,53314,53315,53316,53317,53318,53319,53320,53321,53322,53323,53324,53325,53326,53327,53328,53329,53330,53331,53332,53333,53334,53335,53336,53337,53338,53339,53340,53341,53342,53343,53344,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53356,53357,53358,53359,53360,53361,53362,53363,53364,53365,53366,53367,53368,53369,53370,53371,53372,53373,53374,53375,53376,53377,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53412,53413,53414,53415,53416,53417,53418,53419,53420,53421,53422,53423,53424,53425,53426,53427,53428,53429,53430,53431,53432,53433,53434,53435,53436,53437,53438,53439,53440,53441,53442,53443,53444,53445,53446,53447,53448,53449,53450,53451,53452,53453,53454,53455,53456,53457,53458,53459,53460,53461,53462,53463,53464,53465,53466,53467,53468,53469,53470,53471,53472,53473,53474,53475,53476,53477,53478,53479,53480,53481,53482,53483,53484,53485,53486,53487,53488,53489,53490,53491,53492,53493,53494,53495,53496,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,53509,53510,53511,53512,53513,53514,53515,53516,53517,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53552,53553,53554,53555,53556,53557,53558,53559,53560,53561,53562,53563,53564,53565,53566,53567,53568,53569,53570,53571,53572,53573,53574,53575,53576,53577,53578,53579,53580,53581,53582,53583,53584,53585,53586,53587,53588,53589,53590,53591,53592,53593,53594,53595,53596,53597,53598,53599,53600,53601,53602,53603,53604,53605,53606,53607,53608,53609,53610,53611,53612,53613,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53628,53629,53630,53631,53632,53633,53634,53635,53636,53637,53638,53639,53640,53641,53642,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53664,53665,53666,53667,53668,53669,53670,53671,53672,53673,53674,53675,53676,53677,53678,53679,53680,53681,53682,53683,53684,53685,53686,53687,53688,53689,53690,53691,53692,53693,53694,53695,53696,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,53712,53713,53714,53715,53716,53717,53718,53719,53720,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,53739,53740,53741,53742,53743,53744,53745,53746,53747,53748,53749,53750,53751,53752,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,53767,53768,53769,53770,53771,53772,53773,53774,53775,53776,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,53802,53803,53804,53805,53806,53807,53808,53809,53810,53811,53812,53813,53814,53815,53816,53817,53818,53819,53820,53821,53822,53823,53824,53825,53826,53827,53828,53829,53830,53831,53832,53833,53834,53835,53836,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53852,53853,53854,53855,53856,53857,53858,53859,53860,53861,53862,53863,53864,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53888,53889,53890,53891,53892,53893,53894,53895,53896,53897,53898,53899,53900,53901,53902,53903,53904,53905,53906,53907,53908,53909,53910,53911,53912,53913,53914,53915,53916,53917,53918,53919,53920,53921,53922,53923,53924,53925,53926,53927,53928,53929,53930,53931,53932,53933,53934,53935,53936,53937,53938,53939,53940,53941,53942,53943,53944,53945,53946,53947,53948,53949,53950,53951,53952,53953,53954,53955,53956,53957,53958,53959,53960,53961,53962,53963,53964,53965,53966,53967,53968,53969,53970,53971,53972,53973,53974,53975,53976,53977,53978,53979,53980,53981,53982,53983,53984,53985,53986,53987,53988,53989,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54000,54001,54002,54003,54004,54005,54006,54007,54008,54009,54010,54011,54012,54013,54014,54015,54016,54017,54018,54019,54020,54021,54022,54023,54024,54025,54026,54027,54028,54029,54030,54031,54032,54033,54034,54035,54036,54037,54038,54039,54040,54041,54042,54043,54044,54045,54046,54047,54048,54049,54050,54051,54052,54053,54054,54055,54056,54057,54058,54059,54060,54061,54062,54063,54064,54065,54066,54067,54068,54069,54070,54071,54072,54073,54074,54075,54076,54077,54078,54079,54080,54081,54082,54083,54084,54085,54086,54087,54088,54089,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54140,54141,54142,54143,54144,54145,54146,54147,54148,54149,54150,54151,54152,54153,54154,54155,54156,54157,54158,54159,54160,54161,54162,54163,54164,54165,54166,54167,54168,54169,54170,54171,54172,54173,54174,54175,54176,54177,54178,54179,54180,54181,54182,54183,54184,54185,54186,54187,54188,54189,54190,54191,54192,54193,54194,54195,54196,54197,54198,54199,54200,54201,54202,54203,54204,54205,54206,54207,54208,54209,54210,54211,54212,54213,54214,54215,54216,54217,54218,54219,54220,54221,54222,54223,54224,54225,54226,54227,54228,54229,54230,54231,54232,54233,54234,54235,54236,54237,54238,54239,54240,54241,54242,54243,54244,54245,54246,54247,54248,54249,54250,54251,54252,54253,54254,54255,54256,54257,54258,54259,54260,54261,54262,54263,54264,54265,54266,54267,54268,54269,54270,54271,54272,54273,54274,54275,54276,54277,54278,54279,54280,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,54295,54296,54297,54298,54299,54300,54301,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,54328,54329,54330,54331,54332,54333,54334,54335,54336,54337,54338,54339,54340,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,54356,54357,54358,54359,54360,54361,54362,54363,54364,54365,54366,54367,54368,54369,54370,54371,54372,54373,54374,54375,54376,54377,54378,54379,54380,54381,54382,54383,54384,54385,54386,54387,54388,54389,54390,54391,54392,54393,54394,54395,54396,54397,54398,54399,54400,54401,54402,54403,54404,54405,54406,54407,54408,54409,54410,54411,54412,54413,54414,54415,54416,54417,54418,54419,54420,54421,54422,54423,54424,54425,54426,54427,54428,54429,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54441,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54476,54477,54478,54479,54480,54481,54482,54483,54484,54485,54486,54487,54488,54489,54490,54491,54492,54493,54494,54495,54496,54497,54498,54499,54500,54501,54502,54503,54504,54505,54506,54507,54508,54509,54510,54511,54512,54513,54514,54515,54516,54517,54518,54519,54520,54521,54522,54523,54524,54525,54526,54527,54528,54529,54530,54531,54532,54533,54534,54535,54536,54537,54538,54539,54540,54541,54542,54543,54544,54545,54546,54547,54548,54549,54550,54551,54552,54553,54554,54555,54556,54557,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,54584,54585,54586,54587,54588,54589,54590,54591,54592,54593,54594,54595,54596,54597,54598,54599,54600,54601,54602,54603,54604,54605,54606,54607,54608,54609,54610,54611,54612,54613,54614,54615,54616,54617,54618,54619,54620,54621,54622,54623,54624,54625,54626,54627,54628,54629,54630,54631,54632,54633,54634,54635,54636,54637,54638,54639,54640,54641,54642,54643,54644,54645,54646,54647,54648,54649,54650,54651,54652,54653,54654,54655,54656,54657,54658,54659,54660,54661,54662,54663,54664,54665,54666,54667,54668,54669,54670,54671,54672,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54693,54694,54695,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,54728,54729,54730,54731,54732,54733,54734,54735,54736,54737,54738,54739,54740,54741,54742,54743,54744,54745,54746,54747,54748,54749,54750,54751,54752,54753,54754,54755,54756,54757,54758,54759,54760,54761,54762,54763,54764,54765,54766,54767,54768,54769,54770,54771,54772,54773,54774,54775,54776,54777,54778,54779,54780,54781,54782,54783,54784,54785,54786,54787,54788,54789,54790,54791,54792,54793,54794,54795,54796,54797,54798,54799,54800,54801,54802,54803,54804,54805,54806,54807,54808,54809,54810,54811,54812,54813,54814,54815,54816,54817,54818,54819,54820,54821,54822,54823,54824,54825,54826,54827,54828,54829,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54840,54841,54842,54843,54844,54845,54846,54847,54848,54849,54850,54851,54852,54853,54854,54855,54856,54857,54858,54859,54860,54861,54862,54863,54864,54865,54866,54867,54868,54869,54870,54871,54872,54873,54874,54875,54876,54877,54878,54879,54880,54881,54882,54883,54884,54885,54886,54887,54888,54889,54890,54891,54892,54893,54894,54895,54896,54897,54898,54899,54900,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,54913,54914,54915,54916,54917,54918,54919,54920,54921,54922,54923,54924,54925,54926,54927,54928,54929,54930,54931,54932,54933,54934,54935,54936,54937,54938,54939,54940,54941,54942,54943,54944,54945,54946,54947,54948,54949,54950,54951,54952,54953,54954,54955,54956,54957,54958,54959,54960,54961,54962,54963,54964,54965,54966,54967,54968,54969,54970,54971,54972,54973,54974,54975,54976,54977,54978,54979,54980,54981,54982,54983,54984,54985,54986,54987,54988,54989,54990,54991,54992,54993,54994,54995,54996,54997,54998,54999,55000,55001,55002,55003,55004,55005,55006,55007,55008,55009,55010,55011,55012,55013,55014,55015,55016,55017,55018,55019,55020,55021,55022,55023,55024,55025,55026,55027,55028,55029,55030,55031,55032,55033,55034,55035,55036,55037,55038,55039,55040,55041,55042,55043,55044,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55057,55058,55059,55060,55061,55062,55063,55064,55065,55066,55067,55068,55069,55070,55071,55072,55073,55074,55075,55076,55077,55078,55079,55080,55081,55082,55083,55084,55085,55086,55087,55088,55089,55090,55091,55092,55093,55094,55095,55096,55097,55098,55099,55100,55101,55102,55103,55104,55105,55106,55107,55108,55109,55110,55111,55112,55113,55114,55115,55116,55117,55118,55119,55120,55121,55122,55123,55124,55125,55126,55127,55128,55129,55130,55131,55132,55133,55134,55135,55136,55137,55138,55139,55140,55141,55142,55143,55144,55145,55146,55147,55148,55149,55150,55151,55152,55153,55154,55155,55156,55157,55158,55159,55160,55161,55162,55163,55164,55165,55166,55167,55168,55169,55170,55171,55172,55173,55174,55175,55176,55177,55178,55179,55180,55181,55182,55183,55184,55185,55186,55187,55188,55189,55190,55191,55192,55193,55194,55195,55196,55197,55198,55199,55200,55201,55202,55203,55216,55217,55218,55219,55220,55221,55222,55223,55224,55225,55226,55227,55228,55229,55230,55231,55232,55233,55234,55235,55236,55237,55238,55243,55244,55245,55246,55247,55248,55249,55250,55251,55252,55253,55254,55255,55256,55257,55258,55259,55260,55261,55262,55263,55264,55265,55266,55267,55268,55269,55270,55271,55272,55273,55274,55275,55276,55277,55278,55279,55280,55281,55282,55283,55284,55285,55286,55287,55288,55289,55290,55291,63744,63745,63746,63747,63748,63749,63750,63751,63752,63753,63754,63755,63756,63757,63758,63759,63760,63761,63762,63763,63764,63765,63766,63767,63768,63769,63770,63771,63772,63773,63774,63775,63776,63777,63778,63779,63780,63781,63782,63783,63784,63785,63786,63787,63788,63789,63790,63791,63792,63793,63794,63795,63796,63797,63798,63799,63800,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,63812,63813,63814,63815,63816,63817,63818,63819,63820,63821,63822,63823,63824,63825,63826,63827,63828,63829,63830,63831,63832,63833,63834,63835,63836,63837,63838,63839,63840,63841,63842,63843,63844,63845,63846,63847,63848,63849,63850,63851,63852,63853,63854,63855,63856,63857,63858,63859,63860,63861,63862,63863,63864,63865,63866,63867,63868,63869,63870,63871,63872,63873,63874,63875,63876,63877,63878,63879,63880,63881,63882,63883,63884,63885,63886,63887,63888,63889,63890,63891,63892,63893,63894,63895,63896,63897,63898,63899,63900,63901,63902,63903,63904,63905,63906,63907,63908,63909,63910,63911,63912,63913,63914,63915,63916,63917,63918,63919,63920,63921,63922,63923,63924,63925,63926,63927,63928,63929,63930,63931,63932,63933,63934,63935,63936,63937,63938,63939,63940,63941,63942,63943,63944,63945,63946,63947,63948,63949,63950,63951,63952,63953,63954,63955,63956,63957,63958,63959,63960,63961,63962,63963,63964,63965,63966,63967,63968,63969,63970,63971,63972,63973,63974,63975,63976,63977,63978,63979,63980,63981,63982,63983,63984,63985,63986,63987,63988,63989,63990,63991,63992,63993,63994,63995,63996,63997,63998,63999,64000,64001,64002,64003,64004,64005,64006,64007,64008,64009,64010,64011,64012,64013,64014,64015,64016,64017,64018,64019,64020,64021,64022,64023,64024,64025,64026,64027,64028,64029,64030,64031,64032,64033,64034,64035,64036,64037,64038,64039,64040,64041,64042,64043,64044,64045,64046,64047,64048,64049,64050,64051,64052,64053,64054,64055,64056,64057,64058,64059,64060,64061,64062,64063,64064,64065,64066,64067,64068,64069,64070,64071,64072,64073,64074,64075,64076,64077,64078,64079,64080,64081,64082,64083,64084,64085,64086,64087,64088,64089,64090,64091,64092,64093,64094,64095,64096,64097,64098,64099,64100,64101,64102,64103,64104,64105,64106,64107,64108,64109,64112,64113,64114,64115,64116,64117,64118,64119,64120,64121,64122,64123,64124,64125,64126,64127,64128,64129,64130,64131,64132,64133,64134,64135,64136,64137,64138,64139,64140,64141,64142,64143,64144,64145,64146,64147,64148,64149,64150,64151,64152,64153,64154,64155,64156,64157,64158,64159,64160,64161,64162,64163,64164,64165,64166,64167,64168,64169,64170,64171,64172,64173,64174,64175,64176,64177,64178,64179,64180,64181,64182,64183,64184,64185,64186,64187,64188,64189,64190,64191,64192,64193,64194,64195,64196,64197,64198,64199,64200,64201,64202,64203,64204,64205,64206,64207,64208,64209,64210,64211,64212,64213,64214,64215,64216,64217,64256,64257,64258,64259,64260,64261,64262,64275,64276,64277,64278,64279,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65382,65383,65384,65385,65386,65387,65388,65389,65390,65391,65392,65393,65394,65395,65396,65397,65398,65399,65400,65401,65402,65403,65404,65405,65406,65407,65408,65409,65410,65411,65412,65413,65414,65415,65416,65417,65418,65419,65420,65421,65422,65423,65424,65425,65426,65427,65428,65429,65430,65431,65432,65433,65434,65435,65436,65437,65438,65439,65440,65441,65442,65443,65444,65445,65446,65447,65448,65449,65450,65451,65452,65453,65454,65455,65456,65457,65458,65459,65460,65461,65462,65463,65464,65465,65466,65467,65468,65469,65470,65474,65475,65476,65477,65478,65479,65482,65483,65484,65485,65486,65487,65490,65491,65492,65493,65494,65495,65498,65499,65500';\nvar arr = str.split(',').map(function(code) {\n  return parseInt(code, 10);\n});\nmodule.exports = arr;\n},{}],5:[function(require,module,exports){\n// http://wiki.commonjs.org/wiki/Unit_Testing/1.0\n//\n// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!\n//\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// when used in node, this will actually load the util module we depend on\n// versus loading the builtin util module as happens otherwise\n// this is a bug in node module loading as far as I am concerned\nvar util = require('util/');\n\nvar pSlice = Array.prototype.slice;\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n//                             actual: actual,\n//                             expected: expected })\n\nassert.AssertionError = function AssertionError(options) {\n  this.name = 'AssertionError';\n  this.actual = options.actual;\n  this.expected = options.expected;\n  this.operator = options.operator;\n  if (options.message) {\n    this.message = options.message;\n    this.generatedMessage = false;\n  } else {\n    this.message = getMessage(this);\n    this.generatedMessage = true;\n  }\n  var stackStartFunction = options.stackStartFunction || fail;\n\n  if (Error.captureStackTrace) {\n    Error.captureStackTrace(this, stackStartFunction);\n  }\n  else {\n    // non v8 browsers so we can have a stacktrace\n    var err = new Error();\n    if (err.stack) {\n      var out = err.stack;\n\n      // try to strip useless frames\n      var fn_name = stackStartFunction.name;\n      var idx = out.indexOf('\\n' + fn_name);\n      if (idx >= 0) {\n        // once we have located the function frame\n        // we need to strip out everything before it (and its line)\n        var next_line = out.indexOf('\\n', idx + 1);\n        out = out.substring(next_line + 1);\n      }\n\n      this.stack = out;\n    }\n  }\n};\n\n// assert.AssertionError instanceof Error\nutil.inherits(assert.AssertionError, Error);\n\nfunction replacer(key, value) {\n  if (util.isUndefined(value)) {\n    return '' + value;\n  }\n  if (util.isNumber(value) && !isFinite(value)) {\n    return value.toString();\n  }\n  if (util.isFunction(value) || util.isRegExp(value)) {\n    return value.toString();\n  }\n  return value;\n}\n\nfunction truncate(s, n) {\n  if (util.isString(s)) {\n    return s.length < n ? s : s.slice(0, n);\n  } else {\n    return s;\n  }\n}\n\nfunction getMessage(self) {\n  return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +\n         self.operator + ' ' +\n         truncate(JSON.stringify(self.expected, replacer), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided.  All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n  throw new assert.AssertionError({\n    message: message,\n    actual: actual,\n    expected: expected,\n    operator: operator,\n    stackStartFunction: stackStartFunction\n  });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n  if (!value) fail(value, true, message, '==', assert.ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\n\nassert.equal = function equal(actual, expected, message) {\n  if (actual != expected) fail(actual, expected, message, '==', assert.equal);\n};\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\n\nassert.notEqual = function notEqual(actual, expected, message) {\n  if (actual == expected) {\n    fail(actual, expected, message, '!=', assert.notEqual);\n  }\n};\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n  if (!_deepEqual(actual, expected)) {\n    fail(actual, expected, message, 'deepEqual', assert.deepEqual);\n  }\n};\n\nfunction _deepEqual(actual, expected) {\n  // 7.1. All identical values are equivalent, as determined by ===.\n  if (actual === expected) {\n    return true;\n\n  } else if (util.isBuffer(actual) && util.isBuffer(expected)) {\n    if (actual.length != expected.length) return false;\n\n    for (var i = 0; i < actual.length; i++) {\n      if (actual[i] !== expected[i]) return false;\n    }\n\n    return true;\n\n  // 7.2. If the expected value is a Date object, the actual value is\n  // equivalent if it is also a Date object that refers to the same time.\n  } else if (util.isDate(actual) && util.isDate(expected)) {\n    return actual.getTime() === expected.getTime();\n\n  // 7.3 If the expected value is a RegExp object, the actual value is\n  // equivalent if it is also a RegExp object with the same source and\n  // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n  } else if (util.isRegExp(actual) && util.isRegExp(expected)) {\n    return actual.source === expected.source &&\n           actual.global === expected.global &&\n           actual.multiline === expected.multiline &&\n           actual.lastIndex === expected.lastIndex &&\n           actual.ignoreCase === expected.ignoreCase;\n\n  // 7.4. Other pairs that do not both pass typeof value == 'object',\n  // equivalence is determined by ==.\n  } else if (!util.isObject(actual) && !util.isObject(expected)) {\n    return actual == expected;\n\n  // 7.5 For all other Object pairs, including Array objects, equivalence is\n  // determined by having the same number of owned properties (as verified\n  // with Object.prototype.hasOwnProperty.call), the same set of keys\n  // (although not necessarily the same order), equivalent values for every\n  // corresponding key, and an identical 'prototype' property. Note: this\n  // accounts for both named and indexed properties on Arrays.\n  } else {\n    return objEquiv(actual, expected);\n  }\n}\n\nfunction isArguments(object) {\n  return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b) {\n  if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))\n    return false;\n  // an identical 'prototype' property.\n  if (a.prototype !== b.prototype) return false;\n  // if one is a primitive, the other must be same\n  if (util.isPrimitive(a) || util.isPrimitive(b)) {\n    return a === b;\n  }\n  var aIsArgs = isArguments(a),\n      bIsArgs = isArguments(b);\n  if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n    return false;\n  if (aIsArgs) {\n    a = pSlice.call(a);\n    b = pSlice.call(b);\n    return _deepEqual(a, b);\n  }\n  var ka = objectKeys(a),\n      kb = objectKeys(b),\n      key, i;\n  // having the same number of owned properties (keys incorporates\n  // hasOwnProperty)\n  if (ka.length != kb.length)\n    return false;\n  //the same set of keys (although not necessarily the same order),\n  ka.sort();\n  kb.sort();\n  //~~~cheap key test\n  for (i = ka.length - 1; i >= 0; i--) {\n    if (ka[i] != kb[i])\n      return false;\n  }\n  //equivalent values for every corresponding key, and\n  //~~~possibly expensive deep test\n  for (i = ka.length - 1; i >= 0; i--) {\n    key = ka[i];\n    if (!_deepEqual(a[key], b[key])) return false;\n  }\n  return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n  if (_deepEqual(actual, expected)) {\n    fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);\n  }\n};\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n  if (actual !== expected) {\n    fail(actual, expected, message, '===', assert.strictEqual);\n  }\n};\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==.  assert.notStrictEqual(actual, expected, message_opt);\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n  if (actual === expected) {\n    fail(actual, expected, message, '!==', assert.notStrictEqual);\n  }\n};\n\nfunction expectedException(actual, expected) {\n  if (!actual || !expected) {\n    return false;\n  }\n\n  if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n    return expected.test(actual);\n  } else if (actual instanceof expected) {\n    return true;\n  } else if (expected.call({}, actual) === true) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n  var actual;\n\n  if (util.isString(expected)) {\n    message = expected;\n    expected = null;\n  }\n\n  try {\n    block();\n  } catch (e) {\n    actual = e;\n  }\n\n  message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n            (message ? ' ' + message : '.');\n\n  if (shouldThrow && !actual) {\n    fail(actual, expected, 'Missing expected exception' + message);\n  }\n\n  if (!shouldThrow && expectedException(actual, expected)) {\n    fail(actual, expected, 'Got unwanted exception' + message);\n  }\n\n  if ((shouldThrow && actual && expected &&\n      !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n    throw actual;\n  }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\n\nassert.throws = function(block, /*optional*/error, /*optional*/message) {\n  _throws.apply(this, [true].concat(pSlice.call(arguments)));\n};\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = function(block, /*optional*/message) {\n  _throws.apply(this, [false].concat(pSlice.call(arguments)));\n};\n\nassert.ifError = function(err) { if (err) {throw err;}};\n\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    if (hasOwn.call(obj, key)) keys.push(key);\n  }\n  return keys;\n};\n\n},{\"util/\":8}],6:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n\n},{}],7:[function(require,module,exports){\nmodule.exports = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n}\n},{}],8:[function(require,module,exports){\n(function (process,global){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n  // Allow for deprecating things in the process of starting up.\n  if (isUndefined(global.process)) {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  if (process.noDeprecation === true) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = process.env.NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = process.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    exports._extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== exports.inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n}).call(this,require('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./support/isBuffer\":7,\"_process\":13,\"inherits\":6}],9:[function(require,module,exports){\n(function (global){\n/*global window, global*/\nvar util = require(\"util\")\nvar assert = require(\"assert\")\nvar now = require(\"date-now\")\n\nvar slice = Array.prototype.slice\nvar console\nvar times = {}\n\nif (typeof global !== \"undefined\" && global.console) {\n    console = global.console\n} else if (typeof window !== \"undefined\" && window.console) {\n    console = window.console\n} else {\n    console = {}\n}\n\nvar functions = [\n    [log, \"log\"],\n    [info, \"info\"],\n    [warn, \"warn\"],\n    [error, \"error\"],\n    [time, \"time\"],\n    [timeEnd, \"timeEnd\"],\n    [trace, \"trace\"],\n    [dir, \"dir\"],\n    [consoleAssert, \"assert\"]\n]\n\nfor (var i = 0; i < functions.length; i++) {\n    var tuple = functions[i]\n    var f = tuple[0]\n    var name = tuple[1]\n\n    if (!console[name]) {\n        console[name] = f\n    }\n}\n\nmodule.exports = console\n\nfunction log() {}\n\nfunction info() {\n    console.log.apply(console, arguments)\n}\n\nfunction warn() {\n    console.log.apply(console, arguments)\n}\n\nfunction error() {\n    console.warn.apply(console, arguments)\n}\n\nfunction time(label) {\n    times[label] = now()\n}\n\nfunction timeEnd(label) {\n    var time = times[label]\n    if (!time) {\n        throw new Error(\"No such label: \" + label)\n    }\n\n    var duration = now() - time\n    console.log(label + \": \" + duration + \"ms\")\n}\n\nfunction trace() {\n    var err = new Error()\n    err.name = \"Trace\"\n    err.message = util.format.apply(null, arguments)\n    console.error(err.stack)\n}\n\nfunction dir(object) {\n    console.log(util.inspect(object) + \"\\n\")\n}\n\nfunction consoleAssert(expression) {\n    if (!expression) {\n        var arr = slice.call(arguments, 1)\n        assert.ok(false, util.format.apply(null, arr))\n    }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"assert\":5,\"date-now\":10,\"util\":16}],10:[function(require,module,exports){\nmodule.exports = now\n\nfunction now() {\n    return new Date().getTime()\n}\n\n},{}],11:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      }\n      throw TypeError('Uncaught, unspecified \"error\" event.');\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        len = arguments.length;\n        args = new Array(len - 1);\n        for (i = 1; i < len; i++)\n          args[i - 1] = arguments[i];\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    len = arguments.length;\n    args = new Array(len - 1);\n    for (i = 1; i < len; i++)\n      args[i - 1] = arguments[i];\n\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    var m;\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  var ret;\n  if (!emitter._events || !emitter._events[type])\n    ret = 0;\n  else if (isFunction(emitter._events[type]))\n    ret = 1;\n  else\n    ret = emitter._events[type].length;\n  return ret;\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n\n},{}],12:[function(require,module,exports){\n(function (global){\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.20';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading and trailing whitespace. */\n  var reTrim = /^\\s+|\\s+$/g,\n      reTrimStart = /^\\s+/,\n      reTrimEnd = /\\s+$/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = value.replace(reTrim, '');\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrim, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimEnd, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],13:[function(require,module,exports){\n// shim for using process in browser\n\nvar process = module.exports = {};\nvar queue = [];\nvar draining = false;\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    draining = true;\n    var currentQueue;\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        var i = -1;\n        while (++i < len) {\n            currentQueue[i]();\n        }\n        len = queue.length;\n    }\n    draining = false;\n}\nprocess.nextTick = function (fun) {\n    queue.push(fun);\n    if (!draining) {\n        setTimeout(drainQueue, 0);\n    }\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],14:[function(require,module,exports){\narguments[4][6][0].apply(exports,arguments)\n},{\"dup\":6}],15:[function(require,module,exports){\narguments[4][7][0].apply(exports,arguments)\n},{\"dup\":7}],16:[function(require,module,exports){\narguments[4][8][0].apply(exports,arguments)\n},{\"./support/isBuffer\":15,\"_process\":13,\"dup\":8,\"inherits\":14}],17:[function(require,module,exports){\n/*\n * Lexical analysis and token construction.\n */\n\n\"use strict\";\n\nvar _      = require(\"lodash\");\nvar events = require(\"events\");\nvar reg    = require(\"./reg.js\");\nvar state  = require(\"./state.js\").state;\n\nvar unicodeData = require(\"../data/ascii-identifier-data.js\");\nvar asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable;\nvar asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable;\nvar nonAsciiIdentifierStartTable = require(\"../data/non-ascii-identifier-start.js\");\nvar nonAsciiIdentifierPartTable = require(\"../data/non-ascii-identifier-part-only.js\");\n// Loading of this module is deferred as an optimization for ES2015 input\nvar es5IdentifierNames;\n\n// Some of these token types are from JavaScript Parser API\n// while others are specific to JSHint parser.\n// JS Parser API: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API\n\nvar Token = {\n  Identifier: 1,\n  Punctuator: 2,\n  NumericLiteral: 3,\n  StringLiteral: 4,\n  Comment: 5,\n  Keyword: 6,\n  RegExp: 9,\n  TemplateHead: 10,\n  TemplateMiddle: 11,\n  TemplateTail: 12,\n  NoSubstTemplate: 13\n};\n\nvar Context = {\n  Block: 1,\n  Template: 2\n};\n\nfunction isHex(str) {\n  return /^[0-9a-fA-F]+$/.test(str);\n}\n\nfunction isHexDigit(str) {\n  return str.length === 1 && isHex(str);\n}\n\n// Object that handles postponed lexing verifications that checks the parsed\n// environment state.\n\nfunction asyncTrigger() {\n  var _checks = [];\n\n  return {\n    push: function(fn) {\n      _checks.push(fn);\n    },\n\n    check: function() {\n      for (var check = 0; check < _checks.length; ++check) {\n        _checks[check]();\n      }\n\n      _checks.splice(0, _checks.length);\n    }\n  };\n}\n\n/*\n * Lexer for JSHint.\n *\n * This object does a char-by-char scan of the provided source code\n * and produces a sequence of tokens.\n *\n *   var lex = new Lexer(\"var i = 0;\");\n *   lex.start();\n *   lex.token(); // returns the next token\n *\n * You have to use the token() method to move the lexer forward\n * but you don't have to use its return value to get tokens. In addition\n * to token() method returning the next token, the Lexer object also\n * emits events.\n *\n *   lex.on(\"Identifier\", function(data) {\n *     if (data.name.indexOf(\"_\") >= 0) {\n *       // Produce a warning.\n *     }\n *   });\n *\n * Note that the token() method returns tokens in a JSLint-compatible\n * format while the event emitter uses a slightly modified version of\n * Mozilla's JavaScript Parser API. Eventually, we will move away from\n * JSLint format.\n */\nfunction Lexer(source) {\n  var lines = source;\n\n  if (typeof lines === \"string\") {\n    lines = lines\n      .replace(/\\r\\n/g, \"\\n\")\n      .replace(/\\r/g, \"\\n\")\n      .split(\"\\n\");\n  }\n\n  // If the first line is a shebang (#!), make it a blank and move on.\n  // Shebangs are used by Node scripts.\n\n  if (lines[0] && lines[0].substr(0, 2) === \"#!\") {\n    if (lines[0].indexOf(\"node\") !== -1) {\n      state.option.node = true;\n    }\n    lines[0] = \"\";\n  }\n\n  this.emitter = new events.EventEmitter();\n  this.source = source;\n  this.setLines(lines);\n  this.prereg = true;\n\n  this.line = 0;\n  this.char = 1;\n  this.from = 1;\n  this.input = \"\";\n  this.inComment = false;\n  this.context = [];\n  this.templateStarts = [];\n\n  for (var i = 0; i < state.option.indent; i += 1) {\n    state.tab += \" \";\n  }\n}\n\nLexer.prototype = {\n  _lines: [],\n\n  inContext: function(ctxType) {\n    return this.context.length > 0 && this.context[this.context.length - 1].type === ctxType;\n  },\n\n  pushContext: function(ctxType) {\n    this.context.push({ type: ctxType });\n  },\n\n  popContext: function() {\n    return this.context.pop();\n  },\n\n  currentContext: function() {\n    return this.context.length > 0 && this.context[this.context.length - 1];\n  },\n\n  getLines: function() {\n    this._lines = state.lines;\n    return this._lines;\n  },\n\n  setLines: function(val) {\n    this._lines = val;\n    state.lines = this._lines;\n  },\n\n  /*\n   * Return the next i character without actually moving the\n   * char pointer.\n   */\n  peek: function(i) {\n    return this.input.charAt(i || 0);\n  },\n\n  /*\n   * Move the char pointer forward i times.\n   */\n  skip: function(i) {\n    i = i || 1;\n    this.char += i;\n    this.input = this.input.slice(i);\n  },\n\n  /*\n   * Subscribe to a token event. The API for this method is similar\n   * Underscore.js i.e. you can subscribe to multiple events with\n   * one call:\n   *\n   *   lex.on(\"Identifier Number\", function(data) {\n   *     // ...\n   *   });\n   */\n  on: function(names, listener) {\n    names.split(\" \").forEach(function(name) {\n      this.emitter.on(name, listener);\n    }.bind(this));\n  },\n\n  /*\n   * Trigger a token event. All arguments will be passed to each\n   * listener.\n   */\n  trigger: function() {\n    this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));\n  },\n\n  /*\n   * Postpone a token event. the checking condition is set as\n   * last parameter, and the trigger function is called in a\n   * stored callback. To be later called using the check() function\n   * by the parser. This avoids parser's peek() to give the lexer\n   * a false context.\n   */\n  triggerAsync: function(type, args, checks, fn) {\n    checks.push(function() {\n      if (fn()) {\n        this.trigger(type, args);\n      }\n    }.bind(this));\n  },\n\n  /*\n   * Extract a punctuator out of the next sequence of characters\n   * or return 'null' if its not possible.\n   *\n   * This method's implementation was heavily influenced by the\n   * scanPunctuator function in the Esprima parser's source code.\n   */\n  scanPunctuator: function() {\n    var ch1 = this.peek();\n    var ch2, ch3, ch4;\n\n    switch (ch1) {\n    // Most common single-character punctuators\n    case \".\":\n      if ((/^[0-9]$/).test(this.peek(1))) {\n        return null;\n      }\n      if (this.peek(1) === \".\" && this.peek(2) === \".\") {\n        return {\n          type: Token.Punctuator,\n          value: \"...\"\n        };\n      }\n      /* falls through */\n    case \"(\":\n    case \")\":\n    case \";\":\n    case \",\":\n    case \"[\":\n    case \"]\":\n    case \":\":\n    case \"~\":\n      return {\n        type: Token.Punctuator,\n        value: ch1\n      };\n\n    // A block/object opener\n    case \"{\":\n      this.pushContext(Context.Block);\n      return {\n        type: Token.Punctuator,\n        value: ch1\n      };\n\n    // A block/object closer\n    case \"}\":\n      if (this.inContext(Context.Block)) {\n        this.popContext();\n      }\n      return {\n        type: Token.Punctuator,\n        value: ch1\n      };\n\n    // A pound sign (for Node shebangs)\n    case \"#\":\n      return {\n        type: Token.Punctuator,\n        value: ch1\n      };\n\n    // We're at the end of input\n    case \"\":\n      return null;\n    }\n\n    // Peek more characters\n\n    ch2 = this.peek(1);\n    ch3 = this.peek(2);\n\n    if (ch1 === \"?\") {\n      // Optional chaining\n      if (ch2 === \".\" && !reg.decimalDigit.test(ch3)) {\n        return {\n          type: Token.Punctuator,\n          value: \"?.\"\n        };\n      }\n\n      return {\n        type: Token.Punctuator,\n        value: ch2 === \"?\" ? \"??\" : \"?\"\n      };\n    }\n\n    ch4 = this.peek(3);\n\n    // 4-character punctuator: >>>=\n\n    if (ch1 === \">\" && ch2 === \">\" && ch3 === \">\" && ch4 === \"=\") {\n      return {\n        type: Token.Punctuator,\n        value: \">>>=\"\n      };\n    }\n\n    // 3-character punctuators: === !== >>> <<= >>=\n\n    if (ch1 === \"=\" && ch2 === \"=\" && ch3 === \"=\") {\n      return {\n        type: Token.Punctuator,\n        value: \"===\"\n      };\n    }\n\n    if (ch1 === \"!\" && ch2 === \"=\" && ch3 === \"=\") {\n      return {\n        type: Token.Punctuator,\n        value: \"!==\"\n      };\n    }\n\n    if (ch1 === \">\" && ch2 === \">\" && ch3 === \">\") {\n      return {\n        type: Token.Punctuator,\n        value: \">>>\"\n      };\n    }\n\n    if (ch1 === \"<\" && ch2 === \"<\" && ch3 === \"=\") {\n      return {\n        type: Token.Punctuator,\n        value: \"<<=\"\n      };\n    }\n\n    if (ch1 === \">\" && ch2 === \">\" && ch3 === \"=\") {\n      return {\n        type: Token.Punctuator,\n        value: \">>=\"\n      };\n    }\n\n    // Fat arrow punctuator\n    if (ch1 === \"=\" && ch2 === \">\") {\n      return {\n        type: Token.Punctuator,\n        value: ch1 + ch2\n      };\n    }\n\n    // 2-character punctuators: ++ -- << >> && || **\n    if (ch1 === ch2 && (\"+-<>&|*\".indexOf(ch1) >= 0)) {\n      if (ch1 === \"*\" && ch3 === \"=\") {\n        return {\n          type: Token.Punctuator,\n          value: ch1 + ch2 + ch3\n        };\n      }\n\n      return {\n        type: Token.Punctuator,\n        value: ch1 + ch2\n      };\n    }\n\n    // <= >= != += -= *= %= &= |= ^= /=\n    if (\"<>=!+-*%&|^/\".indexOf(ch1) >= 0) {\n      if (ch2 === \"=\") {\n        return {\n          type: Token.Punctuator,\n          value: ch1 + ch2\n        };\n      }\n\n      return {\n        type: Token.Punctuator,\n        value: ch1\n      };\n    }\n\n    return null;\n  },\n\n  /*\n   * Extract a comment out of the next sequence of characters and/or\n   * lines or return 'null' if its not possible. Since comments can\n   * span across multiple lines this method has to move the char\n   * pointer.\n   *\n   * In addition to normal JavaScript comments (// and /*) this method\n   * also recognizes JSHint- and JSLint-specific comments such as\n   * /*jshint, /*jslint, /*globals and so on.\n   */\n  scanComments: function(checks) {\n    var ch1 = this.peek();\n    var ch2 = this.peek(1);\n    var rest = this.input.substr(2);\n    var startLine = this.line;\n    var startChar = this.char;\n    var self = this;\n\n    // Create a comment token object and make sure it\n    // has all the data JSHint needs to work with special\n    // comments.\n\n    function commentToken(label, body, opt) {\n      var special = [\n        \"jshint\", \"jshint.unstable\", \"jslint\", \"members\", \"member\", \"globals\",\n        \"global\", \"exported\"\n      ];\n      var isSpecial = false;\n      var value = label + body;\n      var commentType = \"plain\";\n      opt = opt || {};\n\n      if (opt.isMultiline) {\n        value += \"*/\";\n      }\n\n      body = body.replace(/\\n/g, \" \");\n\n      if (label === \"/*\" && reg.fallsThrough.test(body)) {\n        isSpecial = true;\n        commentType = \"falls through\";\n      }\n\n      special.forEach(function(str) {\n        if (isSpecial) {\n          return;\n        }\n\n        // Don't recognize any special comments other than jshint for single-line\n        // comments. This introduced many problems with legit comments.\n        if (label === \"//\" && str !== \"jshint\" && str !== \"jshint.unstable\") {\n          return;\n        }\n\n        if (body.charAt(str.length) === \" \" && body.substr(0, str.length) === str) {\n          isSpecial = true;\n          label = label + str;\n          body = body.substr(str.length);\n        }\n\n        if (!isSpecial && body.charAt(0) === \" \" && body.charAt(str.length + 1) === \" \" &&\n          body.substr(1, str.length) === str) {\n          isSpecial = true;\n          label = label + \" \" + str;\n          body = body.substr(str.length + 1);\n        }\n\n        // To handle rarer case when special word is separated from label by\n        // multiple spaces or tabs\n        var strIndex = body.indexOf(str);\n        if (!isSpecial && strIndex >= 0 && body.charAt(strIndex + str.length) === \" \") {\n          var isAllWhitespace = body.substr(0, strIndex).trim().length === 0;\n          if (isAllWhitespace) {\n            isSpecial = true;\n            body = body.substr(str.length + strIndex);\n          }\n        }\n\n        if (!isSpecial) {\n          return;\n        }\n\n        switch (str) {\n        case \"member\":\n          commentType = \"members\";\n          break;\n        case \"global\":\n          commentType = \"globals\";\n          break;\n        default:\n          var options = body.split(\":\").map(function(v) {\n            return v.replace(/^\\s+/, \"\").replace(/\\s+$/, \"\");\n          });\n\n          if (options.length === 2) {\n            switch (options[0]) {\n            case \"ignore\":\n              switch (options[1]) {\n              case \"start\":\n                self.ignoringLinterErrors = true;\n                isSpecial = false;\n                break;\n              case \"end\":\n                self.ignoringLinterErrors = false;\n                isSpecial = false;\n                break;\n              }\n            }\n          }\n\n          commentType = str;\n        }\n      });\n\n      return {\n        type: Token.Comment,\n        commentType: commentType,\n        value: value,\n        body: body,\n        isSpecial: isSpecial,\n        isMalformed: opt.isMalformed || false\n      };\n    }\n\n    // End of unbegun comment. Raise an error and skip that input.\n    if (ch1 === \"*\" && ch2 === \"/\") {\n      this.trigger(\"error\", {\n        code: \"E018\",\n        line: startLine,\n        character: startChar\n      });\n\n      this.skip(2);\n      return null;\n    }\n\n    // Comments must start either with // or /*\n    if (ch1 !== \"/\" || (ch2 !== \"*\" && ch2 !== \"/\")) {\n      return null;\n    }\n\n    // One-line comment\n    if (ch2 === \"/\") {\n      this.skip(this.input.length); // Skip to the EOL.\n      return commentToken(\"//\", rest);\n    }\n\n    var body = \"\";\n\n    /* Multi-line comment */\n    if (ch2 === \"*\") {\n      this.inComment = true;\n      this.skip(2);\n\n      while (this.peek() !== \"*\" || this.peek(1) !== \"/\") {\n        if (this.peek() === \"\") { // End of Line\n          body += \"\\n\";\n\n          // If we hit EOF and our comment is still unclosed,\n          // trigger an error and end the comment implicitly.\n          if (!this.nextLine(checks)) {\n            this.trigger(\"error\", {\n              code: \"E017\",\n              line: startLine,\n              character: startChar\n            });\n\n            this.inComment = false;\n            return commentToken(\"/*\", body, {\n              isMultiline: true,\n              isMalformed: true\n            });\n          }\n        } else {\n          body += this.peek();\n          this.skip();\n        }\n      }\n\n      this.skip(2);\n      this.inComment = false;\n      return commentToken(\"/*\", body, { isMultiline: true });\n    }\n  },\n\n  /*\n   * Extract a keyword out of the next sequence of characters or\n   * return 'null' if its not possible.\n   */\n  scanKeyword: function() {\n    var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);\n    var keywords = [\n      \"if\", \"in\", \"do\", \"var\", \"for\", \"new\",\n      \"try\", \"let\", \"this\", \"else\", \"case\",\n      \"void\", \"with\", \"enum\", \"while\", \"break\",\n      \"catch\", \"throw\", \"const\", \"yield\", \"class\",\n      \"super\", \"return\", \"typeof\", \"delete\",\n      \"switch\", \"export\", \"import\", \"default\",\n      \"finally\", \"extends\", \"function\", \"continue\",\n      \"debugger\", \"instanceof\", \"true\", \"false\", \"null\", \"async\", \"await\"\n    ];\n\n    if (result && keywords.indexOf(result[0]) >= 0) {\n      return {\n        type: Token.Keyword,\n        value: result[0]\n      };\n    }\n\n    return null;\n  },\n\n  /*\n   * Extract a JavaScript identifier out of the next sequence of\n   * characters or return 'null' if its not possible.\n   */\n  scanIdentifier: function(checks) {\n    var id = \"\";\n    var index = 0;\n    var char, value;\n\n    function isNonAsciiIdentifierStart(code) {\n      return nonAsciiIdentifierStartTable.indexOf(code) > -1;\n    }\n\n    function isNonAsciiIdentifierPart(code) {\n      return isNonAsciiIdentifierStart(code) || nonAsciiIdentifierPartTable.indexOf(code) > -1;\n    }\n\n    var readUnicodeEscapeSequence = function() {\n      /*jshint validthis:true */\n      index += 1;\n\n      if (this.peek(index) !== \"u\") {\n        return null;\n      }\n\n      var sequence = this.peek(index + 1) + this.peek(index + 2) +\n        this.peek(index + 3) + this.peek(index + 4);\n      var code;\n\n      if (isHex(sequence)) {\n        code = parseInt(sequence, 16);\n\n        if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) {\n          index += 5;\n          return \"\\\\u\" + sequence;\n        }\n\n        return null;\n      }\n\n      return null;\n    }.bind(this);\n\n    var getIdentifierStart = function() {\n      /*jshint validthis:true */\n      var chr = this.peek(index);\n      var code = chr.charCodeAt(0);\n\n      if (code === 92) {\n        return readUnicodeEscapeSequence();\n      }\n\n      if (code < 128) {\n        if (asciiIdentifierStartTable[code]) {\n          index += 1;\n          return chr;\n        }\n\n        return null;\n      }\n\n      if (isNonAsciiIdentifierStart(code)) {\n        index += 1;\n        return chr;\n      }\n\n      return null;\n    }.bind(this);\n\n    var getIdentifierPart = function() {\n      /*jshint validthis:true */\n      var chr = this.peek(index);\n      var code = chr.charCodeAt(0);\n\n      if (code === 92) {\n        return readUnicodeEscapeSequence();\n      }\n\n      if (code < 128) {\n        if (asciiIdentifierPartTable[code]) {\n          index += 1;\n          return chr;\n        }\n\n        return null;\n      }\n\n      if (isNonAsciiIdentifierPart(code)) {\n        index += 1;\n        return chr;\n      }\n\n      return null;\n    }.bind(this);\n\n    function removeEscapeSequences(id) {\n      return id.replace(/\\\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) {\n        return String.fromCharCode(parseInt(codepoint, 16));\n      });\n    }\n\n    char = getIdentifierStart();\n    if (char === null) {\n      return null;\n    }\n\n    id = char;\n    for (;;) {\n      char = getIdentifierPart();\n\n      if (char === null) {\n        break;\n      }\n\n      id += char;\n    }\n\n    value = removeEscapeSequences(id);\n\n    if (!state.inES6(true)) {\n      es5IdentifierNames = require(\"../data/es5-identifier-names.js\");\n\n      if (!es5IdentifierNames.test(value)) {\n        this.triggerAsync(\n          \"warning\",\n          {\n            code: \"W119\",\n            line: this.line,\n            character: this.char,\n            data: [\"unicode 8\", \"6\"]\n          },\n          checks,\n          function() { return true; }\n        );\n      }\n    }\n\n    return {\n      type: Token.Identifier,\n      value: value,\n      text: id,\n      tokenLength: id.length\n    };\n  },\n\n  /*\n   * Extract a numeric literal out of the next sequence of\n   * characters or return 'null' if its not possible. This method\n   * supports all numeric literals described in section 7.8.3\n   * of the EcmaScript 5 specification.\n   *\n   * This method's implementation was heavily influenced by the\n   * scanNumericLiteral function in the Esprima parser's source code.\n   */\n  scanNumericLiteral: function(checks) {\n    var index = 0;\n    var value = \"\";\n    var length = this.input.length;\n    var char = this.peek(index);\n    var isAllowedDigit = isDecimalDigit;\n    var base = 10;\n    var isLegacy = false;\n    var isNonOctal = false;\n\n    function isDecimalDigit(str) {\n      return (/^[0-9]$/).test(str);\n    }\n\n    function isOctalDigit(str) {\n      return (/^[0-7]$/).test(str);\n    }\n\n    function isNonOctalDigit(str) {\n      return str === \"8\" || str === \"9\";\n    }\n\n    function isBinaryDigit(str) {\n      return (/^[01]$/).test(str);\n    }\n\n    function isIdentifierStart(ch) {\n      return (ch === \"$\") || (ch === \"_\") || (ch === \"\\\\\") ||\n        (ch >= \"a\" && ch <= \"z\") || (ch >= \"A\" && ch <= \"Z\");\n    }\n\n    // Numbers must start either with a decimal digit or a point.\n\n    if (char !== \".\" && !isDecimalDigit(char)) {\n      return null;\n    }\n\n    if (char !== \".\") {\n      value = this.peek(index);\n      index += 1;\n      char = this.peek(index);\n\n      if (value === \"0\") {\n        // Base-16 numbers.\n        if (char === \"x\" || char === \"X\") {\n          isAllowedDigit = isHexDigit;\n          base = 16;\n\n          index += 1;\n          value += char;\n        }\n\n        // Base-8 numbers.\n        if (char === \"o\" || char === \"O\") {\n          isAllowedDigit = isOctalDigit;\n          base = 8;\n\n          if (!state.inES6(true)) {\n            this.triggerAsync(\n              \"warning\",\n              {\n                code: \"W119\",\n                line: this.line,\n                character: this.char,\n                data: [ \"Octal integer literal\", \"6\" ]\n              },\n              checks,\n              function() { return true; }\n            );\n          }\n\n          index += 1;\n          value += char;\n        }\n\n        // Base-2 numbers.\n        if (char === \"b\" || char === \"B\") {\n          isAllowedDigit = isBinaryDigit;\n          base = 2;\n\n          if (!state.inES6(true)) {\n            this.triggerAsync(\n              \"warning\",\n              {\n                code: \"W119\",\n                line: this.line,\n                character: this.char,\n                data: [ \"Binary integer literal\", \"6\" ]\n              },\n              checks,\n              function() { return true; }\n            );\n          }\n\n          index += 1;\n          value += char;\n        }\n\n        // Legacy base-8 numbers.\n        if (isOctalDigit(char)) {\n          isAllowedDigit = isOctalDigit;\n          base = 8;\n          isLegacy = true;\n\n        } else if (isDecimalDigit(char)) {\n          isNonOctal = true;\n        }\n      }\n\n      while (index < length) {\n        char = this.peek(index);\n\n        if (isLegacy && isNonOctalDigit(char)) {\n          base = 10;\n          isLegacy = false;\n          isNonOctal = true;\n          isAllowedDigit = isDecimalDigit;\n        }\n\n        if (!isAllowedDigit(char)) {\n          break;\n        }\n        value += char;\n        index += 1;\n      }\n\n      var isBigInt = this.peek(index) === 'n';\n\n      if (isAllowedDigit !== isDecimalDigit || isBigInt) {\n        if (isBigInt) {\n          this.triggerAsync(\n            \"warning\",\n            {\n              code: \"W119\",\n              line: this.line,\n              character: this.char,\n              data: [ \"BigInt\", \"11\" ]\n            },\n            checks,\n            function() { return !state.inES11(); }\n          );\n\n          if (isLegacy || isNonOctal) {\n            this.triggerAsync(\n              \"error\",\n              {\n                code: \"E067\",\n                line: this.line,\n                character: this.char,\n                data: [value + char]\n              },\n              checks,\n              function() { return true; }\n            );\n          }\n\n          value += char;\n          index += 1;\n        } else if (!isLegacy && value.length <= 2) { // 0x\n          return {\n            type: Token.NumericLiteral,\n            value: value,\n            isMalformed: true\n          };\n        }\n\n        if (index < length) {\n          char = this.peek(index);\n          if (isIdentifierStart(char)) {\n            return null;\n          }\n        }\n\n        return {\n          type: Token.NumericLiteral,\n          value: value,\n          base: base,\n          isLegacy: isLegacy,\n          isMalformed: false\n        };\n      }\n    }\n\n    // Decimal digits.\n\n    if (char === \".\") {\n      value += char;\n      index += 1;\n\n      while (index < length) {\n        char = this.peek(index);\n        if (!isDecimalDigit(char)) {\n          break;\n        }\n        value += char;\n        index += 1;\n      }\n    }\n\n    // Exponent part.\n\n    if (char === \"e\" || char === \"E\") {\n      value += char;\n      index += 1;\n      char = this.peek(index);\n\n      if (char === \"+\" || char === \"-\") {\n        value += this.peek(index);\n        index += 1;\n      }\n\n      char = this.peek(index);\n      if (isDecimalDigit(char)) {\n        value += char;\n        index += 1;\n\n        while (index < length) {\n          char = this.peek(index);\n          if (!isDecimalDigit(char)) {\n            break;\n          }\n          value += char;\n          index += 1;\n        }\n      } else {\n        return null;\n      }\n    }\n\n    if (index < length) {\n      char = this.peek(index);\n      if (isIdentifierStart(char)) {\n        return null;\n      }\n    }\n\n    // TODO: Extend this check to other numeric literals\n    this.triggerAsync(\"warning\", {\n      code: \"W045\",\n      line: this.line,\n      character: this.char + value.length,\n      data: [ value ]\n    }, checks, function() { return !isFinite(value); });\n\n    return {\n      type: Token.NumericLiteral,\n      value: value,\n      base: base,\n      isNonOctal: isNonOctal,\n      isMalformed: false\n    };\n  },\n\n\n  // Assumes previously parsed character was \\ (=== '\\\\') and was not skipped.\n  scanEscapeSequence: function(checks) {\n    var allowNewLine = false;\n    var jump = 1;\n    this.skip();\n    var char = this.peek();\n\n    switch (char) {\n    case \"'\":\n      this.triggerAsync(\"warning\", {\n        code: \"W114\",\n        line: this.line,\n        character: this.char,\n        data: [ \"\\\\'\" ]\n      }, checks, function() {return state.jsonMode; });\n      break;\n    case \"b\":\n      char = \"\\\\b\";\n      break;\n    case \"f\":\n      char = \"\\\\f\";\n      break;\n    case \"n\":\n      char = \"\\\\n\";\n      break;\n    case \"r\":\n      char = \"\\\\r\";\n      break;\n    case \"t\":\n      char = \"\\\\t\";\n      break;\n    case \"0\":\n      char = \"\\\\0\";\n\n      // Octal literals fail in strict mode.\n      // Check if the number is between 00 and 07.\n      var n = parseInt(this.peek(1), 10);\n      this.triggerAsync(\"warning\", {\n        code: \"W115\",\n        line: this.line,\n        character: this.char\n      }, checks,\n      function() { return n >= 0 && n <= 7 && state.isStrict(); });\n      break;\n    case \"1\":\n    case \"2\":\n    case \"3\":\n    case \"4\":\n    case \"5\":\n    case \"6\":\n    case \"7\":\n      char = \"\\\\\" + char;\n      this.triggerAsync(\"warning\", {\n        code: \"W115\",\n        line: this.line,\n        character: this.char\n      }, checks,\n      function() { return state.isStrict(); });\n      break;\n    case \"u\":\n      var sequence = this.input.substr(1, 4);\n      var code = parseInt(sequence, 16);\n      if (!isHex(sequence)) {\n        // This condition unequivocally describes a syntax error.\n        // TODO: Re-factor as an \"error\" (not a \"warning\").\n        this.trigger(\"warning\", {\n          code: \"W052\",\n          line: this.line,\n          character: this.char,\n          data: [ \"u\" + sequence ]\n        });\n      }\n      char = String.fromCharCode(code);\n      jump = 5;\n      break;\n    case \"v\":\n      this.triggerAsync(\"warning\", {\n        code: \"W114\",\n        line: this.line,\n        character: this.char,\n        data: [ \"\\\\v\" ]\n      }, checks, function() { return state.jsonMode; });\n\n      char = \"\\v\";\n      break;\n    case \"x\":\n      var  x = parseInt(this.input.substr(1, 2), 16);\n\n      this.triggerAsync(\"warning\", {\n        code: \"W114\",\n        line: this.line,\n        character: this.char,\n        data: [ \"\\\\x-\" ]\n      }, checks, function() { return state.jsonMode; });\n\n      char = String.fromCharCode(x);\n      jump = 3;\n      break;\n    case \"\\\\\":\n      char = \"\\\\\\\\\";\n      break;\n    case \"/\":\n      break;\n    case \"\":\n      allowNewLine = true;\n      char = \"\";\n      break;\n    }\n\n    return { char: char, jump: jump, allowNewLine: allowNewLine };\n  },\n\n  /*\n   * Extract a template literal out of the next sequence of characters\n   * and/or lines or return 'null' if its not possible. Since template\n   * literals can span across multiple lines, this method has to move\n   * the char pointer.\n   */\n  scanTemplateLiteral: function(checks) {\n    var tokenType;\n    var value = \"\";\n    var ch;\n    var startLine = this.line;\n    var startChar = this.char;\n    var depth = this.templateStarts.length;\n\n    if (this.peek() === \"`\") {\n      if (!state.inES6(true)) {\n        this.triggerAsync(\n          \"warning\",\n          {\n            code: \"W119\",\n            line: this.line,\n            character: this.char,\n            data: [\"template literal syntax\", \"6\"]\n          },\n          checks,\n          function() { return true; }\n        );\n      }\n      // Template must start with a backtick.\n      tokenType = Token.TemplateHead;\n      this.templateStarts.push({ line: this.line, char: this.char });\n      depth = this.templateStarts.length;\n      this.skip(1);\n      this.pushContext(Context.Template);\n    } else if (this.inContext(Context.Template) && this.peek() === \"}\") {\n      // If we're in a template context, and we have a '}', lex a TemplateMiddle.\n      tokenType = Token.TemplateMiddle;\n    } else {\n      // Go lex something else.\n      return null;\n    }\n\n    while (this.peek() !== \"`\") {\n      while ((ch = this.peek()) === \"\") {\n        value += \"\\n\";\n        if (!this.nextLine(checks)) {\n          // Unclosed template literal --- point to the starting \"`\"\n          var startPos = this.templateStarts.pop();\n          this.trigger(\"error\", {\n            code: \"E052\",\n            line: startPos.line,\n            character: startPos.char\n          });\n          return {\n            type: tokenType,\n            value: value,\n            startLine: startLine,\n            startChar: startChar,\n            isUnclosed: true,\n            depth: depth,\n            context: this.popContext()\n          };\n        }\n      }\n\n      if (ch === '$' && this.peek(1) === '{') {\n        value += '${';\n        this.skip(2);\n        return {\n          type: tokenType,\n          value: value,\n          startLine: startLine,\n          startChar: startChar,\n          isUnclosed: false,\n          depth: depth,\n          context: this.currentContext()\n        };\n      } else if (ch === '\\\\') {\n        var escape = this.scanEscapeSequence(checks);\n        value += escape.char;\n        this.skip(escape.jump);\n      } else if (ch !== '`') {\n        // Otherwise, append the value and continue.\n        value += ch;\n        this.skip(1);\n      }\n    }\n\n    // Final value is either NoSubstTemplate or TemplateTail\n    tokenType = tokenType === Token.TemplateHead ? Token.NoSubstTemplate : Token.TemplateTail;\n    this.skip(1);\n    this.templateStarts.pop();\n\n    return {\n      type: tokenType,\n      value: value,\n      startLine: startLine,\n      startChar: startChar,\n      isUnclosed: false,\n      depth: depth,\n      context: this.popContext()\n    };\n  },\n\n  /*\n   * Extract a string out of the next sequence of characters and/or\n   * lines or return 'null' if its not possible. Since strings can\n   * span across multiple lines this method has to move the char\n   * pointer.\n   *\n   * This method recognizes pseudo-multiline JavaScript strings:\n   *\n   *   var str = \"hello\\\n   *   world\";\n   */\n  scanStringLiteral: function(checks) {\n    /*jshint loopfunc:true */\n    var quote = this.peek();\n\n    // String must start with a quote.\n    if (quote !== \"\\\"\" && quote !== \"'\") {\n      return null;\n    }\n\n    // In JSON strings must always use double quotes.\n    this.triggerAsync(\"warning\", {\n      code: \"W108\",\n      line: this.line,\n      character: this.char // +1?\n    }, checks, function() { return state.jsonMode && quote !== \"\\\"\"; });\n\n    var value = \"\";\n    var startLine = this.line;\n    var startChar = this.char;\n    var allowNewLine = false;\n\n    this.skip();\n\n    while (this.peek() !== quote) {\n      if (this.peek() === \"\") { // End Of Line\n\n        // If an EOL is not preceded by a backslash, show a warning\n        // and proceed like it was a legit multi-line string where\n        // author simply forgot to escape the newline symbol.\n        //\n        // Another approach is to implicitly close a string on EOL\n        // but it generates too many false positives.\n\n        if (!allowNewLine) {\n          // This condition unequivocally describes a syntax error.\n          // TODO: Emit error E029 and remove W112.\n          this.trigger(\"warning\", {\n            code: \"W112\",\n            line: this.line,\n            character: this.char\n          });\n        } else {\n          allowNewLine = false;\n\n          // Otherwise show a warning if multistr option was not set.\n          // For JSON, show warning no matter what.\n\n          this.triggerAsync(\"warning\", {\n            code: \"W043\",\n            line: this.line,\n            character: this.char\n          }, checks, function() { return !state.option.multistr; });\n\n          this.triggerAsync(\"warning\", {\n            code: \"W042\",\n            line: this.line,\n            character: this.char\n          }, checks, function() { return state.jsonMode && state.option.multistr; });\n        }\n\n        // If we get an EOF inside of an unclosed string, show an\n        // error and implicitly close it at the EOF point.\n\n        if (!this.nextLine(checks)) {\n          return {\n            type: Token.StringLiteral,\n            value: value,\n            startLine: startLine,\n            startChar: startChar,\n            isUnclosed: true,\n            quote: quote\n          };\n        }\n\n      } else { // Any character other than End Of Line\n\n        allowNewLine = false;\n        var char = this.peek();\n        var jump = 1; // A length of a jump, after we're done\n                      // parsing this character.\n\n        if (char < \" \") {\n          // Warn about a control character in a string.\n          this.triggerAsync(\n            \"warning\",\n            {\n              code: \"W113\",\n              line: this.line,\n              character: this.char,\n              data: [ \"<non-printable>\" ]\n            },\n            checks,\n            function() { return true; }\n          );\n        }\n\n        // Special treatment for some escaped characters.\n        if (char === \"\\\\\") {\n          var parsed = this.scanEscapeSequence(checks);\n          char = parsed.char;\n          jump = parsed.jump;\n          allowNewLine = parsed.allowNewLine;\n        }\n\n        // If char is the empty string, end of the line has been reached. In\n        // this case, `this.char` should not be incremented so that warnings\n        // and errors reported in the subsequent loop iteration have the\n        // correct character column offset.\n        if (char !== \"\") {\n          value += char;\n          this.skip(jump);\n        }\n      }\n    }\n\n    this.skip();\n    return {\n      type: Token.StringLiteral,\n      value: value,\n      startLine: startLine,\n      startChar: startChar,\n      isUnclosed: false,\n      quote: quote\n    };\n  },\n\n  /*\n   * Extract a regular expression out of the next sequence of\n   * characters and/or lines or return 'null' if its not possible.\n   *\n   * This method is platform dependent: it accepts almost any\n   * regular expression values but then tries to compile and run\n   * them using system's RegExp object. This means that there are\n   * rare edge cases where one JavaScript engine complains about\n   * your regular expression while others don't.\n   */\n  scanRegExp: function(checks) {\n    var index = 0;\n    var length = this.input.length;\n    var char = this.peek();\n    var value = char;\n    var body = \"\";\n    var groupReferences = [];\n    var allFlags = \"\";\n    var es5Flags = \"\";\n    var malformed = false;\n    var isCharSet = false;\n    var isCharSetRange = false;\n    var isGroup = false;\n    var isQuantifiable = false;\n    var hasInvalidQuantifier = false;\n    var escapedChars = \"\";\n    var hasUFlag = function() { return allFlags.indexOf(\"u\") > -1; };\n    var escapeSequence;\n    var groupCount = 0;\n    var terminated, malformedDesc;\n\n    var scanRegexpEscapeSequence = function() {\n      var next, sequence;\n      index += 1;\n      char = this.peek(index);\n\n      if (reg.nonzeroDigit.test(char)) {\n        sequence = char;\n        next = this.peek(index + 1);\n        while (reg.nonzeroDigit.test(next) || next === \"0\") {\n          index += 1;\n          char = next;\n          sequence += char;\n          body += char;\n          value += char;\n          next = this.peek(index + 1);\n        }\n        groupReferences.push(Number(sequence));\n        return sequence;\n      }\n\n      escapedChars += char;\n\n      if (char === \"u\" && this.peek(index + 1) === \"{\") {\n        var x = index + 2;\n        sequence = \"u{\";\n        next = this.peek(x);\n        while (isHex(next)) {\n          sequence += next;\n          x += 1;\n          next = this.peek(x);\n        }\n\n        if (next !== \"}\") {\n          this.triggerAsync(\n            \"error\",\n            {\n              code: \"E016\",\n              line: this.line,\n              character: this.char,\n              data: [ \"Invalid Unicode escape sequence\" ]\n            },\n            checks,\n            hasUFlag\n          );\n        } else if (sequence.length > 2) {\n          sequence += \"}\";\n          body += sequence;\n          value += sequence;\n          index = x + 1;\n          return sequence;\n        }\n      }\n\n      if (char === \"p\" || char === \"P\") {\n        var y = index + 2;\n        sequence = \"\";\n        next = \"\";\n\n        if (this.peek(index + 1) === \"{\") {\n          next = this.peek(y);\n          while (next && next !== \"}\") {\n            sequence += next;\n            y += 1;\n            next = this.peek(y);\n          }\n        }\n\n        // Module loading is intentionally deferred as an optimization for\n        // Node.js users who do not use Unicode escape sequences.\n        if (!sequence || !require(\"./validate-unicode-escape-sequence\")(sequence)) {\n          this.triggerAsync(\n            \"error\",\n            {\n              code: \"E016\",\n              line: this.line,\n              character: this.char,\n              data: [ \"Invalid Unicode property escape sequence\" ]\n            },\n            checks,\n            hasUFlag\n          );\n        }\n\n        if (sequence) {\n          sequence = char + \"{\" + sequence + \"}\";\n          body += sequence;\n          value += sequence;\n          index = y + 1;\n\n          if (!state.inES9()) {\n            this.triggerAsync(\n              \"warning\",\n              {\n                code: \"W119\",\n                line: this.line,\n                character: this.char,\n                data: [ \"Unicode property escape\", \"9\" ]\n              },\n              checks,\n              hasUFlag\n            );\n          }\n\n          return sequence;\n        }\n      }\n\n      // Unexpected control character\n      if (char < \" \") {\n        malformed = true;\n        this.triggerAsync(\n          \"warning\",\n          {\n            code: \"W048\",\n            line: this.line,\n            character: this.char\n          },\n          checks,\n          function() { return true; }\n        );\n      }\n\n      // Unexpected escaped character\n      if (char === \"<\") {\n        malformed = true;\n        this.triggerAsync(\n          \"warning\",\n          {\n            code: \"W049\",\n            line: this.line,\n            character: this.char,\n            data: [ char ]\n          },\n          checks,\n          function() { return true; }\n        );\n      } else if (char === \"0\" && reg.decimalDigit.test(this.peek(index + 1))) {\n        this.triggerAsync(\n          \"error\",\n          {\n            code: \"E016\",\n            line: this.line,\n            character: this.char,\n            data: [ \"Invalid decimal escape sequence\" ]\n          },\n          checks,\n          hasUFlag\n        );\n      }\n\n      index += 1;\n      body += char;\n      value += char;\n\n      return char;\n    }.bind(this);\n\n    var checkQuantifier = function() {\n      var lookahead = index;\n      var lowerBound = \"\";\n      var upperBound = \"\";\n      var next;\n\n      next = this.peek(lookahead + 1);\n\n      while (reg.decimalDigit.test(next)) {\n        lookahead += 1;\n        lowerBound += next;\n        next = this.peek(lookahead + 1);\n      }\n\n      if (!lowerBound) {\n        return false;\n      }\n\n      if (next === \"}\") {\n        return true;\n      }\n\n      if (next !== \",\") {\n        return false;\n      }\n\n      lookahead += 1;\n      next = this.peek(lookahead + 1);\n\n      while (reg.decimalDigit.test(next)) {\n        lookahead += 1;\n        upperBound += next;\n        next = this.peek(lookahead + 1);\n      }\n\n      if (next !== \"}\") {\n        return false;\n      }\n\n      if (upperBound) {\n        return Number(lowerBound) <= Number(upperBound);\n      }\n\n      return true;\n    }.bind(this);\n\n    var translateUFlag = function(body) {\n      // The BMP character to use as a replacement for astral symbols when\n      // translating an ES6 \"u\"-flagged pattern to an ES5-compatible\n      // approximation.\n      // Note: replacing with '\\uFFFF' enables false positives in unlikely\n      // scenarios. For example, `[\\u{1044f}-\\u{10440}]` is an invalid pattern\n      // that would not be detected by this substitution.\n      var astralSubstitute = \"\\uFFFF\";\n\n      return body\n        // Replace every Unicode escape sequence with the equivalent BMP\n        // character or a constant ASCII code point in the case of astral\n        // symbols. (See the above note on `astralSubstitute` for more\n        // information.)\n        .replace(/\\\\u\\{([0-9a-fA-F]+)\\}|\\\\u([a-fA-F0-9]{4})/g, function($0, $1, $2) {\n          var codePoint = parseInt($1 || $2, 16);\n          var literal;\n\n          if (codePoint > 0x10FFFF) {\n            malformed = true;\n            this.trigger(\"error\", {\n              code: \"E016\",\n              line: this.line,\n              character: this.char,\n              data: [ char ]\n            });\n\n            return;\n          }\n          literal = String.fromCharCode(codePoint);\n\n          if (reg.regexpSyntaxChars.test(literal)) {\n            return $0;\n          }\n\n          if (codePoint <= 0xFFFF) {\n            return String.fromCharCode(codePoint);\n          }\n          return astralSubstitute;\n        }.bind(this))\n        // Replace each paired surrogate with a single ASCII symbol to avoid\n        // throwing on regular expressions that are only valid in combination\n        // with the \"u\" flag.\n        .replace(\n          /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n          astralSubstitute\n        );\n    }.bind(this);\n\n    // Regular expressions must start with '/'\n    if (!this.prereg || char !== \"/\") {\n      return null;\n    }\n\n    index += 1;\n    terminated = false;\n\n    // Try to get everything in between slashes. A couple of\n    // cases aside (see scanRegexpEscapeSequence) we don't really\n    // care whether the resulting expression is valid or not.\n    // We will check that later using the RegExp object.\n\n    while (index < length) {\n      // Because an iteration of this loop may terminate in a number of\n      // distinct locations, `isCharSetRange` is re-set at the onset of\n      // iteration.\n      isCharSetRange &= char === \"-\";\n      char = this.peek(index);\n      value += char;\n      body += char;\n\n      if (isCharSet) {\n        if (char === \"]\") {\n          if (this.peek(index - 1) !== \"\\\\\" || this.peek(index - 2) === \"\\\\\") {\n            isCharSet = false;\n          }\n        } else if (char === \"-\") {\n          isCharSetRange = true;\n        }\n      }\n\n      if (char === \"\\\\\") {\n        escapeSequence = scanRegexpEscapeSequence();\n\n        if (isCharSet && (this.peek(index) === \"-\" || isCharSetRange) &&\n          reg.regexpCharClasses.test(escapeSequence)) {\n          this.triggerAsync(\n            \"error\",\n            {\n              code: \"E016\",\n              line: this.line,\n              character: this.char,\n              data: [ \"Character class used in range\" ]\n            },\n            checks,\n            hasUFlag\n          );\n        }\n\n        continue;\n      }\n\n      if (isCharSet) {\n        index += 1;\n        continue;\n      }\n\n      if (char === \"{\" && !hasInvalidQuantifier) {\n        hasInvalidQuantifier = !checkQuantifier();\n      }\n\n      if (char === \"[\") {\n        isCharSet = true;\n        index += 1;\n        continue;\n      } else if (char === \"(\") {\n        isGroup = true;\n\n        if (this.peek(index + 1) === \"?\" &&\n          (this.peek(index + 2) === \"=\" || this.peek(index + 2) === \"!\")) {\n          isQuantifiable = true;\n        }\n      } else if (char === \")\") {\n        if (isQuantifiable) {\n          isQuantifiable = false;\n\n          if (reg.regexpQuantifiers.test(this.peek(index + 1))) {\n            this.triggerAsync(\n              \"error\",\n              {\n                code: \"E016\",\n                line: this.line,\n                character: this.char,\n                data: [ \"Quantified quantifiable\" ]\n              },\n              checks,\n              hasUFlag\n            );\n          }\n        } else {\n          groupCount += 1;\n        }\n\n        isGroup = false;\n      } else if (char === \"/\") {\n        body = body.substr(0, body.length - 1);\n        terminated = true;\n        index += 1;\n        break;\n      }\n\n      index += 1;\n    }\n\n    // A regular expression that was never closed is an\n    // error from which we cannot recover.\n\n    if (!terminated) {\n      this.trigger(\"error\", {\n        code: \"E015\",\n        line: this.line,\n        character: this.from\n      });\n\n      return void this.trigger(\"fatal\", {\n        line: this.line,\n        from: this.from\n      });\n    }\n\n    // Parse flags (if any).\n\n    while (index < length) {\n      char = this.peek(index);\n      if (!/[gimyus]/.test(char)) {\n        break;\n      }\n      if (char === \"y\") {\n        if (!state.inES6(true)) {\n          this.triggerAsync(\n            \"warning\",\n            {\n              code: \"W119\",\n              line: this.line,\n              character: this.char,\n              data: [ \"Sticky RegExp flag\", \"6\" ]\n            },\n            checks,\n            function() { return true; }\n          );\n        }\n      } else if (char === \"u\") {\n        if (!state.inES6(true)) {\n          this.triggerAsync(\n            \"warning\",\n            {\n              code: \"W119\",\n              line: this.line,\n              character: this.char,\n              data: [ \"Unicode RegExp flag\", \"6\" ]\n            },\n            checks,\n            function() { return true; }\n          );\n        }\n\n        var hasInvalidEscape = (function(groupReferences, groupCount, escapedChars, reg) {\n          var hasInvalidGroup = groupReferences.some(function(groupReference) {\n            if (groupReference > groupCount) {\n              return true;\n            }\n          });\n\n          if (hasInvalidGroup) {\n            return true;\n          }\n\n          return !escapedChars.split(\"\").every(function(escapedChar) {\n              return escapedChar === \"u\" ||\n                escapedChar === \"/\" ||\n                escapedChar === \"0\" ||\n                reg.regexpControlEscapes.test(escapedChar) ||\n                reg.regexpCharClasses.test(escapedChar) ||\n                reg.regexpSyntaxChars.test(escapedChar);\n            });\n        }(groupReferences, groupCount, escapedChars, reg));\n\n        if (hasInvalidEscape) {\n          malformedDesc = \"Invalid escape\";\n        } else if (hasInvalidQuantifier) {\n          malformedDesc = \"Invalid quantifier\";\n        }\n\n        body = translateUFlag(body);\n      } else if (char === \"s\") {\n        if (!state.inES9()) {\n          this.triggerAsync(\n            \"warning\",\n            {\n              code: \"W119\",\n              line: this.line,\n              character: this.char,\n              data: [ \"DotAll RegExp flag\", \"9\" ]\n            },\n            checks,\n            function() { return true; }\n          );\n        }\n        if (value.indexOf(\"s\") > -1) {\n          malformedDesc = \"Duplicate RegExp flag\";\n        }\n      } else {\n        es5Flags += char;\n      }\n\n      if (allFlags.indexOf(char) > -1) {\n        malformedDesc = \"Duplicate RegExp flag\";\n      }\n      allFlags += char;\n\n      value += char;\n      allFlags += char;\n      index += 1;\n    }\n\n    if (allFlags.indexOf(\"u\") === -1) {\n      this.triggerAsync(\"warning\", {\n        code: \"W147\",\n        line: this.line,\n        character: this.char\n      }, checks, function() { return state.option.regexpu; });\n    }\n\n    // Check regular expression for correctness.\n\n    try {\n      new RegExp(body, es5Flags);\n    } catch (err) {\n      /**\n       * Because JSHint relies on the current engine's RegExp parser to\n       * validate RegExp literals, the description (exposed as the \"data\"\n       * property on the error object) is platform dependent.\n       */\n      malformedDesc = err.message;\n    }\n\n    if (malformedDesc) {\n      malformed = true;\n      this.trigger(\"error\", {\n        code: \"E016\",\n        line: this.line,\n        character: this.char,\n        data: [ malformedDesc ]\n      });\n    } else if (allFlags.indexOf(\"s\") > -1 && !reg.regexpDot.test(body)) {\n      this.trigger(\"warning\", {\n        code: \"W148\",\n        line: this.line,\n        character: this.char\n      });\n    }\n\n    return {\n      type: Token.RegExp,\n      value: value,\n      isMalformed: malformed\n    };\n  },\n\n  /*\n   * Scan for any occurrence of non-breaking spaces. Non-breaking spaces\n   * can be mistakenly typed on OS X with option-space. Non UTF-8 web\n   * pages with non-breaking pages produce syntax errors.\n   */\n  scanNonBreakingSpaces: function() {\n    return state.option.nonbsp ?\n      this.input.search(/(\\u00A0)/) : -1;\n  },\n\n  /*\n   * Produce the next raw token or return 'null' if no tokens can be matched.\n   * This method skips over all space characters.\n   */\n  next: function(checks) {\n    this.from = this.char;\n\n    // Move to the next non-space character.\n    while (reg.whitespace.test(this.peek())) {\n      this.from += 1;\n      this.skip();\n    }\n\n    // Methods that work with multi-line structures and move the\n    // character pointer.\n\n    var match = this.scanComments(checks) ||\n      this.scanStringLiteral(checks) ||\n      this.scanTemplateLiteral(checks);\n\n    if (match) {\n      return match;\n    }\n\n    // Methods that don't move the character pointer.\n\n    match =\n      this.scanRegExp(checks) ||\n      this.scanPunctuator() ||\n      this.scanKeyword() ||\n      this.scanIdentifier(checks) ||\n      this.scanNumericLiteral(checks);\n\n    if (match) {\n      this.skip(match.tokenLength || match.value.length);\n      return match;\n    }\n\n    // No token could be matched, give up.\n\n    return null;\n  },\n\n  /*\n   * Switch to the next line and reset all char pointers. Once\n   * switched, this method also checks for other minor warnings.\n   */\n  nextLine: function(checks) {\n    var char;\n\n    if (this.line >= this.getLines().length) {\n      return false;\n    }\n\n    this.input = this.getLines()[this.line];\n    this.line += 1;\n    this.char = 1;\n    this.from = 1;\n\n    var inputTrimmed = this.input.trim();\n\n    var startsWith = function() {\n      return _.some(arguments, function(prefix) {\n        return inputTrimmed.indexOf(prefix) === 0;\n      });\n    };\n\n    var endsWith = function() {\n      return _.some(arguments, function(suffix) {\n        return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1;\n      });\n    };\n\n    // If we are ignoring linter errors, replace the input with empty string\n    // if it doesn't already at least start or end a multi-line comment\n    if (this.ignoringLinterErrors === true) {\n      if (!startsWith(\"/*\", \"//\") && !(this.inComment && endsWith(\"*/\"))) {\n        this.input = \"\";\n      }\n    }\n\n    char = this.scanNonBreakingSpaces();\n    if (char >= 0) {\n      this.triggerAsync(\n        \"warning\",\n        { code: \"W125\", line: this.line, character: char + 1 },\n        checks,\n        function() { return true; }\n      );\n    }\n\n    this.input = this.input.replace(/\\t/g, state.tab);\n\n    // If there is a limit on line length, warn when lines get too\n    // long.\n\n    if (!this.ignoringLinterErrors && state.option.maxlen &&\n      state.option.maxlen < this.input.length) {\n      var inComment = this.inComment ||\n        startsWith.call(inputTrimmed, \"//\") ||\n        startsWith.call(inputTrimmed, \"/*\");\n\n      var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed);\n\n      if (shouldTriggerError) {\n        this.triggerAsync(\n          \"warning\",\n          { code: \"W101\", line: this.line, character: this.input.length },\n          checks,\n          function() { return true; }\n        );\n      }\n    }\n\n    return true;\n  },\n\n  /*\n   * Produce the next token. This function is called by advance() to get\n   * the next token. It returns a token in a JSLint-compatible format.\n   */\n  token: function() {\n    /*jshint loopfunc:true */\n    var checks = asyncTrigger();\n    var token;\n\n    // Produce a token object.\n    var create = function(type, value, isProperty, token) {\n      /*jshint validthis:true */\n      var obj;\n\n      if (type !== \"(endline)\" && type !== \"(end)\") {\n        this.prereg = false;\n      }\n\n      if (type === \"(punctuator)\") {\n        switch (value) {\n        case \".\":\n        case \")\":\n        case \"~\":\n        case \"#\":\n        case \"]\":\n        case \"}\":\n        case \"++\":\n        case \"--\":\n          this.prereg = false;\n          break;\n        default:\n          this.prereg = true;\n        }\n\n        obj = Object.create(state.syntax[value] || state.syntax[\"(error)\"]);\n      }\n\n      if (type === \"(identifier)\") {\n        if (value === \"return\" || value === \"case\" || value === \"yield\" ||\n            value === \"typeof\" || value === \"instanceof\" || value === \"void\" ||\n            value === \"await\" || value === \"new\" || value === \"delete\" ||\n            value === \"default\" || value === \"extends\") {\n          this.prereg = true;\n        }\n\n        if (_.has(state.syntax, value)) {\n          obj = Object.create(state.syntax[value] || state.syntax[\"(error)\"]);\n        }\n      }\n\n      if (type === \"(template)\" || type === \"(template middle)\") {\n        this.prereg = true;\n      }\n\n      if (!obj) {\n        obj = Object.create(state.syntax[type]);\n      }\n\n      obj.identifier = (type === \"(identifier)\");\n      obj.type = obj.type || type;\n      obj.value = value;\n      obj.line = this.line;\n      obj.character = this.char;\n      obj.from = this.from;\n      if (obj.identifier && token) obj.raw_text = token.text || token.value;\n      if (token && token.startLine && token.startLine !== this.line) {\n        obj.startLine = token.startLine;\n      }\n      if (token && token.context) {\n        // Context of current token\n        obj.context = token.context;\n      }\n      if (token && token.depth) {\n        // Nested template depth\n        obj.depth = token.depth;\n      }\n      if (token && token.isUnclosed) {\n        // Mark token as unclosed string / template literal\n        obj.isUnclosed = token.isUnclosed;\n      }\n\n      if (isProperty && obj.identifier) {\n        obj.isProperty = isProperty;\n      }\n\n      obj.check = checks.check;\n\n      return obj;\n    }.bind(this);\n\n    for (;;) {\n      if (!this.input.length) {\n        if (this.nextLine(checks)) {\n          return create(\"(endline)\", \"\");\n        }\n\n        if (this.exhausted) {\n          return null;\n        }\n\n        this.exhausted = true;\n        return create(\"(end)\", \"\");\n      }\n\n      token = this.next(checks);\n\n      if (!token) {\n        if (this.input.length) {\n          // Unexpected character.\n          this.trigger(\"error\", {\n            code: \"E024\",\n            line: this.line,\n            character: this.char,\n            data: [ this.peek() ]\n          });\n\n          this.input = \"\";\n        }\n\n        continue;\n      }\n\n      switch (token.type) {\n      case Token.StringLiteral:\n        this.triggerAsync(\"String\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          startLine: token.startLine,\n          startChar: token.startChar,\n          value: token.value,\n          quote: token.quote\n        }, checks, function() { return true; });\n\n        return create(\"(string)\", token.value, null, token);\n\n      case Token.TemplateHead:\n        this.trigger(\"TemplateHead\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          startLine: token.startLine,\n          startChar: token.startChar,\n          value: token.value\n        });\n        return create(\"(template)\", token.value, null, token);\n\n      case Token.TemplateMiddle:\n        this.trigger(\"TemplateMiddle\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          startLine: token.startLine,\n          startChar: token.startChar,\n          value: token.value\n        });\n        return create(\"(template middle)\", token.value, null, token);\n\n      case Token.TemplateTail:\n        this.trigger(\"TemplateTail\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          startLine: token.startLine,\n          startChar: token.startChar,\n          value: token.value\n        });\n        return create(\"(template tail)\", token.value, null, token);\n\n      case Token.NoSubstTemplate:\n        this.trigger(\"NoSubstTemplate\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          startLine: token.startLine,\n          startChar: token.startChar,\n          value: token.value\n        });\n        return create(\"(no subst template)\", token.value, null, token);\n\n      case Token.Identifier:\n        this.triggerAsync(\"Identifier\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          name: token.value,\n          raw_name: token.text,\n          isProperty: state.tokens.curr.id === \".\"\n        }, checks, function() { return true; });\n\n        /* falls through */\n      case Token.Keyword:\n        return create(\"(identifier)\", token.value, state.tokens.curr.id === \".\", token);\n\n      case Token.NumericLiteral:\n        if (token.isMalformed) {\n          this.trigger(\"error\", {\n            code: \"E067\",\n            line: this.line,\n            character: this.char,\n            data: [ token.value ]\n          });\n        }\n\n        this.triggerAsync(\"warning\", {\n          code: \"W114\",\n          line: this.line,\n          character: this.char,\n          data: [ \"0x-\" ]\n        }, checks, function() { return token.base === 16 && state.jsonMode; });\n\n        this.triggerAsync(\"warning\", {\n          code: \"W115\",\n          line: this.line,\n          character: this.char\n        }, checks, function() {\n          return state.isStrict() && token.base === 8 && token.isLegacy;\n        });\n\n        this.triggerAsync(\"error\", {\n          code: \"E068\",\n          line: this.line,\n          character: this.char\n        }, checks, function() {\n          return state.isStrict() && token.isNonOctal;\n        });\n\n        this.trigger(\"Number\", {\n          line: this.line,\n          char: this.char,\n          from: this.from,\n          value: token.value,\n          base: token.base,\n          isMalformed: token.isMalformed\n        });\n\n        return create(\"(number)\", token.value);\n\n      case Token.RegExp:\n        return create(\"(regexp)\", token.value);\n\n      case Token.Comment:\n        if (token.isSpecial) {\n          return {\n            id: '(comment)',\n            value: token.value,\n            body: token.body,\n            type: token.commentType,\n            isSpecial: token.isSpecial,\n            line: this.line,\n            character: this.char,\n            from: this.from\n          };\n        }\n\n        break;\n\n      default:\n        return create(\"(punctuator)\", token.value);\n      }\n    }\n  }\n};\n\nexports.Lexer = Lexer;\nexports.Context = Context;\n\n},{\"../data/ascii-identifier-data.js\":1,\"../data/es5-identifier-names.js\":2,\"../data/non-ascii-identifier-part-only.js\":3,\"../data/non-ascii-identifier-start.js\":4,\"./reg.js\":22,\"./state.js\":24,\"./validate-unicode-escape-sequence\":26,\"events\":11,\"lodash\":12}],18:[function(require,module,exports){\n\"use strict\";\n\nvar _ = require(\"lodash\");\n\nvar errors = {\n  // JSHint options\n  E001: \"Bad {a}option: '{b}'.\",\n  E002: \"Bad option value.\",\n\n  // JSHint input\n  E003: \"Expected a JSON value.\",\n  E004: \"Input is neither a string nor an array of strings.\",\n  E005: \"Input is empty.\",\n  E006: \"Unexpected early end of program.\",\n\n  // Strict mode\n  E007: \"Missing \\\"use strict\\\" statement.\",\n  E008: \"Strict violation.\",\n  E009: \"Option 'validthis' can't be used in a global scope.\",\n  E010: \"'with' is not allowed in strict mode.\",\n\n  // Constants\n  E011: \"'{a}' has already been declared.\",\n  E012: \"const '{a}' is initialized to 'undefined'.\",\n  E013: \"Attempting to override '{a}' which is a constant.\",\n\n  // Regular expressions\n  E014: \"A regular expression literal can be confused with '/='.\",\n  E015: \"Unclosed regular expression.\",\n  E016: \"Invalid regular expression.\",\n\n  // Tokens\n  E017: \"Unclosed comment.\",\n  E018: \"Unbegun comment.\",\n  E019: \"Unmatched '{a}'.\",\n  E020: \"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.\",\n  E021: \"Expected '{a}' and instead saw '{b}'.\",\n  E022: \"Line breaking error '{a}'.\",\n  E023: \"Missing '{a}'.\",\n  E024: \"Unexpected '{a}'.\",\n  E025: \"Missing ':' on a case clause.\",\n  E026: \"Missing '}' to match '{' from line {a}.\",\n  E027: \"Missing ']' to match '[' from line {a}.\",\n  E028: \"Illegal comma.\",\n  E029: \"Unclosed string.\",\n\n  // Everything else\n  E030: \"Expected an identifier and instead saw '{a}'.\",\n  E031: \"Bad assignment.\", // FIXME: Rephrase\n  E032: \"Expected a small integer or 'false' and instead saw '{a}'.\",\n  E033: \"Expected an operator and instead saw '{a}'.\",\n  E034: \"get/set are ES5 features.\",\n  E035: \"Missing property name.\",\n  E036: \"Expected to see a statement and instead saw a block.\",\n  E037: null,\n  E038: null,\n  E039: \"Function declarations are not invocable. Wrap the whole function invocation in parens.\",\n  E040: \"Each value should have its own case label.\",\n  E041: \"Unrecoverable syntax error.\",\n  E042: \"Stopping.\",\n  E043: \"Too many errors.\",\n  E044: null,\n  E045: \"Invalid for each loop.\",\n  E046: \"Yield expressions may only occur within generator functions.\",\n  E047: null,\n  E048: \"{a} declaration not directly within block.\",\n  E049: \"A {a} cannot be named '{b}'.\",\n  E050: \"Mozilla requires the yield expression to be parenthesized here.\",\n  E051: null,\n  E052: \"Unclosed template literal.\",\n  E053: \"{a} declarations are only allowed at the top level of module scope.\",\n  E054: \"Class properties must be methods. Expected '(' but instead saw '{a}'.\",\n  E055: \"The '{a}' option cannot be set after any executable code.\",\n  E056: \"'{a}' was used before it was declared, which is illegal for '{b}' variables.\",\n  E057: \"Invalid meta property: '{a}.{b}'.\",\n  E058: \"Missing semicolon.\",\n  E059: \"Incompatible values for the '{a}' and '{b}' linting options.\",\n  E060: \"Non-callable values cannot be used as the second operand to instanceof.\",\n  E061: \"Invalid position for 'yield' expression (consider wrapping in parenthesis).\",\n  E062: \"Rest parameter does not a support default value.\",\n  E063: \"Super property may only be used within method bodies.\",\n  E064: \"Super call may only be used within class method bodies.\",\n  E065: \"Functions defined outside of strict mode with non-simple parameter lists may not \" +\n    \"enable strict mode.\",\n  E066: \"Asynchronous iteration is only available with for-of loops.\",\n  E067: \"Malformed numeric literal: '{a}'.\",\n  E068: \"Decimals with leading zeros are not allowed in strict mode.\",\n  E069: \"Duplicate exported binding: '{a}'.\",\n  E070: \"import.meta may only be used in module code.\"\n};\n\nvar warnings = {\n  W001: \"'hasOwnProperty' is a really bad name.\",\n  W002: \"Value of '{a}' may be overwritten in IE 8 and earlier.\",\n  W003: \"'{a}' was used before it was defined.\",\n  W004: \"'{a}' is already defined.\",\n  W005: \"A dot following a number can be confused with a decimal point.\",\n  W006: \"Confusing minuses.\",\n  W007: \"Confusing plusses.\",\n  W008: \"A leading decimal point can be confused with a dot: '{a}'.\",\n  W009: \"The array literal notation [] is preferable.\",\n  W010: \"The object literal notation {} is preferable.\",\n  W011: null,\n  W012: null,\n  W013: null,\n  W014: \"Misleading line break before '{a}'; readers may interpret this as an expression boundary.\",\n  W015: null,\n  W016: \"Unexpected use of '{a}'.\",\n  W017: \"Bad operand.\",\n  W018: \"Confusing use of '{a}'.\",\n  W019: \"Use the isNaN function to compare with NaN.\",\n  W020: \"Read only.\",\n  W021: \"Reassignment of '{a}', which is a {b}. \" +\n    \"Use 'var' or 'let' to declare bindings that may change.\",\n  W022: \"Do not assign to the exception parameter.\",\n  W023: null,\n  W024: \"Expected an identifier and instead saw '{a}' (a reserved word).\",\n  W025: \"Missing name in function declaration.\",\n  W026: \"Inner functions should be listed at the top of the outer function.\",\n  W027: \"Unreachable '{a}' after '{b}'.\",\n  W028: \"Label '{a}' on {b} statement.\",\n  W030: \"Expected an assignment or function call and instead saw an expression.\",\n  W031: \"Do not use 'new' for side effects.\",\n  W032: \"Unnecessary semicolon.\",\n  W033: \"Missing semicolon.\",\n  W034: \"Unnecessary directive \\\"{a}\\\".\",\n  W035: \"Empty block.\",\n  W036: \"Unexpected /*member '{a}'.\",\n  W037: \"'{a}' is a statement label.\",\n  W038: \"'{a}' used out of scope.\",\n  W039: null,\n  W040: \"If a strict mode function is executed using function invocation, \" +\n    \"its 'this' value will be undefined.\",\n  W041: null,\n  W042: \"Avoid EOL escaping.\",\n  W043: \"Bad escaping of EOL. Use option multistr if needed.\",\n  W044: \"Bad or unnecessary escaping.\", /* TODO(caitp): remove W044 */\n  W045: \"Value described by numeric literal cannot be accurately \" +\n    \"represented with a number value: '{a}'.\",\n  W046: \"Don't use extra leading zeros '{a}'.\",\n  W047: \"A trailing decimal point can be confused with a dot: '{a}'.\",\n  W048: \"Unexpected control character in regular expression.\",\n  W049: \"Unexpected escaped character '{a}' in regular expression.\",\n  W050: \"JavaScript URL.\",\n  W051: \"Variables should not be deleted.\",\n  W052: \"Unexpected '{a}'.\",\n  W053: \"Do not use {a} as a constructor.\",\n  W054: \"The Function constructor is a form of eval.\",\n  W055: \"A constructor name should start with an uppercase letter.\",\n  W056: \"Bad constructor.\",\n  W057: \"Weird construction. Is 'new' necessary?\",\n  W058: \"Missing '()' invoking a constructor.\",\n  W059: \"Avoid arguments.{a}.\",\n  W060: \"document.write can be a form of eval.\",\n  W061: \"eval can be harmful.\",\n  W062: \"Wrap an immediate function invocation in parens \" +\n    \"to assist the reader in understanding that the expression \" +\n    \"is the result of a function, and not the function itself.\",\n  W063: \"Math is not a function.\",\n  W064: \"Missing 'new' prefix when invoking a constructor.\",\n  W065: \"Missing radix parameter.\",\n  W066: \"Implied eval. Consider passing a function instead of a string.\",\n  W067: \"Unorthodox function invocation.\",\n  W068: \"Wrapping non-IIFE function literals in parens is unnecessary.\",\n  W069: \"['{a}'] is better written in dot notation.\",\n  W070: \"Extra comma. (it breaks older versions of IE)\",\n  W071: \"This function has too many statements. ({a})\",\n  W072: \"This function has too many parameters. ({a})\",\n  W073: \"Blocks are nested too deeply. ({a})\",\n  W074: \"This function's cyclomatic complexity is too high. ({a})\",\n  W075: \"Duplicate {a} '{b}'.\",\n  W076: \"Unexpected parameter '{a}' in get {b} function.\",\n  W077: \"Expected a single parameter in set {a} function.\",\n  W078: \"Setter is defined without getter.\",\n  W079: \"Redefinition of '{a}'.\",\n  W080: \"It's not necessary to initialize '{a}' to 'undefined'.\",\n  W081: null,\n  W082: \"Function declarations should not be placed in blocks. \" +\n    \"Use a function expression or move the statement to the top of \" +\n    \"the outer function.\",\n  W083: \"Functions declared within loops referencing an outer scoped \" +\n    \"variable may lead to confusing semantics. ({a})\",\n  W084: \"Expected a conditional expression and instead saw an assignment.\",\n  W085: \"Don't use 'with'.\",\n  W086: \"Expected a 'break' statement before '{a}'.\",\n  W087: \"Forgotten 'debugger' statement?\",\n  W088: \"Creating global 'for' variable. Should be 'for (var {a} ...'.\",\n  W089: \"The body of a for in should be wrapped in an if statement to filter \" +\n    \"unwanted properties from the prototype.\",\n  W090: \"'{a}' is not a statement label.\",\n  W091: null,\n  W093: \"Did you mean to return a conditional instead of an assignment?\",\n  W094: \"Unexpected comma.\",\n  W095: \"Expected a string and instead saw {a}.\",\n  W096: \"The '{a}' key may produce unexpected results.\",\n  W097: \"Use the function form of \\\"use strict\\\".\",\n  W098: \"'{a}' is defined but never used.\",\n  W099: null,\n  W100: null,\n  W101: \"Line is too long.\",\n  W102: null,\n  W103: \"The '{a}' property is deprecated.\",\n  W104: \"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz).\",\n  W105: null,\n  W106: \"Identifier '{a}' is not in camel case.\",\n  W107: \"Script URL.\",\n  W108: \"Strings must use doublequote.\",\n  W109: \"Strings must use singlequote.\",\n  W110: \"Mixed double and single quotes.\",\n  W112: \"Unclosed string.\",\n  W113: \"Control character in string: {a}.\",\n  W114: \"Avoid {a}.\",\n  W115: \"Octal literals are not allowed in strict mode.\",\n  W116: \"Expected '{a}' and instead saw '{b}'.\",\n  W117: \"'{a}' is not defined.\",\n  W118: \"'{a}' is only available in Mozilla JavaScript extensions (use moz option).\",\n  W119: \"'{a}' is only available in ES{b} (use 'esversion: {b}').\",\n  W120: \"You might be leaking a variable ({a}) here.\",\n  W121: \"Extending prototype of native object: '{a}'.\",\n  W122: \"Invalid typeof value '{a}'\",\n  W123: \"'{a}' is already defined in outer scope.\",\n  W124: \"A generator function should contain at least one yield expression.\",\n  W125: \"This line contains non-breaking spaces: http://jshint.com/docs/options/#nonbsp\",\n  W126: \"Unnecessary grouping operator.\",\n  W127: \"Unexpected use of a comma operator.\",\n  W128: \"Empty array elements require elision=true.\",\n  W129: \"'{a}' is defined in a future version of JavaScript. Use a \" +\n    \"different variable name to avoid migration issues.\",\n  W130: \"Invalid element after rest element.\",\n  W131: \"Invalid parameter after rest parameter.\",\n  W132: \"`var` declarations are forbidden. Use `let` or `const` instead.\",\n  W133: \"Invalid for-{a} loop left-hand-side: {b}.\",\n  W134: \"The '{a}' option is only available when linting ECMAScript {b} code.\",\n  W135: \"{a} may not be supported by non-browser environments.\",\n  W136: \"'{a}' must be in function scope.\",\n  W137: \"Empty destructuring: this is unnecessary and can be removed.\",\n  W138: \"Regular parameters should not come after default parameters.\",\n  W139: \"Function expressions should not be used as the second operand to instanceof.\",\n  W140: \"Missing comma.\",\n  W141: \"Empty {a}: this is unnecessary and can be removed.\",\n  W142: \"Empty {a}: consider replacing with `import '{b}';`.\",\n  W143: \"Assignment to properties of a mapped arguments object may cause \" +\n    \"unexpected changes to formal parameters.\",\n  W144: \"'{a}' is a non-standard language feature. Enable it using the '{b}' unstable option.\",\n  W145: \"Superfluous 'case' clause.\",\n  W146: \"Unnecessary `await` expression.\",\n  W147: \"Regular expressions should include the 'u' flag.\",\n  W148: \"Unnecessary RegExp 's' flag.\"\n};\n\nvar info = {\n  I001: \"Comma warnings can be turned off with 'laxcomma'.\",\n  I002: null,\n  I003: \"ES5 option is now set per default\"\n};\n\nexports.errors = {};\nexports.warnings = {};\nexports.info = {};\n\n_.each(errors, function(desc, code) {\n  exports.errors[code] = { code: code, desc: desc };\n});\n\n_.each(warnings, function(desc, code) {\n  exports.warnings[code] = { code: code, desc: desc };\n});\n\n_.each(info, function(desc, code) {\n  exports.info[code] = { code: code, desc: desc };\n});\n\n},{\"lodash\":12}],19:[function(require,module,exports){\n/**\n * The NameStack class is used to approximate function name inference as\n * introduced by ECMAScript 2015. In that edition, the `name` property of\n * function objects is set according to the function's syntactic form. For\n * certain forms, this value depends on values available to the runtime during\n * execution. For example:\n *\n *     var fnName = function() {};\n *\n * In the program code above, the function object's `name` property is set to\n * `\"fnName\"` during execution.\n *\n * This general \"name inference\" behavior extends to a number of additional\n * syntactic forms, not all of which can be implemented statically. `NameStack`\n * is a support class representing a \"best-effort\" attempt to implement the\n * specified behavior in cases where this may be done statically.\n *\n * For more information on this behavior, see the following blog post:\n * https://bocoup.com/blog/whats-in-a-function-name\n */\n\"use strict\";\n\nfunction NameStack() {\n  this._stack = [];\n}\n\nObject.defineProperty(NameStack.prototype, \"length\", {\n  get: function() {\n    return this._stack.length;\n  }\n});\n\n/**\n * Create a new entry in the stack. Useful for tracking names across\n * expressions.\n */\nNameStack.prototype.push = function() {\n  this._stack.push(null);\n};\n\n/**\n * Discard the most recently-created name on the stack.\n */\nNameStack.prototype.pop = function() {\n  this._stack.pop();\n};\n\n/**\n * Update the most recent name on the top of the stack.\n *\n * @param {object} token The token to consider as the source for the most\n *                       recent name.\n */\nNameStack.prototype.set = function(token) {\n  this._stack[this.length - 1] = token;\n};\n\n/**\n * Generate a string representation of the most recent name.\n *\n * @returns {string}\n */\nNameStack.prototype.infer = function() {\n  var nameToken = this._stack[this.length - 1];\n  var prefix = \"\";\n  var type;\n\n  // During expected operation, the topmost entry on the stack will only\n  // reflect the current function's name when the function is declared without\n  // the `function` keyword (i.e. for in-line accessor methods). In other\n  // cases, the `function` expression itself will introduce an empty entry on\n  // the top of the stack, and this should be ignored.\n  if (!nameToken || nameToken.type === \"class\") {\n    nameToken = this._stack[this.length - 2];\n  }\n\n  if (!nameToken) {\n    return \"(empty)\";\n  }\n\n  type = nameToken.type;\n\n  if (type !== \"(string)\" && type !== \"(number)\" && type !== \"(identifier)\" && type !== \"default\") {\n    return \"(expression)\";\n  }\n\n  if (nameToken.accessorType) {\n    prefix = nameToken.accessorType + \" \";\n  }\n\n  return prefix + nameToken.value;\n};\n\nmodule.exports = NameStack;\n\n},{}],20:[function(require,module,exports){\n\"use strict\";\n\n// These are the JSHint boolean options.\nexports.bool = {\n  enforcing: {\n\n    /**\n     * This option prohibits the use of bitwise operators such as `^` (XOR),\n     * `|` (OR) and others. Bitwise operators are very rare in JavaScript\n     * programs and quite often `&` is simply a mistyped `&&`.\n     */\n    bitwise     : true,\n\n    /**\n     *\n     * This options prohibits overwriting prototypes of native objects such as\n     * `Array`, `Date` and so on.\n     *\n     *     // jshint freeze:true\n     *     Array.prototype.count = function (value) { return 4; };\n     *     // -> Warning: Extending prototype of native object: 'Array'.\n     */\n    freeze      : true,\n\n    /**\n     * This option allows you to force all variable names to use either\n     * camelCase style or UPPER_CASE with underscores.\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    camelcase   : true,\n\n    /**\n     * This option requires you to always put curly braces around blocks in\n     * loops and conditionals. JavaScript allows you to omit curly braces when\n     * the block consists of only one statement, for example:\n     *\n     *     while (day)\n     *       shuffle();\n     *\n     * However, in some circumstances, it can lead to bugs (you'd think that\n     * `sleep()` is a part of the loop while in reality it is not):\n     *\n     *     while (day)\n     *       shuffle();\n     *       sleep();\n     */\n    curly       : true,\n\n    /**\n     * This options prohibits the use of `==` and `!=` in favor of `===` and\n     * `!==`. The former try to coerce values before comparing them which can\n     * lead to some unexpected results. The latter don't do any coercion so\n     * they are generally safer. If you would like to learn more about type\n     * coercion in JavaScript, we recommend [Truth, Equality and\n     * JavaScript](http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/)\n     * by Angus Croll.\n     */\n    eqeqeq      : true,\n\n    /**\n     * This option enables warnings about the use of identifiers which are\n     * defined in future versions of JavaScript. Although overwriting them has\n     * no effect in contexts where they are not implemented, this practice can\n     * cause issues when migrating codebases to newer versions of the language.\n     */\n    futurehostile: true,\n\n    /**\n     * This option tells JSHint that your code needs to adhere to ECMAScript 3\n     * specification. Use this option if you need your program to be executable\n     * in older browsers—such as Internet Explorer 6/7/8/9—and other legacy\n     * JavaScript environments.\n     *\n     * @deprecated Use `esversion: 3` instead.\n     */\n    es3         : true,\n\n    /**\n     * This option enables syntax first defined in [the ECMAScript 5.1\n     * specification](http://es5.github.io/). This includes allowing reserved\n     * keywords as object properties.\n     *\n     * @deprecated Use `esversion: 5` instead.\n     */\n    es5         : true,\n\n    /**\n     * This option requires all `for in` loops to filter object's items. The\n     * for in statement allows for looping through the names of all of the\n     * properties of an object including those inherited through the prototype\n     * chain. This behavior can lead to unexpected items in your object so it\n     * is generally safer to always filter inherited properties out as shown in\n     * the example:\n     *\n     *     for (key in obj) {\n     *       if (obj.hasOwnProperty(key)) {\n     *         // We are sure that obj[key] belongs to the object and was not inherited.\n     *       }\n     *     }\n     *\n     * For more in-depth understanding of `for in` loops in JavaScript, read\n     * [Exploring JavaScript for-in\n     * loops](http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/)\n     * by Angus Croll.\n     */\n    forin       : true,\n\n    /**\n     * This option prohibits the use of immediate function invocations without\n     * wrapping them in parentheses. Wrapping parentheses assists readers of\n     * your code in understanding that the expression is the result of a\n     * function, and not the function itself.\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    immed       : true,\n\n    /**\n     * This option prohibits unnecessary clauses within `switch` statements,\n     * e.g.\n     *\n     *     switch (x) {\n     *       case 1:\n     *       default:\n     *         z();\n     *     }\n     *\n     * While clauses like these are techincally valid, they do not effect\n     * program behavior and may indicate an erroneous refactoring.\n     */\n    leanswitch  : true,\n\n    /**\n     * This option requires you to capitalize names of constructor functions.\n     * Capitalizing functions that are intended to be used with `new` operator\n     * is just a convention that helps programmers to visually distinguish\n     * constructor functions from other types of functions to help spot\n     * mistakes when using `this`.\n     *\n     * Not doing so won't break your code in any browsers or environments but\n     * it will be a bit harder to figure out—by reading the code—if the\n     * function was supposed to be used with or without new. And this is\n     * important because when the function that was intended to be used with\n     * `new` is used without it, `this` will point to the global object instead\n     * of a new object.\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    newcap      : true,\n\n    /**\n     * This option prohibits the use of `arguments.caller` and\n     * `arguments.callee`.  Both `.caller` and `.callee` make quite a few\n     * optimizations impossible so they were deprecated in future versions of\n     * JavaScript. In fact, ECMAScript 5 forbids the use of `arguments.callee`\n     * in strict mode.\n     */\n    noarg       : true,\n\n    /**\n     * This option prohibits the use of the comma operator. When misused, the\n     * comma operator can obscure the value of a statement and promote\n     * incorrect code.\n     */\n    nocomma     : true,\n\n    /**\n     * This option warns when you have an empty block in your code. JSLint was\n     * originally warning for all empty blocks and we simply made it optional.\n     * There were no studies reporting that empty blocks in JavaScript break\n     * your code in any way.\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    noempty     : true,\n\n    /**\n     * This option warns about \"non-breaking whitespace\" characters. These\n     * characters can be entered with option-space on Mac computers and have a\n     * potential of breaking non-UTF8 web pages.\n     */\n    nonbsp      : true,\n\n    /**\n     * This option prohibits the use of constructor functions for side-effects.\n     * Some people like to call constructor functions without assigning its\n     * result to any variable:\n     *\n     *     new MyConstructor();\n     *\n     * There is no advantage in this approach over simply calling\n     * `MyConstructor` since the object that the operator `new` creates isn't\n     * used anywhere so you should generally avoid constructors like this one.\n     */\n    nonew       : true,\n\n\n    /**\n     * Async functions resolve on their return value. In most cases, this makes\n     * returning the result of an AwaitExpression (which is itself a Promise\n     * instance) unnecessary. For clarity, it's often preferable to return the\n     * result of the asynchronous operation directly. The notable exception is\n     * within the `try` clause of a TryStatement--for more, see \"await vs\n     * return vs return await\":\n     *\n     * https://jakearchibald.com/2017/await-vs-return-vs-return-await/\n     */\n    noreturnawait: true,\n\n    /**\n     * This option enables warnings for regular expressions which do not\n     * include the \"u\" flag. The \"u\" flag extends support for Unicode and also\n     * enables more strict parsing rules. JSHint will enforce these rules even\n     * if it is executed in a JavaScript engine which does not support the \"u\"\n     * flag.\n     */\n    regexpu     : true,\n\n    /**\n     * This option prohibits the use of explicitly undeclared variables. This\n     * option is very useful for spotting leaking and mistyped variables.\n     *\n     *     // jshint undef:true\n     *\n     *     function test() {\n     *       var myVar = 'Hello, World';\n     *       console.log(myvar); // Oops, typoed here. JSHint with undef will complain\n     *     }\n     *\n     * If your variable is defined in another file, you can use the `global`\n     * directive to tell JSHint about it.\n     */\n    undef       : true,\n\n    /**\n     * This option prohibits the use of the grouping operator when it is not\n     * strictly required. Such usage commonly reflects a misunderstanding of\n     * unary operators, for example:\n     *\n     *     // jshint singleGroups: true\n     *\n     *     delete(obj.attr); // Warning: Unnecessary grouping operator.\n     */\n    singleGroups: false,\n\n    /**\n     * When set to true, the use of VariableStatements are forbidden.\n     * For example:\n     *\n     *     // jshint varstmt: true\n     *\n     *     var a; // Warning: `var` declarations are forbidden. Use `let` or `const` instead.\n     */\n    varstmt: false,\n\n    /**\n     * This option is a short hand for the most strict JSHint configuration as\n     * available in JSHint version 2.6.3. It enables all enforcing options and\n     * disables all relaxing options that were defined in that release.\n     *\n     * @deprecated The option cannot be maintained without automatically opting\n     *             users in to new features. This can lead to unexpected\n     *             warnings/errors in when upgrading between minor versions of\n     *             JSHint.\n     */\n    enforceall : false,\n\n    /**\n     * This option warns when a comma is not placed after the last element in an\n     * array or object literal. Due to bugs in old versions of IE, trailing\n     * commas used to be discouraged, but since ES5 their semantics were\n     * standardized. (See\n     * [#11.1.4](http://www.ecma-international.org/ecma-262/5.1/#sec-11.1.4) and\n     * [#11.1.5](http://www.ecma-international.org/ecma-262/5.1/#sec-11.1.5).)\n     * Now, they help to prevent the same [visual\n     * ambiguities](http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.2)\n     * that the strict usage of semicolons helps prevent.\n     *\n     * For example, this code might have worked last Tuesday:\n     *\n     *     [\n     *         b + c\n     *     ].forEach(print);\n     *\n     * But if one adds an element to the array and forgets to compensate for the\n     * missing comma, no syntax error is thrown, and a linter cannot determine\n     * if this was a mistake or an intentional function invocation.\n     *\n     *     [\n     *         b + c\n     *         (d + e)\n     *     ].forEach(print);\n     *\n     * If one always appends a list item with a comma, this ambiguity cannot\n     * occur:\n     *\n     *     [\n     *         b + c,\n     *     ].forEach(print);\n     *\n     *     [\n     *         b + c,\n     *         (d + e),\n     *     ].forEach(print);\n     */\n    trailingcomma: false\n  },\n  relaxing: {\n\n    /**\n     * This option suppresses warnings about missing semicolons. There is a lot\n     * of FUD about semicolon spread by quite a few people in the community.\n     * The common myths are that semicolons are required all the time (they are\n     * not) and that they are unreliable. JavaScript has rules about semicolons\n     * which are followed by *all* browsers so it is up to you to decide\n     * whether you should or should not use semicolons in your code.\n     *\n     * For more information about semicolons in JavaScript read [An Open Letter\n     * to JavaScript Leaders Regarding\n     * Semicolons](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding)\n     * by Isaac Schlueter and [JavaScript Semicolon\n     * Insertion](http://inimino.org/~inimino/blog/javascript_semicolons).\n     */\n    asi         : true,\n\n    /**\n     * This option suppresses warnings about multi-line strings. Multi-line\n     * strings can be dangerous in JavaScript because all hell breaks loose if\n     * you accidentally put a whitespace in between the escape character (`\\`)\n     * and a new line.\n     *\n     * Note that even though this option allows correct multi-line strings, it\n     * still warns about multi-line strings without escape characters or with\n     * anything in between the escape character and a whitespace.\n     *\n     *     // jshint multistr:true\n     *\n     *     var text = \"Hello\\\n     *     World\"; // All good.\n     *\n     *     text = \"Hello\n     *     World\"; // Warning, no escape character.\n     *\n     *     text = \"Hello\\\n     *     World\"; // Warning, there is a space after \\\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    multistr    : true,\n\n    /**\n     * This option suppresses warnings about the `debugger` statements in your\n     * code.\n     */\n    debug       : true,\n\n    /**\n     * This option suppresses warnings about the use of assignments in cases\n     * where comparisons are expected. More often than not, code like `if (a =\n     * 10) {}` is a typo. However, it can be useful in cases like this one:\n     *\n     *     for (var i = 0, person; person = people[i]; i++) {}\n     *\n     * You can silence this error on a per-use basis by surrounding the assignment\n     * with parenthesis, such as:\n     *\n     *     for (var i = 0, person; (person = people[i]); i++) {}\n     */\n    boss        : true,\n\n    /**\n     * This option suppresses warnings about the use of `eval`. The use of\n     * `eval` is discouraged because it can make your code vulnerable to\n     * various injection attacks and it makes it hard for JavaScript\n     * interpreter to do certain optimizations.\n    */\n    evil        : true,\n\n    /**\n     * This option suppresses warnings about declaring variables inside\n     * of control structures while accessing them later from the outside.\n     * Even though identifiers declared with `var` have two real scopes—global\n     * and function—such practice leads to confusion among people new to\n     * the language and hard-to-debug bugs. This is why, by default, JSHint\n     * warns about variables that are used outside of their intended scope.\n     *\n     *     function test() {\n     *       if (true) {\n     *         var x = 0;\n     *       }\n     *\n     *       x += 1; // Default: 'x' used out of scope.\n     *                 // No warning when funcscope:true\n     *     }\n     */\n    funcscope   : true,\n\n    /**\n     * This option suppresses warnings about the use of global strict mode.\n     * Global strict mode can break third-party widgets so it is not\n     * recommended.\n     *\n     * For more info about strict mode see the `strict` option.\n     *\n     * @deprecated Use `strict: \"global\"`.\n     */\n    globalstrict: true,\n\n    /**\n     * This option suppresses warnings about the `__iterator__` property. This\n     * property is not supported by all browsers so use it carefully.\n     */\n    iterator    : true,\n\n     /**\n     * This option suppresses warnings about invalid `typeof` operator values.\n     * This operator has only [a limited set of possible return\n     * values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof).\n     * By default, JSHint warns when you compare its result with an invalid\n     * value which often can be a typo.\n     *\n     *     // 'fuction' instead of 'function'\n     *     if (typeof a == \"fuction\") { // Invalid typeof value 'fuction'\n     *       // ...\n     *     }\n     *\n     * Do not use this option unless you're absolutely sure you don't want\n     * these checks.\n     */\n    notypeof    : true,\n\n    /**\n     * This option prohibits the use of unary increment and decrement\n     * operators.  Some people think that `++` and `--` reduces the quality of\n     * their coding styles and there are programming languages—such as\n     * Python—that go completely without these operators.\n     */\n    plusplus    : true,\n\n    /**\n     * This option suppresses warnings about the `__proto__` property.\n     */\n    proto       : true,\n\n    /**\n     * This option suppresses warnings about the use of script-targeted\n     * URLs—such as `javascript:...`.\n     */\n    scripturl   : true,\n\n    /**\n     * This option suppresses warnings about using `[]` notation when it can be\n     * expressed in dot notation: `person['name']` vs. `person.name`.\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    sub         : true,\n\n    /**\n     * This option suppresses warnings about \"weird\" constructions like\n     * `new function () { ... }` and `new Object;`. Such constructions are\n     * sometimes used to produce singletons in JavaScript:\n     *\n     *     var singleton = new function() {\n     *       var privateVar;\n     *\n     *       this.publicMethod  = function () {}\n     *       this.publicMethod2 = function () {}\n     *     };\n     */\n    supernew    : true,\n\n    /**\n     * This option suppresses most of the warnings about possibly unsafe line\n     * breakings in your code. It doesn't suppress warnings about comma-first\n     * coding style. To suppress those you have to use `laxcomma` (see below).\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    laxbreak    : true,\n\n    /**\n     * This option suppresses warnings about comma-first coding style:\n     *\n     *     var obj = {\n     *         name: 'Anton'\n     *       , handle: 'valueof'\n     *       , role: 'SW Engineer'\n     *     };\n     *\n     * @deprecated JSHint is limiting its scope to issues of code correctness.\n     *             If you would like to enforce rules relating to code style,\n     *             check out [the JSCS\n     *             project](https://github.com/jscs-dev/node-jscs).\n     */\n    laxcomma    : true,\n\n    /**\n     * This option suppresses warnings about possible strict violations when\n     * the code is running in strict mode and you use `this` in a\n     * non-constructor function. You should use this option—in a function scope\n     * only—when you are positive that your use of `this` is valid in the\n     * strict mode (for example, if you call your function using\n     * `Function.call`).\n     *\n     * **Note:** This option can be used only inside of a function scope.\n     * JSHint will fail with an error if you will try to set this option\n     * globally.\n     */\n    validthis   : true,\n\n    /**\n     * This option suppresses warnings about the use of the `with` statement.\n     * The semantics of the `with` statement can cause confusion among\n     * developers and accidental definition of global variables.\n     *\n     * More info:\n     *\n     * * [with Statement Considered\n     *   Harmful](http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/)\n     */\n    withstmt    : true,\n\n    /**\n     * This options tells JSHint that your code uses Mozilla JavaScript\n     * extensions. Unless you develop specifically for the Firefox web browser\n     * you don't need this option.\n     *\n     * More info:\n     *\n     * * [New in JavaScript\n     *   1.7](https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7)\n     */\n    moz         : true,\n\n    /**\n     * This option suppresses warnings about generator functions with no\n     * `yield` statement in them.\n     */\n    noyield     : true,\n\n    /**\n     * This option suppresses warnings about `== null` comparisons. Such\n     * comparisons are often useful when you want to check if a variable is\n     * `null` or `undefined`.\n     */\n    eqnull      : true,\n\n    /**\n     * This option suppresses warnings about missing semicolons, but only when\n     * the semicolon is omitted for the last statement in a one-line block:\n     *\n     *     var name = (function() { return 'Anton' }());\n     *\n     * This is a very niche use case that is useful only when you use automatic\n     * JavaScript code generators.\n     */\n    lastsemic   : true,\n\n    /**\n     * This option suppresses warnings about functions inside of loops.\n     * Defining functions inside of loops can lead to bugs such as this one:\n     *\n     *     var nums = [];\n     *\n     *     for (var i = 0; i < 10; i++) {\n     *       nums[i] = function (j) {\n     *         return i + j;\n     *       };\n     *     }\n     *\n     *     nums[0](2); // Prints 12 instead of 2\n     *\n     * To fix the code above you need to copy the value of `i`:\n     *\n     *     var nums = [];\n     *\n     *     for (var i = 0; i < 10; i++) {\n     *       (function (i) {\n     *         nums[i] = function (j) {\n     *             return i + j;\n     *         };\n     *       }(i));\n     *     }\n     */\n    loopfunc    : true,\n\n    /**\n     * This option suppresses warnings about the use of expressions where\n     * normally you would expect to see assignments or function calls. Most of\n     * the time, such code is a typo. However, it is not forbidden by the spec\n     * and that's why this warning is optional.\n     */\n    expr        : true,\n\n    /**\n     * This option tells JSHint that your code uses ECMAScript 6 specific\n     * syntax. Note that not all browsers implement these features.\n     *\n     * More info:\n     *\n     * * [Specification for ECMAScript\n     *   6](http://www.ecma-international.org/ecma-262/6.0/index.html)\n     *\n     * @deprecated Use `esversion: 6` instead.\n     */\n    esnext      : true,\n\n    /**\n     * This option tells JSHint that your code uses ES3 array elision elements,\n     * or empty elements (for example, `[1, , , 4, , , 7]`).\n     */\n    elision     : true,\n  },\n\n  // Third party globals\n  environments: {\n\n    /**\n     * This option defines globals exposed by the\n     * [MooTools](http://mootools.net/) JavaScript framework.\n     */\n    mootools    : true,\n\n    /**\n     * This option defines globals exposed by\n     * [CouchDB](http://couchdb.apache.org/). CouchDB is a document-oriented\n     * database that can be queried and indexed in a MapReduce fashion using\n     * JavaScript.\n     */\n    couch       : true,\n\n    /**\n     * This option defines globals exposed by [the Jasmine unit testing\n     * framework](https://jasmine.github.io/).\n     */\n    jasmine     : true,\n\n    /**\n     * This option defines globals exposed by the [jQuery](http://jquery.com/)\n     * JavaScript library.\n     */\n    jquery      : true,\n\n    /**\n     * This option defines globals available when your code is running inside\n     * of the Node runtime environment. [Node.js](http://nodejs.org/) is a\n     * server-side JavaScript environment that uses an asynchronous\n     * event-driven model. This option also skips some warnings that make sense\n     * in the browser environments but don't make sense in Node such as\n     * file-level `use strict` pragmas and `console.log` statements.\n     */\n    node        : true,\n\n    /**\n     * This option defines globals exposed by [the QUnit unit testing\n     * framework](http://qunitjs.com/).\n     */\n    qunit       : true,\n\n    /**\n     * This option defines globals available when your code is running inside\n     * of the Rhino runtime environment. [Rhino](http://www.mozilla.org/rhino/)\n     * is an open-source implementation of JavaScript written entirely in Java.\n     */\n    rhino       : true,\n\n    /**\n     * This option defines globals exposed by [the ShellJS\n     * library](http://documentup.com/arturadib/shelljs).\n     */\n    shelljs     : true,\n\n    /**\n     * This option defines globals exposed by the\n     * [Prototype](http://www.prototypejs.org/) JavaScript framework.\n     */\n    prototypejs : true,\n\n    /**\n     * This option defines globals exposed by the [YUI](http://yuilibrary.com/)\n     * JavaScript framework.\n     */\n    yui         : true,\n\n    /**\n     * This option defines globals exposed by the \"BDD\" and \"TDD\" UIs of the\n     * [Mocha unit testing framework](http://mochajs.org/).\n     */\n    mocha       : true,\n\n    /**\n     * This option informs JSHint that the input code describes an ECMAScript 6\n     * module. All module code is interpreted as strict mode code.\n     */\n    module      : true,\n\n    /**\n     * This option defines globals available when your code is running as a\n     * script for the [Windows Script\n     * Host](http://en.wikipedia.org/wiki/Windows_Script_Host).\n     */\n    wsh         : true,\n\n    /**\n     * This option defines globals available when your code is running inside\n     * of a Web Worker. [Web\n     * Workers](https://developer.mozilla.org/en/Using_web_workers) provide a\n     * simple means for web content to run scripts in background threads.\n     */\n    worker      : true,\n\n    /**\n     * This option defines non-standard but widely adopted globals such as\n     * `escape` and `unescape`.\n     */\n    nonstandard : true,\n\n    /**\n     * This option defines globals exposed by modern browsers: all the way from\n     * good old `document` and `navigator` to the HTML5 `FileReader` and other\n     * new developments in the browser world.\n     *\n     * **Note:** This option doesn't expose variables like `alert` or\n     * `console`. See option `devel` for more information.\n     */\n    browser     : true,\n\n    /**\n     * This option defines globals available when using [the Browserify\n     * tool](http://browserify.org/) to build a project.\n     */\n    browserify  : true,\n\n    /**\n     * This option defines globals that are usually used for logging poor-man's\n     * debugging: `console`, `alert`, etc. It is usually a good idea to not\n     * ship them in production because, for example, `console.log` breaks in\n     * legacy versions of Internet Explorer.\n     */\n    devel       : true,\n\n    /**\n     * This option defines globals exposed by the [Dojo\n     * Toolkit](http://dojotoolkit.org/).\n     */\n    dojo        : true,\n\n    /**\n     * This option defines globals for typed array constructors.\n     *\n     * More info:\n     *\n     * * [JavaScript typed\n     *   arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays)\n     */\n    typed       : true,\n\n    /**\n     * This option defines globals available when your core is running inside\n     * of the PhantomJS runtime environment. [PhantomJS](http://phantomjs.org/)\n     * is a headless WebKit scriptable with a JavaScript API. It has fast and\n     * native support for various web standards: DOM handling, CSS selector,\n     * JSON, Canvas, and SVG.\n     */\n    phantom     : true\n  },\n\n  // Obsolete options\n  obsolete: {\n    onecase     : true, // if one case switch statements should be allowed\n    regexp      : true, // if the . should not be allowed in regexp literals\n    regexdash   : true  // if unescaped first/last dash (-) inside brackets\n                        // should be tolerated\n  }\n};\n\n// These are the JSHint options that can take any value\n// (we use this object to detect invalid options)\nexports.val = {\n\n  /**\n   * This option lets you set the maximum length of a line.\n   *\n   * @deprecated JSHint is limiting its scope to issues of code correctness. If\n   *             you would like to enforce rules relating to code style, check\n   *             out [the JSCS project](https://github.com/jscs-dev/node-jscs).\n   */\n  maxlen       : false,\n\n  /**\n   * This option sets a specific tab width for your code.\n   *\n   * @deprecated JSHint is limiting its scope to issues of code correctness. If\n   *             you would like to enforce rules relating to code style, check\n   *             out [the JSCS project](https://github.com/jscs-dev/node-jscs).\n   */\n  indent       : false,\n\n  /**\n   * This options allows you to set the maximum amount of errors JSHint will\n   * produce before giving up. Default is 50.\n   */\n  maxerr       : false,\n\n  /**\n   * This option allows you to control which variables JSHint considers to be\n   * implicitly defined in the environment. Configure it with an array of\n   * string values. Prefixing a variable name with a hyphen (-) character will\n   * remove that name from the collection of predefined variables.\n   *\n   * JSHint will consider variables declared in this way to be read-only.\n   *\n   * This option cannot be specified in-line; it may only be used via the\n   * JavaScript API or from an external configuration file.\n   */\n  predef       : false,\n\n  /**\n   * This option can be used to specify a white list of global variables that\n   * are not formally defined in the source code. This is most useful when\n   * combined with the `undef` option in order to suppress warnings for\n   * project-specific global variables.\n   *\n   * Setting an entry to `true` enables reading and writing to that variable.\n   * Setting it to `false` will trigger JSHint to consider that variable\n   * read-only.\n   *\n   * See also the \"environment\" options: a set of options to be used as short\n   * hand for enabling global variables defined in common JavaScript\n   * environments.\n   *\n   * To configure `globals` within an individual file, see [Inline\n   * Configuration](http://jshint.com/docs/#inline-configuration).\n   */\n  globals      : false,\n\n  /**\n   * This option enforces the consistency of quotation marks used throughout\n   * your code. It accepts three values: `true` if you don't want to enforce\n   * one particular style but want some consistency, `\"single\"` if you want to\n   * allow only single quotes and `\"double\"` if you want to allow only double\n   * quotes.\n   *\n   * @deprecated JSHint is limiting its scope to issues of code correctness. If\n   *             you would like to enforce rules relating to code style, check\n   *             out [the JSCS project](https://github.com/jscs-dev/node-jscs).\n   */\n  quotmark     : false,\n\n  scope        : false,\n\n  /**\n   * This option lets you set the max number of statements allowed per function:\n   *\n   *     // jshint maxstatements:4\n   *\n   *     function main() {\n   *       var i = 0;\n   *       var j = 0;\n   *\n   *       // Function declarations count as one statement. Their bodies\n   *       // don't get taken into account for the outer function.\n   *       function inner() {\n   *         var i2 = 1;\n   *         var j2 = 1;\n   *\n   *         return i2 + j2;\n   *       }\n   *\n   *       j = i + j;\n   *       return j; // JSHint: Too many statements per function. (5)\n   *     }\n   */\n  maxstatements: false,\n\n  /**\n   * This option lets you control how nested do you want your blocks to be:\n   *\n   *     // jshint maxdepth:2\n   *\n   *     function main(meaning) {\n   *       var day = true;\n   *\n   *       if (meaning === 42) {\n   *         while (day) {\n   *           shuffle();\n   *\n   *           if (tired) { // JSHint: Blocks are nested too deeply (3).\n   *               sleep();\n   *           }\n   *         }\n   *       }\n   *     }\n   */\n  maxdepth     : false,\n\n  /**\n   * This option lets you set the max number of formal parameters allowed per\n   * function:\n   *\n   *     // jshint maxparams:3\n   *\n   *     function login(request, onSuccess) {\n   *       // ...\n   *     }\n   *\n   *     // JSHint: Too many parameters per function (4).\n   *     function logout(request, isManual, whereAmI, onSuccess) {\n   *       // ...\n   *     }\n   */\n  maxparams    : false,\n\n  /**\n   * This option lets you control cyclomatic complexity throughout your code.\n   * Cyclomatic complexity measures the number of linearly independent paths\n   * through a program's source code. Read more about [cyclomatic complexity on\n   * Wikipedia](http://en.wikipedia.org/wiki/Cyclomatic_complexity).\n   */\n  maxcomplexity: false,\n\n  /**\n   * This option suppresses warnings about variable shadowing i.e. declaring a\n   * variable that had been already declared somewhere in the outer scope.\n   *\n   * - \"inner\"  - check for variables defined in the same scope only\n   * - \"outer\"  - check for variables defined in outer scopes as well\n   * - false    - same as inner\n   * - true     - allow variable shadowing\n   */\n  shadow       : false,\n\n  /**\n   * This option requires the code to run in ECMAScript 5's strict mode.\n   * [Strict mode](https://developer.mozilla.org/en/JavaScript/Strict_mode)\n   * is a way to opt in to a restricted variant of JavaScript. Strict mode\n   * eliminates some JavaScript pitfalls that didn't cause errors by changing\n   * them to produce errors.  It also fixes mistakes that made it difficult\n   * for the JavaScript engines to perform certain optimizations.\n   *\n   * - \"global\"  - there must be a `\"use strict\";` directive at global level\n   * - \"implied\" - lint the code as if there is the `\"use strict\";` directive\n   * - false     - disable warnings about strict mode\n   * - true      - there must be a `\"use strict\";` directive at function level;\n   *               this is preferable for scripts intended to be loaded in web\n   *               browsers directly because enabling strict mode globally\n   *               could adversely effect other scripts running on the same\n   *               page\n   */\n  strict      : true,\n\n  /**\n   * This option warns when you define and never use your variables. It is very\n   * useful for general code cleanup, especially when used in addition to\n   * `undef`.\n   *\n   *     // jshint unused:true\n   *\n   *     function test(a, b) {\n   *       var c, d = 2;\n   *\n   *       return a + d;\n   *     }\n   *\n   *     test(1, 2);\n   *\n   *     // Line 3: 'b' was defined but never used.\n   *     // Line 4: 'c' was defined but never used.\n   *\n   * In addition to that, this option will warn you about unused global\n   * variables declared via the `global` directive.\n   *\n   * When set to `true`, unused parameters that are followed by a used\n   * parameter will not produce warnings. This option can be set to `vars` to\n   * only check for variables, not function parameters, or `strict` to check\n   * all variables and parameters.\n   */\n  unused       : true,\n\n  /**\n   * This option prohibits the use of a variable before it was defined.\n   * JavaScript has function scope only and, in addition to that, all variables\n   * are always moved—or hoisted— to the top of the function. This behavior can\n   * lead to some very nasty bugs and that's why it is safer to always use\n   * variable only after they have been explicitly defined.\n   *\n   * Setting this option to \"nofunc\" will allow function declarations to be\n   * ignored.\n   *\n   * For more in-depth understanding of scoping and hoisting in JavaScript,\n   * read [JavaScript Scoping and\n   * Hoisting](http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting)\n   * by Ben Cherry.\n   */\n  latedef      : false,\n\n  ignore       : false, // start/end ignoring lines of code, bypassing the lexer\n                        //   start    - start ignoring lines, including the current line\n                        //   end      - stop ignoring lines, starting on the next line\n                        //   line     - ignore warnings / errors for just a single line\n                        //              (this option does not bypass the lexer)\n\n  ignoreDelimiters: false, // array of start/end delimiters used to ignore\n                           // certain chunks from code\n\n  /**\n   * This option is used to specify the ECMAScript version to which the code\n   * must adhere. It can assume one of the following values:\n   *  - `3` - If you need your program to be executable\n   *    in older browsers—such as Internet Explorer 6/7/8/9—and other legacy\n   *    JavaScript environments\n   *  - `5` - To enable syntax first defined in [the ECMAScript 5.1\n   *    specification](http://www.ecma-international.org/ecma-262/5.1/index.html).\n   *    This includes allowing reserved keywords as object properties.\n   *  - `6` - To tell JSHint that your code uses [ECMAScript\n   *    6](http://www.ecma-international.org/ecma-262/6.0/index.html) specific\n   *    syntax. Note that not all browsers implement them.\n   *  - `7` - To enable language features introduced by [ECMAScript\n   *    7](https://www.ecma-international.org/ecma-262/7.0/index.html). Notable\n   *    additions: the exponentiation operator.\n   *  - `8` - To enable language features introduced by [ECMAScript\n   *    8](https://www.ecma-international.org/ecma-262/8.0/index.html). Notable\n   *    additions: async functions, shared memory, and atomics\n   *  - `9` - To enable language features introduced by [ECMAScript\n   *    9](https://www.ecma-international.org/ecma-262/9.0/index.html). Notable\n   *    additions: asynchronous iteration, rest/spread properties, and various\n   *    RegExp extensions\n   *  - `10` - To enable language features introduced by [ECMAScript\n   *    10](https://www.ecma-international.org/ecma-262/10.0/index.html).\n   *    Notable additions: optional catch bindings.\n   *  - `11` - To enable language features introduced by ECMAScript 11. Notable\n   *    additions: \"export * as ns from 'module'\", `import.meta`, the nullish\n   *    coalescing operator, and optional chaining, and dynamic import.\n   */\n  esversion: 5\n};\n\n/**\n * Unstable options allow control for parsing and linting of proposed additions\n * to the JavaScript language. Just like the language features they describe,\n * the presence and behavior of these options is volatile; JSHint reserves the\n * right to remove or modify them between major version releases.\n */\nexports.unstable = {\n};\n\n// These are JSHint boolean options which are shared with JSLint\n// where the definition in JSHint is opposite JSLint\nexports.inverted = {\n  bitwise : true,\n  forin   : true,\n  newcap  : true,\n  plusplus: true,\n  regexp  : true,\n  undef   : true,\n\n  // Inverted and renamed, use JSHint name here\n  eqeqeq  : true,\n  strict  : true\n};\n\nexports.validNames = Object.keys(exports.val)\n  .concat(Object.keys(exports.bool.relaxing))\n  .concat(Object.keys(exports.bool.enforcing))\n  .concat(Object.keys(exports.bool.obsolete))\n  .concat(Object.keys(exports.bool.environments))\n  .concat([\"unstable\"]);\n\nexports.unstableNames = Object.keys(exports.unstable);\n\n// These are JSHint boolean options which are shared with JSLint\n// where the name has been changed but the effect is unchanged\nexports.renamed = {\n  eqeq   : \"eqeqeq\",\n  windows: \"wsh\",\n  sloppy : \"strict\"\n};\n\nexports.removed = {\n  nomen: true,\n  onevar: true,\n  passfail: true,\n  white: true,\n  gcl: true,\n  smarttabs: true,\n  trailing: true\n};\n\n// Add options here which should not be automatically enforced by\n// `enforceall`.\nexports.noenforceall = {\n  varstmt: true,\n  strict: true,\n  regexpu: true\n};\n\n},{}],21:[function(require,module,exports){\n/**\n * This module defines a set of enum-like values intended for use as bit\n * \"flags\" during parsing. The ECMAScript grammar defines a number of such\n * \"production parameters\" to control how certain forms are parsed in context.\n * JSHint implements additional parameters to facilitate detection of lint\n * warnings.\n *\n * An equivalent implementation which described the context in terms of a\n * \"lookup table\" object would be more idiomatic for a JavaScript project like\n * JSHint. However, because the number of contexts scales with the number of\n * expressions in the input program, this would have non-negligible impact on\n * the process's memory footprint.\n */\nmodule.exports = {\n  /**\n   * Enabled when parsing expressions within ES2015 \"export\" declarations,\n   * allowing otherwise-unreferenced bindings to be considered \"used\".\n   */\n  export: 1,\n\n  /**\n   * Enabled when parsing expressions within the head of `for` statements,\n   * allowing to distinguish between `for-in` and \"C-style\" `for` statements.\n   */\n  noin: 2,\n\n  /**\n   * Enabled when the expression begins the statement, allowing the parser to\n   * correctly select between the null denotation (\"nud\") and first null\n   * denotation (\"fud\") parsing strategy.\n   */\n  initial: 4,\n\n  preAsync: 8,\n\n  async: 16,\n\n  /**\n   * Enabled when any exception thrown by the expression will be caught by a\n   * TryStatement.\n   */\n  tryClause: 32,\n\n  /**\n   * Enabled when parsing the body of a generator function.\n   */\n  yield: 64\n};\n\n},{}],22:[function(require,module,exports){\n/*\n * Regular expressions. Some of these are stupidly long.\n */\n\n/*jshint maxlen:1000 */\n\n\"use strict\";\n\n// Unsafe comment or string (ax)\nexports.unsafeString =\n  /@cc|<\\/?|script|\\]\\s*\\]|<\\s*!|&lt/i;\n\n// Characters in strings that need escaping (nx and nxg)\nexports.needEsc =\n  /[\\u0000-\\u001f&<\"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/;\n\nexports.needEscGlobal =\n  /[\\u0000-\\u001f&<\"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n// Star slash (lx)\nexports.starSlash = /\\*\\//;\n\n// Identifier (ix)\nexports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;\n\n// JavaScript URL (jx)\nexports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;\n\n// Catches /* falls through */ comments (ft)\nexports.fallsThrough = /^\\s*falls?\\sthrough\\s*$/;\n\n// very conservative rule (eg: only one space between the start of the comment and the first character)\n// to relax the maxlen option\nexports.maxlenException = /^(?:(?:\\/\\/|\\/\\*|\\*) ?)?[^ ]+$/;\n\n// Node.js releases prior to version 8 include a version of the V8 engine which\n// incorrectly interprets the character class escape `\\s`. The following\n// regular expression may be replaced with `/\\s/` when JSHint removes support\n// for Node.js versions prior to 8.\n// Source:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nexports.whitespace = /[ \\f\\n\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]/;\n\nexports.nonzeroDigit = /^[1-9]$/;\n\nexports.decimalDigit = /^[0-9]$/;\n\nexports.regexpSyntaxChars = /[\\^$\\\\.*+?()[\\]{}|]/;\n\nexports.regexpQuantifiers = /[*+?{]/;\n\nexports.regexpControlEscapes = /[fnrtv]/;\n\nexports.regexpCharClasses = /[dDsSwWpP]/;\n\n// Identifies the \"dot\" atom in regular expressions\nexports.regexpDot = /(^|[^\\\\])(\\\\\\\\)*\\./;\n\n},{}],23:[function(require,module,exports){\n\"use strict\";\n/**\n * A note on `__proto__`:\n *\n * This file uses ordinary objects to track identifiers that are observed in\n * the input source code. It creates these objects using `Object.create` so\n * that the tracking objects have no prototype, allowing the `__proto__`\n * property to be used to store a value *without* triggering the invocation of\n * the built-in `Object.prototype.__proto__` accessor method. Some environments\n * (e.g. PhantomJS) do not implement the correct semantics for property\n * enumeration. In those environments, methods like `Object.keys` and Lodash's\n * `values` do not include the property name. This file includes a number of\n * branches which ensure that JSHint behaves consistently in those\n * environments. The branches must be ignored by the test coverage verification\n * system because the workaround is not necessary in the environment where\n * coverage is verified (i.e. Node.js).\n */\n\nvar _      = require(\"lodash\");\nvar events = require(\"events\");\n\n// Used to denote membership in lookup tables (a primitive value such as `true`\n// would be silently rejected for the property name \"__proto__\" in some\n// environments)\nvar marker = {};\n\n/**\n * A factory function for creating scope managers. A scope manager tracks\n * bindings, detecting when variables are referenced (through \"usages\").\n *\n * @param {object} state - the global state object (see `state.js`)\n * @param {Array} predefined - a set of binding names for built-in bindings\n *                             provided by the environment\n * @param {object} exported - a hash for binding names that are intended to be\n *                            referenced in contexts beyond the current program\n *                            code\n * @param {object} declared - a hash for binding names that were defined as\n *                            global bindings via linting configuration\n *\n * @returns {object} - a scope manager\n */\nvar scopeManager = function(state, predefined, exported, declared) {\n\n  var _current;\n  var _scopeStack = [];\n\n  function _newScope(type) {\n    _current = {\n      \"(bindings)\": Object.create(null),\n      \"(usages)\": Object.create(null),\n      \"(labels)\": Object.create(null),\n      \"(parent)\": _current,\n      \"(type)\": type,\n      \"(params)\": (type === \"functionparams\" || type === \"catchparams\") ? [] : null\n    };\n    _scopeStack.push(_current);\n  }\n\n  _newScope(\"global\");\n  _current[\"(predefined)\"] = predefined;\n\n  var _currentFunctBody = _current; // this is the block after the params = function\n\n  var usedPredefinedAndGlobals = Object.create(null);\n  var impliedGlobals = Object.create(null);\n  var unuseds = [];\n  var esModuleExports = [];\n  var emitter = new events.EventEmitter();\n\n  function warning(code, token) {\n    emitter.emit(\"warning\", {\n      code: code,\n      token: token,\n      data: _.slice(arguments, 2)\n    });\n  }\n\n  function error(code, token) {\n    emitter.emit(\"warning\", {\n      code: code,\n      token: token,\n      data: _.slice(arguments, 2)\n    });\n  }\n\n  function _setupUsages(bindingName) {\n    if (!_current[\"(usages)\"][bindingName]) {\n      _current[\"(usages)\"][bindingName] = {\n        \"(modified)\": [],\n        \"(reassigned)\": [],\n        \"(tokens)\": []\n      };\n    }\n  }\n\n  var _getUnusedOption = function(unused_opt) {\n    if (unused_opt === undefined) {\n      unused_opt = state.option.unused;\n    }\n\n    if (unused_opt === true) {\n      unused_opt = \"last-param\";\n    }\n\n    return unused_opt;\n  };\n\n  var _warnUnused = function(name, tkn, type, unused_opt) {\n    var line = tkn.line;\n    var chr  = tkn.from;\n    var raw_name = tkn.raw_text || name;\n\n    unused_opt = _getUnusedOption(unused_opt);\n\n    var warnable_types = {\n      \"vars\": [\"var\"],\n      \"last-param\": [\"var\", \"param\"],\n      \"strict\": [\"var\", \"param\", \"last-param\"]\n    };\n\n    if (unused_opt) {\n      if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {\n        warning(\"W098\", { line: line, from: chr }, raw_name);\n      }\n    }\n\n    // inconsistent - see gh-1894\n    if (unused_opt || type === \"var\") {\n      unuseds.push({\n        name: name,\n        line: line,\n        character: chr\n      });\n    }\n  };\n\n  /**\n   * Check the current scope for unused identifiers\n   */\n  function _checkForUnused() {\n    if (_current[\"(type)\"] !== \"functionparams\") {\n      var currentBindings = _current[\"(bindings)\"];\n      for (var bindingName in currentBindings) {\n        if (currentBindings[bindingName][\"(type)\"] !== \"exception\" &&\n          currentBindings[bindingName][\"(unused)\"]) {\n          _warnUnused(bindingName, currentBindings[bindingName][\"(token)\"], \"var\");\n        }\n      }\n      return;\n    }\n\n    // Check the current scope for unused parameters and issue warnings as\n    // necessary.\n    var params = _current[\"(params)\"];\n\n    var param = params.pop();\n    var unused_opt;\n\n    while (param) {\n      var binding = _current[\"(bindings)\"][param];\n\n      unused_opt = _getUnusedOption(state.funct[\"(unusedOption)\"]);\n\n      // 'undefined' is a special case for the common pattern where `undefined`\n      // is used as a formal parameter name to defend against global\n      // re-assignment, e.g.\n      //\n      //     (function(window, undefined) {\n      //     })();\n      if (param === \"undefined\")\n        return;\n\n      if (binding[\"(unused)\"]) {\n        _warnUnused(param, binding[\"(token)\"], \"param\", state.funct[\"(unusedOption)\"]);\n      } else if (unused_opt === \"last-param\") {\n        return;\n      }\n\n      param = params.pop();\n    }\n  }\n\n  /**\n   * Find the relevant binding's scope. The owning scope is located by first\n   * inspecting the current scope and then moving \"downward\" through the stack\n   * of scopes.\n   *\n   * @param {string} bindingName - the value of the identifier\n   *\n   * @returns {Object} - the scope in which the binding was found\n   */\n  function _getBinding(bindingName) {\n    for (var i = _scopeStack.length - 1 ; i >= 0; --i) {\n      var scopeBindings = _scopeStack[i][\"(bindings)\"];\n      if (scopeBindings[bindingName]) {\n        return scopeBindings;\n      }\n    }\n  }\n\n  /**\n   * Determine if a given binding name has been referenced within the current\n   * function or any function defined within.\n   *\n   * @param {string} bindingName - the value of the identifier\n   *\n   * @returns {boolean}\n   */\n  function usedSoFarInCurrentFunction(bindingName) {\n    for (var i = _scopeStack.length - 1; i >= 0; i--) {\n      var current = _scopeStack[i];\n      if (current[\"(usages)\"][bindingName]) {\n        return current[\"(usages)\"][bindingName];\n      }\n      if (current === _currentFunctBody) {\n        break;\n      }\n    }\n    return false;\n  }\n\n  function _checkOuterShadow(bindingName, token) {\n\n    // only check if shadow is outer\n    if (state.option.shadow !== \"outer\") {\n      return;\n    }\n\n    var isGlobal = _currentFunctBody[\"(type)\"] === \"global\",\n      isNewFunction = _current[\"(type)\"] === \"functionparams\";\n\n    var outsideCurrentFunction = !isGlobal;\n    for (var i = 0; i < _scopeStack.length; i++) {\n      var stackItem = _scopeStack[i];\n\n      if (!isNewFunction && _scopeStack[i + 1] === _currentFunctBody) {\n        outsideCurrentFunction = false;\n      }\n      if (outsideCurrentFunction && stackItem[\"(bindings)\"][bindingName]) {\n        warning(\"W123\", token, bindingName);\n      }\n      if (stackItem[\"(labels)\"][bindingName]) {\n        warning(\"W123\", token, bindingName);\n      }\n    }\n  }\n\n  function _latedefWarning(type, bindingName, token) {\n    var isFunction;\n\n    if (state.option.latedef) {\n      isFunction = type === \"function\" || type === \"generator function\" ||\n        type === \"async function\";\n\n      // if either latedef is strict and this is a function\n      //    or this is not a function\n      if ((state.option.latedef === true && isFunction) || !isFunction) {\n        warning(\"W003\", token, bindingName);\n      }\n    }\n  }\n\n  var scopeManagerInst = {\n\n    on: function(names, listener) {\n      names.split(\" \").forEach(function(name) {\n        emitter.on(name, listener);\n      });\n    },\n\n    isPredefined: function(bindingName) {\n      return !this.has(bindingName) && _.has(_scopeStack[0][\"(predefined)\"], bindingName);\n    },\n\n    /**\n     * Create a new scope within the current scope. As the topmost value, the\n     * new scope will be interpreted as the current scope until it is\n     * exited--see the `unstack` method.\n     *\n     * @param {string} [type] - The type of the scope. Valid values are\n     *                          \"functionparams\", \"catchparams\" and\n     *                          \"functionouter\"\n     */\n    stack: function(type) {\n      var previousScope = _current;\n      _newScope(type);\n\n      if (!type && previousScope[\"(type)\"] === \"functionparams\") {\n\n        _current[\"(isFuncBody)\"] = true;\n        _currentFunctBody = _current;\n      }\n    },\n\n    /**\n     * Valldate all binding references and declarations in the current scope\n     * and set the next scope on the stack as the active scope.\n     */\n    unstack: function() {\n      // jshint proto: true\n      var subScope = _scopeStack.length > 1 ? _scopeStack[_scopeStack.length - 2] : null;\n      var isUnstackingFunctionBody = _current === _currentFunctBody,\n        isUnstackingFunctionParams = _current[\"(type)\"] === \"functionparams\",\n        isUnstackingFunctionOuter = _current[\"(type)\"] === \"functionouter\";\n\n      var i, j, isImmutable, isFunction;\n      var currentUsages = _current[\"(usages)\"];\n      var currentBindings = _current[\"(bindings)\"];\n      var usedBindingNameList = Object.keys(currentUsages);\n\n      // See comment, \"A note on `__proto__`\"\n      /* istanbul ignore if */\n      if (currentUsages.__proto__ && usedBindingNameList.indexOf(\"__proto__\") === -1) {\n        usedBindingNameList.push(\"__proto__\");\n      }\n\n      for (i = 0; i < usedBindingNameList.length; i++) {\n        var usedBindingName = usedBindingNameList[i];\n\n        var usage = currentUsages[usedBindingName];\n        var usedBinding = currentBindings[usedBindingName];\n        if (usedBinding) {\n          var usedBindingType = usedBinding[\"(type)\"];\n          isImmutable = usedBindingType === \"const\" || usedBindingType === \"import\";\n\n          if (usedBinding[\"(useOutsideOfScope)\"] && !state.option.funcscope) {\n            var usedTokens = usage[\"(tokens)\"];\n            for (j = 0; j < usedTokens.length; j++) {\n              // Keep the consistency of https://github.com/jshint/jshint/issues/2409\n              if (usedBinding[\"(function)\"] === usedTokens[j][\"(function)\"]) {\n                error(\"W038\", usedTokens[j], usedBindingName);\n              }\n            }\n          }\n\n          // mark the binding used\n          _current[\"(bindings)\"][usedBindingName][\"(unused)\"] = false;\n\n          // check for modifying a const\n          if (isImmutable && usage[\"(modified)\"]) {\n            for (j = 0; j < usage[\"(modified)\"].length; j++) {\n              error(\"E013\", usage[\"(modified)\"][j], usedBindingName);\n            }\n          }\n\n          isFunction = usedBindingType === \"function\" ||\n            usedBindingType === \"generator function\" ||\n            usedBindingType === \"async function\";\n\n          // check for re-assigning a function declaration\n          if ((isFunction || usedBindingType === \"class\") && usage[\"(reassigned)\"]) {\n            for (j = 0; j < usage[\"(reassigned)\"].length; j++) {\n              if (!usage[\"(reassigned)\"][j].ignoreW021) {\n                warning(\"W021\", usage[\"(reassigned)\"][j], usedBindingName, usedBindingType);\n              }\n            }\n          }\n          continue;\n        }\n\n        if (subScope) {\n          var bindingType = this.bindingtype(usedBindingName);\n          isImmutable = bindingType === \"const\" ||\n            (bindingType === null && _scopeStack[0][\"(predefined)\"][usedBindingName] === false);\n          if (isUnstackingFunctionOuter && !isImmutable) {\n            if (!state.funct[\"(outerMutables)\"]) {\n              state.funct[\"(outerMutables)\"] = [];\n            }\n            state.funct[\"(outerMutables)\"].push(usedBindingName);\n          }\n\n          // not exiting the global scope, so copy the usage down in case its an out of scope usage\n          if (!subScope[\"(usages)\"][usedBindingName]) {\n            subScope[\"(usages)\"][usedBindingName] = usage;\n            if (isUnstackingFunctionBody) {\n              subScope[\"(usages)\"][usedBindingName][\"(onlyUsedSubFunction)\"] = true;\n            }\n          } else {\n            var subScopeUsage = subScope[\"(usages)\"][usedBindingName];\n            subScopeUsage[\"(modified)\"] = subScopeUsage[\"(modified)\"].concat(usage[\"(modified)\"]);\n            subScopeUsage[\"(tokens)\"] = subScopeUsage[\"(tokens)\"].concat(usage[\"(tokens)\"]);\n            subScopeUsage[\"(reassigned)\"] =\n              subScopeUsage[\"(reassigned)\"].concat(usage[\"(reassigned)\"]);\n          }\n        } else {\n          // this is exiting global scope, so we finalise everything here - we are at the end of the file\n          if (typeof _current[\"(predefined)\"][usedBindingName] === \"boolean\") {\n\n            // remove the declared token, so we know it is used\n            delete declared[usedBindingName];\n\n            // note it as used so it can be reported\n            usedPredefinedAndGlobals[usedBindingName] = marker;\n\n            // check for re-assigning a read-only (set to false) predefined\n            if (_current[\"(predefined)\"][usedBindingName] === false && usage[\"(reassigned)\"]) {\n              for (j = 0; j < usage[\"(reassigned)\"].length; j++) {\n                if (!usage[\"(reassigned)\"][j].ignoreW020) {\n                  warning(\"W020\", usage[\"(reassigned)\"][j]);\n                }\n              }\n            }\n          }\n          else {\n            // binding usage is not predefined and we have not found a declaration\n            // so report as undeclared\n            for (j = 0; j < usage[\"(tokens)\"].length; j++) {\n              var undefinedToken = usage[\"(tokens)\"][j];\n              // if its not a forgiven undefined (e.g. typof x)\n              if (!undefinedToken.forgiveUndef) {\n                // if undef is on and undef was on when the token was defined\n                if (state.option.undef && !undefinedToken.ignoreUndef) {\n                  warning(\"W117\", undefinedToken, usedBindingName);\n                }\n                if (impliedGlobals[usedBindingName]) {\n                  impliedGlobals[usedBindingName].line.push(undefinedToken.line);\n                } else {\n                  impliedGlobals[usedBindingName] = {\n                    name: usedBindingName,\n                    line: [undefinedToken.line]\n                  };\n                }\n              }\n            }\n          }\n        }\n      }\n\n      // if exiting the global scope, we can warn about declared globals that haven't been used yet\n      if (!subScope) {\n        Object.keys(declared)\n          .forEach(function(bindingNotUsed) {\n            _warnUnused(bindingNotUsed, declared[bindingNotUsed], \"var\");\n          });\n      }\n\n      // If this is not a function boundary, transfer function-scoped bindings to\n      // the parent block (a rough simulation of variable hoisting). Previously\n      // existing bindings in the parent block should take precedence so that\n      // prior usages are not discarded.\n      if (subScope && !isUnstackingFunctionBody &&\n        !isUnstackingFunctionParams && !isUnstackingFunctionOuter) {\n        var bindingNames = Object.keys(currentBindings);\n        for (i = 0; i < bindingNames.length; i++) {\n\n          var defBindingName = bindingNames[i];\n          var defBinding = currentBindings[defBindingName];\n\n          if (!defBinding[\"(blockscoped)\"] && defBinding[\"(type)\"] !== \"exception\") {\n            var shadowed = subScope[\"(bindings)\"][defBindingName];\n\n            // Do not overwrite a binding if it exists in the parent scope\n            // because it is shared by adjacent blocks. Copy the `unused`\n            // property so that any references found within the current block\n            // are counted toward that higher-level declaration.\n            if (shadowed) {\n              shadowed[\"(unused)\"] &= defBinding[\"(unused)\"];\n\n            // \"Hoist\" the variable to the parent block, decorating the binding\n            // so that future references, though technically valid, can be\n            // reported as \"out-of-scope\" in the absence of the `funcscope`\n            // option.\n            } else {\n              defBinding[\"(useOutsideOfScope)\"] =\n                // Do not warn about out-of-scope usages in the global scope\n                _currentFunctBody[\"(type)\"] !== \"global\" &&\n                // When a higher scope contains a binding for the binding, the\n                // binding is a re-declaration and should not prompt \"used\n                // out-of-scope\" warnings.\n                !this.funct.has(defBindingName, { excludeCurrent: true });\n\n              subScope[\"(bindings)\"][defBindingName] = defBinding;\n            }\n\n            delete currentBindings[defBindingName];\n          }\n        }\n      }\n\n      _checkForUnused();\n\n      _scopeStack.pop();\n      if (isUnstackingFunctionBody) {\n        _currentFunctBody = _scopeStack[_.findLastIndex(_scopeStack, function(scope) {\n          // if function or if global (which is at the bottom so it will only return true if we call back)\n          return scope[\"(isFuncBody)\"] || scope[\"(type)\"] === \"global\";\n        })];\n      }\n\n      _current = subScope;\n    },\n\n    /**\n     * Add a function parameter to the current scope.\n     *\n     * @param {string} bindingName - the value of the identifier\n     * @param {Token} token\n     * @param {string} [type] - binding type; defaults to \"param\"\n     */\n    addParam: function(bindingName, token, type) {\n      type = type || \"param\";\n\n      if (type === \"exception\") {\n        // if defined in the current function\n        var previouslyDefinedBindingType = this.funct.bindingtype(bindingName);\n        if (previouslyDefinedBindingType && previouslyDefinedBindingType !== \"exception\") {\n          // and has not been used yet in the current function scope\n          if (!state.option.node) {\n            warning(\"W002\", state.tokens.next, bindingName);\n          }\n        }\n\n        if (state.isStrict() && (bindingName === \"arguments\" || bindingName === \"eval\")) {\n          warning(\"E008\", token);\n        }\n      }\n\n      // The variable was declared in the current scope\n      if (_.has(_current[\"(bindings)\"], bindingName)) {\n        _current[\"(bindings)\"][bindingName].duplicated = true;\n\n      // The variable was declared in an outer scope\n      } else {\n        // if this scope has the variable defined, it's a re-definition error\n        _checkOuterShadow(bindingName, token);\n\n        _current[\"(bindings)\"][bindingName] = {\n          \"(type)\" : type,\n          \"(token)\": token,\n          \"(unused)\": true };\n\n        _current[\"(params)\"].push(bindingName);\n      }\n\n      if (_.has(_current[\"(usages)\"], bindingName)) {\n        var usage = _current[\"(usages)\"][bindingName];\n        // if its in a sub function it is not necessarily an error, just latedef\n        if (usage[\"(onlyUsedSubFunction)\"]) {\n          _latedefWarning(type, bindingName, token);\n        } else {\n          // this is a clear illegal usage, but not a syntax error, so emit a\n          // warning and not an error\n          warning(\"W003\", token, bindingName);\n        }\n      }\n    },\n\n    validateParams: function(isArrow) {\n      var isStrict = state.isStrict();\n      var currentFunctParamScope = _currentFunctBody[\"(parent)\"];\n      // From ECMAScript 2017:\n      //\n      // > 14.1.2Static Semantics: Early Errors\n      // >\n      // > [...]\n      // > - It is a Syntax Error if IsSimpleParameterList of\n      // >   FormalParameterList is false and BoundNames of FormalParameterList\n      // >   contains any duplicate elements.\n      var isSimple = state.funct['(hasSimpleParams)'];\n      // Method definitions are defined in terms of UniqueFormalParameters, so\n      // they cannot support duplicate parameter names regardless of strict\n      // mode.\n      var isMethod = state.funct[\"(method)\"];\n\n      if (!currentFunctParamScope[\"(params)\"]) {\n        /* istanbul ignore next */\n        return;\n      }\n\n      currentFunctParamScope[\"(params)\"].forEach(function(bindingName) {\n        var binding = currentFunctParamScope[\"(bindings)\"][bindingName];\n\n        if (binding.duplicated) {\n          if (isStrict || isArrow || isMethod || !isSimple) {\n            warning(\"E011\", binding[\"(token)\"], bindingName);\n          } else if (state.option.shadow !== true) {\n            warning(\"W004\", binding[\"(token)\"], bindingName);\n          }\n        }\n\n        if (isStrict && (bindingName === \"arguments\" || bindingName === \"eval\")) {\n          warning(\"E008\", binding[\"(token)\"]);\n        }\n      });\n    },\n\n    getUsedOrDefinedGlobals: function() {\n      // jshint proto: true\n      var list = Object.keys(usedPredefinedAndGlobals);\n\n      // See comment, \"A note on `__proto__`\"\n      /* istanbul ignore if */\n      if (usedPredefinedAndGlobals.__proto__ === marker &&\n        list.indexOf(\"__proto__\") === -1) {\n        list.push(\"__proto__\");\n      }\n\n      return list;\n    },\n\n    /**\n     * Get an array of implied globals\n     *\n     * @returns {Array.<{ name: string, line: Array.<number>}>}\n     */\n    getImpliedGlobals: function() {\n      // jshint proto: true\n      var values = _.values(impliedGlobals);\n      var hasProto = false;\n\n      // See comment, \"A note on `__proto__`\"\n      if (impliedGlobals.__proto__) {\n        hasProto = values.some(function(value) {\n          return value.name === \"__proto__\";\n        });\n\n        /* istanbul ignore if */\n        if (!hasProto) {\n          values.push(impliedGlobals.__proto__);\n        }\n      }\n\n      return values;\n    },\n\n    /**\n     * Get an array of objects describing unused bindings.\n     *\n     * @returns {Array<Object>}\n     */\n    getUnuseds: function() {\n      return unuseds;\n    },\n\n    /**\n     * Determine if a given name has been defined in the current scope or any\n     * lower scope.\n     *\n     * @param {string} bindingName - the value of the identifier\n     *\n     * @return {boolean}\n     */\n    has: function(bindingName) {\n      return Boolean(_getBinding(bindingName));\n    },\n\n    /**\n     * Retrieve binding described by `bindingName` or null\n     *\n     * @param {string} bindingName - the value of the identifier\n     *\n     * @returns {string|null} - the type of the binding or `null` if no such\n     *                          binding exists\n     */\n    bindingtype: function(bindingName) {\n      var scopeBindings = _getBinding(bindingName);\n      if (scopeBindings) {\n        return scopeBindings[bindingName][\"(type)\"];\n      }\n      return null;\n    },\n\n    /**\n     * For the exported options, indicating a variable is used outside the file\n     *\n     * @param {string} bindingName - the value of the identifier\n     */\n    addExported: function(bindingName) {\n      var globalBindings = _scopeStack[0][\"(bindings)\"];\n      if (_.has(declared, bindingName)) {\n        // remove the declared token, so we know it is used\n        delete declared[bindingName];\n      } else if (_.has(globalBindings, bindingName)) {\n        globalBindings[bindingName][\"(unused)\"] = false;\n      } else {\n        for (var i = 1; i < _scopeStack.length; i++) {\n          var scope = _scopeStack[i];\n          // if `scope.(type)` is not defined, it is a block scope\n          if (!scope[\"(type)\"]) {\n            if (_.has(scope[\"(bindings)\"], bindingName) &&\n                !scope[\"(bindings)\"][bindingName][\"(blockscoped)\"]) {\n              scope[\"(bindings)\"][bindingName][\"(unused)\"] = false;\n              return;\n            }\n          } else {\n            break;\n          }\n        }\n        exported[bindingName] = true;\n      }\n    },\n\n    /**\n     * Mark a binding as \"exported\" by an ES2015 module\n     *\n     * @param {string} bindingName - the value of the identifier\n     * @param {object} token\n     */\n    setExported: function(localName, exportName) {\n      if (exportName) {\n        if (esModuleExports.indexOf(exportName.value) > -1) {\n          error(\"E069\", exportName, exportName.value);\n        }\n\n        esModuleExports.push(exportName.value);\n      }\n\n      if (localName) {\n        this.block.use(localName.value, localName);\n      }\n    },\n\n    /**\n     * Mark a binding as \"initialized.\" This is necessary to enforce the\n     * \"temporal dead zone\" (TDZ) of block-scoped bindings which are not\n     * hoisted.\n     *\n     * @param {string} bindingName - the value of the identifier\n     */\n    initialize: function(bindingName) {\n      if (_current[\"(bindings)\"][bindingName]) {\n        _current[\"(bindings)\"][bindingName][\"(initialized)\"] = true;\n      }\n    },\n\n    /**\n     * Create a new binding and add it to the current scope. Delegates to the\n     * internal `block.add` or `func.add` methods depending on the type.\n     * Produces warnings and errors as necessary.\n     *\n     * @param {string} bindingName\n     * @param {Object} opts\n     * @param {String} opts.type - the type of the binding e.g. \"param\", \"var\",\n     *                             \"let, \"const\", \"import\", \"function\",\n     *                             \"generator function\", \"async function\",\n     *                             \"async generator function\"\n     * @param {object} opts.token - the token pointing at the declaration\n     * @param {boolean} opts.initialized - whether the binding should be\n     *                                     created in an \"initialized\" state.\n     */\n    addbinding: function(bindingName, opts) {\n\n      var type  = opts.type;\n      var token = opts.token;\n      var isblockscoped = type === \"let\" || type === \"const\" ||\n        type === \"class\" || type === \"import\" || type === \"generator function\" ||\n        type === \"async function\" || type === \"async generator function\";\n      var ishoisted = type === \"function\" || type === \"generator function\" ||\n        type === \"async function\" || type === \"import\";\n      var isexported    = (isblockscoped ? _current : _currentFunctBody)[\"(type)\"] === \"global\" &&\n                          _.has(exported, bindingName);\n\n      // outer shadow check (inner is only on non-block scoped)\n      _checkOuterShadow(bindingName, token);\n\n      if (state.isStrict() && (bindingName === \"arguments\" || bindingName === \"eval\")) {\n        warning(\"E008\", token);\n      }\n\n      if (isblockscoped) {\n\n        var declaredInCurrentScope = _current[\"(bindings)\"][bindingName];\n        // for block scoped variables, params are seen in the current scope as the root function\n        // scope, so check these too.\n        if (!declaredInCurrentScope && _current === _currentFunctBody &&\n          _current[\"(type)\"] !== \"global\") {\n          declaredInCurrentScope = !!_currentFunctBody[\"(parent)\"][\"(bindings)\"][bindingName];\n        }\n\n        // if its not already defined (which is an error, so ignore) and is used in TDZ\n        if (!declaredInCurrentScope && _current[\"(usages)\"][bindingName]) {\n          var usage = _current[\"(usages)\"][bindingName];\n          // if its in a sub function it is not necessarily an error, just latedef\n          if (usage[\"(onlyUsedSubFunction)\"] || ishoisted) {\n            _latedefWarning(type, bindingName, token);\n          } else if (!ishoisted) {\n            // this is a clear illegal usage for block scoped variables\n            warning(\"E056\", token, bindingName, type);\n          }\n        }\n\n        // If this scope has already declared a binding with the same name,\n        // then this represents a redeclaration error if:\n        //\n        // 1. it is a \"hoisted\" block-scoped binding within a block. For\n        //    instance: generator functions may be redeclared in the global\n        //    scope but not within block statements\n        // 2. this is not a \"hoisted\" block-scoped binding\n        if (declaredInCurrentScope &&\n          (!ishoisted || (_current[\"(type)\"] !== \"global\" || type === \"import\"))) {\n          warning(\"E011\", token, bindingName);\n        }\n        else if (state.option.shadow === \"outer\") {\n\n          // if shadow is outer, for block scope we want to detect any shadowing within this function\n          if (scopeManagerInst.funct.has(bindingName)) {\n            warning(\"W004\", token, bindingName);\n          }\n        }\n\n        scopeManagerInst.block.add(\n          bindingName, type, token, !isexported, opts.initialized\n        );\n\n      } else {\n\n        var declaredInCurrentFunctionScope = scopeManagerInst.funct.has(bindingName);\n\n        // check for late definition, ignore if already declared\n        if (!declaredInCurrentFunctionScope && usedSoFarInCurrentFunction(bindingName)) {\n          _latedefWarning(type, bindingName, token);\n        }\n\n        // defining with a var or a function when a block scope variable of the same name\n        // is in scope is an error\n        if (scopeManagerInst.funct.has(bindingName, { onlyBlockscoped: true })) {\n          warning(\"E011\", token, bindingName);\n        } else if (state.option.shadow !== true) {\n          // now since we didn't get any block scope variables, test for var/function\n          // shadowing\n          if (declaredInCurrentFunctionScope && bindingName !== \"__proto__\") {\n\n            // see https://github.com/jshint/jshint/issues/2400\n            if (_currentFunctBody[\"(type)\"] !== \"global\") {\n              warning(\"W004\", token, bindingName);\n            }\n          }\n        }\n\n        scopeManagerInst.funct.add(bindingName, type, token, !isexported);\n\n        if (_currentFunctBody[\"(type)\"] === \"global\" && !state.impliedClosure()) {\n          usedPredefinedAndGlobals[bindingName] = marker;\n        }\n      }\n    },\n\n    funct: {\n      /**\n       * Return the type of the provided binding given certain options\n       *\n       * @param {string} bindingName\n       * @param {Object=} [options]\n       * @param {boolean} [options.onlyBlockscoped] - only include block scoped\n       *                                              bindings\n       * @param {boolean} [options.excludeParams] - exclude the param scope\n       * @param {boolean} [options.excludeCurrent] - exclude the current scope\n       *\n       * @returns {String}\n       */\n      bindingtype: function(bindingName, options) {\n        var onlyBlockscoped = options && options.onlyBlockscoped;\n        var excludeParams = options && options.excludeParams;\n        var currentScopeIndex = _scopeStack.length - (options && options.excludeCurrent ? 2 : 1);\n        for (var i = currentScopeIndex; i >= 0; i--) {\n          var current = _scopeStack[i];\n          if (current[\"(bindings)\"][bindingName] &&\n            (!onlyBlockscoped || current[\"(bindings)\"][bindingName][\"(blockscoped)\"])) {\n            return current[\"(bindings)\"][bindingName][\"(type)\"];\n          }\n          var scopeCheck = excludeParams ? _scopeStack[ i - 1 ] : current;\n          if (scopeCheck && scopeCheck[\"(type)\"] === \"functionparams\") {\n            return null;\n          }\n        }\n        return null;\n      },\n\n      /**\n       * Determine whether a `break` statement label exists in the function\n       * scope.\n       *\n       * @param {string} labelName - the value of the identifier\n       *\n       * @returns {boolean}\n       */\n      hasLabel: function(labelName) {\n        for (var i = _scopeStack.length - 1; i >= 0; i--) {\n          var current = _scopeStack[i];\n\n          if (current[\"(labels)\"][labelName]) {\n            return true;\n          }\n          if (current[\"(type)\"] === \"functionparams\") {\n            return false;\n          }\n        }\n        return false;\n      },\n\n      /**\n       * Determine if a given name has been defined in the current function\n       * scope.\n       *\n       * @param {string} bindingName - the value of the identifier\n       * @param {object} options - options as supported by the\n       *                           `funct.bindingtype` method\n       *\n       * @return {boolean}\n       */\n      has: function(bindingName, options) {\n        return Boolean(this.bindingtype(bindingName, options));\n      },\n\n      /**\n       * Create a new function-scoped binding and add it to the current scope.\n       * See the `block.add` method for coresponding logic to create\n       * block-scoped bindings.\n       *\n       * @param {string} bindingName - the value of the identifier\n       * @param {string} type - the type of the binding; either \"function\" or\n       *                        \"var\"\n       * @param {object} tok - the token that triggered the definition\n       * @param {boolean} unused - `true` if the binding has not been\n       *                           referenced\n       */\n      add: function(bindingName, type, tok, unused) {\n        _current[\"(bindings)\"][bindingName] = {\n          \"(type)\" : type,\n          \"(token)\": tok,\n          \"(blockscoped)\": false,\n          \"(function)\": _currentFunctBody,\n          \"(unused)\": unused };\n      }\n    },\n\n    block: {\n\n      /**\n       * Determine whether the current block scope is the global scope.\n       *\n       * @returns Boolean\n       */\n      isGlobal: function() {\n        return _current[\"(type)\"] === \"global\";\n      },\n\n      /**\n       * Resolve a reference to a binding and mark the corresponding binding as\n       * \"used.\"\n       *\n       * @param {string} bindingName - the value of the identifier\n       * @param {object} token - the token value that triggered the reference\n       */\n      use: function(bindingName, token) {\n        // If the name resolves to a parameter of the current function, then do\n        // not store usage. This is because in cases such as the following:\n        //\n        //     function(a) {\n        //       var a;\n        //       a = a;\n        //     }\n        //\n        // the usage of `a` will resolve to the parameter, not to the unset\n        // variable binding.\n        var paramScope = _currentFunctBody[\"(parent)\"];\n        if (paramScope && paramScope[\"(bindings)\"][bindingName] &&\n          paramScope[\"(bindings)\"][bindingName][\"(type)\"] === \"param\") {\n\n          // then check its not declared by a block scope variable\n          if (!scopeManagerInst.funct.has(bindingName,\n                { excludeParams: true, onlyBlockscoped: true })) {\n            paramScope[\"(bindings)\"][bindingName][\"(unused)\"] = false;\n          }\n        }\n\n        if (token && (state.ignored.W117 || state.option.undef === false)) {\n          token.ignoreUndef = true;\n        }\n\n        _setupUsages(bindingName);\n\n        _current[\"(usages)\"][bindingName][\"(onlyUsedSubFunction)\"] = false;\n\n        if (token) {\n          token[\"(function)\"] = _currentFunctBody;\n          _current[\"(usages)\"][bindingName][\"(tokens)\"].push(token);\n        }\n\n        // Block-scoped bindings can't be used within their initializer due to\n        // \"temporal dead zone\" (TDZ) restrictions.\n        var binding = _current[\"(bindings)\"][bindingName];\n        if (binding && binding[\"(blockscoped)\"] && !binding[\"(initialized)\"]) {\n          error(\"E056\", token, bindingName, binding[\"(type)\"]);\n        }\n      },\n\n      reassign: function(bindingName, token) {\n        token.ignoreW020 = state.ignored.W020;\n        token.ignoreW021 = state.ignored.W021;\n\n        this.modify(bindingName, token);\n\n        _current[\"(usages)\"][bindingName][\"(reassigned)\"].push(token);\n      },\n\n      modify: function(bindingName, token) {\n\n        _setupUsages(bindingName);\n\n        _current[\"(usages)\"][bindingName][\"(onlyUsedSubFunction)\"] = false;\n        _current[\"(usages)\"][bindingName][\"(modified)\"].push(token);\n      },\n\n      /**\n       * Create a new block-scoped binding and add it to the current scope. See\n       * the `funct.add` method for coresponding logic to create\n       * function-scoped bindings.\n       *\n       * @param {string} bindingName - the value of the identifier\n       * @param {string} type - the type of the binding; one of \"class\",\n       *                        \"const\", \"function\", \"import\", or \"let\"\n       * @param {object} tok - the token that triggered the definition\n       * @param {boolean} unused - `true` if the binding has not been\n       *                           referenced\n       * @param {boolean} initialized - `true` if the binding has been\n       *                                initialized (as is the case with\n       *                                bindings created via `import`\n       *                                declarations)\n       */\n      add: function(bindingName, type, tok, unused, initialized) {\n        _current[\"(bindings)\"][bindingName] = {\n          \"(type)\" : type,\n          \"(token)\": tok,\n          \"(initialized)\": !!initialized,\n          \"(blockscoped)\": true,\n          \"(unused)\": unused };\n      },\n\n      addLabel: function(labelName, opts) {\n        var token = opts.token;\n        if (scopeManagerInst.funct.hasLabel(labelName)) {\n          warning(\"E011\", token, labelName);\n        }\n        else if (state.option.shadow === \"outer\") {\n          if (scopeManagerInst.funct.has(labelName)) {\n            warning(\"W004\", token, labelName);\n          } else {\n            _checkOuterShadow(labelName, token);\n          }\n        }\n        _current[\"(labels)\"][labelName] = token;\n      }\n    }\n  };\n  return scopeManagerInst;\n};\n\nmodule.exports = scopeManager;\n\n},{\"events\":11,\"lodash\":12}],24:[function(require,module,exports){\n\"use strict\";\nvar NameStack = require(\"./name-stack.js\");\n\nvar state = {\n  syntax: {},\n\n  /**\n   * Determine if the code currently being linted is strict mode code.\n   *\n   * @returns {boolean}\n   */\n  isStrict: function() {\n    return !!this.directive[\"use strict\"] || this.inClassBody ||\n      this.option.module || this.option.strict === \"implied\";\n  },\n\n  /**\n   * Determine if the current state warrants a warning for statements outside\n   * of strict mode code.\n   *\n   * While emitting warnings based on function scope would be more intuitive\n   * (and less noisy), JSHint observes statement-based semantics in order to\n   * preserve legacy behavior.\n   *\n   * This method does not take the state of the parser into account, making no\n   * distinction between global code and function code. Because the \"missing\n   * 'use strict'\" warning is *also* reported at function boundaries, this\n   * function interprets `strict` option values `true` and `undefined` as\n   * equivalent.\n   */\n  stmtMissingStrict: function() {\n    if (this.option.strict === \"global\") {\n      return true;\n    }\n\n    if (this.option.strict === false) {\n      return false;\n    }\n\n    if (this.option.globalstrict) {\n      return true;\n    }\n\n    return false;\n  },\n\n  allowsGlobalUsd: function() {\n    return this.option.strict === \"global\" || this.option.globalstrict ||\n      this.option.module || this.impliedClosure();\n  },\n\n  /**\n   * Determine if the current configuration describes an environment that is\n   * wrapped in an immediately-invoked function expression prior to evaluation.\n   *\n   * @returns {boolean}\n   */\n  impliedClosure: function() {\n    return this.option.node || this.option.phantom || this.option.browserify;\n  },\n\n  // Assumption: chronologically ES3 < ES5 < ES6 < Moz\n\n  inMoz: function() {\n    return this.option.moz;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 11 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES11: function() {\n    return this.esVersion >= 11;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 10 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES10: function() {\n    return this.esVersion >= 10;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 9 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES9: function() {\n    return this.esVersion >= 9;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 8 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES8: function() {\n    return this.esVersion >= 8;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 7 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES7: function() {\n    return this.esVersion >= 7;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 6 should be accepted.\n   *\n   * @param {boolean} strict - When `true`, do not interpret the `moz` option\n   *                           as ECMAScript 6\n   *\n   * @returns {boolean}\n   */\n  inES6: function(strict) {\n    if (!strict && this.option.moz) {\n      return true;\n    }\n\n    return this.esVersion >= 6;\n  },\n\n  /**\n   * Determine if constructs introduced in ECMAScript 5 should be accepted.\n   *\n   * @returns {boolean}\n   */\n  inES5: function() {\n    return !this.esVersion || this.esVersion >= 5 || this.option.moz;\n  },\n\n  /**\n   * Determine the current version of the input language by inspecting the\n   * value of all ECMAScript-version-related options. This logic is necessary\n   * to ensure compatibility with deprecated options `es3`, `es5`, and\n   * `esnext`, and it may be drastically simplified when those options are\n   * removed.\n   *\n   * @returns {string|null} - the name of any incompatible option detected,\n   *                          `null` otherwise\n   */\n  inferEsVersion: function() {\n    var badOpt = null;\n\n    if (this.option.esversion) {\n      if (this.option.es3) {\n        badOpt = \"es3\";\n      } else if (this.option.es5) {\n        badOpt = \"es5\";\n      } else if (this.option.esnext) {\n        badOpt = \"esnext\";\n      }\n\n      if (badOpt) {\n        return badOpt;\n      }\n\n      if (this.option.esversion === 2015) {\n        this.esVersion = 6;\n      } else {\n        this.esVersion = this.option.esversion;\n      }\n    } else if (this.option.es3) {\n      this.esVersion = 3;\n    } else if (this.option.esnext) {\n      this.esVersion = 6;\n    }\n\n    return null;\n  },\n\n  reset: function() {\n    this.tokens = {\n      prev: null,\n      next: null,\n      curr: null\n    };\n\n    this.option = { unstable: {} };\n    this.esVersion = 5;\n    this.funct = null;\n    this.ignored = {};\n    /**\n     * A lookup table for active directives whose keys are the value of the\n     * directives and whose values are the tokens which enabled the directives.\n     */\n    this.directive = Object.create(null);\n    this.jsonMode = false;\n    this.lines = [];\n    this.tab = \"\";\n    this.cache = {}; // Node.JS doesn't have Map. Sniff.\n    this.ignoredLines = {};\n    this.forinifcheckneeded = false;\n    this.nameStack = new NameStack();\n    this.inClassBody = false;\n  }\n};\n\nexports.state = state;\n\n},{\"./name-stack.js\":19}],25:[function(require,module,exports){\n\"use strict\";\n\nexports.register = function(linter) {\n  // Check for properties named __proto__. This special property was\n  // deprecated and then re-introduced for ES6.\n\n  linter.on(\"Identifier\", function style_scanProto(data) {\n    if (linter.getOption(\"proto\")) {\n      return;\n    }\n\n    if (data.name === \"__proto__\") {\n      linter.warn(\"W103\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.name, \"6\" ]\n      });\n    }\n  });\n\n  // Check for properties named __iterator__. This is a special property\n  // available only in browsers with JavaScript 1.7 implementation, but\n  // it is deprecated for ES6\n\n  linter.on(\"Identifier\", function style_scanIterator(data) {\n    if (linter.getOption(\"iterator\")) {\n      return;\n    }\n\n    if (data.name === \"__iterator__\") {\n      linter.warn(\"W103\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.name ]\n      });\n    }\n  });\n\n  // Check that all identifiers are using camelCase notation.\n  // Exceptions: names like MY_VAR and _myVar.\n\n  linter.on(\"Identifier\", function style_scanCamelCase(data) {\n    if (!linter.getOption(\"camelcase\")) {\n      return;\n    }\n\n    if (data.name.replace(/^_+|_+$/g, \"\").indexOf(\"_\") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {\n      linter.warn(\"W106\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.name ]\n      });\n    }\n  });\n\n  // Enforce consistency in style of quoting.\n\n  linter.on(\"String\", function style_scanQuotes(data) {\n    var quotmark = linter.getOption(\"quotmark\");\n    var code;\n\n    if (!quotmark) {\n      return;\n    }\n\n    // If quotmark is set to 'single' warn about all double-quotes.\n\n    if (quotmark === \"single\" && data.quote !== \"'\") {\n      code = \"W109\";\n    }\n\n    // If quotmark is set to 'double' warn about all single-quotes.\n\n    if (quotmark === \"double\" && data.quote !== \"\\\"\") {\n      code = \"W108\";\n    }\n\n    // If quotmark is set to true, remember the first quotation style\n    // and then warn about all others.\n\n    if (quotmark === true) {\n      if (!linter.getCache(\"quotmark\")) {\n        linter.setCache(\"quotmark\", data.quote);\n      }\n\n      if (linter.getCache(\"quotmark\") !== data.quote) {\n        code = \"W110\";\n      }\n    }\n\n    if (code) {\n      linter.warn(code, {\n        line: data.line,\n        char: data.char,\n      });\n    }\n  });\n\n  linter.on(\"Number\", function style_scanNumbers(data) {\n    if (data.value.charAt(0) === \".\") {\n      // Warn about a leading decimal point.\n      linter.warn(\"W008\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.value ]\n      });\n    }\n\n    if (data.value.substr(data.value.length - 1) === \".\") {\n      // Warn about a trailing decimal point.\n      linter.warn(\"W047\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.value ]\n      });\n    }\n\n    if (/^00+/.test(data.value)) {\n      // Multiple leading zeroes.\n      linter.warn(\"W046\", {\n        line: data.line,\n        char: data.char,\n        data: [ data.value ]\n      });\n    }\n  });\n\n  // Warn about script URLs.\n\n  linter.on(\"String\", function style_scanJavaScriptURLs(data) {\n    var re = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;\n\n    if (linter.getOption(\"scripturl\")) {\n      return;\n    }\n\n    if (re.test(data.value)) {\n      linter.warn(\"W107\", {\n        line: data.line,\n        char: data.char\n      });\n    }\n  });\n};\n\n},{}],26:[function(require,module,exports){\n/*\n * Determine whether a given string is a valid UnicodePropertyValueExpression.\n */\n\n\"use strict\";\n\nmodule.exports = function validate(sequence) {\n  var equalSignIndex = sequence.indexOf(\"=\");\n\n  if (equalSignIndex === -1) {\n    return sequence in names.binary || sequence in values.general;\n  }\n\n  var name = sequence.substr(0, equalSignIndex);\n  var value = sequence.substr(equalSignIndex + 1);\n\n  if (name === \"General_Category\" || name === \"gc\") {\n    return value in values.general;\n  } if (name === \"Script\" || name === \"sc\" || name === \"Script_Extensions\" || name === \"scx\") {\n    return value in values.script;\n  }\n\n  return false;\n};\n\n\nvar names = {\n  nonBinary: Object.create(null),\n  binary: Object.create(null)\n};\nvar values = {\n  general: Object.create(null),\n  script: Object.create(null)\n};\n\nvar nb = names.nonBinary;\nnb.General_Category = true;\nnb.gc = true;\nnb.Script = true;\nnb.sc = true;\nnb.Script_Extensions = true;\nnb.scx = true;\n\nvar b = names.binary;\nb.ASCII = true;\nb.ASCII_Hex_Digit = true;\nb.AHex = true;\nb.Alphabetic = true;\nb.Alpha = true;\nb.Any = true;\nb.Assigned = true;\nb.Bidi_Control = true;\nb.Bidi_C = true;\nb.Bidi_Mirrored = true;\nb.Bidi_M = true;\nb.Case_Ignorable = true;\nb.CI = true;\nb.Cased = true;\nb.Changes_When_Casefolded = true;\nb.CWCF = true;\nb.Changes_When_Casemapped = true;\nb.CWCM = true;\nb.Changes_When_Lowercased = true;\nb.CWL = true;\nb.Changes_When_NFKC_Casefolded = true;\nb.CWKCF = true;\nb.Changes_When_Titlecased = true;\nb.CWT = true;\nb.Changes_When_Uppercased = true;\nb.CWU = true;\nb.Dash = true;\nb.Default_Ignorable_Code_Point = true;\nb.DI = true;\nb.Deprecated = true;\nb.Dep = true;\nb.Diacritic = true;\nb.Dia = true;\nb.Emoji = true;\nb.Emoji_Component = true;\nb.EComp = true;\nb.Emoji_Modifier = true;\nb.EMod = true;\nb.Emoji_Modifier_Base = true;\nb.EBase = true;\nb.Emoji_Presentation = true;\nb.EPres = true;\nb.Extended_Pictographic = true;\nb.ExtPict = true;\nb.Extender = true;\nb.Ext = true;\nb.Grapheme_Base = true;\nb.Gr_Base = true;\nb.Grapheme_Extend = true;\nb.Gr_Ext = true;\nb.Hex_Digit = true;\nb.Hex = true;\nb.IDS_Binary_Operator = true;\nb.IDSB = true;\nb.IDS_Trinary_Operator = true;\nb.IDST = true;\nb.ID_Continue = true;\nb.IDC = true;\nb.ID_Start = true;\nb.IDS = true;\nb.Ideographic = true;\nb.Ideo = true;\nb.Join_Control = true;\nb.Join_C = true;\nb.Logical_Order_Exception = true;\nb.LOE = true;\nb.Lowercase = true;\nb.Lower = true;\nb.Math = true;\nb.Noncharacter_Code_Point = true;\nb.NChar = true;\nb.Pattern_Syntax = true;\nb.Pat_Syn = true;\nb.Pattern_White_Space = true;\nb.Pat_WS = true;\nb.Quotation_Mark = true;\nb.QMark = true;\nb.Radical = true;\nb.Regional_Indicator = true;\nb.RI = true;\nb.Sentence_Terminal = true;\nb.STerm = true;\nb.Soft_Dotted = true;\nb.SD = true;\nb.Terminal_Punctuation = true;\nb.Term = true;\nb.Unified_Ideograph = true;\nb.UIdeo = true;\nb.Uppercase = true;\nb.Upper = true;\nb.Variation_Selector = true;\nb.VS = true;\nb.White_Space = true;\nb.space = true;\nb.XID_Continue = true;\nb.XIDC = true;\nb.XID_Start = true;\nb.XIDS = true;\n\nvar g = values.general;\ng.Cased_Letter = true;\ng.LC = true;\ng.Close_Punctuation = true;\ng.Pe = true;\ng.Connector_Punctuation = true;\ng.Pc = true;\ng.Control = true;\ng.Cc = true;\ng.cntrl = true;\ng.Currency_Symbol = true;\ng.Sc = true;\ng.Dash_Punctuation = true;\ng.Pd = true;\ng.Decimal_Number = true;\ng.Nd = true;\ng.digit = true;\ng.Enclosing_Mark = true;\ng.Me = true;\ng.Final_Punctuation = true;\ng.Pf = true;\ng.Format = true;\ng.Cf = true;\ng.Initial_Punctuation = true;\ng.Pi = true;\ng.Letter = true;\ng.L = true;\ng.Letter_Number = true;\ng.Nl = true;\ng.Line_Separator = true;\ng.Zl = true;\ng.Lowercase_Letter = true;\ng.Ll = true;\ng.Mark = true;\ng.M = true;\ng.Combining_Mark = true;\ng.Math_Symbol = true;\ng.Sm = true;\ng.Modifier_Letter = true;\ng.Lm = true;\ng.Modifier_Symbol = true;\ng.Sk = true;\ng.Nonspacing_Mark = true;\ng.Mn = true;\ng.Number = true;\ng.N = true;\ng.Open_Punctuation = true;\ng.Ps = true;\ng.Other = true;\ng.C = true;\ng.Other_Letter = true;\ng.Lo = true;\ng.Other_Number = true;\ng.No = true;\ng.Other_Punctuation = true;\ng.Po = true;\ng.Other_Symbol = true;\ng.So = true;\ng.Paragraph_Separator = true;\ng.Zp = true;\ng.Private_Use = true;\ng.Co = true;\ng.Punctuation = true;\ng.P = true;\ng.punct = true;\ng.Separator = true;\ng.Z = true;\ng.Space_Separator = true;\ng.Zs = true;\ng.Spacing_Mark = true;\ng.Mc = true;\ng.Surrogate = true;\ng.Cs = true;\ng.Symbol = true;\ng.S = true;\ng.Titlecase_Letter = true;\ng.Lt = true;\ng.Unassigned = true;\ng.Cn = true;\ng.Uppercase_Letter = true;\ng.Lu = true;\n\nvar s = values.script;\ns.Adlam = true;\ns.Adlm = true;\ns.Ahom = true;\ns.Anatolian_Hieroglyphs = true;\ns.Hluw = true;\ns.Arabic = true;\ns.Arab = true;\ns.Armenian = true;\ns.Armn = true;\ns.Avestan = true;\ns.Avst = true;\ns.Balinese = true;\ns.Bali = true;\ns.Bamum = true;\ns.Bamu = true;\ns.Bassa_Vah = true;\ns.Bass = true;\ns.Batak = true;\ns.Batk = true;\ns.Bengali = true;\ns.Beng = true;\ns.Bhaiksuki = true;\ns.Bhks = true;\ns.Bopomofo = true;\ns.Bopo = true;\ns.Brahmi = true;\ns.Brah = true;\ns.Braille = true;\ns.Brai = true;\ns.Buginese = true;\ns.Bugi = true;\ns.Buhid = true;\ns.Buhd = true;\ns.Canadian_Aboriginal = true;\ns.Cans = true;\ns.Carian = true;\ns.Cari = true;\ns.Caucasian_Albanian = true;\ns.Aghb = true;\ns.Chakma = true;\ns.Cakm = true;\ns.Cham = true;\ns.Chorasmian = true;\ns.Chrs = true;\ns.Cherokee = true;\ns.Cher = true;\ns.Common = true;\ns.Zyyy = true;\ns.Coptic = true;\ns.Copt = true;\ns.Qaac = true;\ns.Cuneiform = true;\ns.Xsux = true;\ns.Cypriot = true;\ns.Cprt = true;\ns.Cyrillic = true;\ns.Cyrl = true;\ns.Deseret = true;\ns.Dsrt = true;\ns.Devanagari = true;\ns.Deva = true;\ns.Dives_Akuru = true;\ns.Diak = true;\ns.Dogra = true;\ns.Dogr = true;\ns.Duployan = true;\ns.Dupl = true;\ns.Egyptian_Hieroglyphs = true;\ns.Egyp = true;\ns.Elbasan = true;\ns.Elba = true;\ns.Elymaic = true;\ns.Elym = true;\ns.Ethiopic = true;\ns.Ethi = true;\ns.Georgian = true;\ns.Geor = true;\ns.Glagolitic = true;\ns.Glag = true;\ns.Gothic = true;\ns.Goth = true;\ns.Grantha = true;\ns.Gran = true;\ns.Greek = true;\ns.Grek = true;\ns.Gujarati = true;\ns.Gujr = true;\ns.Gunjala_Gondi = true;\ns.Gong = true;\ns.Gurmukhi = true;\ns.Guru = true;\ns.Han = true;\ns.Hani = true;\ns.Hangul = true;\ns.Hang = true;\ns.Hanifi_Rohingya = true;\ns.Rohg = true;\ns.Hanunoo = true;\ns.Hano = true;\ns.Hatran = true;\ns.Hatr = true;\ns.Hebrew = true;\ns.Hebr = true;\ns.Hiragana = true;\ns.Hira = true;\ns.Imperial_Aramaic = true;\ns.Armi = true;\ns.Inherited = true;\ns.Zinh = true;\ns.Qaai = true;\ns.Inscriptional_Pahlavi = true;\ns.Phli = true;\ns.Inscriptional_Parthian = true;\ns.Prti = true;\ns.Javanese = true;\ns.Java = true;\ns.Kaithi = true;\ns.Kthi = true;\ns.Kannada = true;\ns.Knda = true;\ns.Katakana = true;\ns.Kana = true;\ns.Kayah_Li = true;\ns.Kali = true;\ns.Kharoshthi = true;\ns.Khar = true;\ns.Khitan_Small_Script = true;\ns.Kits = true;\ns.Khmer = true;\ns.Khmr = true;\ns.Khojki = true;\ns.Khoj = true;\ns.Khudawadi = true;\ns.Sind = true;\ns.Lao = true;\ns.Laoo = true;\ns.Latin = true;\ns.Latn = true;\ns.Lepcha = true;\ns.Lepc = true;\ns.Limbu = true;\ns.Limb = true;\ns.Linear_A = true;\ns.Lina = true;\ns.Linear_B = true;\ns.Linb = true;\ns.Lisu = true;\ns.Lycian = true;\ns.Lyci = true;\ns.Lydian = true;\ns.Lydi = true;\ns.Mahajani = true;\ns.Mahj = true;\ns.Makasar = true;\ns.Maka = true;\ns.Malayalam = true;\ns.Mlym = true;\ns.Mandaic = true;\ns.Mand = true;\ns.Manichaean = true;\ns.Mani = true;\ns.Marchen = true;\ns.Marc = true;\ns.Medefaidrin = true;\ns.Medf = true;\ns.Masaram_Gondi = true;\ns.Gonm = true;\ns.Meetei_Mayek = true;\ns.Mtei = true;\ns.Mende_Kikakui = true;\ns.Mend = true;\ns.Meroitic_Cursive = true;\ns.Merc = true;\ns.Meroitic_Hieroglyphs = true;\ns.Mero = true;\ns.Miao = true;\ns.Plrd = true;\ns.Modi = true;\ns.Mongolian = true;\ns.Mong = true;\ns.Mro = true;\ns.Mroo = true;\ns.Multani = true;\ns.Mult = true;\ns.Myanmar = true;\ns.Mymr = true;\ns.Nabataean = true;\ns.Nbat = true;\ns.Nandinagari = true;\ns.Nand = true;\ns.New_Tai_Lue = true;\ns.Talu = true;\ns.Newa = true;\ns.Nko = true;\ns.Nkoo = true;\ns.Nushu = true;\ns.Nshu = true;\ns.Nyiakeng_Puachue_Hmong = true;\ns.Hmnp = true;\ns.Ogham = true;\ns.Ogam = true;\ns.Ol_Chiki = true;\ns.Olck = true;\ns.Old_Hungarian = true;\ns.Hung = true;\ns.Old_Italic = true;\ns.Ital = true;\ns.Old_North_Arabian = true;\ns.Narb = true;\ns.Old_Permic = true;\ns.Perm = true;\ns.Old_Persian = true;\ns.Xpeo = true;\ns.Old_Sogdian = true;\ns.Sogo = true;\ns.Old_South_Arabian = true;\ns.Sarb = true;\ns.Old_Turkic = true;\ns.Orkh = true;\ns.Oriya = true;\ns.Orya = true;\ns.Osage = true;\ns.Osge = true;\ns.Osmanya = true;\ns.Osma = true;\ns.Pahawh_Hmong = true;\ns.Hmng = true;\ns.Palmyrene = true;\ns.Palm = true;\ns.Pau_Cin_Hau = true;\ns.Pauc = true;\ns.Phags_Pa = true;\ns.Phag = true;\ns.Phoenician = true;\ns.Phnx = true;\ns.Psalter_Pahlavi = true;\ns.Phlp = true;\ns.Rejang = true;\ns.Rjng = true;\ns.Runic = true;\ns.Runr = true;\ns.Samaritan = true;\ns.Samr = true;\ns.Saurashtra = true;\ns.Saur = true;\ns.Sharada = true;\ns.Shrd = true;\ns.Shavian = true;\ns.Shaw = true;\ns.Siddham = true;\ns.Sidd = true;\ns.SignWriting = true;\ns.Sgnw = true;\ns.Sinhala = true;\ns.Sinh = true;\ns.Sogdian = true;\ns.Sogd = true;\ns.Sora_Sompeng = true;\ns.Sora = true;\ns.Soyombo = true;\ns.Soyo = true;\ns.Sundanese = true;\ns.Sund = true;\ns.Syloti_Nagri = true;\ns.Sylo = true;\ns.Syriac = true;\ns.Syrc = true;\ns.Tagalog = true;\ns.Tglg = true;\ns.Tagbanwa = true;\ns.Tagb = true;\ns.Tai_Le = true;\ns.Tale = true;\ns.Tai_Tham = true;\ns.Lana = true;\ns.Tai_Viet = true;\ns.Tavt = true;\ns.Takri = true;\ns.Takr = true;\ns.Tamil = true;\ns.Taml = true;\ns.Tangut = true;\ns.Tang = true;\ns.Telugu = true;\ns.Telu = true;\ns.Thaana = true;\ns.Thaa = true;\ns.Thai = true;\ns.Tibetan = true;\ns.Tibt = true;\ns.Tifinagh = true;\ns.Tfng = true;\ns.Tirhuta = true;\ns.Tirh = true;\ns.Ugaritic = true;\ns.Ugar = true;\ns.Vai = true;\ns.Vaii = true;\ns.Wancho = true;\ns.Wcho = true;\ns.Warang_Citi = true;\ns.Wara = true;\ns.Yezidi = true;\ns.Yezi = true;\ns.Yi = true;\ns.Yiii = true;\ns.Zanabazar_Square = true;\ns.Zanb = true;\n\n},{}],27:[function(require,module,exports){\n// jshint -W001\n\n\"use strict\";\n\n// Identifiers provided by the ECMAScript standard.\n\nexports.reservedVars = {\n  NaN       : false,\n  undefined : false\n};\n\nexports.ecmaIdentifiers = {\n  3: {\n    Array              : false,\n    Boolean            : false,\n    Date               : false,\n    decodeURI          : false,\n    decodeURIComponent : false,\n    encodeURI          : false,\n    encodeURIComponent : false,\n    Error              : false,\n    \"eval\"             : false,\n    EvalError          : false,\n    Function           : false,\n    hasOwnProperty     : false,\n    Infinity           : false,\n    isFinite           : false,\n    isNaN              : false,\n    Math               : false,\n    Number             : false,\n    Object             : false,\n    parseInt           : false,\n    parseFloat         : false,\n    RangeError         : false,\n    ReferenceError     : false,\n    RegExp             : false,\n    String             : false,\n    SyntaxError        : false,\n    TypeError          : false,\n    URIError           : false\n  },\n  5: {\n    JSON               : false\n  },\n  6: {\n    ArrayBuffer        : false,\n    DataView           : false,\n    Float32Array       : false,\n    Float64Array       : false,\n    Int8Array          : false,\n    Int16Array         : false,\n    Int32Array         : false,\n    Map                : false,\n    Promise            : false,\n    Proxy              : false,\n    Reflect            : false,\n    Set                : false,\n    Symbol             : false,\n    Uint8Array         : false,\n    Uint16Array        : false,\n    Uint32Array        : false,\n    Uint8ClampedArray  : false,\n    WeakMap            : false,\n    WeakSet            : false\n  },\n  8: {\n    Atomics            : false,\n    SharedArrayBuffer  : false\n  },\n  11: {\n    BigInt             : false\n  }\n};\n\n// Global variables commonly provided by a web browser environment.\n\nexports.browser = {\n  Audio                : false,\n  Blob                 : false,\n  addEventListener     : false, // EventTarget\n  applicationCache     : false,\n  atob                 : false, // WindowOrWorkerGlobalScope\n  blur                 : false,\n  btoa                 : false, // WindowOrWorkerGlobalScope\n  cancelAnimationFrame : false,\n  CanvasGradient       : false,\n  CanvasPattern        : false,\n  CanvasRenderingContext2D: false,\n  CSS                  : false,\n  CSSImportRule        : false,\n  CSSGroupingRule      : false,\n  CSSMarginRule        : false,\n  CSSMediaRule         : false,\n  CSSNamespaceRule     : false,\n  CSSPageRule          : false,\n  CSSRule              : false,\n  CSSRuleList          : false,\n  CSSStyleDeclaration  : false,\n  CSSStyleRule         : false,\n  CSSStyleSheet        : false,\n  clearInterval        : false, // WindowOrWorkerGlobalScope\n  clearTimeout         : false, // WindowOrWorkerGlobalScope\n  close                : false,\n  closed               : false,\n  Comment              : false,\n  CompositionEvent     : false,\n  createImageBitmap    : false, // WindowOrWorkerGlobalScope\n  CustomEvent          : false,\n  DOMParser            : false,\n  defaultStatus        : false,\n  dispatchEvent        : false, // EventTarget\n  Document             : false,\n  document             : false,\n  DocumentFragment     : false,\n  Element              : false,\n  ElementTimeControl   : false,\n  Event                : false,\n  event                : false,\n  fetch                : false,\n  File                 : false,\n  FileList             : false,\n  FileReader           : false,\n  FormData             : false,\n  focus                : false,\n  frames               : false,\n  getComputedStyle     : false,\n  Headers              : false,\n  HTMLAnchorElement    : false,\n  HTMLAreaElement      : false,\n  HTMLAudioElement     : false,\n  HTMLBaseElement      : false,\n  HTMLBlockquoteElement: false,\n  HTMLBodyElement      : false,\n  HTMLBRElement        : false,\n  HTMLButtonElement    : false,\n  HTMLCanvasElement    : false,\n  HTMLCollection       : false,\n  HTMLDataElement      : false,\n  HTMLDataListElement  : false,\n  HTMLDetailsElement   : false,\n  HTMLDialogElement    : false,\n  HTMLDirectoryElement : false,\n  HTMLDivElement       : false,\n  HTMLDListElement     : false,\n  HTMLElement          : false,\n  HTMLEmbedElement     : false,\n  HTMLFieldSetElement  : false,\n  HTMLFontElement      : false,\n  HTMLFormElement      : false,\n  HTMLFrameElement     : false,\n  HTMLFrameSetElement  : false,\n  HTMLHeadElement      : false,\n  HTMLHeadingElement   : false,\n  HTMLHRElement        : false,\n  HTMLHtmlElement      : false,\n  HTMLIFrameElement    : false,\n  HTMLImageElement     : false,\n  HTMLInputElement     : false,\n/* HTMLIsIndexElement was removed from the WHATWG HTML spec;\n   see https://github.com/whatwg/html/pull/1095.\n   HTMLIsIndexElement has been removed from browsers; see:\n   • Chromium Removal: https://codereview.chromium.org/96653004/\n   • Gecko Removal: https://bugzilla.mozilla.org/show_bug.cgi?id=1266495\n   • WebKit Removal: https://bugs.webkit.org/show_bug.cgi?id=7139.\n   See also the discussion at https://github.com/jshint/jshint/pull/3222. */\n  HTMLIsIndexElement   : false,\n  HTMLLabelElement     : false,\n  HTMLLayerElement     : false,\n  HTMLLegendElement    : false,\n  HTMLLIElement        : false,\n  HTMLLinkElement      : false,\n  HTMLMapElement       : false,\n  HTMLMarqueeElement   : false,\n  HTMLMediaElement     : false,\n  HTMLMenuElement      : false,\n  HTMLMetaElement      : false,\n  HTMLMeterElement     : false,\n  HTMLModElement       : false,\n  HTMLObjectElement    : false,\n  HTMLOListElement     : false,\n  HTMLOptGroupElement  : false,\n  HTMLOptionElement    : false,\n  HTMLParagraphElement : false,\n  HTMLParamElement     : false,\n  HTMLPictureElement   : false,\n  HTMLPreElement       : false,\n  HTMLProgressElement  : false,\n  HTMLQuoteElement     : false,\n  HTMLScriptElement    : false,\n  HTMLSelectElement    : false,\n  HTMLSlotElement      : false,\n  HTMLSourceElement    : false,\n  HTMLStyleElement     : false,\n  HTMLTableCaptionElement: false,\n  HTMLTableCellElement : false,\n  HTMLTableColElement  : false,\n  HTMLTableElement     : false,\n  HTMLTableRowElement  : false,\n  HTMLTableSectionElement: false,\n  HTMLTemplateElement  : false,\n  HTMLTextAreaElement  : false,\n  HTMLTimeElement      : false,\n  HTMLTitleElement     : false,\n  HTMLTrackElement     : false,\n  HTMLUListElement     : false,\n  HTMLVideoElement     : false,\n  history              : false,\n  Image                : false,\n  IntersectionObserver : false,\n  Intl                 : false,\n  length               : false,\n  localStorage         : false,\n  location             : false,\n  matchMedia           : false,\n  MediaList            : false,\n  MediaRecorder        : false,\n  MessageChannel       : false,\n  MessageEvent         : false,\n  MessagePort          : false,\n  MouseEvent           : false,\n  moveBy               : false,\n  moveTo               : false,\n  MutationObserver     : false,\n  name                 : false,\n  Node                 : false,\n  NodeFilter           : false,\n  NodeList             : false,\n  Notification         : false,\n  navigator            : false,\n  onbeforeunload       : true,\n  onblur               : true,\n  onerror              : true,\n  onfocus              : true,\n  onload               : true,\n  onresize             : true,\n  onunload             : true,\n  open                 : false,\n  openDatabase         : false,\n  opener               : false,\n  Option               : false,\n  origin               : false, // WindowOrWorkerGlobalScope\n  parent               : false,\n  performance          : false,\n  print                : false,\n  queueMicrotask       : false, // WindowOrWorkerGlobalScope\n  Range                : false,\n  requestAnimationFrame : false,\n  removeEventListener  : false, // EventTarget\n  Request              : false,\n  resizeBy             : false,\n  resizeTo             : false,\n  Response             : false,\n  screen               : false,\n  scroll               : false,\n  scrollBy             : false,\n  scrollTo             : false,\n  sessionStorage       : false,\n  setInterval          : false, // WindowOrWorkerGlobalScope\n  setTimeout           : false, // WindowOrWorkerGlobalScope\n  SharedWorker         : false,\n  status               : false,\n  Storage              : false,\n  StyleSheet           : false,\n  SVGAElement          : false,\n  SVGAltGlyphDefElement: false,\n  SVGAltGlyphElement   : false,\n  SVGAltGlyphItemElement: false,\n  SVGAngle             : false,\n  SVGAnimateColorElement: false,\n  SVGAnimateElement    : false,\n  SVGAnimateMotionElement: false,\n  SVGAnimateTransformElement: false,\n  SVGAnimatedAngle     : false,\n  SVGAnimatedBoolean   : false,\n  SVGAnimatedEnumeration: false,\n  SVGAnimatedInteger   : false,\n  SVGAnimatedLength    : false,\n  SVGAnimatedLengthList: false,\n  SVGAnimatedNumber    : false,\n  SVGAnimatedNumberList: false,\n  SVGAnimatedPathData  : false,\n  SVGAnimatedPoints    : false,\n  SVGAnimatedPreserveAspectRatio: false,\n  SVGAnimatedRect      : false,\n  SVGAnimatedString    : false,\n  SVGAnimatedTransformList: false,\n  SVGAnimationElement  : false,\n  SVGCSSRule           : false,\n  SVGCircleElement     : false,\n  SVGClipPathElement   : false,\n  SVGColor             : false,\n  SVGColorProfileElement: false,\n  SVGColorProfileRule  : false,\n  SVGComponentTransferFunctionElement: false,\n  SVGCursorElement     : false,\n  SVGDefsElement       : false,\n  SVGDescElement       : false,\n  SVGDocument          : false,\n  SVGElement           : false,\n  SVGElementInstance   : false,\n  SVGElementInstanceList: false,\n  SVGEllipseElement    : false,\n  SVGExternalResourcesRequired: false,\n  SVGFEBlendElement    : false,\n  SVGFEColorMatrixElement: false,\n  SVGFEComponentTransferElement: false,\n  SVGFECompositeElement: false,\n  SVGFEConvolveMatrixElement: false,\n  SVGFEDiffuseLightingElement: false,\n  SVGFEDisplacementMapElement: false,\n  SVGFEDistantLightElement: false,\n  SVGFEFloodElement    : false,\n  SVGFEFuncAElement    : false,\n  SVGFEFuncBElement    : false,\n  SVGFEFuncGElement    : false,\n  SVGFEFuncRElement    : false,\n  SVGFEGaussianBlurElement: false,\n  SVGFEImageElement    : false,\n  SVGFEMergeElement    : false,\n  SVGFEMergeNodeElement: false,\n  SVGFEMorphologyElement: false,\n  SVGFEOffsetElement   : false,\n  SVGFEPointLightElement: false,\n  SVGFESpecularLightingElement: false,\n  SVGFESpotLightElement: false,\n  SVGFETileElement     : false,\n  SVGFETurbulenceElement: false,\n  SVGFilterElement     : false,\n  SVGFilterPrimitiveStandardAttributes: false,\n  SVGFitToViewBox      : false,\n  SVGFontElement       : false,\n  SVGFontFaceElement   : false,\n  SVGFontFaceFormatElement: false,\n  SVGFontFaceNameElement: false,\n  SVGFontFaceSrcElement: false,\n  SVGFontFaceUriElement: false,\n  SVGForeignObjectElement: false,\n  SVGGElement          : false,\n  SVGGlyphElement      : false,\n  SVGGlyphRefElement   : false,\n  SVGGradientElement   : false,\n  SVGHKernElement      : false,\n  SVGICCColor          : false,\n  SVGImageElement      : false,\n  SVGLangSpace         : false,\n  SVGLength            : false,\n  SVGLengthList        : false,\n  SVGLineElement       : false,\n  SVGLinearGradientElement: false,\n  SVGLocatable         : false,\n  SVGMPathElement      : false,\n  SVGMarkerElement     : false,\n  SVGMaskElement       : false,\n  SVGMatrix            : false,\n  SVGMetadataElement   : false,\n  SVGMissingGlyphElement: false,\n  SVGNumber            : false,\n  SVGNumberList        : false,\n  SVGPaint             : false,\n  SVGPathElement       : false,\n  SVGPathSeg           : false,\n  SVGPathSegArcAbs     : false,\n  SVGPathSegArcRel     : false,\n  SVGPathSegClosePath  : false,\n  SVGPathSegCurvetoCubicAbs: false,\n  SVGPathSegCurvetoCubicRel: false,\n  SVGPathSegCurvetoCubicSmoothAbs: false,\n  SVGPathSegCurvetoCubicSmoothRel: false,\n  SVGPathSegCurvetoQuadraticAbs: false,\n  SVGPathSegCurvetoQuadraticRel: false,\n  SVGPathSegCurvetoQuadraticSmoothAbs: false,\n  SVGPathSegCurvetoQuadraticSmoothRel: false,\n  SVGPathSegLinetoAbs  : false,\n  SVGPathSegLinetoHorizontalAbs: false,\n  SVGPathSegLinetoHorizontalRel: false,\n  SVGPathSegLinetoRel  : false,\n  SVGPathSegLinetoVerticalAbs: false,\n  SVGPathSegLinetoVerticalRel: false,\n  SVGPathSegList       : false,\n  SVGPathSegMovetoAbs  : false,\n  SVGPathSegMovetoRel  : false,\n  SVGPatternElement    : false,\n  SVGPoint             : false,\n  SVGPointList         : false,\n  SVGPolygonElement    : false,\n  SVGPolylineElement   : false,\n  SVGPreserveAspectRatio: false,\n  SVGRadialGradientElement: false,\n  SVGRect              : false,\n  SVGRectElement       : false,\n  SVGRenderingIntent   : false,\n  SVGSVGElement        : false,\n  SVGScriptElement     : false,\n  SVGSetElement        : false,\n  SVGStopElement       : false,\n  SVGStringList        : false,\n  SVGStylable          : false,\n  SVGStyleElement      : false,\n  SVGSwitchElement     : false,\n  SVGSymbolElement     : false,\n  SVGTRefElement       : false,\n  SVGTSpanElement      : false,\n  SVGTests             : false,\n  SVGTextContentElement: false,\n  SVGTextElement       : false,\n  SVGTextPathElement   : false,\n  SVGTextPositioningElement: false,\n  SVGTitleElement      : false,\n  SVGTransform         : false,\n  SVGTransformList     : false,\n  SVGTransformable     : false,\n  SVGURIReference      : false,\n  SVGUnitTypes         : false,\n  SVGUseElement        : false,\n  SVGVKernElement      : false,\n  SVGViewElement       : false,\n  SVGViewSpec          : false,\n  SVGZoomAndPan        : false,\n  Text                 : false,\n  TextDecoder          : false,\n  TextEncoder          : false,\n  TimeEvent            : false,\n  top                  : false,\n  URL                  : false,\n  URLSearchParams      : false,\n  WebGLActiveInfo      : false,\n  WebGLBuffer          : false,\n  WebGLContextEvent    : false,\n  WebGLFramebuffer     : false,\n  WebGLProgram         : false,\n  WebGLRenderbuffer    : false,\n  WebGLRenderingContext: false,\n  WebGLShader          : false,\n  WebGLShaderPrecisionFormat: false,\n  WebGLTexture         : false,\n  WebGLUniformLocation : false,\n  WebSocket            : false,\n  window               : false,\n  Window               : false,\n  Worker               : false,\n  XDomainRequest       : false,\n  XMLDocument          : false,\n  XMLHttpRequest       : false,\n  XMLSerializer        : false,\n  XPathEvaluator       : false,\n  XPathException       : false,\n  XPathExpression      : false,\n  XPathNamespace       : false,\n  XPathNSResolver      : false,\n  XPathResult          : false\n};\n\nexports.devel = {\n  alert  : false,\n  confirm: false,\n  console: false,\n  Debug  : false,\n  opera  : false,\n  prompt : false\n};\n\nexports.worker = {\n  addEventListener    : true, // EventTarget\n  atob                : true, // WindowOrWorkerGlobalScope\n  btoa                : true, // WindowOrWorkerGlobalScope\n  clearInterval       : true, // WindowOrWorkerGlobalScope\n  clearTimeout        : true, // WindowOrWorkerGlobalScope\n  createImageBitmap   : true, // WindowOrWorkerGlobalScope\n  dispatchEvent       : true, // EventTarget\n  importScripts       : true,\n  onmessage           : true,\n  origin              : true, // WindowOrWorkerGlobalScope\n  postMessage         : true,\n  queueMicrotask      : true, // WindowOrWorkerGlobalScope\n  removeEventListener : true, // EventTarget\n  self                : true,\n  setInterval         : true, // WindowOrWorkerGlobalScope\n  setTimeout          : true, // WindowOrWorkerGlobalScope\n  FileReaderSync      : true\n};\n\n// Widely adopted global names that are not part of ECMAScript standard\nexports.nonstandard = {\n  escape  : false,\n  unescape: false\n};\n\n// Globals provided by popular JavaScript environments.\n\nexports.couch = {\n  \"require\" : false,\n  respond   : false,\n  getRow    : false,\n  emit      : false,\n  send      : false,\n  start     : false,\n  sum       : false,\n  log       : false,\n  exports   : false,\n  module    : false,\n  provides  : false\n};\n\nexports.node = {\n  __filename    : false,\n  __dirname     : false,\n  arguments     : false,\n  GLOBAL        : false,\n  global        : false,\n  module        : false,\n  require       : false,\n  Intl          : false,\n\n  // These globals are writeable because Node allows the following\n  // usage pattern: var Buffer = require(\"buffer\").Buffer;\n\n  Buffer         : true,\n  console        : true,\n  exports        : true,\n  process        : true,\n  setTimeout     : true,\n  clearTimeout   : true,\n  setInterval    : true,\n  clearInterval  : true,\n  setImmediate   : true, // v0.9.1+\n  clearImmediate : true, // v0.9.1+\n  URL            : true,  // v6.13.0+\n  URLSearchParams: true  // v6.13.0+\n};\n\nexports.browserify = {\n  __filename    : false,\n  __dirname     : false,\n  global        : false,\n  module        : false,\n  require       : false,\n  Buffer        : true,\n  exports       : true,\n  process       : true\n};\n\nexports.phantom = {\n  phantom      : true,\n  require      : true,\n  WebPage      : true,\n  console      : true, // in examples, but undocumented\n  exports      : true  // v1.7+\n};\n\nexports.qunit = {\n  asyncTest      : false,\n  deepEqual      : false,\n  equal          : false,\n  expect         : false,\n  module         : false,\n  notDeepEqual   : false,\n  notEqual       : false,\n  notOk          : false,\n  notPropEqual   : false,\n  notStrictEqual : false,\n  ok             : false,\n  propEqual      : false,\n  QUnit          : false,\n  raises         : false,\n  start          : false,\n  stop           : false,\n  strictEqual    : false,\n  test           : false,\n  \"throws\"       : false\n};\n\nexports.rhino = {\n  arguments    : false,\n  defineClass  : false,\n  deserialize  : false,\n  gc           : false,\n  help         : false,\n  importClass  : false,\n  importPackage: false,\n  \"java\"       : false,\n  load         : false,\n  loadClass    : false,\n  Packages     : false,\n  print        : false,\n  quit         : false,\n  readFile     : false,\n  readUrl      : false,\n  runCommand   : false,\n  seal         : false,\n  serialize    : false,\n  spawn        : false,\n  sync         : false,\n  toint32      : false,\n  version      : false\n};\n\nexports.shelljs = {\n  target       : false,\n  echo         : false,\n  exit         : false,\n  cd           : false,\n  pwd          : false,\n  ls           : false,\n  find         : false,\n  cp           : false,\n  rm           : false,\n  mv           : false,\n  mkdir        : false,\n  test         : false,\n  cat          : false,\n  sed          : false,\n  grep         : false,\n  which        : false,\n  dirs         : false,\n  pushd        : false,\n  popd         : false,\n  env          : false,\n  exec         : false,\n  chmod        : false,\n  config       : false,\n  error        : false,\n  tempdir      : false\n};\n\nexports.typed = {\n  ArrayBuffer         : false,\n  ArrayBufferView     : false,\n  DataView            : false,\n  Float32Array        : false,\n  Float64Array        : false,\n  Int16Array          : false,\n  Int32Array          : false,\n  Int8Array           : false,\n  Uint16Array         : false,\n  Uint32Array         : false,\n  Uint8Array          : false,\n  Uint8ClampedArray   : false\n};\n\nexports.wsh = {\n  ActiveXObject            : true,\n  Enumerator               : true,\n  GetObject                : true,\n  ScriptEngine             : true,\n  ScriptEngineBuildVersion : true,\n  ScriptEngineMajorVersion : true,\n  ScriptEngineMinorVersion : true,\n  VBArray                  : true,\n  WSH                      : true,\n  WScript                  : true,\n  XDomainRequest           : true\n};\n\n// Globals provided by popular JavaScript libraries.\n\nexports.dojo = {\n  dojo     : false,\n  dijit    : false,\n  dojox    : false,\n  define   : false,\n  \"require\": false\n};\n\nexports.jquery = {\n  \"$\"    : false,\n  jQuery : false\n};\n\nexports.mootools = {\n  \"$\"           : false,\n  \"$$\"          : false,\n  Asset         : false,\n  Browser       : false,\n  Chain         : false,\n  Class         : false,\n  Color         : false,\n  Cookie        : false,\n  Core          : false,\n  Document      : false,\n  DomReady      : false,\n  DOMEvent      : false,\n  DOMReady      : false,\n  Drag          : false,\n  Element       : false,\n  Elements      : false,\n  Event         : false,\n  Events        : false,\n  Fx            : false,\n  Group         : false,\n  Hash          : false,\n  HtmlTable     : false,\n  IFrame        : false,\n  IframeShim    : false,\n  InputValidator: false,\n  instanceOf    : false,\n  Keyboard      : false,\n  Locale        : false,\n  Mask          : false,\n  MooTools      : false,\n  Native        : false,\n  Options       : false,\n  OverText      : false,\n  Request       : false,\n  Scroller      : false,\n  Slick         : false,\n  Slider        : false,\n  Sortables     : false,\n  Spinner       : false,\n  Swiff         : false,\n  Tips          : false,\n  Type          : false,\n  typeOf        : false,\n  URI           : false,\n  Window        : false\n};\n\nexports.prototypejs = {\n  \"$\"               : false,\n  \"$$\"              : false,\n  \"$A\"              : false,\n  \"$F\"              : false,\n  \"$H\"              : false,\n  \"$R\"              : false,\n  \"$break\"          : false,\n  \"$continue\"       : false,\n  \"$w\"              : false,\n  Abstract          : false,\n  Ajax              : false,\n  Class             : false,\n  Enumerable        : false,\n  Element           : false,\n  Event             : false,\n  Field             : false,\n  Form              : false,\n  Hash              : false,\n  Insertion         : false,\n  ObjectRange       : false,\n  PeriodicalExecuter: false,\n  Position          : false,\n  Prototype         : false,\n  Selector          : false,\n  Template          : false,\n  Toggle            : false,\n  Try               : false,\n  Autocompleter     : false,\n  Builder           : false,\n  Control           : false,\n  Draggable         : false,\n  Draggables        : false,\n  Droppables        : false,\n  Effect            : false,\n  Sortable          : false,\n  SortableObserver  : false,\n  Sound             : false,\n  Scriptaculous     : false\n};\n\nexports.yui = {\n  YUI       : false,\n  Y         : false,\n  YUI_config: false\n};\n\nexports.mocha = {\n  // Global (for config etc.)\n  mocha       : false,\n  // BDD\n  describe    : false,\n  xdescribe   : false,\n  context     : false,\n  xcontext    : false,\n  it          : false,\n  xit         : false,\n  specify     : false,\n  xspecify    : false,\n  before      : false,\n  after       : false,\n  beforeEach  : false,\n  afterEach   : false,\n  // TDD\n  suite         : false,\n  test          : false,\n  setup         : false,\n  teardown      : false,\n  suiteSetup    : false,\n  suiteTeardown : false\n};\n\nexports.jasmine = {\n  jasmine     : false,\n  describe    : false,\n  xdescribe   : false,\n  it          : false,\n  xit         : false,\n  beforeEach  : false,\n  afterEach   : false,\n  setFixtures : false,\n  loadFixtures: false,\n  spyOn       : false,\n  expect      : false,\n  // Jasmine 1.3\n  runs        : false,\n  waitsFor    : false,\n  waits       : false,\n  // Jasmine 2.1\n  beforeAll   : false,\n  afterAll    : false,\n  fail        : false,\n  fdescribe   : false,\n  fit         : false,\n  pending     : false,\n  // Jasmine 2.6\n  spyOnProperty: false\n};\n\n},{}],\"jshint\":[function(require,module,exports){\n/*!\n * JSHint, by JSHint Community.\n *\n * Licensed under the MIT license.\n *\n * JSHint is a derivative work of JSLint:\n *\n *   Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)\n *\n *   Permission is hereby granted, free of charge, to any person obtaining\n *   a copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom\n *   the Software is furnished to do so, subject to the following conditions:\n *\n *   The above copyright notice and this permission notice shall be included\n *   in all copies or substantial portions of the Software.\n *\n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n */\n\n/*jshint quotmark:double */\n/*exported console */\n\nvar _            = require(\"lodash\");\nvar events       = require(\"events\");\nvar vars         = require(\"./vars.js\");\nvar messages     = require(\"./messages.js\");\nvar Lexer        = require(\"./lex.js\").Lexer;\nvar reg          = require(\"./reg.js\");\nvar state        = require(\"./state.js\").state;\nvar style        = require(\"./style.js\");\nvar options      = require(\"./options.js\");\nvar scopeManager = require(\"./scope-manager.js\");\nvar prodParams   = require(\"./prod-params.js\");\n\n// We need this module here because environments such as IE and Rhino\n// don't necessarilly expose the 'console' API and browserify uses\n// it to log things. It's a sad state of affair, really.\nvar console = require(\"console-browserify\");\n\n// We build the application inside a function so that we produce only a singleton\n// variable. That function will be invoked immediately, and its return value is\n// the JSHINT function itself.\n\nvar JSHINT = (function() {\n  \"use strict\";\n\n  var api, // Extension API\n\n    // These are operators that should not be used with the ! operator.\n    bang = {\n      \"<\"  : true,\n      \"<=\" : true,\n      \"==\" : true,\n      \"===\": true,\n      \"!==\": true,\n      \"!=\" : true,\n      \">\"  : true,\n      \">=\" : true,\n      \"+\"  : true,\n      \"-\"  : true,\n      \"*\"  : true,\n      \"/\"  : true,\n      \"%\"  : true\n    },\n\n    declared, // Globals that were declared using /*global ... */ syntax.\n\n    functions, // All of the functions\n\n    inblock,\n    indent,\n    lookahead,\n    lex,\n    member,\n    membersOnly,\n    predefined,    // Global variables defined by option\n\n    extraModules = [],\n    emitter = new events.EventEmitter();\n\n  function checkOption(name, isStable, t) {\n    var type, validNames;\n\n    if (isStable) {\n      type = \"\";\n      validNames = options.validNames;\n    } else {\n      type = \"unstable \";\n      validNames = options.unstableNames;\n    }\n\n    name = name.trim();\n\n    if (/^[+-]W\\d{3}$/g.test(name)) {\n      return true;\n    }\n\n    if (validNames.indexOf(name) === -1) {\n      if (t.type !== \"jslint\" && !_.has(options.removed, name)) {\n        error(\"E001\", t, type, name);\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  function isString(obj) {\n    return Object.prototype.toString.call(obj) === \"[object String]\";\n  }\n\n  function isIdentifier(tkn, value) {\n    if (!tkn)\n      return false;\n\n    if (!tkn.identifier || tkn.value !== value)\n      return false;\n\n    return true;\n  }\n\n  /**\n   * ES3 defined a set of \"FutureReservedWords\" in order \"to allow for the\n   * possibility of future adoption of [proposed] extensions.\"\n   *\n   * ES5 reduced the set of FutureReservedWords, in some cases by using them to\n   * define new syntactic forms (e.g. `class` and `const`) and in other cases\n   * by simply allowing their use as Identifiers (e.g. `int` and `goto`).\n   * Separately, ES5 introduced new restrictions on certain tokens, but limited\n   * the restriction to strict mode code (e.g. `let` and `yield`).\n   *\n   * This function determines if a given token describes a reserved word\n   * according to the current state of the parser.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   * @param {Token} token\n   */\n  function isReserved(context, token) {\n    if (!token.reserved) {\n      return false;\n    }\n    var meta = token.meta;\n\n    if (meta && meta.isFutureReservedWord) {\n      if (state.inES5()) {\n        // ES3 FutureReservedWord in an ES5 environment.\n        if (!meta.es5) {\n          return false;\n        }\n\n        if (token.isProperty) {\n          return false;\n        }\n      }\n    } else if (meta && meta.es5 && !state.inES5()) {\n      return false;\n    }\n\n    // Some identifiers are reserved only within a strict mode environment.\n    if (meta && meta.strictOnly && state.inES5()) {\n      if (!state.option.strict && !state.isStrict()) {\n        return false;\n      }\n    }\n\n    if (token.id === \"await\" && (!(context & prodParams.async) && !state.option.module)) {\n      return false;\n    }\n\n    if (token.id === \"yield\" && (!(context & prodParams.yield))) {\n      return state.isStrict();\n    }\n\n    return true;\n  }\n\n  function supplant(str, data) {\n    return str.replace(/\\{([^{}]*)\\}/g, function(a, b) {\n      var r = data[b];\n      return typeof r === \"string\" || typeof r === \"number\" ? r : a;\n    });\n  }\n\n  function combine(dest, src) {\n    Object.keys(src).forEach(function(name) {\n      if (_.has(JSHINT.blacklist, name)) return;\n      dest[name] = src[name];\n    });\n  }\n\n  function processenforceall() {\n    if (state.option.enforceall) {\n      for (var enforceopt in options.bool.enforcing) {\n        if (state.option[enforceopt] === undefined &&\n            !options.noenforceall[enforceopt]) {\n          state.option[enforceopt] = true;\n        }\n      }\n      for (var relaxopt in options.bool.relaxing) {\n        if (state.option[relaxopt] === undefined) {\n          state.option[relaxopt] = false;\n        }\n      }\n    }\n  }\n\n  /**\n   * Apply all linting options according to the status of the `state` object.\n   */\n  function applyOptions() {\n    var badESOpt = null;\n    processenforceall();\n\n    /**\n     * TODO: Remove in JSHint 3\n     */\n    badESOpt = state.inferEsVersion();\n    if (badESOpt) {\n      quit(\"E059\", state.tokens.next, \"esversion\", badESOpt);\n    }\n\n    if (state.inES5()) {\n      combine(predefined, vars.ecmaIdentifiers[5]);\n    }\n\n    if (state.inES6()) {\n      combine(predefined, vars.ecmaIdentifiers[6]);\n    }\n\n    if (state.inES8()) {\n      combine(predefined, vars.ecmaIdentifiers[8]);\n    }\n\n    /**\n     * Use `in` to check for the presence of any explicitly-specified value for\n     * `globalstrict` because both `true` and `false` should trigger an error.\n     */\n    if (state.option.strict === \"global\" && \"globalstrict\" in state.option) {\n      quit(\"E059\", state.tokens.next, \"strict\", \"globalstrict\");\n    }\n\n    if (state.option.module) {\n      /**\n       * TODO: Extend this restriction to *all* ES6-specific options.\n       */\n      if (!state.inES6()) {\n        warning(\"W134\", state.tokens.next, \"module\", 6);\n      }\n    }\n\n    if (state.option.regexpu) {\n      /**\n       * TODO: Extend this restriction to *all* ES6-specific options.\n       */\n      if (!state.inES6()) {\n        warning(\"W134\", state.tokens.next, \"regexpu\", 6);\n      }\n    }\n\n    if (state.option.couch) {\n      combine(predefined, vars.couch);\n    }\n\n    if (state.option.qunit) {\n      combine(predefined, vars.qunit);\n    }\n\n    if (state.option.rhino) {\n      combine(predefined, vars.rhino);\n    }\n\n    if (state.option.shelljs) {\n      combine(predefined, vars.shelljs);\n      combine(predefined, vars.node);\n    }\n    if (state.option.typed) {\n      combine(predefined, vars.typed);\n    }\n\n    if (state.option.phantom) {\n      combine(predefined, vars.phantom);\n    }\n\n    if (state.option.prototypejs) {\n      combine(predefined, vars.prototypejs);\n    }\n\n    if (state.option.node) {\n      combine(predefined, vars.node);\n      combine(predefined, vars.typed);\n    }\n\n    if (state.option.devel) {\n      combine(predefined, vars.devel);\n    }\n\n    if (state.option.dojo) {\n      combine(predefined, vars.dojo);\n    }\n\n    if (state.option.browser) {\n      combine(predefined, vars.browser);\n      combine(predefined, vars.typed);\n    }\n\n    if (state.option.browserify) {\n      combine(predefined, vars.browser);\n      combine(predefined, vars.typed);\n      combine(predefined, vars.browserify);\n    }\n\n    if (state.option.nonstandard) {\n      combine(predefined, vars.nonstandard);\n    }\n\n    if (state.option.jasmine) {\n      combine(predefined, vars.jasmine);\n    }\n\n    if (state.option.jquery) {\n      combine(predefined, vars.jquery);\n    }\n\n    if (state.option.mootools) {\n      combine(predefined, vars.mootools);\n    }\n\n    if (state.option.worker) {\n      combine(predefined, vars.worker);\n    }\n\n    if (state.option.wsh) {\n      combine(predefined, vars.wsh);\n    }\n\n    if (state.option.yui) {\n      combine(predefined, vars.yui);\n    }\n\n    if (state.option.mocha) {\n      combine(predefined, vars.mocha);\n    }\n  }\n\n  // Produce an error warning.\n  function quit(code, token, a, b) {\n    var percentage = Math.floor((token.line / state.lines.length) * 100);\n    var message = messages.errors[code].desc;\n\n    var exception = {\n      name: \"JSHintError\",\n      line: token.line,\n      character: token.from,\n      message: message + \" (\" + percentage + \"% scanned).\",\n      raw: message,\n      code: code,\n      a: a,\n      b: b\n    };\n\n    exception.reason = supplant(message, exception) + \" (\" + percentage +\n      \"% scanned).\";\n\n    throw exception;\n  }\n\n  function removeIgnoredMessages() {\n    var ignored = state.ignoredLines;\n\n    if (_.isEmpty(ignored)) return;\n    JSHINT.errors = _.reject(JSHINT.errors, function(err) { return ignored[err.line] });\n  }\n\n  function warning(code, t, a, b, c, d) {\n    var ch, l, w, msg;\n\n    if (/^W\\d{3}$/.test(code)) {\n      if (state.ignored[code])\n        return;\n\n      msg = messages.warnings[code];\n    } else if (/E\\d{3}/.test(code)) {\n      msg = messages.errors[code];\n    } else if (/I\\d{3}/.test(code)) {\n      msg = messages.info[code];\n    }\n\n    t = t || state.tokens.next || {};\n    if (t.id === \"(end)\") {  // `~\n      t = state.tokens.curr;\n    }\n\n    l = t.line;\n    ch = t.from;\n\n    w = {\n      id: \"(error)\",\n      raw: msg.desc,\n      code: msg.code,\n      evidence: state.lines[l - 1] || \"\",\n      line: l,\n      character: ch,\n      scope: JSHINT.scope,\n      a: a,\n      b: b,\n      c: c,\n      d: d\n    };\n\n    w.reason = supplant(msg.desc, w);\n    JSHINT.errors.push(w);\n\n    removeIgnoredMessages();\n\n    var errors = JSHINT.errors.filter(function(e) { return /E\\d{3}/.test(e.code); });\n    if (errors.length >= state.option.maxerr) {\n      quit(\"E043\", t);\n    }\n    return w;\n  }\n\n  function warningAt(m, l, ch, a, b, c, d) {\n    return warning(m, {\n      line: l,\n      from: ch\n    }, a, b, c, d);\n  }\n\n  function error(m, t, a, b, c, d) {\n    warning(m, t, a, b, c, d);\n  }\n\n  function errorAt(m, l, ch, a, b, c, d) {\n    return error(m, {\n      line: l,\n      from: ch\n    }, a, b, c, d);\n  }\n\n  // Tracking of \"internal\" scripts, like eval containing a static string\n  function addEvalCode(elem, token) {\n    JSHINT.internals.push({\n      id: \"(internal)\",\n      elem: elem,\n      token: token,\n      code: token.value.replace(/([^\\\\])(\\\\*)\\2\\\\n/g, \"$1\\n\")\n    });\n  }\n\n  /**\n   * Process an inline linting directive\n   *\n   * @param {Token} directiveToken - the directive-bearing comment token\n   * @param {Token} previous - the token that preceeds the directive\n   */\n  function lintingDirective(directiveToken, previous) {\n    var body = directiveToken.body.split(\",\")\n      .map(function(s) { return s.trim(); });\n    var predef = {};\n\n    if (directiveToken.type === \"falls through\") {\n      previous.caseFallsThrough = true;\n      return;\n    }\n\n    if (directiveToken.type === \"globals\") {\n      body.forEach(function(item, idx) {\n        var parts = item.split(\":\");\n        var key = parts[0].trim();\n\n        if (key === \"-\" || !key.length) {\n          // Ignore trailing comma\n          if (idx > 0 && idx === body.length - 1) {\n            return;\n          }\n          error(\"E002\", directiveToken);\n          return;\n        }\n\n        if (key.charAt(0) === \"-\") {\n          key = key.slice(1);\n\n          JSHINT.blacklist[key] = key;\n          delete predefined[key];\n        } else {\n          predef[key] = parts.length > 1 && parts[1].trim() === \"true\";\n        }\n      });\n\n      combine(predefined, predef);\n\n      for (var key in predef) {\n        if (_.has(predef, key)) {\n          declared[key] = directiveToken;\n        }\n      }\n    }\n\n    if (directiveToken.type === \"exported\") {\n      body.forEach(function(e, idx) {\n        if (!e.length) {\n          // Ignore trailing comma\n          if (idx > 0 && idx === body.length - 1) {\n            return;\n          }\n          error(\"E002\", directiveToken);\n          return;\n        }\n\n        state.funct[\"(scope)\"].addExported(e);\n      });\n    }\n\n    if (directiveToken.type === \"members\") {\n      membersOnly = membersOnly || {};\n\n      body.forEach(function(m) {\n        var ch1 = m.charAt(0);\n        var ch2 = m.charAt(m.length - 1);\n\n        if (ch1 === ch2 && (ch1 === \"\\\"\" || ch1 === \"'\")) {\n          m = m\n            .substr(1, m.length - 2)\n            .replace(\"\\\\\\\"\", \"\\\"\");\n        }\n\n        membersOnly[m] = false;\n      });\n    }\n\n    var numvals = [\n      \"maxstatements\",\n      \"maxparams\",\n      \"maxdepth\",\n      \"maxcomplexity\",\n      \"maxerr\",\n      \"maxlen\",\n      \"indent\"\n    ];\n\n    if (directiveToken.type === \"jshint\" || directiveToken.type === \"jslint\" ||\n      directiveToken.type === \"jshint.unstable\") {\n      body.forEach(function(item) {\n        var parts = item.split(\":\");\n        var key = parts[0].trim();\n        var val = parts.length > 1 ? parts[1].trim() : \"\";\n        var numberVal;\n\n        if (!checkOption(key, directiveToken.type !== \"jshint.unstable\", directiveToken)) {\n          return;\n        }\n\n        if (numvals.indexOf(key) >= 0) {\n          // GH988 - numeric options can be disabled by setting them to `false`\n          if (val !== \"false\") {\n            numberVal = +val;\n\n            if (typeof numberVal !== \"number\" || !isFinite(numberVal) ||\n              numberVal <= 0 || Math.floor(numberVal) !== numberVal) {\n              error(\"E032\", directiveToken, val);\n              return;\n            }\n\n            state.option[key] = numberVal;\n          } else {\n            state.option[key] = key === \"indent\" ? 4 : false;\n          }\n\n          return;\n        }\n\n        if (key === \"validthis\") {\n          // `validthis` is valid only within a function scope.\n\n          if (state.funct[\"(global)\"])\n            return void error(\"E009\");\n\n          if (val !== \"true\" && val !== \"false\")\n            return void error(\"E002\", directiveToken);\n\n          state.option.validthis = (val === \"true\");\n          return;\n        }\n\n        if (key === \"quotmark\") {\n          switch (val) {\n          case \"true\":\n          case \"false\":\n            state.option.quotmark = (val === \"true\");\n            break;\n          case \"double\":\n          case \"single\":\n            state.option.quotmark = val;\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"shadow\") {\n          switch (val) {\n          case \"true\":\n            state.option.shadow = true;\n            break;\n          case \"outer\":\n            state.option.shadow = \"outer\";\n            break;\n          case \"false\":\n          case \"inner\":\n            state.option.shadow = \"inner\";\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"unused\") {\n          switch (val) {\n          case \"true\":\n            state.option.unused = true;\n            break;\n          case \"false\":\n            state.option.unused = false;\n            break;\n          case \"vars\":\n          case \"strict\":\n            state.option.unused = val;\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"latedef\") {\n          switch (val) {\n          case \"true\":\n            state.option.latedef = true;\n            break;\n          case \"false\":\n            state.option.latedef = false;\n            break;\n          case \"nofunc\":\n            state.option.latedef = \"nofunc\";\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"ignore\") {\n          switch (val) {\n          case \"line\":\n            state.ignoredLines[directiveToken.line] = true;\n            removeIgnoredMessages();\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"strict\") {\n          switch (val) {\n          case \"true\":\n            state.option.strict = true;\n            break;\n          case \"false\":\n            state.option.strict = false;\n            break;\n          case \"global\":\n          case \"implied\":\n            state.option.strict = val;\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          return;\n        }\n\n        if (key === \"module\") {\n          /**\n           * TODO: Extend this restriction to *all* \"environmental\" options.\n           */\n          if (!hasParsedCode(state.funct)) {\n            error(\"E055\", directiveToken, \"module\");\n          }\n        }\n\n        if (key === \"esversion\") {\n          switch (val) {\n          case \"3\":\n          case \"5\":\n          case \"6\":\n          case \"7\":\n          case \"8\":\n          case \"9\":\n          case \"10\":\n          case \"11\":\n            state.option.moz = false;\n            state.option.esversion = +val;\n            break;\n          case \"2015\":\n          case \"2016\":\n          case \"2017\":\n          case \"2018\":\n          case \"2019\":\n          case \"2020\":\n            state.option.moz = false;\n            // Translate specification publication year to version number.\n            state.option.esversion = +val - 2009;\n            break;\n          default:\n            error(\"E002\", directiveToken);\n          }\n          if (!hasParsedCode(state.funct)) {\n            error(\"E055\", directiveToken, \"esversion\");\n          }\n          return;\n        }\n\n        var match = /^([+-])(W\\d{3})$/g.exec(key);\n        if (match) {\n          // ignore for -W..., unignore for +W...\n          state.ignored[match[2]] = (match[1] === \"-\");\n          return;\n        }\n\n        var tn;\n        if (val === \"true\" || val === \"false\") {\n          if (directiveToken.type === \"jslint\") {\n            tn = options.renamed[key] || key;\n            state.option[tn] = (val === \"true\");\n\n            if (options.inverted[tn] !== undefined) {\n              state.option[tn] = !state.option[tn];\n            }\n          } else if (directiveToken.type === \"jshint.unstable\") {\n            /* istanbul ignore next */\n            state.option.unstable[key] = (val === \"true\");\n          } else {\n            state.option[key] = (val === \"true\");\n          }\n\n          return;\n        }\n\n        error(\"E002\", directiveToken);\n      });\n\n      applyOptions();\n    }\n  }\n\n  /**\n   * Return a token beyond the token available in `state.tokens.next`. If no\n   * such token exists, return the \"(end)\" token. This function is used to\n   * determine parsing strategies in cases where the value of the next token\n   * does not provide sufficient information, as is the case with `for` loops,\n   * e.g.:\n   *\n   *     for ( var i in ...\n   *\n   * versus:\n   *\n   *     for ( var i = ...\n   *\n   * @param {number} [p] - offset of desired token; defaults to 0\n   *\n   * @returns {token}\n   */\n  function peek(p) {\n    var i = p || 0, j = lookahead.length, t;\n\n    if (i < j) {\n      return lookahead[i];\n    }\n\n    while (j <= i) {\n      t = lex.token();\n\n      // When the lexer is exhausted, this function should produce the \"(end)\"\n      // token, even in cases where the requested token is beyond the end of\n      // the input stream.\n      if (!t) {\n        // If the lookahead buffer is empty, the expected \"(end)\" token was\n        // already emitted by the most recent invocation of `advance` and is\n        // available as the next token.\n        if (!lookahead.length) {\n          return state.tokens.next;\n        }\n\n        return lookahead[j - 1];\n      }\n\n      lookahead[j] = t;\n      j += 1;\n    }\n\n    return t;\n  }\n\n  function peekIgnoreEOL() {\n    var i = 0;\n    var t;\n    do {\n      t = peek(i++);\n    } while (t.id === \"(endline)\");\n    return t;\n  }\n\n  /**\n   * Consume the next token.\n   *\n   * @param {string} [expected] - the expected value of the next token's `id`\n   *                              property (in the case of punctuators) or\n   *                              `value` property (in the case of identifiers\n   *                              and literals); if unspecified, any token will\n   *                              be accepted\n   * @param {object} [relatedToken] - the token that informed the expected\n   *                                  value, if any (for example: the opening\n   *                                  brace when a closing brace is expected);\n   *                                  used to produce more meaningful errors\n   */\n  function advance(expected, relatedToken) {\n    var nextToken = state.tokens.next;\n\n    if (expected && nextToken.id !== expected) {\n      if (relatedToken) {\n        if (nextToken.id === \"(end)\") {\n          error(\"E019\", relatedToken, relatedToken.id);\n        } else {\n          error(\"E020\", nextToken, expected, relatedToken.id,\n            relatedToken.line, nextToken.value);\n        }\n      } else if (nextToken.type !== \"(identifier)\" || nextToken.value !== expected) {\n        error(\"E021\", nextToken, expected, nextToken.value);\n      }\n    }\n\n    state.tokens.prev = state.tokens.curr;\n    state.tokens.curr = state.tokens.next;\n    for (;;) {\n      state.tokens.next = lookahead.shift() || lex.token();\n\n      if (!state.tokens.next) { // No more tokens left, give up\n        quit(\"E041\", state.tokens.curr);\n      }\n\n      if (state.tokens.next.id === \"(end)\" || state.tokens.next.id === \"(error)\") {\n        return;\n      }\n\n      if (state.tokens.next.check) {\n        state.tokens.next.check();\n      }\n\n      if (state.tokens.next.isSpecial) {\n        lintingDirective(state.tokens.next, state.tokens.curr);\n      } else {\n        if (state.tokens.next.id !== \"(endline)\") {\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * Determine whether a given token is an operator.\n   *\n   * @param {token} token\n   *\n   * @returns {boolean}\n   */\n  function isOperator(token) {\n    return token.first || token.right || token.left || token.id === \"yield\" || token.id === \"await\";\n  }\n\n  function isEndOfExpr(context, curr, next) {\n    if (arguments.length <= 1) {\n      curr = state.tokens.curr;\n      next = state.tokens.next;\n    }\n\n    if (next.id === \"in\" && context & prodParams.noin) {\n      return true;\n    }\n\n    if (next.id === \";\" || next.id === \"}\" || next.id === \":\") {\n      return true;\n    }\n\n    if (next.infix === curr.infix ||\n      // Infix operators which follow `yield` should only be consumed as part\n      // of the current expression if allowed by the syntactic grammar. In\n      // effect, this prevents automatic semicolon insertion when `yield` is\n      // followed by a newline and a comma operator (without enabling it when\n      // `yield` is followed by a newline and a `[` token).\n      (curr.id === \"yield\" && curr.rbp < next.rbp)) {\n      return !sameLine(curr, next);\n    }\n\n    return false;\n  }\n\n  /**\n   * The `expression` function is the heart of JSHint's parsing behaior. It is\n   * based on the Pratt parser, but it extends that model with a `fud` method.\n   * Short for \"first null denotation,\" it it similar to the `nud` (\"null\n   * denotation\") function, but it is only used on the first token of a\n   * statement. This simplifies usage in statement-oriented languages like\n   * JavaScript.\n   *\n   * .nud  Null denotation\n   * .fud  First null denotation\n   * .led  Left denotation\n   *  lbp  Left binding power\n   *  rbp  Right binding power\n   *\n   * They are elements of the parsing method called Top Down Operator Precedence.\n   *\n   * In addition to parsing, this function applies a number of linting patterns.\n   *\n   * @param {number} context - the parsing context (a bitfield describing\n   *                           conditions of the current parsing operation\n   *                           which can influence how the next tokens are\n   *                           interpreted); see `prod-params.js` for more\n   *                           detail)\n   * @param {number} rbp - the right-binding power of the token to be consumed\n   */\n  function expression(context, rbp) {\n    var left, isArray = false, isObject = false;\n    var initial = context & prodParams.initial;\n    var curr;\n\n    context &= ~prodParams.initial;\n\n    state.nameStack.push();\n\n    if (state.tokens.next.id === \"(end)\")\n      error(\"E006\", state.tokens.curr);\n\n    advance();\n\n    if (initial) {\n      state.funct[\"(verb)\"] = state.tokens.curr.value;\n      state.tokens.curr.beginsStmt = true;\n    }\n\n    curr = state.tokens.curr;\n\n    if (initial && curr.fud && (!curr.useFud || curr.useFud(context))) {\n      left = state.tokens.curr.fud(context);\n    } else {\n      if (state.tokens.curr.nud) {\n        left = state.tokens.curr.nud(context, rbp);\n      } else {\n        error(\"E030\", state.tokens.curr, state.tokens.curr.id);\n      }\n\n      while (rbp < state.tokens.next.lbp && !isEndOfExpr(context)) {\n        isArray = state.tokens.curr.value === \"Array\";\n        isObject = state.tokens.curr.value === \"Object\";\n\n        // #527, new Foo.Array(), Foo.Array(), new Foo.Object(), Foo.Object()\n        // Line breaks in IfStatement heads exist to satisfy the checkJSHint\n        // \"Line too long.\" error.\n        if (left && (left.value || (left.first && left.first.value))) {\n          // If the left.value is not \"new\", or the left.first.value is a \".\"\n          // then safely assume that this is not \"new Array()\" and possibly\n          // not \"new Object()\"...\n          if (left.value !== \"new\" ||\n            (left.first && left.first.value && left.first.value === \".\")) {\n            isArray = false;\n            // ...In the case of Object, if the left.value and state.tokens.curr.value\n            // are not equal, then safely assume that this not \"new Object()\"\n            if (left.value !== state.tokens.curr.value) {\n              isObject = false;\n            }\n          }\n        }\n\n        advance();\n\n        if (isArray && state.tokens.curr.id === \"(\" && state.tokens.next.id === \")\") {\n          warning(\"W009\", state.tokens.curr);\n        }\n\n        if (isObject && state.tokens.curr.id === \"(\" && state.tokens.next.id === \")\") {\n          warning(\"W010\", state.tokens.curr);\n        }\n\n        if (left && state.tokens.curr.led) {\n          left = state.tokens.curr.led(context, left);\n        } else {\n          error(\"E033\", state.tokens.curr, state.tokens.curr.id);\n        }\n      }\n    }\n\n    state.nameStack.pop();\n\n    return left;\n  }\n\n\n  // Functions for conformance of style.\n\n  function sameLine(first, second) {\n    return first.line === (second.startLine || second.line);\n  }\n\n  function nobreaknonadjacent(left, right) {\n    if (!state.option.laxbreak && !sameLine(left, right)) {\n      warning(\"W014\", right, right.value);\n    }\n  }\n\n  function nolinebreak(t) {\n    if (!sameLine(t, state.tokens.next)) {\n      warning(\"E022\", t, t.value);\n    }\n  }\n\n  /**\n   * Validate the comma token in the \"current\" position of the token stream.\n   *\n   * @param {object} [opts]\n   * @param {boolean} [opts.property] - flag indicating whether the current\n   *                                    comma token is situated directly within\n   *                                    an object initializer\n   * @param {boolean} [opts.allowTrailing] - flag indicating whether the\n   *                                         current comma token may appear\n   *                                         directly before a delimiter\n   *\n   * @returns {boolean} flag indicating the validity of the current comma\n   *                    token; `false` if the token directly causes a syntax\n   *                    error, `true` otherwise\n   */\n  function checkComma(opts) {\n    var prev = state.tokens.prev;\n    var curr = state.tokens.curr;\n    opts = opts || {};\n\n    if (!sameLine(prev, curr)) {\n      if (!state.option.laxcomma) {\n        if (checkComma.first) {\n          warning(\"I001\", curr);\n          checkComma.first = false;\n        }\n        warning(\"W014\", prev, curr.value);\n      }\n    }\n\n    if (state.tokens.next.identifier && !(opts.property && state.inES5())) {\n      // Keywords that cannot follow a comma operator.\n      switch (state.tokens.next.value) {\n      case \"break\":\n      case \"case\":\n      case \"catch\":\n      case \"continue\":\n      case \"default\":\n      case \"do\":\n      case \"else\":\n      case \"finally\":\n      case \"for\":\n      case \"if\":\n      case \"in\":\n      case \"instanceof\":\n      case \"return\":\n      case \"switch\":\n      case \"throw\":\n      case \"try\":\n      case \"var\":\n      case \"let\":\n      case \"while\":\n      case \"with\":\n        error(\"E024\", state.tokens.next, state.tokens.next.value);\n        return false;\n      }\n    }\n\n    if (state.tokens.next.type === \"(punctuator)\") {\n      switch (state.tokens.next.value) {\n      case \"}\":\n      case \"]\":\n      case \",\":\n      case \")\":\n        if (opts.allowTrailing) {\n          return true;\n        }\n\n        error(\"E024\", state.tokens.next, state.tokens.next.value);\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * Factory function for creating \"symbols\"--objects that will be inherited by\n   * tokens. The objects created by this function are stored in a symbol table\n   * and set as the prototype of the tokens generated by the lexer.\n   *\n   * Note that this definition of \"symbol\" describes an implementation detail\n   * of JSHint and is not related to the ECMAScript value type introduced in\n   * ES2015.\n   *\n   * @param {string} s - the name of the token; for keywords (e.g. `void`) and\n   *                     delimiters (e.g.. `[`), this is the token's text\n   *                     representation; for literals (e.g. numbers) and other\n   *                     \"special\" tokens (e.g. the end-of-file marker) this is\n   *                     a parenthetical value\n   * @param {number} p - the left-binding power of the token as used by the\n   *                     Pratt parsing semantics\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function symbol(s, p) {\n    var x = state.syntax[s];\n    if (!x || typeof x !== \"object\") {\n      state.syntax[s] = x = {\n        id: s,\n        lbp: p,\n        // Symbols that accept a right-hand side do so with a binding power\n        // that is commonly identical to their left-binding power. (This value\n        // is relevant when determining if the grouping operator is necessary\n        // to override the precedence of surrounding operators.) Because the\n        // exponentiation operator's left-binding power and right-binding power\n        // are distinct, the values must be encoded separately.\n        rbp: p,\n        value: s\n      };\n    }\n    return x;\n  }\n\n  /**\n   * Convenience function for defining delimiter symbols.\n   *\n   * @param {string} s - the name of the symbol\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function delim(s) {\n    var x = symbol(s, 0);\n    x.delim = true;\n    return x;\n  }\n\n  /**\n   * Convenience function for defining statement-denoting symbols.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} f - the first null denotation function for the symbol;\n   *                       see the `expression` function for more detail\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function stmt(s, f) {\n    var x = delim(s);\n    x.identifier = x.reserved = true;\n    x.fud = f;\n    return x;\n  }\n\n  /**\n   * Convenience function for defining block-statement-denoting symbols.\n   *\n   * A block-statement-denoting symbol is one like 'if' or 'for', which will be\n   * followed by a block and will not have to end with a semicolon.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} - the first null denotation function for the symbol; see\n   *                     the `expression` function for more detail\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function blockstmt(s, f) {\n    var x = stmt(s, f);\n    x.block = true;\n    return x;\n  }\n  /**\n   * Denote a given JSHint symbol as an identifier and a reserved keyword.\n   *\n   * @param {object} - a JSHint symbol value\n   *\n   * @returns {object} - the provided object\n   */\n  function reserveName(x) {\n    var c = x.id.charAt(0);\n    if ((c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\")) {\n      x.identifier = x.reserved = true;\n    }\n    return x;\n  }\n\n  /**\n   * Convenience function for defining \"prefix\" symbols--operators that accept\n   * expressions as a right-hand side.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} [f] - the first null denotation function for the symbol;\n   *                         see the `expression` function for more detail\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function prefix(s, f) {\n    var x = symbol(s, 150);\n    reserveName(x);\n\n    x.nud = (typeof f === \"function\") ? f : function(context) {\n      this.arity = \"unary\";\n      this.right = expression(context, 150);\n\n      if (this.id === \"++\" || this.id === \"--\") {\n        if (state.option.plusplus) {\n          warning(\"W016\", this, this.id);\n        }\n\n        if (this.right) {\n          checkLeftSideAssign(context, this.right, this);\n        }\n      }\n\n      return this;\n    };\n\n    return x;\n  }\n\n  /**\n   * Convenience function for defining \"type\" symbols--those that describe\n   * literal values.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} f - the first null denotation function for the symbol;\n   *                       see the `expression` function for more detail\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function type(s, f) {\n    var x = symbol(s, 0);\n    x.type = s;\n    x.nud = f;\n    return x;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for reserved\n   * keywords--those that are restricted from use as bindings (and as property\n   * names in ECMAScript 3 environments).\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} func - the first null denotation function for the\n   *                          symbol; see the `expression` function for more\n   *                          detail\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function reserve(name, func) {\n    var x = type(name, func);\n    x.identifier = true;\n    x.reserved = true;\n    return x;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for keywords that are\n   * only reserved in some circumstances.\n   *\n   * @param {string} name - the name of the symbol\n   * @param {object} [meta] - a collection of optional arguments\n   * @param {function} [meta.nud] -the null denotation function for the symbol;\n   *                   see the `expression` function for more detail\n   * @param {boolean} [meta.es5] - `true` if the identifier is reserved\n   *                               in ECMAScript 5 or later\n   * @param {boolean} [meta.strictOnly] - `true` if the identifier is only\n   *                                      reserved in strict mode code.\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function FutureReservedWord(name, meta) {\n    var x = type(name, state.syntax[\"(identifier)\"].nud);\n\n    meta = meta || {};\n    meta.isFutureReservedWord = true;\n\n    x.value = name;\n    x.identifier = true;\n    x.reserved = true;\n    x.meta = meta;\n\n    return x;\n  }\n\n  /**\n   * Convenience function for defining \"infix\" symbols--operators that require\n   * operands as both \"land-hand side\" and \"right-hand side\".\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} [f] - a function to be invoked that consumes the\n   *                         right-hand side of the operator\n   * @param {number} p - the left-binding power of the token as used by the\n   *                     Pratt parsing semantics\n   * @param {boolean} [w] - if `true`\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function infix(s, f, p, w) {\n    var x = symbol(s, p);\n    reserveName(x);\n    x.infix = true;\n    x.led = function(context, left) {\n      if (!w) {\n        nobreaknonadjacent(state.tokens.prev, state.tokens.curr);\n      }\n      if ((s === \"in\" || s === \"instanceof\") && left.id === \"!\") {\n        warning(\"W018\", left, \"!\");\n      }\n      if (typeof f === \"function\") {\n        return f(context, left, this);\n      } else {\n        this.left = left;\n        this.right = expression(context, p);\n        return this;\n      }\n    };\n    return x;\n  }\n\n  /**\n   * Convenience function for defining the `=>` token as used in arrow\n   * functions.\n   *\n   * @param {string} s - the name of the symbol\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function application(s) {\n    var x = symbol(s, 42);\n\n    x.infix = true;\n    x.led = function(context, left) {\n      nobreaknonadjacent(state.tokens.prev, state.tokens.curr);\n\n      this.left = left;\n      this.right = doFunction(context, { type: \"arrow\", loneArg: left });\n      return this;\n    };\n    return x;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for relation operators.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} [f] - a function to be invoked to enforce any additional\n   *                         linting rules.\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function relation(s, f) {\n    var x = symbol(s, 100);\n\n    x.infix = true;\n    x.led = function(context, left) {\n      nobreaknonadjacent(state.tokens.prev, state.tokens.curr);\n      this.left = left;\n      var right = this.right = expression(context, 100);\n\n      if (isIdentifier(left, \"NaN\") || isIdentifier(right, \"NaN\")) {\n        warning(\"W019\", this);\n      } else if (f) {\n        f.apply(this, [context, left, right]);\n      }\n\n      if (!left || !right) {\n        quit(\"E041\", state.tokens.curr);\n      }\n\n      if (left.id === \"!\") {\n        warning(\"W018\", left, \"!\");\n      }\n\n      if (right.id === \"!\") {\n        warning(\"W018\", right, \"!\");\n      }\n\n      return this;\n    };\n    return x;\n  }\n\n  /**\n   * Determine if a given token marks the beginning of a UnaryExpression.\n   *\n   * @param {object} token\n   *\n   * @returns {boolean}\n   */\n  function beginsUnaryExpression(token) {\n    return token.arity === \"unary\" && token.id !== \"++\" && token.id !== \"--\";\n  }\n\n  var typeofValues = {};\n  typeofValues.legacy = [\n    // E4X extended the `typeof` operator to return \"xml\" for the XML and\n    // XMLList types it introduced.\n    // Ref: 11.3.2 The typeof Operator\n    // http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-357.pdf\n    \"xml\",\n    // IE<9 reports \"unknown\" when the `typeof` operator is applied to an\n    // object existing across a COM+ bridge. In lieu of official documentation\n    // (which does not exist), see:\n    // http://robertnyman.com/2005/12/21/what-is-typeof-unknown/\n    \"unknown\"\n  ];\n  typeofValues.es3 = [\n    \"undefined\", \"boolean\", \"number\", \"string\", \"function\", \"object\",\n  ];\n  typeofValues.es3 = typeofValues.es3.concat(typeofValues.legacy);\n  typeofValues.es6 = typeofValues.es3.concat(\"symbol\", \"bigint\");\n\n  /**\n   * Validate comparisons between the result of a `typeof` expression and a\n   * string literal.\n   *\n   * @param {token} [left] - one of the values being compared\n   * @param {token} [right] - the other value being compared\n   * @param {object} state - the global state object (see `state.js`)\n   *\n   * @returns {boolean} - `false` if the second token describes a `typeof`\n   *                       expression and the first token is a string literal\n   *                       whose value is never returned by that operator;\n   *                       `true` otherwise\n   */\n  function isTypoTypeof(left, right, state) {\n    var values;\n\n    if (state.option.notypeof)\n      return false;\n\n    if (!left || !right)\n      return false;\n\n    values = state.inES6() ? typeofValues.es6 : typeofValues.es3;\n\n    if (right.type === \"(identifier)\" && right.value === \"typeof\" && left.type === \"(string)\") {\n      if (left.value === \"bigint\") {\n        if (!state.inES11()) {\n          warning(\"W119\", left, \"BigInt\", \"11\");\n        }\n\n        return false;\n      }\n\n      return !_.includes(values, left.value);\n    }\n\n    return false;\n  }\n\n  /**\n   * Determine if a given token describes the built-in `eval` function.\n   *\n   * @param {token} left\n   * @param {object} state - the global state object (see `state.js`)\n   *\n   * @returns {boolean}\n   */\n  function isGlobalEval(left, state) {\n    var isGlobal = false;\n\n    // permit methods to refer to an \"eval\" key in their own context\n    if (left.type === \"this\" && state.funct[\"(context)\"] === null) {\n      isGlobal = true;\n    }\n    // permit use of \"eval\" members of objects\n    else if (left.type === \"(identifier)\") {\n      if (state.option.node && left.value === \"global\") {\n        isGlobal = true;\n      }\n\n      else if (state.option.browser && (left.value === \"window\" || left.value === \"document\")) {\n        isGlobal = true;\n      }\n    }\n\n    return isGlobal;\n  }\n\n  /**\n   * Determine if a given token describes a property of a built-in object.\n   *\n   * @param {token} left\n   *\n   * @returns {boolean}\n   */\n  function findNativePrototype(left) {\n    var natives = [\n      \"Array\", \"ArrayBuffer\", \"Boolean\", \"Collator\", \"DataView\", \"Date\",\n      \"DateTimeFormat\", \"Error\", \"EvalError\", \"Float32Array\", \"Float64Array\",\n      \"Function\", \"Infinity\", \"Intl\", \"Int16Array\", \"Int32Array\", \"Int8Array\",\n      \"Iterator\", \"Number\", \"NumberFormat\", \"Object\", \"RangeError\",\n      \"ReferenceError\", \"RegExp\", \"StopIteration\", \"String\", \"SyntaxError\",\n      \"TypeError\", \"Uint16Array\", \"Uint32Array\", \"Uint8Array\", \"Uint8ClampedArray\",\n      \"URIError\"\n    ];\n\n    function walkPrototype(obj) {\n      if (typeof obj !== \"object\") return;\n      return obj.right === \"prototype\" ? obj : walkPrototype(obj.left);\n    }\n\n    function walkNative(obj) {\n      while (!obj.identifier && typeof obj.left === \"object\")\n        obj = obj.left;\n\n      if (obj.identifier && natives.indexOf(obj.value) >= 0 &&\n          state.funct[\"(scope)\"].isPredefined(obj.value)) {\n        return obj.value;\n      }\n    }\n\n    var prototype = walkPrototype(left);\n    if (prototype) return walkNative(prototype);\n  }\n\n  /**\n   * Determine if the given token is a valid assignment target; emit errors\n   * and/or warnings as appropriate\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   * @param {token} left - the left hand side of the assignment\n   * @param {token=} assignToken - the token for the assignment, used for\n   *                               reporting\n   * @param {object=} options - optional object\n   * @param {boolean} options.allowDestructuring - whether to allow\n   *                                               destructuring binding\n   *\n   * @returns {boolean} Whether the left hand side is OK\n   */\n  function checkLeftSideAssign(context, left, assignToken, options) {\n\n    var allowDestructuring = options && options.allowDestructuring;\n\n    assignToken = assignToken || left;\n\n    if (state.option.freeze) {\n      var nativeObject = findNativePrototype(left);\n      if (nativeObject)\n        warning(\"W121\", left, nativeObject);\n    }\n\n    if (left.identifier && !left.isMetaProperty) {\n      // The `reassign` method also calls `modify`, but we are specific in\n      // order to catch function re-assignment and globals re-assignment\n      state.funct[\"(scope)\"].block.reassign(left.value, left);\n    }\n\n    if (left.id === \".\") {\n      if (!left.left || left.left.value === \"arguments\" && !state.isStrict()) {\n        warning(\"W143\", assignToken);\n      }\n\n      state.nameStack.set(state.tokens.prev);\n      return true;\n    } else if (left.id === \"{\" || left.id === \"[\") {\n      if (!allowDestructuring || !left.destructAssign) {\n        if (left.id === \"{\" || !left.left) {\n          warning(\"E031\", assignToken);\n        } else if (left.left.value === \"arguments\" && !state.isStrict()) {\n          warning(\"W143\", assignToken);\n        }\n      }\n\n      if (left.id === \"[\") {\n        state.nameStack.set(left.right);\n      }\n\n      return true;\n    } else if (left.identifier && !isReserved(context, left) && !left.isMetaProperty) {\n      if (state.funct[\"(scope)\"].bindingtype(left.value) === \"exception\") {\n        warning(\"W022\", left);\n      }\n\n      if (left.value === \"eval\" && state.isStrict()) {\n        error(\"E031\", assignToken);\n        return false;\n      } else if (left.value === \"arguments\") {\n        if (!state.isStrict()) {\n          warning(\"W143\", assignToken);\n        } else {\n          error(\"E031\", assignToken);\n          return false;\n        }\n      }\n      state.nameStack.set(left);\n      return true;\n    }\n\n    error(\"E031\", assignToken);\n\n    return false;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for assignment operators.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} [f] - a function to be invoked that consumes the\n   *                         right-hand side of the operator (see the `infix`\n   *                         function)\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function assignop(s, f) {\n    var x = infix(s, typeof f === \"function\" ? f : function(context, left, that) {\n      that.left = left;\n\n      checkLeftSideAssign(context, left, that, { allowDestructuring: true });\n\n      that.right = expression(context, 10);\n\n      return that;\n    }, 20);\n\n    x.exps = true;\n    x.assign = true;\n\n    return x;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for bitwise operators.\n   *\n   * @param {string} s - the name of the symbol\n   * @param {function} [f] - the left denotation function for the symbol; see\n   *                         the `expression` function for more detail\n   * @param {number} p - the left-binding power of the token as used by the\n   *                     Pratt parsing semantics\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function bitwise(s, f, p) {\n    var x = symbol(s, p);\n    reserveName(x);\n    x.infix = true;\n    x.led = (typeof f === \"function\") ? f : function(context, left) {\n      if (state.option.bitwise) {\n        warning(\"W016\", this, this.id);\n      }\n      this.left = left;\n      this.right = expression(context, p);\n      return this;\n    };\n    return x;\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for bitwise assignment\n   * operators. See the `assignop` function for more detail.\n   *\n   * @param {string} s - the name of the symbol\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function bitwiseassignop(s) {\n    symbol(s, 20).exps = true;\n    return infix(s, function(context, left, that) {\n      if (state.option.bitwise) {\n        warning(\"W016\", that, that.id);\n      }\n\n      checkLeftSideAssign(context, left, that);\n\n      that.right = expression(context, 10);\n\n      return that;\n    }, 20);\n  }\n\n  /**\n   * Convenience function for defining JSHint symbols for those operators which\n   * have a single operand that appears before them in the source code.\n   *\n   * @param {string} s - the name of the symbol\n   *\n   * @returns {object} - the object describing the JSHint symbol (provided to\n   *                     support cases where further refinement is necessary)\n   */\n  function suffix(s) {\n    var x = symbol(s, 150);\n\n    x.led = function(context, left) {\n      // this = suffix e.g. \"++\" punctuator\n      // left = symbol operated e.g. \"a\" identifier or \"a.b\" punctuator\n      if (state.option.plusplus) {\n        warning(\"W016\", this, this.id);\n      }\n\n      checkLeftSideAssign(context, left, this);\n\n      this.left = left;\n      return this;\n    };\n    return x;\n  }\n\n  /**\n   * Retrieve the value of the next token if it is an identifier and optionally\n   * advance the parser.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   * @param {boolean} [isName] - `true` if an IdentifierName should be consumed\n   *                             (e.g. object properties)\n   * @param {boolean} [preserve] - `true` if the token should not be consumed\n   *\n   * @returns {string|undefined} - the value of the identifier, if present\n   */\n  function optionalidentifier(context, isName, preserve) {\n    if (!state.tokens.next.identifier) {\n      return;\n    }\n\n    if (!preserve) {\n      advance();\n    }\n\n    var curr = state.tokens.curr;\n\n    if (isReserved(context, curr) && !(isName && state.inES5())) {\n      warning(\"W024\", state.tokens.curr, state.tokens.curr.id);\n    }\n\n    return curr.value;\n  }\n\n  /**\n   * Consume the \"...\" token which designates \"spread\" and \"rest\" operations if\n   * it is present. If the operator is repeated, consume every repetition, and\n   * issue a single error describing the syntax error.\n   *\n   * @param {string} operation - either \"spread\" or \"rest\"\n   *\n   * @returns {boolean} a value describing whether or not any tokens were\n   *                    consumed in this way\n   */\n  function spreadrest(operation) {\n    if (!checkPunctuator(state.tokens.next, \"...\")) {\n      return false;\n    }\n\n    if (!state.inES6(true)) {\n      warning(\"W119\", state.tokens.next, operation + \" operator\", \"6\");\n    }\n    advance();\n\n    if (checkPunctuator(state.tokens.next, \"...\")) {\n      warning(\"E024\", state.tokens.next, \"...\");\n      while (checkPunctuator(state.tokens.next, \"...\")) {\n        advance();\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Ensure that the current token is an identifier and retrieve its value.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   * @param {boolean} [isName] - `true` if an IdentifierName should be consumed\n   *                             (e.g. object properties)\n   *\n   * @returns {string|undefined} - the value of the identifier, if present\n   */\n  function identifier(context, isName) {\n    var i = optionalidentifier(context, isName, false);\n    if (i) {\n      return i;\n    }\n\n    error(\"E030\", state.tokens.next, state.tokens.next.value);\n\n    // The token should be consumed after a warning is issued so the parser\n    // can continue as though an identifier were found. The semicolon token\n    // should not be consumed in this way so that the parser interprets it as\n    // a statement delimiter;\n    if (state.tokens.next.id !== \";\") {\n      advance();\n    }\n  }\n\n\n  /**\n   * Determine if the provided token may be evaluated and emit a linting\n   * warning if this is note the case.\n   *\n   * @param {token} controlToken\n   */\n  function reachable(controlToken) {\n    var i = 0, t;\n    if (state.tokens.next.id !== \";\" || controlToken.inBracelessBlock) {\n      return;\n    }\n    for (;;) {\n      do {\n        t = peek(i);\n        i += 1;\n      } while (t.id !== \"(end)\" && t.id === \"(comment)\");\n\n      if (t.reach) {\n        return;\n      }\n      if (t.id !== \"(endline)\") {\n        if (t.id === \"function\") {\n          if (state.option.latedef === true) {\n            warning(\"W026\", t);\n          }\n          break;\n        }\n\n        warning(\"W027\", t, t.value, controlToken.value);\n        break;\n      }\n    }\n  }\n\n  /**\n   * Consume the semicolon that delimits the statement currently being parsed,\n   * emitting relevant warnings/errors as appropriate.\n   *\n   * @param {token} stmt - token describing the statement under consideration\n   */\n  function parseFinalSemicolon(stmt) {\n    if (state.tokens.next.id !== \";\") {\n      // don't complain about unclosed templates / strings\n      if (state.tokens.next.isUnclosed) return advance();\n\n      var isSameLine = sameLine(state.tokens.curr, state.tokens.next) &&\n                       state.tokens.next.id !== \"(end)\";\n      var blockEnd = checkPunctuator(state.tokens.next, \"}\");\n\n      if (isSameLine && !blockEnd && !(stmt.id === \"do\" && state.inES6(true))) {\n        errorAt(\"E058\", state.tokens.curr.line, state.tokens.curr.character);\n      } else if (!state.option.asi) {\n\n        // If this is the last statement in a block that ends on the same line\n        // *and* option lastsemic is on, ignore the warning.  Otherwise, issue\n        // a warning about missing semicolon.\n        if (!(blockEnd && isSameLine && state.option.lastsemic)) {\n          warningAt(\"W033\", state.tokens.curr.line, state.tokens.curr.character);\n        }\n      }\n    } else {\n      advance(\";\");\n    }\n  }\n\n  /**\n   * Consume a statement.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   *\n   * @returns {token} - the token describing the statement\n   */\n  function statement(context) {\n    var i = indent, r, t = state.tokens.next, hasOwnScope = false;\n\n    context |= prodParams.initial;\n\n    if (t.id === \";\") {\n      advance(\";\");\n      return;\n    }\n\n    // Is this a labelled statement?\n    var res = isReserved(context, t);\n\n    // We're being more tolerant here: if someone uses\n    // a FutureReservedWord (that is not meant to start a statement)\n    // as a label, we warn but proceed anyway.\n\n    if (res && t.meta && t.meta.isFutureReservedWord && !t.fud) {\n      warning(\"W024\", t, t.id);\n      res = false;\n    }\n\n    if (t.identifier && !res && peek().id === \":\") {\n      advance();\n      advance(\":\");\n\n      hasOwnScope = true;\n      state.funct[\"(scope)\"].stack();\n      state.funct[\"(scope)\"].block.addLabel(t.value, { token: state.tokens.curr });\n\n      if (!state.tokens.next.labelled && state.tokens.next.value !== \"{\") {\n        warning(\"W028\", state.tokens.next, t.value, state.tokens.next.value);\n      }\n\n      t = state.tokens.next;\n    }\n\n    // Is it a lonely block?\n\n    if (t.id === \"{\") {\n      // Is it a switch case block?\n      //\n      //  switch (foo) {\n      //    case bar: { <= here.\n      //      ...\n      //    }\n      //  }\n      var iscase = (state.funct[\"(verb)\"] === \"case\" && state.tokens.curr.value === \":\");\n      block(context, true, true, false, false, iscase);\n\n      if (hasOwnScope) {\n        state.funct[\"(scope)\"].unstack();\n      }\n\n      return;\n    }\n\n    // Parse the statement.\n\n    r = expression(context, 0);\n\n    if (r && !(r.identifier && r.value === \"function\") &&\n        !(r.type === \"(punctuator)\" && r.left &&\n          r.left.identifier && r.left.value === \"function\")) {\n      if (!state.isStrict() && state.stmtMissingStrict()) {\n        warning(\"E007\");\n      }\n    }\n\n    // Look for the final semicolon.\n\n    if (!t.block) {\n      if (!state.option.expr && (!r || !r.exps)) {\n        warning(\"W030\", state.tokens.curr);\n      } else if (state.option.nonew && r && r.left && r.id === \"(\" && r.left.id === \"new\") {\n        warning(\"W031\", t);\n      }\n\n      parseFinalSemicolon(t);\n    }\n\n\n    // Restore the indentation.\n\n    indent = i;\n    if (hasOwnScope) {\n      state.funct[\"(scope)\"].unstack();\n    }\n    return r;\n  }\n\n  /**\n   * Consume a series of statements until encountering either the end of the\n   * program or a token that interrupts control flow.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   *\n   * @returns {Array<token>} - the tokens consumed\n   */\n  function statements(context) {\n    var a = [], p;\n\n    while (!state.tokens.next.reach && state.tokens.next.id !== \"(end)\") {\n      if (state.tokens.next.id === \";\") {\n        p = peek();\n\n        if (!p || (p.id !== \"(\" && p.id !== \"[\")) {\n          warning(\"W032\");\n        }\n\n        advance(\";\");\n      } else {\n        a.push(statement(context));\n      }\n    }\n    return a;\n  }\n\n\n  /**\n   * Parse any directives in a directive prologue.\n   */\n  function directives() {\n    var current = state.tokens.next;\n    while (state.tokens.next.id === \"(string)\") {\n      var next = peekIgnoreEOL();\n      if (!isEndOfExpr(0, current, next)) {\n        break;\n      }\n      current = next;\n\n      advance();\n      var directive = state.tokens.curr.value;\n      if (state.directive[directive] ||\n          (directive === \"use strict\" && state.option.strict === \"implied\")) {\n        warning(\"W034\", state.tokens.curr, directive);\n      }\n\n      // From ECMAScript 2016:\n      //\n      // > 14.1.2 Static Semantics: Early Errors\n      // >\n      // > [...]\n      // > - It is a Syntax Error if ContainsUseStrict of FunctionBody is true\n      // >   and IsSimpleParameterList of FormalParameters is false.\n      if (directive === \"use strict\" && state.inES7() &&\n        !state.funct[\"(global)\"] && state.funct[\"(hasSimpleParams)\"] === false) {\n        error(\"E065\", state.tokens.curr);\n      }\n\n      state.directive[directive] = state.tokens.curr;\n\n      parseFinalSemicolon(current);\n    }\n\n    if (state.isStrict()) {\n      state.option.undef = true;\n    }\n  }\n\n  /**\n   * Parses a single block. A block is a sequence of statements wrapped in\n   * braces.\n   *\n   * @param {number} context - parsing context\n   * @param {boolean} ordinary - `true` for everything but function bodies and\n   *                             try blocks\n   * @param {boolean} [stmt] - `true` if block can be a single statement (e.g.\n   *                           in if/for/while)\n   * @param {boolean} [isfunc] - `true` if block is a function body\n   * @param {boolean} [isfatarrow] - `true` if its a body of a fat arrow\n   *                                 function\n   * @param {boolean} [iscase] - `true` if block is a switch case block\n   *\n   * @returns {token} - the token describing the block\n   */\n  function block(context, ordinary, stmt, isfunc, isfatarrow, iscase) {\n    var a,\n      b = inblock,\n      old_indent = indent,\n      m,\n      t,\n      d;\n\n    inblock = ordinary;\n\n    t = state.tokens.next;\n\n    var metrics = state.funct[\"(metrics)\"];\n    metrics.nestedBlockDepth += 1;\n    metrics.verifyMaxNestedBlockDepthPerFunction();\n\n    if (state.tokens.next.id === \"{\") {\n      advance(\"{\");\n\n      // create a new block scope\n      state.funct[\"(scope)\"].stack();\n\n      if (state.tokens.next.id !== \"}\") {\n        indent += state.option.indent;\n        while (!ordinary && state.tokens.next.from > indent) {\n          indent += state.option.indent;\n        }\n\n        if (isfunc) {\n          m = {};\n          for (d in state.directive) {\n            m[d] = state.directive[d];\n          }\n          directives();\n\n          state.funct[\"(isStrict)\"] = state.isStrict();\n\n          if (state.option.strict && state.funct[\"(context)\"][\"(global)\"]) {\n            if (!m[\"use strict\"] && !state.isStrict()) {\n              warning(\"E007\");\n            }\n          }\n        }\n\n        a = statements(context);\n\n        metrics.statementCount += a.length;\n\n        indent -= state.option.indent;\n      } else if (isfunc) {\n        // Ensure property is set for functions with empty bodies.\n        state.funct[\"(isStrict)\"] = state.isStrict();\n      }\n\n      advance(\"}\", t);\n\n      if (isfunc) {\n        state.funct[\"(scope)\"].validateParams(isfatarrow);\n        if (m) {\n          state.directive = m;\n        }\n      }\n\n      state.funct[\"(scope)\"].unstack();\n\n      indent = old_indent;\n    } else if (!ordinary) {\n      if (isfunc) {\n        state.funct[\"(scope)\"].stack();\n\n        if (stmt && !isfatarrow && !state.inMoz()) {\n          error(\"W118\", state.tokens.curr, \"function closure expressions\");\n        }\n\n        if (isfatarrow) {\n          state.funct[\"(scope)\"].validateParams(true);\n        }\n\n        var expr = expression(context, 10);\n\n        if (state.option.noreturnawait && context & prodParams.async &&\n            expr.identifier && expr.value === \"await\") {\n          warning(\"W146\", expr);\n        }\n\n        if (state.option.strict && state.funct[\"(context)\"][\"(global)\"]) {\n          if (!state.isStrict()) {\n            warning(\"E007\");\n          }\n        }\n\n        state.funct[\"(scope)\"].unstack();\n      } else {\n        error(\"E021\", state.tokens.next, \"{\", state.tokens.next.value);\n      }\n    } else {\n\n      state.funct[\"(scope)\"].stack();\n\n      if (!stmt || state.option.curly) {\n        warning(\"W116\", state.tokens.next, \"{\", state.tokens.next.value);\n      }\n\n      // JSHint observes Annex B of the ECMAScript specification by default,\n      // where function declarations are permitted in the statement positions\n      // of IfStatements.\n      var supportsFnDecl = state.funct[\"(verb)\"] === \"if\" ||\n        state.tokens.curr.id === \"else\";\n\n      state.tokens.next.inBracelessBlock = true;\n      indent += state.option.indent;\n      // test indentation only if statement is in new line\n      a = [statement(context)];\n      indent -= state.option.indent;\n\n      if (a[0] && a[0].declaration &&\n        !(supportsFnDecl && a[0].id === \"function\")) {\n        error(\"E048\", a[0], a[0].id[0].toUpperCase() + a[0].id.slice(1));\n      }\n\n      state.funct[\"(scope)\"].unstack();\n    }\n\n    // Don't clear and let it propagate out if it is \"break\", \"return\" or\n    // similar in switch case\n    switch (state.funct[\"(verb)\"]) {\n    case \"break\":\n    case \"continue\":\n    case \"return\":\n    case \"throw\":\n      if (iscase) {\n        break;\n      }\n\n      /* falls through */\n    default:\n      state.funct[\"(verb)\"] = null;\n    }\n\n    inblock = b;\n    if (ordinary && state.option.noempty && (!a || a.length === 0)) {\n      warning(\"W035\", state.tokens.prev);\n    }\n    metrics.nestedBlockDepth -= 1;\n    return a;\n  }\n\n\n  /**\n   * Update the global state which tracks all statically-identifiable property\n   * names, and emit a warning if the `members` linting directive is in use and\n   * does not include the given name.\n   *\n   * @param {string} m - the property name\n   */\n  function countMember(m) {\n    if (membersOnly && typeof membersOnly[m] !== \"boolean\") {\n      warning(\"W036\", state.tokens.curr, m);\n    }\n    if (typeof member[m] === \"number\") {\n      member[m] += 1;\n    } else {\n      member[m] = 1;\n    }\n  }\n\n  // Build the syntax table by declaring the syntactic elements of the language.\n\n  type(\"(number)\", function() {\n    if (state.tokens.next.id === \".\") {\n      warning(\"W005\", this);\n    }\n\n    return this;\n  });\n\n  type(\"(string)\", function() {\n    return this;\n  });\n\n  state.syntax[\"(identifier)\"] = {\n    type: \"(identifier)\",\n    lbp: 0,\n    identifier: true,\n\n    nud: function(context) {\n      var v = this.value;\n      // If this identifier is the lone parameter to a shorthand \"fat arrow\"\n      // function definition, i.e.\n      //\n      //     x => x;\n      //\n      // ...it should not be considered as a variable in the current scope. It\n      // will be added to the scope of the new function when the next token is\n      // parsed, so it can be safely ignored for now.\n      var isLoneArrowParam = state.tokens.next.id === \"=>\";\n\n      if (isReserved(context, this)) {\n        warning(\"W024\", this, v);\n      } else if (!isLoneArrowParam && !state.funct[\"(comparray)\"].check(v)) {\n        state.funct[\"(scope)\"].block.use(v, state.tokens.curr);\n      }\n\n      return this;\n    },\n\n    led: function() {\n      /* istanbul ignore next */\n      error(\"E033\", state.tokens.next, state.tokens.next.value);\n    }\n  };\n\n  var baseTemplateSyntax = {\n    identifier: false,\n    template: true,\n  };\n  state.syntax[\"(template)\"] = _.extend({\n    lbp: 155,\n    type: \"(template)\",\n    nud: doTemplateLiteral,\n    led: doTemplateLiteral,\n    noSubst: false\n  }, baseTemplateSyntax);\n\n  state.syntax[\"(template middle)\"] = _.extend({\n    lbp: 0,\n    type: \"(template middle)\",\n    noSubst: false\n  }, baseTemplateSyntax);\n\n  state.syntax[\"(template tail)\"] = _.extend({\n    lbp: 0,\n    type: \"(template tail)\",\n    tail: true,\n    noSubst: false\n  }, baseTemplateSyntax);\n\n  state.syntax[\"(no subst template)\"] = _.extend({\n    lbp: 155,\n    type: \"(template)\",\n    nud: doTemplateLiteral,\n    led: doTemplateLiteral,\n    noSubst: true,\n    tail: true // mark as tail, since it's always the last component\n  }, baseTemplateSyntax);\n\n  type(\"(regexp)\", function() {\n    return this;\n  });\n\n  // ECMAScript parser\n\n  delim(\"(endline)\");\n  (function(x) {\n    x.line = x.from = 0;\n  })(delim(\"(begin)\"));\n  delim(\"(end)\").reach = true;\n  delim(\"(error)\").reach = true;\n  delim(\"}\").reach = true;\n  delim(\")\");\n  delim(\"]\");\n  delim(\"\\\"\").reach = true;\n  delim(\"'\").reach = true;\n  delim(\";\");\n  delim(\":\").reach = true;\n  delim(\"#\");\n\n  reserve(\"else\");\n  reserve(\"case\").reach = true;\n  reserve(\"catch\");\n  reserve(\"default\").reach = true;\n  reserve(\"finally\");\n  reserve(\"true\", function() { return this; });\n  reserve(\"false\", function() { return this; });\n  reserve(\"null\", function() { return this; });\n  reserve(\"this\", function() {\n    if (state.isStrict() && !isMethod() &&\n        !state.option.validthis && ((state.funct[\"(statement)\"] &&\n        state.funct[\"(name)\"].charAt(0) > \"Z\") || state.funct[\"(global)\"])) {\n      warning(\"W040\", this);\n    }\n\n    return this;\n  });\n\n  (function(superSymbol) {\n    superSymbol.rbp = 161;\n  })(reserve(\"super\", function() {\n    superNud.call(state.tokens.curr, this);\n\n    return this;\n  }));\n\n  assignop(\"=\", \"assign\");\n  assignop(\"+=\", \"assignadd\");\n  assignop(\"-=\", \"assignsub\");\n  assignop(\"*=\", \"assignmult\");\n  assignop(\"/=\", \"assigndiv\").nud = function() {\n    /* istanbul ignore next */\n    error(\"E014\");\n  };\n  assignop(\"%=\", \"assignmod\");\n  assignop(\"**=\", function(context, left, that) {\n    if (!state.inES7()) {\n      warning(\"W119\", that, \"Exponentiation operator\", \"7\");\n    }\n\n    that.left = left;\n\n    checkLeftSideAssign(context, left, that);\n\n    that.right = expression(context, 10);\n\n    return that;\n  });\n\n  bitwiseassignop(\"&=\");\n  bitwiseassignop(\"|=\");\n  bitwiseassignop(\"^=\");\n  bitwiseassignop(\"<<=\");\n  bitwiseassignop(\">>=\");\n  bitwiseassignop(\">>>=\");\n  infix(\",\", function(context, left, that) {\n    if (state.option.nocomma) {\n      warning(\"W127\", that);\n    }\n\n    that.left = left;\n\n    if (checkComma()) {\n      that.right = expression(context, 10);\n    } else {\n      that.right = null;\n    }\n\n    return that;\n  }, 10, true);\n\n  infix(\"?\", function(context, left, that) {\n    increaseComplexityCount();\n    that.left = left;\n    that.right = expression(context & ~prodParams.noin, 10);\n    advance(\":\");\n    expression(context, 10);\n    return that;\n  }, 30);\n\n  infix(\"||\", function(context, left, that) {\n    increaseComplexityCount();\n    that.left = left;\n    that.right = expression(context, 40);\n    return that;\n  }, 40);\n\n  var andPrecedence = 50;\n  infix(\"&&\", function(context, left, that) {\n    increaseComplexityCount();\n    that.left = left;\n    that.right = expression(context, andPrecedence);\n    return that;\n  }, andPrecedence);\n\n  infix(\"??\", function(context, left, that) {\n    if (!left.paren && (left.id === \"||\" || left.id === \"&&\")) {\n      error(\"E024\", that, \"??\");\n    }\n\n    if (!state.inES11()) {\n      warning(\"W119\", that, \"nullish coalescing\", \"11\");\n    }\n\n    increaseComplexityCount();\n    that.left = left;\n    var right = that.right = expression(context, 39);\n\n    if (!right) {\n      error(\"E024\", state.tokens.next, state.tokens.next.id);\n    } else if (!right.paren && (right.id === \"||\" || right.id === \"&&\")) {\n      error(\"E024\", that.right, that.right.id);\n    }\n\n    return that;\n  }, 39);\n\n  // The Exponentiation operator, introduced in ECMAScript 2016\n  //\n  // ExponentiationExpression[Yield] :\n  //   UnaryExpression[?Yield]\n  //   UpdateExpression[?Yield] ** ExponentiationExpression[?Yield]\n  infix(\"**\", function(context, left, that) {\n    if (!state.inES7()) {\n      warning(\"W119\", that, \"Exponentiation operator\", \"7\");\n    }\n\n    // Disallow UnaryExpressions which are not wrapped in parenthesis\n    if (!left.paren && beginsUnaryExpression(left)) {\n      error(\"E024\", that, \"**\");\n    }\n\n    that.left = left;\n    that.right = expression(context, that.rbp);\n    return that;\n  }, 150);\n  state.syntax[\"**\"].rbp = 140;\n  bitwise(\"|\", \"bitor\", 70);\n  bitwise(\"^\", \"bitxor\", 80);\n  bitwise(\"&\", \"bitand\", 90);\n  relation(\"==\", function(context, left, right) {\n    var eqnull = state.option.eqnull &&\n      ((left && left.value) === \"null\" || (right && right.value) === \"null\");\n\n    switch (true) {\n      case !eqnull && state.option.eqeqeq:\n        this.from = this.character;\n        warning(\"W116\", this, \"===\", \"==\");\n        break;\n      /* istanbul ignore next */\n      case isTypoTypeof(right, left, state):\n        warning(\"W122\", this, right.value);\n        break;\n      case isTypoTypeof(left, right, state):\n        warning(\"W122\", this, left.value);\n        break;\n    }\n\n    return this;\n  });\n  relation(\"===\", function(context, left, right) {\n    if (isTypoTypeof(right, left, state)) {\n      warning(\"W122\", this, right.value);\n    } else if (isTypoTypeof(left, right, state)) {\n      /* istanbul ignore next */\n      warning(\"W122\", this, left.value);\n    }\n    return this;\n  });\n  relation(\"!=\", function(context, left, right) {\n    var eqnull = state.option.eqnull &&\n        ((left && left.value) === \"null\" || (right && right.value) === \"null\");\n\n    if (!eqnull && state.option.eqeqeq) {\n      this.from = this.character;\n      warning(\"W116\", this, \"!==\", \"!=\");\n    } else if (isTypoTypeof(right, left, state)) {\n      /* istanbul ignore next */\n      warning(\"W122\", this, right.value);\n    } else if (isTypoTypeof(left, right, state)) {\n      warning(\"W122\", this, left.value);\n    }\n    return this;\n  });\n  relation(\"!==\", function(context, left, right) {\n    if (isTypoTypeof(right, left, state)) {\n      warning(\"W122\", this, right.value);\n    } else if (isTypoTypeof(left, right, state)) {\n      /* istanbul ignore next */\n      warning(\"W122\", this, left.value);\n    }\n    return this;\n  });\n  relation(\"<\");\n  relation(\">\");\n  relation(\"<=\");\n  relation(\">=\");\n  bitwise(\"<<\", \"shiftleft\", 120);\n  bitwise(\">>\", \"shiftright\", 120);\n  bitwise(\">>>\", \"shiftrightunsigned\", 120);\n  infix(\"in\", \"in\", 120);\n  infix(\"instanceof\", function(context, left, token) {\n    var right;\n    var scope = state.funct[\"(scope)\"];\n    token.left = left;\n    token.right = right = expression(context, 120);\n\n    // This condition reflects a syntax error which will be reported by the\n    // `expression` function.\n    if (!right) {\n      return token;\n    }\n\n    if (right.id === \"(number)\" ||\n        right.id === \"(string)\" ||\n        right.value === \"null\" ||\n        (right.value === \"undefined\" && !scope.has(\"undefined\")) ||\n        right.arity === \"unary\" ||\n        right.id === \"{\" ||\n        (right.id === \"[\" && !right.right) ||\n        right.id === \"(regexp)\" ||\n        (right.id === \"(template)\" && !right.tag)) {\n      error(\"E060\");\n    }\n\n    if (right.id === \"function\") {\n      warning(\"W139\");\n    }\n\n    return token;\n  }, 120);\n  infix(\"+\", function(context, left, that) {\n    var next = state.tokens.next;\n    var right;\n    that.left = left;\n    that.right = right = expression(context, 130);\n\n    if (left && right && left.id === \"(string)\" && right.id === \"(string)\") {\n      left.value += right.value;\n      left.character = right.character;\n      if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {\n        warning(\"W050\", left);\n      }\n      return left;\n    }\n\n    if (next.id === \"+\" || next.id === \"++\") {\n      warning(\"W007\", that.right);\n    }\n\n    return that;\n  }, 130);\n  prefix(\"+\", function(context) {\n    var next = state.tokens.next;\n    this.arity = \"unary\";\n    this.right = expression(context, 150);\n\n    if (next.id === \"+\" || next.id === \"++\") {\n      warning(\"W007\", this.right);\n    }\n\n    return this;\n  });\n  infix(\"-\", function(context, left, that) {\n    var next = state.tokens.next;\n    that.left = left;\n    that.right = expression(context, 130);\n\n    if (next.id === \"-\" || next.id === \"--\") {\n      warning(\"W006\", that.right);\n    }\n\n    return that;\n  }, 130);\n  prefix(\"-\", function(context) {\n    var next = state.tokens.next;\n    this.arity = \"unary\";\n    this.right = expression(context, 150);\n\n    if (next.id === \"-\" || next.id === \"--\") {\n      warning(\"W006\", this.right);\n    }\n\n    return this;\n  });\n  infix(\"*\", \"mult\", 140);\n  infix(\"/\", \"div\", 140);\n  infix(\"%\", \"mod\", 140);\n\n  suffix(\"++\");\n  prefix(\"++\", \"preinc\");\n  state.syntax[\"++\"].exps = true;\n\n  suffix(\"--\");\n  prefix(\"--\", \"predec\");\n  state.syntax[\"--\"].exps = true;\n\n  prefix(\"delete\", function(context) {\n    this.arity = \"unary\";\n    var p = expression(context, 150);\n    if (!p) {\n      return this;\n    }\n\n    if (p.id !== \".\" && p.id !== \"[\") {\n      warning(\"W051\");\n    }\n    this.first = p;\n\n    // The `delete` operator accepts unresolvable references when not in strict\n    // mode, so the operand may be undefined.\n    if (p.identifier && !state.isStrict()) {\n      p.forgiveUndef = true;\n    }\n    return this;\n  }).exps = true;\n\n  prefix(\"~\", function(context) {\n    if (state.option.bitwise) {\n      warning(\"W016\", this, \"~\");\n    }\n    this.arity = \"unary\";\n    this.right = expression(context, 150);\n    return this;\n  });\n\n  infix(\"...\");\n\n  prefix(\"!\", function(context) {\n    this.arity = \"unary\";\n    this.right = expression(context, 150);\n\n    if (!this.right) { // '!' followed by nothing? Give up.\n      quit(\"E041\", this);\n    }\n\n    if (bang[this.right.id] === true) {\n      warning(\"W018\", this, \"!\");\n    }\n    return this;\n  });\n\n  prefix(\"typeof\", function(context) {\n    this.arity = \"unary\";\n    var p = expression(context, 150);\n    this.first = this.right = p;\n\n    if (!p) { // 'typeof' followed by nothing? Give up.\n      quit(\"E041\", this);\n    }\n\n    // The `typeof` operator accepts unresolvable references, so the operand\n    // may be undefined.\n    if (p.identifier) {\n      p.forgiveUndef = true;\n    }\n    return this;\n  });\n  prefix(\"new\", function(context) {\n    var mp = metaProperty(context, \"target\", function() {\n      if (!state.inES6(true)) {\n        warning(\"W119\", state.tokens.prev, \"new.target\", \"6\");\n      }\n      var inFunction, c = state.funct;\n      while (c) {\n        inFunction = !c[\"(global)\"];\n        if (!c[\"(arrow)\"]) { break; }\n        c = c[\"(context)\"];\n      }\n      if (!inFunction) {\n        warning(\"W136\", state.tokens.prev, \"new.target\");\n      }\n    });\n    if (mp) { return mp; }\n\n    var opening = state.tokens.next;\n    var c = expression(context, 155), i;\n\n    if (!c) {\n      return this;\n    }\n\n    if (!c.paren && c.rbp > 160) {\n      error(\"E024\", opening, opening.value);\n    }\n\n    if (c.id !== \"function\") {\n      if (c.identifier) {\n        switch (c.value) {\n        case \"Number\":\n        case \"String\":\n        case \"Boolean\":\n        case \"Math\":\n        case \"JSON\":\n          warning(\"W053\", state.tokens.prev, c.value);\n          break;\n        case \"Symbol\":\n          if (state.inES6()) {\n            warning(\"W053\", state.tokens.prev, c.value);\n          }\n          break;\n        case \"Function\":\n          if (!state.option.evil) {\n            warning(\"W054\");\n          }\n          break;\n        case \"Date\":\n        case \"RegExp\":\n        case \"this\":\n          break;\n        default:\n          i = c.value.substr(0, 1);\n          if (state.option.newcap && (i < \"A\" || i > \"Z\") &&\n            !state.funct[\"(scope)\"].isPredefined(c.value)) {\n            warning(\"W055\", state.tokens.curr);\n          }\n        }\n      } else {\n        if (c.id === \"?.\" && !c.paren) {\n          error(\"E024\", c, \"?.\");\n        } else if (c.id !== \".\" && c.id !== \"[\" && c.id !== \"(\") {\n          /* istanbul ignore next */\n          warning(\"W056\", state.tokens.curr);\n        }\n      }\n    } else {\n      if (!state.option.supernew)\n        warning(\"W057\", this);\n    }\n    if (state.tokens.next.id !== \"(\" && !state.option.supernew) {\n      warning(\"W058\", state.tokens.curr, state.tokens.curr.value);\n    }\n    this.first = this.right = c;\n    return this;\n  });\n  state.syntax[\"new\"].exps = true;\n\n\n  var classDeclaration = blockstmt(\"class\", function(context) {\n    var className, classNameToken;\n\n    if (!state.inES6()) {\n      warning(\"W104\", state.tokens.curr, \"class\", \"6\");\n    }\n    state.inClassBody = true;\n\n    // Class Declaration: 'class <Classname>'\n    if (state.tokens.next.identifier && state.tokens.next.value !== \"extends\") {\n      classNameToken = state.tokens.next;\n      className = classNameToken.value;\n      identifier(context);\n      // unintialized, so that the 'extends' clause is parsed while the class is in TDZ\n      state.funct[\"(scope)\"].addbinding(className, {\n        type: \"class\",\n        initialized: false,\n        token: classNameToken\n      });\n    }\n\n    // Class Declaration: 'class <Classname> extends <Superclass>'\n    if (state.tokens.next.value === \"extends\") {\n      advance(\"extends\");\n      expression(context, 0);\n    }\n\n    if (classNameToken) {\n      this.name = classNameToken;\n      state.funct[\"(scope)\"].initialize(className);\n    } else {\n      this.name = null;\n    }\n\n    state.funct[\"(scope)\"].stack();\n    classBody(this, context);\n    return this;\n  });\n  classDeclaration.exps = true;\n  classDeclaration.declaration = true;\n\n  /*\n    Class expression\n\n    The Block- and Expression- handling for \"class\" are almost identical, except for the ordering of steps.\n    In an expression:, the name should not be saved into the calling scope, but is still accessible inside the definition, so we open a new scope first, then save the name. We also mark it as used.\n  */\n  prefix(\"class\", function(context) {\n    var className, classNameToken;\n\n    if (!state.inES6()) {\n      warning(\"W104\", state.tokens.curr, \"class\", \"6\");\n    }\n    state.inClassBody = true;\n\n    // Class Declaration: 'class <Classname>'\n    if (state.tokens.next.identifier && state.tokens.next.value !== \"extends\") {\n      classNameToken = state.tokens.next;\n      className = classNameToken.value;\n      identifier(context);\n    }\n\n    // Class Declaration: 'class <Classname> extends <Superclass>'\n    if (state.tokens.next.value === \"extends\") {\n      advance(\"extends\");\n      expression(context, 0);\n    }\n\n    state.funct[\"(scope)\"].stack();\n    if (classNameToken) {\n      this.name = classNameToken;\n      state.funct[\"(scope)\"].addbinding(className, {\n        type: \"class\",\n        initialized: true,\n        token: classNameToken\n      });\n      state.funct[\"(scope)\"].block.use(className, classNameToken);\n    } else {\n      this.name = null;\n    }\n\n    classBody(this, context);\n    return this;\n  });\n\n  function classBody(classToken, context) {\n    var props = Object.create(null);\n    var name, accessorType, token, isStatic, inGenerator, hasConstructor;\n\n    /* istanbul ignore else */\n    if (state.tokens.next.value === \"{\") {\n      advance(\"{\");\n    } else {\n      warning(\"W116\", state.tokens.curr, \"identifier\", state.tokens.next.type); //?\n      advance();\n    }\n\n    while (state.tokens.next.value !== \"}\") {\n      isStatic = false;\n      inGenerator = false;\n      context &= ~prodParams.preAsync;\n\n      if (state.tokens.next.value === \"static\" &&\n        !checkPunctuator(peek(), \"(\")) {\n        isStatic = true;\n        advance();\n      }\n\n      if (state.tokens.next.value === \"async\") {\n        if (!checkPunctuator(peek(), \"(\")) {\n          context |= prodParams.preAsync;\n          advance();\n\n          nolinebreak(state.tokens.curr);\n\n          if (checkPunctuator(state.tokens.next, \"*\")) {\n            inGenerator = true;\n            advance(\"*\");\n\n            if (!state.inES9()) {\n              warning(\"W119\", state.tokens.next, \"async generators\", \"9\");\n            }\n          }\n\n          if (!state.inES8()) {\n            warning(\"W119\", state.tokens.curr, \"async functions\", \"8\");\n          }\n        }\n      }\n\n      if (state.tokens.next.value === \"*\") {\n        inGenerator = true;\n        advance();\n      }\n\n      token = state.tokens.next;\n\n      if ((token.value === \"set\" || token.value === \"get\") && !checkPunctuator(peek(), \"(\")) {\n        if (inGenerator) {\n          /* istanbul ignore next */\n          error(\"E024\", token, token.value);\n        }\n        accessorType = token.value;\n        advance();\n        token = state.tokens.next;\n\n        if (!isStatic && token.value === \"constructor\") {\n          error(\"E049\", token, \"class \" + accessorType + \"ter method\", token.value);\n        } else if (isStatic && token.value === \"prototype\") {\n          error(\"E049\", token, \"static class \" + accessorType + \"ter method\", token.value);\n        }\n      } else {\n        accessorType = null;\n      }\n\n      switch (token.value) {\n        case \";\":\n          warning(\"W032\", token);\n          advance();\n          break;\n        case \"constructor\":\n          if (isStatic) {\n            // treat like a regular method -- static methods can be called 'constructor'\n            name = propertyName(context);\n            saveProperty(props, name, token, true, isStatic);\n            doMethod(classToken, context, name, inGenerator);\n          } else {\n            if (inGenerator || context & prodParams.preAsync) {\n              error(\"E024\", token, token.value);\n            } else if (hasConstructor) {\n              /* istanbul ignore next */\n              error(\"E024\", token, token.value);\n            } else {\n              hasConstructor = !accessorType && !isStatic;\n            }\n            advance();\n            doMethod(classToken, context, state.nameStack.infer());\n          }\n          break;\n        case \"[\":\n          name = computedPropertyName(context);\n          doMethod(classToken, context, name, inGenerator);\n          // We don't check names (via calling saveProperty()) of computed expressions like [\"Symbol.iterator\"]()\n          break;\n        default:\n          name = propertyName(context);\n          if (name === undefined) {\n            error(\"E024\", token, token.value);\n            advance();\n            break;\n          }\n\n          if (accessorType) {\n            saveAccessor(accessorType, props, name, token, true, isStatic);\n            name = state.nameStack.infer();\n          } else {\n            if (isStatic && name === \"prototype\") {\n              error(\"E049\", token, \"static class method\", name);\n            }\n\n            saveProperty(props, name, token, true, isStatic);\n          }\n\n          doMethod(classToken, context, name, inGenerator);\n          break;\n      }\n    }\n    advance(\"}\");\n    checkProperties(props);\n\n    state.inClassBody = false;\n    state.funct[\"(scope)\"].unstack();\n  }\n\n  function doMethod(classToken, context, name, generator) {\n    if (generator) {\n      if (!state.inES6()) {\n        warning(\"W119\", state.tokens.curr, \"function*\", \"6\");\n      }\n    }\n\n    if (state.tokens.next.value !== \"(\") {\n      error(\"E054\", state.tokens.next, state.tokens.next.value);\n      advance();\n      if (state.tokens.next.value === \"{\") {\n        // manually cheating the test \"invalidClasses\", which asserts this particular behavior when a class is misdefined.\n        advance();\n        if (state.tokens.next.value === \"}\") {\n          warning(\"W116\", state.tokens.next, \"(\", state.tokens.next.value);\n          advance();\n          identifier(context);\n          advance();\n        }\n        /* istanbul ignore next */\n        return;\n      } else {\n        while (state.tokens.next.value !== \"(\") {\n          advance();\n        }\n      }\n    }\n\n    doFunction(context, { name: name,\n        type: generator ? \"generator\" : null,\n        isMethod: true,\n        statement: classToken });\n  }\n\n  prefix(\"void\").exps = true;\n\n  infix(\".\", function(context, left, that) {\n    var m = identifier(context, true);\n\n    if (typeof m === \"string\") {\n      countMember(m);\n    }\n\n    that.left = left;\n    that.right = m;\n\n    if (m && m === \"hasOwnProperty\" && state.tokens.next.value === \"=\") {\n      warning(\"W001\");\n    }\n\n    if (left && left.value === \"arguments\" && (m === \"callee\" || m === \"caller\")) {\n      if (state.option.noarg)\n        warning(\"W059\", left, m);\n      else if (state.isStrict())\n        error(\"E008\");\n    } else if (!state.option.evil && left && left.value === \"document\" &&\n        (m === \"write\" || m === \"writeln\")) {\n      warning(\"W060\", left);\n    }\n\n    if (!state.option.evil && (m === \"eval\" || m === \"execScript\")) {\n      if (isGlobalEval(left, state)) {\n        warning(\"W061\");\n      }\n    }\n\n    return that;\n  }, 160, true);\n\n  infix(\"?.\", function(context, left, that) {\n    if (!state.inES11()) {\n      warning(\"W119\", state.tokens.curr, \"Optional chaining\", \"11\");\n    }\n\n\n    if (checkPunctuator(state.tokens.next, \"[\")) {\n      that.left = left;\n      advance();\n      that.right = state.tokens.curr.led(context, left);\n    } else if (checkPunctuator(state.tokens.next, \"(\")) {\n      that.left = left;\n      advance();\n      that.right = state.tokens.curr.led(context, left);\n      that.exps = true;\n    } else {\n      state.syntax[\".\"].led.call(that, context, left);\n    }\n\n    if (state.tokens.next.type === \"(template)\") {\n      error(\"E024\", state.tokens.next, \"`\");\n    }\n\n    return that;\n  }, 160, true);\n\n\n  /**\n   * Determine if a CallExpression's \"base\" is a type of expression commonly\n   * used in this position.\n   *\n   * @param {token} token - token describing the \"base\" of the CallExpression\n   * @returns {boolean}\n   */\n  function isTypicalCallExpression(token) {\n    return token.identifier || token.id === \".\" || token.id === \"[\" ||\n      token.id === \"=>\" || token.id === \"(\" || token.id === \"&&\" ||\n      token.id === \"||\" || token.id === \"?\" || token.id === \"async\" ||\n      token.id === \"?.\" || (state.inES6() && token[\"(name)\"]);\n  }\n\n  infix(\"(\", function(context, left, that) {\n    if (state.option.immed && left && !left.immed && left.id === \"function\") {\n      warning(\"W062\");\n    }\n\n    if (state.option.asi && checkPunctuators(state.tokens.prev, [\")\", \"]\"]) &&\n      !sameLine(state.tokens.prev, state.tokens.curr)) {\n      warning(\"W014\", state.tokens.curr, state.tokens.curr.id);\n    }\n\n    var n = 0;\n    var p = [];\n\n    if (left) {\n      if (left.type === \"(identifier)\") {\n        var newcapRe = /^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/;\n        var newcapIgnore = [\n          \"Array\", \"Boolean\", \"Date\", \"Error\", \"Function\", \"Number\",\n          \"Object\", \"RegExp\", \"String\", \"Symbol\"\n        ];\n        if (newcapRe.test(left.value) && newcapIgnore.indexOf(left.value) === -1) {\n          if (left.value === \"Math\") {\n            /* istanbul ignore next */\n            warning(\"W063\", left);\n          } else if (state.option.newcap) {\n            warning(\"W064\", left);\n          }\n        }\n      }\n    }\n\n    if (state.tokens.next.id !== \")\") {\n      for (;;) {\n        spreadrest(\"spread\");\n\n        p[p.length] = expression(context, 10);\n        n += 1;\n        if (state.tokens.next.id !== \",\") {\n          break;\n        }\n        advance(\",\");\n        checkComma({ allowTrailing: true });\n\n        if (state.tokens.next.id === \")\") {\n          if (!state.inES8()) {\n            warning(\"W119\", state.tokens.curr, \"Trailing comma in arguments lists\", \"8\");\n          }\n\n          break;\n        }\n      }\n    }\n\n    advance(\")\");\n\n    if (typeof left === \"object\") {\n      if (!state.inES5() && left.value === \"parseInt\" && n === 1) {\n        warning(\"W065\", state.tokens.curr);\n      }\n      if (!state.option.evil) {\n        if (left.value === \"eval\" || left.value === \"Function\" ||\n            left.value === \"execScript\") {\n          warning(\"W061\", left);\n\n          // This conditional expression was initially implemented with a typo\n          // which prevented the branch's execution in all cases. While\n          // enabling the code will produce behavior that is consistent with\n          // the other forms of code evaluation that follow, such a change is\n          // also technically incompatable with prior versions of JSHint (due\n          // to the fact that the behavior was never formally documented). This\n          // branch should be enabled as part of a major release.\n          //if (p[0] && p[0].id === \"(string)\") {\n          //  addEvalCode(left, p[0]);\n          //}\n        } else if (p[0] && p[0].id === \"(string)\" &&\n             (left.value === \"setTimeout\" ||\n            left.value === \"setInterval\")) {\n          warning(\"W066\", left);\n          addEvalCode(left, p[0]);\n\n        // window.setTimeout/setInterval\n        } else if (p[0] && p[0].id === \"(string)\" &&\n             left.value === \".\" &&\n             left.left.value === \"window\" &&\n             (left.right === \"setTimeout\" ||\n            left.right === \"setInterval\")) {\n          warning(\"W066\", left);\n          addEvalCode(left, p[0]);\n        }\n      }\n      if (!isTypicalCallExpression(left)) {\n        warning(\"W067\", that);\n      }\n    }\n\n    that.left = left;\n    return that;\n  }, 155, true).exps = true;\n\n  function peekThroughParens(parens) {\n    var pn = state.tokens.next;\n    var i = -1;\n    var pn1;\n\n    do {\n      if (pn.value === \"(\") {\n        parens += 1;\n      } else if (pn.value === \")\") {\n        parens -= 1;\n      }\n\n      i += 1;\n      pn1 = pn;\n      pn = peek(i);\n    } while (!(parens === 0 && pn1.value === \")\") && pn.type !== \"(end)\");\n\n    return pn;\n  }\n\n  prefix(\"(\", function(context, rbp) {\n    var ret, triggerFnExpr, first, last;\n    var opening = state.tokens.curr;\n    var preceeding = state.tokens.prev;\n    var isNecessary = !state.option.singleGroups;\n    var pn = peekThroughParens(1);\n\n    if (state.tokens.next.id === \"function\") {\n      triggerFnExpr = state.tokens.next.immed = true;\n    }\n\n    // If the balanced grouping operator is followed by a \"fat arrow\", the\n    // current token marks the beginning of a \"fat arrow\" function and parsing\n    // should proceed accordingly.\n    if (pn.value === \"=>\") {\n      pn.funct = doFunction(context, { type: \"arrow\", parsedOpening: true });\n      return pn;\n    }\n\n    // The ECMA262 grammar requires an expression between the \"opening\n    // parenthesis\" and \"close parenthesis\" tokens of the grouping operator.\n    // However, the \"ignore\" directive is commonly used to inject values that\n    // are not included in the token stream. For example:\n    //\n    //     return (\n    //       /*jshint ignore:start */\n    //       <div></div>\n    //       /*jshint ignore:end */\n    //     );\n    //\n    // The \"empty\" grouping operator is permitted in order to tolerate this\n    // pattern.\n    if (state.tokens.next.id === \")\") {\n      advance(\")\");\n      return;\n    }\n\n    ret = expression(context, 0);\n\n    advance(\")\", this);\n\n    if (!ret) {\n      return;\n    }\n\n    ret.paren = true;\n\n    if (state.option.immed && ret && ret.id === \"function\") {\n      if (state.tokens.next.id !== \"(\" &&\n        state.tokens.next.id !== \".\" && state.tokens.next.id !== \"[\") {\n        warning(\"W068\", this);\n      }\n    }\n\n    if (ret.id === \",\") {\n      first = ret.left;\n      while (first.id === \",\") {\n        first = first.left;\n      }\n\n      last = ret.right;\n    } else {\n      first = last = ret;\n\n      if (!isNecessary) {\n        // async functions are identified after parsing due to the complexity\n        // of disambiguating the `async` keyword.\n        if (!triggerFnExpr) {\n          triggerFnExpr = ret.id === \"async\";\n        }\n\n        isNecessary =\n          // Used to distinguish from an ExpressionStatement which may not\n          // begin with the `{` and `function` tokens\n          (opening.beginsStmt && (ret.id === \"{\" || triggerFnExpr)) ||\n          // Used to signal that a function expression is being supplied to\n          // some other operator.\n          (triggerFnExpr &&\n            // For parenthesis wrapping a function expression to be considered\n            // necessary, the grouping operator should be the left-hand-side of\n            // some other operator--either within the parenthesis or directly\n            // following them.\n            (!isEndOfExpr() || state.tokens.prev.id !== \"}\")) ||\n          // Used to demarcate an arrow function as the left-hand side of some\n          // operator.\n          (ret.id === \"=>\" && !isEndOfExpr()) ||\n          // Used as the return value of a single-statement arrow function\n          (ret.id === \"{\" && preceeding.id === \"=>\") ||\n          // Used to cover a unary expression as the left-hand side of the\n          // exponentiation operator\n          (beginsUnaryExpression(ret) && state.tokens.next.id === \"**\") ||\n          // Used to cover a logical operator as the right-hand side of the\n          // nullish coalescing operator\n          (preceeding.id === \"??\" && (ret.id === \"&&\" || ret.id === \"||\")) ||\n          // Used to delineate an integer number literal from a dereferencing\n          // punctuator (otherwise interpreted as a decimal point)\n          (ret.type === \"(number)\" &&\n            checkPunctuator(pn, \".\") && /^\\d+$/.test(ret.value)) ||\n          // Used to wrap object destructuring assignment\n          (opening.beginsStmt && ret.id === \"=\" && ret.left.id === \"{\") ||\n          // Used to allow optional chaining with other language features which\n          // are otherwise restricted.\n          (ret.id === \"?.\" &&\n              (preceeding.id === \"new\" || state.tokens.next.type === \"(template)\"));\n      }\n    }\n\n    // The operator may be necessary to override the default binding power of\n    // neighboring operators (whenever there is an operator in use within the\n    // first expression *or* the current group contains multiple expressions)\n    if (!isNecessary && (isOperator(first) || first !== last)) {\n      isNecessary =\n        (rbp > first.lbp) ||\n        (rbp > 0 && rbp === first.lbp) ||\n        (!isEndOfExpr() && last.rbp < state.tokens.next.lbp);\n    }\n\n    if (!isNecessary) {\n      warning(\"W126\", opening);\n    }\n\n    return ret;\n  });\n\n  application(\"=>\").rbp = 161;\n\n  infix(\"[\", function(context, left, that) {\n    var e, s, canUseDot;\n\n    if (state.option.asi && checkPunctuators(state.tokens.prev, [\")\", \"]\"]) &&\n      !sameLine(state.tokens.prev, state.tokens.curr)) {\n      warning(\"W014\", state.tokens.curr, state.tokens.curr.id);\n    }\n\n    e = expression(context & ~prodParams.noin, 0);\n\n    if (e && e.type === \"(string)\") {\n      if (!state.option.evil && (e.value === \"eval\" || e.value === \"execScript\")) {\n        if (isGlobalEval(left, state)) {\n          warning(\"W061\");\n        }\n      }\n\n      countMember(e.value);\n      if (!state.option.sub && reg.identifier.test(e.value)) {\n        s = state.syntax[e.value];\n\n        if (s) {\n          canUseDot = !isReserved(context, s);\n        } else {\n          // This branch exists to preserve legacy behavior with version 2.9.5\n          // and earlier. In those releases, `eval` and `arguments` were\n          // incorrectly interpreted as reserved keywords, so Member\n          // Expressions such as `object[\"eval\"]` did not trigger warning W069.\n          //\n          // TODO: Remove in JSHint 3\n          canUseDot = e.value !== \"eval\" && e.value !== \"arguments\";\n        }\n\n        if (canUseDot) {\n          warning(\"W069\", state.tokens.prev, e.value);\n        }\n      }\n    }\n    advance(\"]\", that);\n\n    if (e && e.value === \"hasOwnProperty\" && state.tokens.next.value === \"=\") {\n      warning(\"W001\");\n    }\n\n    that.left = left;\n    that.right = e;\n    return that;\n  }, 160, true);\n\n  function comprehensiveArrayExpression(context) {\n    var res = {};\n    res.exps = true;\n    state.funct[\"(comparray)\"].stack();\n\n    // Handle reversed for expressions, used in spidermonkey\n    var reversed = false;\n    if (state.tokens.next.value !== \"for\") {\n      reversed = true;\n      if (!state.inMoz()) {\n        warning(\"W116\", state.tokens.next, \"for\", state.tokens.next.value);\n      }\n      state.funct[\"(comparray)\"].setState(\"use\");\n      res.right = expression(context, 10);\n    }\n\n    advance(\"for\");\n    if (state.tokens.next.value === \"each\") {\n      advance(\"each\");\n      if (!state.inMoz()) {\n        warning(\"W118\", state.tokens.curr, \"for each\");\n      }\n    }\n    advance(\"(\");\n    state.funct[\"(comparray)\"].setState(\"define\");\n    res.left = expression(context, 130);\n    if (_.includes([\"in\", \"of\"], state.tokens.next.value)) {\n      advance();\n    } else {\n      /* istanbul ignore next */\n      error(\"E045\", state.tokens.curr);\n    }\n    state.funct[\"(comparray)\"].setState(\"generate\");\n    expression(context, 10);\n\n    advance(\")\");\n    if (state.tokens.next.value === \"if\") {\n      advance(\"if\");\n      advance(\"(\");\n      state.funct[\"(comparray)\"].setState(\"filter\");\n      expression(context, 10);\n      advance(\")\");\n    }\n\n    if (!reversed) {\n      state.funct[\"(comparray)\"].setState(\"use\");\n      res.right = expression(context, 10);\n    }\n\n    advance(\"]\");\n    state.funct[\"(comparray)\"].unstack();\n    return res;\n  }\n\n  prefix(\"[\", function(context) {\n    var blocktype = lookupBlockType();\n    if (blocktype.isCompArray) {\n      if (!state.option.esnext && !state.inMoz()) {\n        warning(\"W118\", state.tokens.curr, \"array comprehension\");\n      }\n      return comprehensiveArrayExpression(context);\n    } else if (blocktype.isDestAssign) {\n      this.destructAssign = destructuringPattern(context, {\n          openingParsed: true,\n          assignment: true\n        });\n      return this;\n    }\n    var b = !sameLine(state.tokens.curr, state.tokens.next);\n    this.first = [];\n    if (b) {\n      indent += state.option.indent;\n      if (state.tokens.next.from === indent + state.option.indent) {\n        /* istanbul ignore next */\n        indent += state.option.indent;\n      }\n    }\n    while (state.tokens.next.id !== \"(end)\") {\n      while (state.tokens.next.id === \",\") {\n        if (!state.option.elision) {\n          if (!state.inES5()) {\n            // Maintain compat with old options --- ES5 mode without\n            // elision=true will warn once per comma\n            warning(\"W070\");\n          } else {\n            warning(\"W128\");\n            do {\n              advance(\",\");\n            } while (state.tokens.next.id === \",\");\n            continue;\n          }\n        }\n        advance(\",\");\n      }\n\n      if (state.tokens.next.id === \"]\") {\n        break;\n      }\n\n      spreadrest(\"spread\");\n\n      this.first.push(expression(context, 10));\n      if (state.tokens.next.id === \",\") {\n        advance(\",\");\n        checkComma({ allowTrailing: true });\n        if (state.tokens.next.id === \"]\" && !state.inES5()) {\n          warning(\"W070\", state.tokens.curr);\n          break;\n        }\n      } else {\n        if (state.option.trailingcomma && state.inES5()) {\n          warningAt(\"W140\", state.tokens.curr.line, state.tokens.curr.character);\n        }\n        break;\n      }\n    }\n    if (b) {\n      indent -= state.option.indent;\n    }\n    advance(\"]\", this);\n    return this;\n  });\n\n\n  function isMethod() {\n    return !!state.funct[\"(method)\"];\n  }\n\n  /**\n   * Retrieve the value of the next token if it is a valid LiteralPropertyName\n   * and optionally advance the parser.\n   *\n   * @param {number} context - the parsing context; see `prod-params.js` for\n   *                           more information\n   *\n   * @returns {string|undefined} - the value of the identifier, if present\n   */\n  function propertyName(context) {\n    var id = optionalidentifier(context, true);\n\n    if (!id) {\n      if (state.tokens.next.id === \"(string)\") {\n        id = state.tokens.next.value;\n        advance();\n      } else if (state.tokens.next.id === \"(number)\") {\n        id = state.tokens.next.value.toString();\n        advance();\n      }\n    }\n\n    if (id === \"hasOwnProperty\") {\n      warning(\"W001\");\n    }\n\n    return id;\n  }\n\n  /**\n   * @param {Number} context The parsing context\n   * @param {Object} [options]\n   * @param {token} [options.loneArg] The argument to the function in cases\n   *                                  where it was defined using the\n   *                                  single-argument shorthand.\n   * @param {bool} [options.parsedOpening] Whether the opening parenthesis has\n   *                                       already been parsed.\n   *\n   * @returns {{ arity: number, params: Array.<string>, isSimple: boolean }}\n   */\n  function functionparams(context, options) {\n    var next;\n    var paramsIds = [];\n    var ident;\n    var tokens = [];\n    var t;\n    var pastDefault = false;\n    var pastRest = false;\n    var arity = 0;\n    var loneArg = options && options.loneArg;\n    var hasDestructuring = false;\n\n    if (loneArg && loneArg.identifier === true) {\n      state.funct[\"(scope)\"].addParam(loneArg.value, loneArg);\n      return { arity: 1, params: [ loneArg.value ], isSimple: true };\n    }\n\n    next = state.tokens.next;\n\n    if (!options || !options.parsedOpening) {\n      advance(\"(\");\n    }\n\n    if (state.tokens.next.id === \")\") {\n      advance(\")\");\n      return;\n    }\n\n    function addParam(addParamArgs) {\n      state.funct[\"(scope)\"].addParam.apply(state.funct[\"(scope)\"], addParamArgs);\n    }\n\n    for (;;) {\n      arity++;\n      // are added to the param scope\n      var currentParams = [];\n\n      pastRest = spreadrest(\"rest\");\n\n      if (_.includes([\"{\", \"[\"], state.tokens.next.id)) {\n        hasDestructuring = true;\n        tokens = destructuringPattern(context);\n        for (t in tokens) {\n          t = tokens[t];\n          if (t.id) {\n            paramsIds.push(t.id);\n            currentParams.push([t.id, t.token]);\n          }\n        }\n      } else {\n        ident = identifier(context);\n\n        if (ident) {\n          paramsIds.push(ident);\n          currentParams.push([ident, state.tokens.curr]);\n        } else {\n          // Skip invalid parameter.\n          while (!checkPunctuators(state.tokens.next, [\",\", \")\"])) advance();\n        }\n      }\n\n      // It is valid to have a regular argument after a default argument\n      // since undefined can be used for missing parameters. Still warn as it is\n      // a possible code smell.\n      if (pastDefault) {\n        if (state.tokens.next.id !== \"=\") {\n          error(\"W138\", state.tokens.curr);\n        }\n      }\n      if (state.tokens.next.id === \"=\") {\n        if (!state.inES6()) {\n          warning(\"W119\", state.tokens.next, \"default parameters\", \"6\");\n        }\n\n        if (pastRest) {\n          error(\"E062\", state.tokens.next);\n        }\n\n        advance(\"=\");\n        pastDefault = true;\n        expression(context, 10);\n      }\n\n      // now we have evaluated the default expression, add the variable to the param scope\n      currentParams.forEach(addParam);\n      if (state.tokens.next.id === \",\") {\n        if (pastRest) {\n          warning(\"W131\", state.tokens.next);\n        }\n        advance(\",\");\n        checkComma({ allowTrailing: true });\n      }\n\n      if (state.tokens.next.id === \")\") {\n        if (state.tokens.curr.id === \",\" && !state.inES8()) {\n          warning(\"W119\", state.tokens.curr, \"Trailing comma in function parameters\", \"8\");\n        }\n\n        advance(\")\", next);\n        return {\n          arity: arity,\n          params: paramsIds,\n          isSimple: !hasDestructuring && !pastRest && !pastDefault\n        };\n      }\n    }\n  }\n\n  /**\n   * Factory function for creating objects used to track statistics of function\n   * literals.\n   *\n   * @param {string} name - the identifier name to associate with the function\n   * @param {object} [token] - token responsible for creating the function\n   *                           object\n   * @param {object} [overwrites] - a collection of properties that should\n   *                                override the corresponding default value of\n   *                                the new \"functor\" object\n   */\n  function functor(name, token, overwrites) {\n    var funct = {\n      \"(name)\"      : name,\n      \"(breakage)\"  : 0,\n      \"(loopage)\"   : 0,\n      // The strictness of the function body is tracked via a dedicated\n      // property (as opposed to via the global `state` object) so that the\n      // value can be referenced after the body has been fully parsed (i.e.\n      // when validating the identifier used in function declarations and\n      // function expressions).\n      \"(isStrict)\"  : \"unknown\",\n\n      \"(global)\"    : false,\n\n      \"(line)\"      : null,\n      \"(character)\" : null,\n      \"(metrics)\"   : null,\n      \"(statement)\" : null,\n      \"(context)\"   : null,\n      \"(scope)\"     : null,\n      \"(comparray)\" : null,\n      \"(yielded)\"   : null,\n      \"(arrow)\"     : null,\n      \"(async)\"     : null,\n      \"(params)\"    : null\n    };\n\n    if (token) {\n      _.extend(funct, {\n        \"(line)\"     : token.line,\n        \"(character)\": token.character,\n        \"(metrics)\"  : createMetrics(token)\n      });\n    }\n\n    _.extend(funct, overwrites);\n\n    if (funct[\"(context)\"]) {\n      funct[\"(scope)\"] = funct[\"(context)\"][\"(scope)\"];\n      funct[\"(comparray)\"]  = funct[\"(context)\"][\"(comparray)\"];\n    }\n\n    return funct;\n  }\n\n  /**\n   * Determine if the parser has begun parsing executable code.\n   *\n   * @param {Token} funct - The current \"functor\" token\n   *\n   * @returns {boolean}\n   */\n  function hasParsedCode(funct) {\n    return funct[\"(global)\"] && !funct[\"(verb)\"];\n  }\n\n  /**\n   * This function is used as both a null-denotation method *and* a\n   * left-denotation method, meaning the first parameter is overloaded.\n   */\n  function doTemplateLiteral(context, leftOrRbp) {\n    // ASSERT: this.type === \"(template)\"\n    // jshint validthis: true\n    var ctx = this.context;\n    var noSubst = this.noSubst;\n    var depth = this.depth;\n    var left = typeof leftOrRbp === \"number\" ? null : leftOrRbp;\n\n    if (!noSubst) {\n      while (!end()) {\n        if (!state.tokens.next.template || state.tokens.next.depth > depth) {\n          expression(context, 0); // should probably have different rbp?\n        } else {\n          // skip template start / middle\n          advance();\n        }\n      }\n    }\n\n    return {\n      id: \"(template)\",\n      type: \"(template)\",\n      tag: left\n    };\n\n    function end() {\n      if (state.tokens.curr.template && state.tokens.curr.tail &&\n          state.tokens.curr.context === ctx) {\n        /* istanbul ignore next */\n        return true;\n      }\n      var complete = (state.tokens.next.template && state.tokens.next.tail &&\n                      state.tokens.next.context === ctx);\n      if (complete) advance();\n      return complete || state.tokens.next.isUnclosed;\n    }\n  }\n\n  /**\n   * Parse a function literal.\n   *\n   * @param {Number} context The parsing context\n   * @param {Object} [options]\n   * @param {string} [options.name] The identifier belonging to the function (if\n   *                                any)\n   * @param {token} [options.statement] The statement that triggered creation\n   *                                    of the current function.\n   * @param {string} [options.type] If specified, either \"generator\" or \"arrow\"\n   * @param {token} [options.loneArg] The argument to the function in cases\n   *                                  where it was defined using the\n   *                                  single-argument shorthand\n   * @param {bool} [options.parsedOpening] Whether the opening parenthesis has\n   *                                       already been parsed\n   * @param {string} [options.classExprBinding] Define a function with this\n   *                                            identifier in the new function's\n   *                                            scope, mimicking the bahavior of\n   *                                            class expression names within\n   *                                            the body of member functions.\n   */\n  function doFunction(context, options) {\n    var f, token, name, statement, classExprBinding, isGenerator, isArrow,\n      isMethod, ignoreLoopFunc;\n    var oldOption = state.option;\n    var oldIgnored = state.ignored;\n    var isAsync = context & prodParams.preAsync;\n\n    if (options) {\n      name = options.name;\n      statement = options.statement;\n      classExprBinding = options.classExprBinding;\n      isGenerator = options.type === \"generator\";\n      isArrow = options.type === \"arrow\";\n      isMethod = options.isMethod;\n      ignoreLoopFunc = options.ignoreLoopFunc;\n    }\n\n    context &= ~prodParams.noin;\n    context &= ~prodParams.tryClause;\n\n    if (isAsync) {\n      context |= prodParams.async;\n    } else {\n      context &= ~prodParams.async;\n    }\n\n    if (isGenerator) {\n      context |= prodParams.yield;\n    } else if (!isArrow) {\n      context &= ~prodParams.yield;\n    }\n    context &= ~prodParams.preAsync;\n\n    state.option = Object.create(state.option);\n    state.ignored = Object.create(state.ignored);\n\n    state.funct = functor(name || state.nameStack.infer(), state.tokens.next, {\n      \"(statement)\": statement,\n      \"(context)\":   state.funct,\n      \"(arrow)\":     isArrow,\n      \"(method)\":    isMethod,\n      \"(async)\":     isAsync\n    });\n\n    f = state.funct;\n    token = state.tokens.curr;\n\n    functions.push(state.funct);\n\n    // So that the function is available to itself and referencing itself is not\n    // seen as a closure, add the function name to a new scope, but do not\n    // test for unused (unused: false)\n    // it is a new block scope so that params can override it, it can be block scoped\n    // but declarations inside the function don't cause already declared error\n    state.funct[\"(scope)\"].stack(\"functionouter\");\n    var internallyAccessibleName = !isMethod && (name || classExprBinding);\n    if (internallyAccessibleName) {\n      state.funct[\"(scope)\"].block.add(internallyAccessibleName,\n        classExprBinding ? \"class\" : \"function\", state.tokens.curr, false);\n    }\n\n    if (!isArrow) {\n      state.funct[\"(scope)\"].funct.add(\"arguments\", \"var\", token, false);\n    }\n\n    // create the param scope (params added in functionparams)\n    state.funct[\"(scope)\"].stack(\"functionparams\");\n\n    var paramsInfo = functionparams(context, options);\n\n    if (paramsInfo) {\n      state.funct[\"(params)\"] = paramsInfo.params;\n      state.funct[\"(hasSimpleParams)\"] = paramsInfo.isSimple;\n      state.funct[\"(metrics)\"].arity = paramsInfo.arity;\n      state.funct[\"(metrics)\"].verifyMaxParametersPerFunction();\n    } else {\n      state.funct[\"(params)\"] = [];\n      state.funct[\"(metrics)\"].arity = 0;\n      state.funct[\"(hasSimpleParams)\"] = true;\n    }\n\n    if (isArrow) {\n      context &= ~prodParams.yield;\n\n      if (!state.inES6(true)) {\n        warning(\"W119\", state.tokens.curr, \"arrow function syntax (=>)\", \"6\");\n      }\n\n      if (!options.loneArg) {\n        advance(\"=>\");\n      }\n    }\n\n    block(context, false, true, true, isArrow);\n\n    if (!state.option.noyield && isGenerator && !state.funct[\"(yielded)\"]) {\n      warning(\"W124\", state.tokens.curr);\n    }\n\n    state.funct[\"(metrics)\"].verifyMaxStatementsPerFunction();\n    state.funct[\"(metrics)\"].verifyMaxComplexityPerFunction();\n    state.funct[\"(unusedOption)\"] = state.option.unused;\n    state.option = oldOption;\n    state.ignored = oldIgnored;\n    state.funct[\"(last)\"] = state.tokens.curr.line;\n    state.funct[\"(lastcharacter)\"] = state.tokens.curr.character;\n\n    // unstack the params scope\n    state.funct[\"(scope)\"].unstack(); // also does usage and label checks\n\n    // unstack the function outer stack\n    state.funct[\"(scope)\"].unstack();\n\n    state.funct = state.funct[\"(context)\"];\n\n    if (!ignoreLoopFunc && !state.option.loopfunc && state.funct[\"(loopage)\"]) {\n      // If the function we just parsed accesses any non-local variables\n      // trigger a warning. Otherwise, the function is safe even within\n      // a loop.\n      if (f[\"(outerMutables)\"]) {\n        warning(\"W083\", token, f[\"(outerMutables)\"].join(\", \"));\n      }\n    }\n\n    return f;\n  }\n\n  function createMetrics(functionStartToken) {\n    return {\n      statementCount: 0,\n      nestedBlockDepth: -1,\n      ComplexityCount: 1,\n      arity: 0,\n\n      verifyMaxStatementsPerFunction: function() {\n        if (state.option.maxstatements &&\n          this.statementCount > state.option.maxstatements) {\n          warning(\"W071\", functionStartToken, this.statementCount);\n        }\n      },\n\n      verifyMaxParametersPerFunction: function() {\n        if (_.isNumber(state.option.maxparams) &&\n          this.arity > state.option.maxparams) {\n          warning(\"W072\", functionStartToken, this.arity);\n        }\n      },\n\n      verifyMaxNestedBlockDepthPerFunction: function() {\n        if (state.option.maxdepth &&\n          this.nestedBlockDepth > 0 &&\n          this.nestedBlockDepth === state.option.maxdepth + 1) {\n          warning(\"W073\", null, this.nestedBlockDepth);\n        }\n      },\n\n      verifyMaxComplexityPerFunction: function() {\n        var max = state.option.maxcomplexity;\n        var cc = this.ComplexityCount;\n        if (max && cc > max) {\n          warning(\"W074\", functionStartToken, cc);\n        }\n      }\n    };\n  }\n\n  function increaseComplexityCount() {\n    state.funct[\"(metrics)\"].ComplexityCount += 1;\n  }\n\n  // Parse assignments that were found instead of conditionals.\n  // For example: if (a = 1) { ... }\n\n  function checkCondAssignment(token) {\n    if (!token || token.paren) {\n      return;\n    }\n\n    if (token.id === \",\") {\n      checkCondAssignment(token.right);\n      return;\n    }\n\n    switch (token.id) {\n    case \"=\":\n    case \"+=\":\n    case \"-=\":\n    case \"*=\":\n    case \"%=\":\n    case \"&=\":\n    case \"|=\":\n    case \"^=\":\n    case \"/=\":\n      if (!state.option.boss) {\n        warning(\"W084\", token);\n      }\n    }\n  }\n\n  /**\n   * Validate the properties defined within an object literal or class body.\n   * See the `saveAccessor` and `saveProperty` functions for more detail.\n   *\n   * @param {object} props - Collection of objects describing the properties\n   *                         encountered\n   */\n  function checkProperties(props) {\n    // Check for lonely setters if in the ES5 mode.\n    if (state.inES5()) {\n      for (var name in props) {\n        if (props[name] && props[name].setterToken && !props[name].getterToken &&\n          !props[name].static) {\n          warning(\"W078\", props[name].setterToken);\n        }\n      }\n    }\n  }\n\n  function metaProperty(context, name, c) {\n    if (checkPunctuator(state.tokens.next, \".\")) {\n      var left = state.tokens.curr.id;\n      advance(\".\");\n      var id = identifier(context);\n      state.tokens.curr.isMetaProperty = true;\n      if (name !== id) {\n        error(\"E057\", state.tokens.prev, left, id);\n      } else {\n        c();\n      }\n      return state.tokens.curr;\n    }\n  }\n\n//object literals\n  (function(x) {\n    x.nud = function(context) {\n      var b, f, i, params, t, isGeneratorMethod = false, nextVal;\n      var props = Object.create(null); // All properties, including accessors\n      var isAsyncMethod = false;\n\n      b = !sameLine(state.tokens.curr, state.tokens.next);\n      if (b) {\n        indent += state.option.indent;\n        if (state.tokens.next.from === indent + state.option.indent) {\n          /* istanbul ignore next */\n          indent += state.option.indent;\n        }\n      }\n\n      var blocktype = lookupBlockType();\n      if (blocktype.isDestAssign) {\n        this.destructAssign = destructuringPattern(context, {\n            openingParsed: true,\n            assignment: true\n          });\n        return this;\n      }\n      state.inObjectBody = true;\n      for (;;) {\n        if (state.tokens.next.id === \"}\") {\n          break;\n        }\n\n        nextVal = state.tokens.next.value;\n        if (state.tokens.next.identifier &&\n            (peekIgnoreEOL().id === \",\" || peekIgnoreEOL().id === \"}\")) {\n          if (!state.inES6()) {\n            warning(\"W104\", state.tokens.next, \"object short notation\", \"6\");\n          }\n          t = expression(context, 10);\n          i = t && t.value;\n          if (t) {\n            saveProperty(props, i, t);\n          }\n\n        } else if (peek().id !== \":\" && (nextVal === \"get\" || nextVal === \"set\")) {\n          advance(nextVal);\n\n          if (!state.inES5()) {\n            error(\"E034\");\n          }\n\n          if (state.tokens.next.id === \"[\") {\n            i = computedPropertyName(context);\n          } else {\n            i = propertyName(context);\n\n            // ES6 allows for get() {...} and set() {...} method\n            // definition shorthand syntax, so we don't produce an error\n            // if linting ECMAScript 6 code.\n            if (!i && !state.inES6()) {\n              error(\"E035\");\n            }\n          }\n\n          // We don't want to save this getter unless it's an actual getter\n          // and not an ES6 concise method\n          if (i) {\n            saveAccessor(nextVal, props, i, state.tokens.curr);\n          }\n\n          t = state.tokens.next;\n          f = doFunction(context, { isMethod: true });\n          params = f[\"(params)\"];\n\n          // Don't warn about getter/setter pairs if this is an ES6 concise method\n          if (nextVal === \"get\" && i && params.length) {\n            warning(\"W076\", t, params[0], i);\n          } else if (nextVal === \"set\" && i && f[\"(metrics)\"].arity !== 1) {\n            warning(\"W077\", t, i);\n          }\n\n        } else if (spreadrest(\"spread\")) {\n          if (!state.inES9()) {\n            warning(\"W119\", state.tokens.next, \"object spread property\", \"9\");\n          }\n\n          expression(context, 10);\n        } else {\n          if (state.tokens.next.id === \"async\" && !checkPunctuators(peek(), [\"(\", \":\"])) {\n            if (!state.inES8()) {\n              warning(\"W119\", state.tokens.next, \"async functions\", \"8\");\n            }\n\n            isAsyncMethod = true;\n            advance();\n\n            nolinebreak(state.tokens.curr);\n          } else {\n            isAsyncMethod = false;\n          }\n\n          if (state.tokens.next.value === \"*\" && state.tokens.next.type === \"(punctuator)\") {\n            if (isAsyncMethod && !state.inES9()) {\n              warning(\"W119\", state.tokens.next, \"async generators\", \"9\");\n            } else if (!state.inES6()) {\n              warning(\"W104\", state.tokens.next, \"generator functions\", \"6\");\n            }\n\n            advance(\"*\");\n            isGeneratorMethod = true;\n          } else {\n            isGeneratorMethod = false;\n          }\n\n          if (state.tokens.next.id === \"[\") {\n            i = computedPropertyName(context);\n            state.nameStack.set(i);\n          } else {\n            state.nameStack.set(state.tokens.next);\n            i = propertyName(context);\n            saveProperty(props, i, state.tokens.next);\n\n            if (typeof i !== \"string\") {\n              break;\n            }\n          }\n\n          if (state.tokens.next.value === \"(\") {\n            if (!state.inES6()) {\n              warning(\"W104\", state.tokens.curr, \"concise methods\", \"6\");\n            }\n\n            doFunction(isAsyncMethod ? context | prodParams.preAsync : context, {\n              isMethod: true,\n              type: isGeneratorMethod ? \"generator\" : null\n            });\n          } else {\n            advance(\":\");\n            expression(context, 10);\n          }\n        }\n\n        countMember(i);\n\n        if (state.tokens.next.id === \",\") {\n          advance(\",\");\n          checkComma({ allowTrailing: true, property: true });\n          if (state.tokens.next.id === \",\") {\n            /* istanbul ignore next */\n            warning(\"W070\", state.tokens.curr);\n          } else if (state.tokens.next.id === \"}\" && !state.inES5()) {\n            warning(\"W070\", state.tokens.curr);\n          }\n        } else {\n          if (state.option.trailingcomma && state.inES5()) {\n            warningAt(\"W140\", state.tokens.curr.line, state.tokens.curr.character);\n          }\n          break;\n        }\n      }\n      if (b) {\n        indent -= state.option.indent;\n      }\n      advance(\"}\", this);\n\n      checkProperties(props);\n      state.inObjectBody = false;\n\n      return this;\n    };\n    x.fud = function() {\n      /* istanbul ignore next */\n      error(\"E036\", state.tokens.curr);\n    };\n  }(delim(\"{\")));\n\n  function destructuringPattern(context, options) {\n    var isAssignment = options && options.assignment;\n\n    context &= ~prodParams.noin;\n\n    if (!state.inES6()) {\n      warning(\"W104\", state.tokens.curr,\n        isAssignment ? \"destructuring assignment\" : \"destructuring binding\", \"6\");\n    }\n\n    return destructuringPatternRecursive(context, options);\n  }\n\n  function destructuringPatternRecursive(context, options) {\n    var ids, idx;\n    var identifiers = [];\n    var openingParsed = options && options.openingParsed;\n    var isAssignment = options && options.assignment;\n    var recursiveOptions = isAssignment ? { assignment: isAssignment } : null;\n    var firstToken = openingParsed ? state.tokens.curr : state.tokens.next;\n\n    var nextInnerDE = function() {\n      var ident;\n      if (checkPunctuators(state.tokens.next, [\"[\", \"{\"])) {\n        ids = destructuringPatternRecursive(context, recursiveOptions);\n        for (idx = 0; idx < ids.length; idx++) {\n          identifiers.push({ id: ids[idx].id, token: ids[idx].token });\n        }\n      } else if (checkPunctuator(state.tokens.next, \",\")) {\n        identifiers.push({ id: null, token: state.tokens.curr });\n      } else if (checkPunctuator(state.tokens.next, \"(\")) {\n        advance(\"(\");\n        nextInnerDE();\n        advance(\")\");\n      } else {\n        if (isAssignment) {\n          var assignTarget = expression(context, 20);\n          if (assignTarget) {\n            checkLeftSideAssign(context, assignTarget);\n\n            // if the target was a simple identifier, add it to the list to return\n            if (assignTarget.identifier) {\n              ident = assignTarget.value;\n            }\n          }\n        } else {\n          ident = identifier(context);\n        }\n        if (ident) {\n          identifiers.push({ id: ident, token: state.tokens.curr });\n        }\n      }\n    };\n\n    var assignmentProperty = function(context) {\n      var id, expr;\n\n      if (checkPunctuator(state.tokens.next, \"[\")) {\n        advance(\"[\");\n        expression(context, 10);\n        advance(\"]\");\n        advance(\":\");\n        nextInnerDE();\n      } else if (state.tokens.next.id === \"(string)\" ||\n                 state.tokens.next.id === \"(number)\") {\n        advance();\n        advance(\":\");\n        nextInnerDE();\n      } else {\n        // this id will either be the property name or the property name and the assigning identifier\n        var isRest = spreadrest(\"rest\");\n\n        if (isRest) {\n          if (!state.inES9()) {\n            warning(\"W119\", state.tokens.next, \"object rest property\", \"9\");\n          }\n\n          // Due to visual symmetry with the array rest property (and the early\n          // design of the language feature), developers may mistakenly assume\n          // any expression is valid in this position. If the next token is not\n          // an identifier, attempt to parse an expression and issue an error.\n          // order to recover more gracefully from this condition.\n          if (state.tokens.next.type === \"(identifier)\") {\n            id = identifier(context);\n          } else {\n            expr = expression(context, 10);\n            error(\"E030\", expr, expr.value);\n          }\n        } else {\n          id = identifier(context);\n        }\n\n        if (!isRest && checkPunctuator(state.tokens.next, \":\")) {\n          advance(\":\");\n          nextInnerDE();\n        } else if (id) {\n          // in this case we are assigning (not declaring), so check assignment\n          if (isAssignment) {\n            checkLeftSideAssign(context, state.tokens.curr);\n          }\n          identifiers.push({ id: id, token: state.tokens.curr });\n        }\n\n        if (isRest && checkPunctuator(state.tokens.next, \",\")) {\n          warning(\"W130\", state.tokens.next);\n        }\n      }\n    };\n\n    var id, value;\n    if (checkPunctuator(firstToken, \"[\")) {\n      if (!openingParsed) {\n        advance(\"[\");\n      }\n      if (checkPunctuator(state.tokens.next, \"]\")) {\n        warning(\"W137\", state.tokens.curr);\n      }\n      var element_after_rest = false;\n      while (!checkPunctuator(state.tokens.next, \"]\")) {\n        var isRest = spreadrest(\"rest\");\n\n        nextInnerDE();\n\n        if (isRest && !element_after_rest &&\n            checkPunctuator(state.tokens.next, \",\")) {\n          warning(\"W130\", state.tokens.next);\n          element_after_rest = true;\n        }\n        if (!isRest && checkPunctuator(state.tokens.next, \"=\")) {\n          if (checkPunctuator(state.tokens.prev, \"...\")) {\n            /* istanbul ignore next */\n            advance(\"]\");\n          } else {\n            advance(\"=\");\n          }\n          id = state.tokens.prev;\n          value = expression(context, 10);\n          if (value && value.identifier && value.value === \"undefined\") {\n            warning(\"W080\", id, id.value);\n          }\n        }\n        if (!checkPunctuator(state.tokens.next, \"]\")) {\n          advance(\",\");\n        }\n      }\n      advance(\"]\");\n    } else if (checkPunctuator(firstToken, \"{\")) {\n\n      if (!openingParsed) {\n        advance(\"{\");\n      }\n      if (checkPunctuator(state.tokens.next, \"}\")) {\n        warning(\"W137\", state.tokens.curr);\n      }\n      while (!checkPunctuator(state.tokens.next, \"}\")) {\n        assignmentProperty(context);\n        if (checkPunctuator(state.tokens.next, \"=\")) {\n          advance(\"=\");\n          id = state.tokens.prev;\n          value = expression(context, 10);\n          if (value && value.identifier && value.value === \"undefined\") {\n            warning(\"W080\", id, id.value);\n          }\n        }\n        if (!checkPunctuator(state.tokens.next, \"}\")) {\n          advance(\",\");\n          if (checkPunctuator(state.tokens.next, \"}\")) {\n            // Trailing comma\n            // ObjectBindingPattern: { BindingPropertyList , }\n            break;\n          }\n        }\n      }\n      advance(\"}\");\n    }\n    return identifiers;\n  }\n\n  function destructuringPatternMatch(tokens, value) {\n    var first = value.first;\n\n    if (!first)\n      return;\n\n    _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function(val) {\n      var token = val[0];\n      var value = val[1];\n\n      if (token && value)\n        token.first = value;\n      else if (token && token.first && !value)\n        /* istanbul ignore next */\n        warning(\"W080\", token.first, token.first.value);\n    });\n  }\n\n  function blockVariableStatement(type, statement, context) {\n    // used for both let and const statements\n\n    var noin = context & prodParams.noin;\n    var isLet = type === \"let\";\n    var isConst = type === \"const\";\n    var tokens, lone, value, letblock;\n\n    if (!state.inES6()) {\n      warning(\"W104\", state.tokens.curr, type, \"6\");\n    }\n\n    if (isLet && isMozillaLet()) {\n      advance(\"(\");\n      state.funct[\"(scope)\"].stack();\n      letblock = true;\n      statement.declaration = false;\n    }\n\n    statement.first = [];\n    for (;;) {\n      var names = [];\n      if (_.includes([\"{\", \"[\"], state.tokens.next.value)) {\n        tokens = destructuringPattern(context);\n        lone = false;\n      } else {\n        tokens = [ { id: identifier(context), token: state.tokens.curr } ];\n        lone = true;\n      }\n\n      // A `const` declaration without an initializer is permissible within the\n      // head of for-in and for-of statements. If this binding list is being\n      // parsed as part of a `for` statement of any kind, allow the initializer\n      // to be omitted. Although this may erroneously allow such forms from\n      // \"C-style\" `for` statements (i.e. `for (const x;;) {}`, the `for`\n      // statement logic includes dedicated logic to issue the error for such\n      // cases.\n      if (!noin && isConst && state.tokens.next.id !== \"=\") {\n        warning(\"E012\", state.tokens.curr, state.tokens.curr.value);\n      }\n\n      for (var t in tokens) {\n        if (tokens.hasOwnProperty(t)) {\n          t = tokens[t];\n\n          // It is a Syntax Error if the BoundNames of BindingList contains\n          // \"let\".\n          if (t.id === \"let\") {\n            /* istanbul ignore next */\n            warning(\"W024\", t.token, t.id);\n          }\n\n          if (state.funct[\"(scope)\"].block.isGlobal()) {\n            if (predefined[t.id] === false) {\n              warning(\"W079\", t.token, t.id);\n            }\n          }\n          if (t.id) {\n            state.funct[\"(scope)\"].addbinding(t.id, {\n              type: type,\n              token: t.token });\n            names.push(t.token);\n          }\n        }\n      }\n\n      if (state.tokens.next.id === \"=\") {\n        statement.hasInitializer = true;\n\n        advance(\"=\");\n        if (!noin && peek(0).id === \"=\" && state.tokens.next.identifier) {\n          warning(\"W120\", state.tokens.next, state.tokens.next.value);\n        }\n        var id = state.tokens.prev;\n        value = expression(context, 10);\n        if (value) {\n          if (value.identifier && value.value === \"undefined\") {\n            warning(\"W080\", id, id.value);\n          }\n          if (!lone) {\n            destructuringPatternMatch(names, value);\n          }\n        }\n      }\n\n      // Bindings are not immediately initialized in for-in and for-of\n      // statements. As with `const` initializers (described above), the `for`\n      // statement parsing logic includes\n      if (state.tokens.next.value !== \"in\" && state.tokens.next.value !== \"of\") {\n        for (t in tokens) {\n          if (tokens.hasOwnProperty(t)) {\n            t = tokens[t];\n            state.funct[\"(scope)\"].initialize(t.id);\n          }\n        }\n      }\n\n      statement.first = statement.first.concat(names);\n\n      if (state.tokens.next.id !== \",\") {\n        break;\n      }\n\n      statement.hasComma = true;\n      advance(\",\");\n      checkComma();\n    }\n    if (letblock) {\n      advance(\")\");\n      block(context, true, true);\n      statement.block = true;\n      state.funct[\"(scope)\"].unstack();\n    }\n\n    return statement;\n  }\n\n  var conststatement = stmt(\"const\", function(context) {\n    return blockVariableStatement(\"const\", this, context);\n  });\n  conststatement.exps = true;\n  conststatement.declaration = true;\n\n\n  /**\n   * Determine if the current `let` token designates the beginning of a \"let\n   * block\" or \"let expression\" as implemented in the Mozilla SpiderMonkey\n   * engine.\n   *\n   * This function will only return `true` if Mozilla extensions have been\n   * enabled. It would be preferable to detect the language feature regardless\n   * of the parser's state because this would allow JSHint to instruct users to\n   * enable the `moz` option where necessary. This is not possible because the\n   * language extension is not compatible with standard JavaScript. For\n   * example, the following program code may describe a \"let block\" or a\n   * function invocation:\n   *\n   *     let(x)\n   *     {\n   *       typeof x;\n   *     }\n   *\n   * @returns {boolean}\n   */\n  function isMozillaLet() {\n    return state.tokens.next.id === \"(\" && state.inMoz();\n  }\n  var letstatement = stmt(\"let\", function(context) {\n    return blockVariableStatement(\"let\", this, context);\n  });\n  letstatement.nud = function(context, rbp) {\n    if (isMozillaLet()) {\n      // create a new block scope we use only for the current expression\n      state.funct[\"(scope)\"].stack();\n      advance(\"(\");\n      state.tokens.prev.fud(context);\n      advance(\")\");\n      expression(context, rbp);\n      state.funct[\"(scope)\"].unstack();\n    } else {\n      this.exps = false;\n      return state.syntax[\"(identifier)\"].nud.apply(this, arguments);\n    }\n  };\n  letstatement.meta = { es5: true, isFutureReservedWord: false, strictOnly: true };\n  letstatement.exps = true;\n  letstatement.declaration = true;\n  letstatement.useFud = function(context) {\n    var next = state.tokens.next;\n    var nextIsBindingName;\n\n    if (this.line !== next.line && !state.inES6()) {\n      return false;\n    }\n\n    // JSHint generally interprets `let` as a reserved word even though it is\n    // not considered as such by the ECMAScript specification because doing so\n    // simplifies parsing logic. It is special-cased here so that code such as\n    //\n    //     let\n    //     let\n    //\n    // is correctly interpreted as an invalid LexicalBinding. (Without this\n    // consideration, the code above would be parsed as two\n    // IdentifierReferences.)\n    nextIsBindingName = next.identifier && (!isReserved(context, next) ||\n      next.id === \"let\");\n\n    return nextIsBindingName || checkPunctuators(next, [\"{\", \"[\"]) ||\n      isMozillaLet();\n  };\n\n  var varstatement = stmt(\"var\", function(context) {\n    var noin = context & prodParams.noin;\n    var tokens, lone, value, id;\n\n    this.first = [];\n    for (;;) {\n      var names = [];\n      if (_.includes([\"{\", \"[\"], state.tokens.next.value)) {\n        tokens = destructuringPattern(context);\n        lone = false;\n      } else {\n        tokens = [];\n        id = identifier(context);\n\n        if (id) {\n          tokens.push({ id: id, token: state.tokens.curr });\n        }\n\n        lone = true;\n      }\n\n      if (state.option.varstmt) {\n        warning(\"W132\", this);\n      }\n\n\n      for (var t in tokens) {\n        if (tokens.hasOwnProperty(t)) {\n          t = tokens[t];\n          if (state.funct[\"(global)\"] && !state.impliedClosure()) {\n            if (predefined[t.id] === false) {\n              warning(\"W079\", t.token, t.id);\n            } else if (state.option.futurehostile === false) {\n              if ((!state.inES5() && vars.ecmaIdentifiers[5][t.id] === false) ||\n                (!state.inES6() && vars.ecmaIdentifiers[6][t.id] === false)) {\n                warning(\"W129\", t.token, t.id);\n              }\n            }\n          }\n          if (t.id) {\n            state.funct[\"(scope)\"].addbinding(t.id, {\n              type: \"var\",\n              token: t.token });\n\n            names.push(t.token);\n          }\n        }\n      }\n\n      if (state.tokens.next.id === \"=\") {\n        this.hasInitializer = true;\n\n        state.nameStack.set(state.tokens.curr);\n\n        advance(\"=\");\n        if (peek(0).id === \"=\" && state.tokens.next.identifier) {\n          if (!noin &&\n              !state.funct[\"(params)\"] ||\n              state.funct[\"(params)\"].indexOf(state.tokens.next.value) === -1) {\n            warning(\"W120\", state.tokens.next, state.tokens.next.value);\n          }\n        }\n        id = state.tokens.prev;\n        value = expression(context, 10);\n        if (value) {\n          if (!state.funct[\"(loopage)\"] && value.identifier &&\n            value.value === \"undefined\") {\n            warning(\"W080\", id, id.value);\n          }\n          if (!lone) {\n            destructuringPatternMatch(names, value);\n          }\n        }\n      }\n\n      this.first = this.first.concat(names);\n\n      if (state.tokens.next.id !== \",\") {\n        break;\n      }\n      this.hasComma = true;\n      advance(\",\");\n      checkComma();\n    }\n\n    return this;\n  });\n  varstatement.exps = true;\n\n  blockstmt(\"function\", function(context) {\n    var inexport = context & prodParams.export;\n    var generator = false;\n    var isAsync = context & prodParams.preAsync;\n    var labelType = \"\";\n\n    if (isAsync) {\n      labelType = \"async \";\n    }\n\n    if (state.tokens.next.value === \"*\") {\n      if (isAsync && !state.inES9()) {\n        warning(\"W119\", state.tokens.prev, \"async generators\", \"9\");\n      } else if (!isAsync && !state.inES6(true)) {\n        warning(\"W119\", state.tokens.next, \"function*\", \"6\");\n      }\n\n      advance(\"*\");\n      labelType += \"generator \";\n      generator = true;\n    }\n\n    labelType += \"function\";\n\n    if (inblock) {\n      warning(\"W082\", state.tokens.curr);\n    }\n    this.name = optionalidentifier(context) ? state.tokens.curr : null;\n\n    if (!this.name) {\n      if (!inexport) {\n        warning(\"W025\");\n      }\n    } else {\n      state.funct[\"(scope)\"].addbinding(this.name.value, {\n        type: labelType,\n        token: state.tokens.curr,\n        initialized: true });\n    }\n\n    var f = doFunction(context, {\n      name: this.name && this.name.value,\n      statement: this,\n      type: generator ? \"generator\" : null,\n      ignoreLoopFunc: inblock // a declaration may already have warned\n    });\n\n    // If the function declaration is strict because the surrounding code is\n    // strict, the invalid name will trigger E008 when the scope manager\n    // attempts to create a binding in the strict environment record. An error\n    // should only be signaled here when the function itself enables strict\n    // mode (the scope manager will not report an error because a declaration\n    // does not introduce a binding into the function's environment record).\n    var enablesStrictMode = f[\"(isStrict)\"] && !state.isStrict();\n    if (this.name && (f[\"(name)\"] === \"arguments\" || f[\"(name)\"] === \"eval\") &&\n      enablesStrictMode) {\n      error(\"E008\", this.name);\n    }\n\n    // Although the parser correctly recognizes the statement boundary in this\n    // condition, it's support for the invalid \"empty grouping\" expression\n    // makes it tolerant of productions such as `function f() {}();`.\n    if (state.tokens.next.id === \"(\" && peek().id === \")\" && peek(1).id !== \"=>\" &&\n      state.tokens.next.line === state.tokens.curr.line) {\n      error(\"E039\");\n    }\n    return this;\n  }).declaration = true;\n\n  prefix(\"function\", function(context) {\n    var generator = false;\n    var isAsync = context & prodParams.preAsync;\n\n    if (state.tokens.next.value === \"*\") {\n      if (isAsync && !state.inES9()) {\n        warning(\"W119\", state.tokens.prev, \"async generators\", \"9\");\n      } else if (!isAsync && !state.inES6(true)) {\n        warning(\"W119\", state.tokens.curr, \"function*\", \"6\");\n      }\n\n      advance(\"*\");\n      generator = true;\n    }\n\n    // This context modification restricts the use of `await` as the optional\n    // BindingIdentifier in async function expressions.\n    this.name = optionalidentifier(isAsync ? context | prodParams.async : context) ?\n      state.tokens.curr : null;\n\n    var f = doFunction(context, {\n      name: this.name && this.name.value,\n      type: generator ? \"generator\" : null\n    });\n\n    if (generator && this.name && this.name.value === \"yield\") {\n      error(\"E024\", this.name, \"yield\");\n    }\n\n    if (this.name && (f[\"(name)\"] === \"arguments\" || f[\"(name)\"] === \"eval\") &&\n      f[\"(isStrict)\"]) {\n      error(\"E008\", this.name);\n    }\n\n    return this;\n  });\n\n  blockstmt(\"if\", function(context) {\n    var t = state.tokens.next;\n    increaseComplexityCount();\n    advance(\"(\");\n    var expr = expression(context, 0);\n\n    if (!expr) {\n      quit(\"E041\", this);\n    }\n\n    checkCondAssignment(expr);\n\n    // When the if is within a for-in loop, check if the condition\n    // starts with a negation operator\n    var forinifcheck = null;\n    if (state.option.forin && state.forinifcheckneeded) {\n      state.forinifcheckneeded = false; // We only need to analyze the first if inside the loop\n      forinifcheck = state.forinifchecks[state.forinifchecks.length - 1];\n      if (expr.type === \"(punctuator)\" && expr.value === \"!\") {\n        forinifcheck.type = \"(negative)\";\n      } else {\n        forinifcheck.type = \"(positive)\";\n      }\n    }\n\n    advance(\")\", t);\n    var s = block(context, true, true);\n\n    // When the if is within a for-in loop and the condition has a negative form,\n    // check if the body contains nothing but a continue statement\n    if (forinifcheck && forinifcheck.type === \"(negative)\") {\n      if (s && s[0] && s[0].type === \"(identifier)\" && s[0].value === \"continue\") {\n        forinifcheck.type = \"(negative-with-continue)\";\n      }\n    }\n\n    if (state.tokens.next.id === \"else\") {\n      advance(\"else\");\n      if (state.tokens.next.id === \"if\" || state.tokens.next.id === \"switch\") {\n        statement(context);\n      } else {\n        block(context, true, true);\n      }\n    }\n    return this;\n  });\n\n  blockstmt(\"try\", function(context) {\n    var b;\n    var hasParameter = false;\n\n    function catchParameter() {\n      advance(\"(\");\n\n      if (checkPunctuators(state.tokens.next, [\"[\", \"{\"])) {\n        var tokens = destructuringPattern(context);\n        _.each(tokens, function(token) {\n          if (token.id) {\n            state.funct[\"(scope)\"].addParam(token.id, token.token, \"exception\");\n          }\n        });\n      } else if (state.tokens.next.type !== \"(identifier)\") {\n        warning(\"E030\", state.tokens.next, state.tokens.next.value);\n      } else {\n        // only advance if an identifier is present. This allows JSHint to\n        // recover from the case where no value is specified.\n        state.funct[\"(scope)\"].addParam(identifier(context), state.tokens.curr, \"exception\");\n      }\n\n      if (state.tokens.next.value === \"if\") {\n        if (!state.inMoz()) {\n          warning(\"W118\", state.tokens.curr, \"catch filter\");\n        }\n        advance(\"if\");\n        expression(context, 0);\n      }\n\n      advance(\")\");\n    }\n\n    block(context | prodParams.tryClause, true);\n\n    while (state.tokens.next.id === \"catch\") {\n      increaseComplexityCount();\n      if (b && (!state.inMoz())) {\n        warning(\"W118\", state.tokens.next, \"multiple catch blocks\");\n      }\n      advance(\"catch\");\n      if (state.tokens.next.id !== \"{\") {\n        state.funct[\"(scope)\"].stack(\"catchparams\");\n        hasParameter = true;\n        catchParameter();\n      } else if (!state.inES10()) {\n        warning(\"W119\", state.tokens.curr, \"optional catch binding\", \"10\");\n      }\n      block(context, false);\n\n      if (hasParameter) {\n        state.funct[\"(scope)\"].unstack();\n        hasParameter = false;\n      }\n      b = true;\n    }\n\n    if (state.tokens.next.id === \"finally\") {\n      advance(\"finally\");\n      block(context, true);\n      return;\n    }\n\n    if (!b) {\n      error(\"E021\", state.tokens.next, \"catch\", state.tokens.next.value);\n    }\n\n    return this;\n  });\n\n  blockstmt(\"while\", function(context) {\n    var t = state.tokens.next;\n    state.funct[\"(breakage)\"] += 1;\n    state.funct[\"(loopage)\"] += 1;\n    increaseComplexityCount();\n    advance(\"(\");\n    checkCondAssignment(expression(context, 0));\n    advance(\")\", t);\n    block(context, true, true);\n    state.funct[\"(breakage)\"] -= 1;\n    state.funct[\"(loopage)\"] -= 1;\n    return this;\n  }).labelled = true;\n\n  blockstmt(\"with\", function(context) {\n    var t = state.tokens.next;\n    if (state.isStrict()) {\n      error(\"E010\", state.tokens.curr);\n    } else if (!state.option.withstmt) {\n      warning(\"W085\", state.tokens.curr);\n    }\n\n    advance(\"(\");\n    expression(context, 0);\n    advance(\")\", t);\n    block(context, true, true);\n\n    return this;\n  });\n\n  blockstmt(\"switch\", function(context) {\n    var t = state.tokens.next;\n    var g = false;\n    var noindent = false;\n    var seenCase = false;\n\n    state.funct[\"(breakage)\"] += 1;\n    advance(\"(\");\n    checkCondAssignment(expression(context, 0));\n    advance(\")\", t);\n    t = state.tokens.next;\n    advance(\"{\");\n    state.funct[\"(scope)\"].stack();\n\n    if (state.tokens.next.from === indent)\n      noindent = true;\n\n    if (!noindent)\n      indent += state.option.indent;\n\n    for (;;) {\n      switch (state.tokens.next.id) {\n      case \"case\":\n        switch (state.funct[\"(verb)\"]) {\n        case \"yield\":\n        case \"break\":\n        case \"case\":\n        case \"continue\":\n        case \"return\":\n        case \"switch\":\n        case \"throw\":\n          break;\n        case \"default\":\n          if (state.option.leanswitch) {\n            warning(\"W145\", state.tokens.next);\n          }\n\n          break;\n        default:\n          // You can tell JSHint that you don't use break intentionally by\n          // adding a comment /* falls through */ on a line just before\n          // the next `case`.\n          if (!state.tokens.curr.caseFallsThrough) {\n            warning(\"W086\", state.tokens.curr, \"case\");\n          }\n        }\n\n        advance(\"case\");\n        expression(context, 0);\n        seenCase = true;\n        increaseComplexityCount();\n        g = true;\n        advance(\":\");\n        state.funct[\"(verb)\"] = \"case\";\n        break;\n      case \"default\":\n        switch (state.funct[\"(verb)\"]) {\n        case \"yield\":\n        case \"break\":\n        case \"continue\":\n        case \"return\":\n        case \"throw\":\n          break;\n        case \"case\":\n          if (state.option.leanswitch) {\n            warning(\"W145\", state.tokens.curr);\n          }\n\n          break;\n        default:\n          // Do not display a warning if 'default' is the first statement or if\n          // there is a special /* falls through */ comment.\n          if (seenCase && !state.tokens.curr.caseFallsThrough) {\n            warning(\"W086\", state.tokens.curr, \"default\");\n          }\n        }\n\n        advance(\"default\");\n        g = true;\n        advance(\":\");\n        state.funct[\"(verb)\"] = \"default\";\n        break;\n      case \"}\":\n        if (!noindent)\n          indent -= state.option.indent;\n\n        advance(\"}\", t);\n        state.funct[\"(scope)\"].unstack();\n        state.funct[\"(breakage)\"] -= 1;\n        state.funct[\"(verb)\"] = undefined;\n        return;\n      /* istanbul ignore next */\n      case \"(end)\":\n        error(\"E023\", state.tokens.next, \"}\");\n        return;\n      default:\n        indent += state.option.indent;\n        if (g) {\n          switch (state.tokens.curr.id) {\n          /* istanbul ignore next */\n          case \",\":\n            error(\"E040\");\n            return;\n          case \":\":\n            g = false;\n            statements(context);\n            break;\n          /* istanbul ignore next */\n          default:\n            error(\"E025\", state.tokens.curr);\n            return;\n          }\n        } else {\n          /* istanbul ignore else */\n          if (state.tokens.curr.id === \":\") {\n            advance(\":\");\n            error(\"E024\", state.tokens.curr, \":\");\n            statements(context);\n          } else {\n            error(\"E021\", state.tokens.next, \"case\", state.tokens.next.value);\n            return;\n          }\n        }\n        indent -= state.option.indent;\n      }\n    }\n  }).labelled = true;\n\n  stmt(\"debugger\", function() {\n    if (!state.option.debug) {\n      warning(\"W087\", this);\n    }\n    return this;\n  }).exps = true;\n\n  (function() {\n    var x = stmt(\"do\", function(context) {\n      state.funct[\"(breakage)\"] += 1;\n      state.funct[\"(loopage)\"] += 1;\n      increaseComplexityCount();\n\n      this.first = block(context, true, true);\n      advance(\"while\");\n      var t = state.tokens.next;\n      advance(\"(\");\n      checkCondAssignment(expression(context, 0));\n      advance(\")\", t);\n      state.funct[\"(breakage)\"] -= 1;\n      state.funct[\"(loopage)\"] -= 1;\n      return this;\n    });\n    x.labelled = true;\n    x.exps = true;\n  }());\n\n  blockstmt(\"for\", function(context) {\n    var s, t = state.tokens.next;\n    var letscope = false;\n    var isAsync = false;\n    var foreachtok = null;\n\n    if (t.value === \"each\") {\n      foreachtok = t;\n      advance(\"each\");\n      if (!state.inMoz()) {\n        warning(\"W118\", state.tokens.curr, \"for each\");\n      }\n    }\n\n    if (state.tokens.next.identifier && state.tokens.next.value === \"await\") {\n      advance(\"await\");\n      isAsync = true;\n\n      if (!(context & prodParams.async)) {\n        error(\"E024\", state.tokens.curr, \"await\");\n      } else if (!state.inES9()) {\n        warning(\"W119\", state.tokens.curr, \"asynchronous iteration\", \"9\");\n      }\n    }\n\n    increaseComplexityCount();\n    advance(\"(\");\n\n    // what kind of for(…) statement it is? for(…of…)? for(…in…)? for(…;…;…)?\n    var nextop; // contains the token of the \"in\" or \"of\" operator\n    var comma; // First comma punctuator at level 0\n    var initializer; // First initializer at level 0\n    var bindingPower;\n    var targets;\n    var target;\n    var decl;\n    var afterNext = peek();\n\n    var headContext = context | prodParams.noin;\n\n    if (state.tokens.next.id === \"var\") {\n      advance(\"var\");\n      decl = state.tokens.curr.fud(headContext);\n      comma = decl.hasComma ? decl : null;\n      initializer = decl.hasInitializer ? decl : null;\n    } else if (state.tokens.next.id === \"const\" ||\n      // The \"let\" keyword only signals a lexical binding if it is followed by\n      // an identifier, `{`, or `[`. Otherwise, it should be parsed as an\n      // IdentifierReference (i.e. in a subsquent branch).\n      (state.tokens.next.id === \"let\" &&\n        ((afterNext.identifier && afterNext.id !== \"in\") ||\n         checkPunctuators(afterNext, [\"{\", \"[\"])))) {\n      advance(state.tokens.next.id);\n      // create a new block scope\n      letscope = true;\n      state.funct[\"(scope)\"].stack();\n      decl = state.tokens.curr.fud(headContext);\n      comma = decl.hasComma ? decl : null;\n      initializer = decl.hasInitializer ? decl : null;\n    } else if (!checkPunctuator(state.tokens.next, \";\")) {\n      targets = [];\n\n      while (state.tokens.next.value !== \"in\" &&\n        state.tokens.next.value !== \"of\" &&\n        !checkPunctuator(state.tokens.next, \";\")) {\n\n        if (checkPunctuators(state.tokens.next, [\"{\", \"[\"])) {\n          destructuringPattern(headContext, { assignment: true })\n            .forEach(function(elem) {\n              this.push(elem.token);\n            }, targets);\n          if (checkPunctuator(state.tokens.next, \"=\")) {\n            advance(\"=\");\n            initializer = state.tokens.curr;\n            expression(headContext, 10);\n          }\n        } else {\n          target = expression(headContext, 10);\n\n          if (target) {\n            if (target.type === \"(identifier)\") {\n              targets.push(target);\n            } else if (checkPunctuator(target, \"=\")) {\n              initializer = target;\n              targets.push(target);\n            }\n          }\n        }\n\n        if (checkPunctuator(state.tokens.next, \",\")) {\n          advance(\",\");\n\n          if (!comma) {\n            comma = state.tokens.curr;\n          }\n        }\n      }\n\n      //checkLeftSideAssign(target, nextop);\n\n      // In the event of a syntax error, do not issue warnings regarding the\n      // implicit creation of bindings.\n      if (!initializer && !comma) {\n        targets.forEach(function(token) {\n          if (!state.funct[\"(scope)\"].has(token.value)) {\n            warning(\"W088\", token, token.value);\n          }\n        });\n      }\n    }\n\n    nextop = state.tokens.next;\n\n    if (isAsync && nextop.value !== \"of\") {\n      error(\"E066\", nextop);\n    }\n\n    // if we're in a for (… in|of …) statement\n    if (_.includes([\"in\", \"of\"], nextop.value)) {\n      if (nextop.value === \"of\") {\n        bindingPower = 20;\n\n        if (!state.inES6()) {\n          warning(\"W104\", nextop, \"for of\", \"6\");\n        }\n      } else {\n        bindingPower = 0;\n      }\n      if (comma) {\n        error(\"W133\", comma, nextop.value, \"more than one ForBinding\");\n      }\n      if (initializer) {\n        error(\"W133\", initializer, nextop.value, \"initializer is forbidden\");\n      }\n      if (target && !comma && !initializer) {\n        checkLeftSideAssign(context, target, nextop);\n      }\n\n      advance(nextop.value);\n\n      // The binding power is variable because for-in statements accept any\n      // Expression in this position, while for-of statements are limited to\n      // AssignmentExpressions. For example:\n      //\n      //     for ( LeftHandSideExpression in Expression ) Statement\n      //     for ( LeftHandSideExpression of AssignmentExpression ) Statement\n      expression(context, bindingPower);\n      advance(\")\", t);\n\n      if (nextop.value === \"in\" && state.option.forin) {\n        state.forinifcheckneeded = true;\n\n        if (state.forinifchecks === undefined) {\n          state.forinifchecks = [];\n        }\n\n        // Push a new for-in-if check onto the stack. The type will be modified\n        // when the loop's body is parsed and a suitable if statement exists.\n        state.forinifchecks.push({\n          type: \"(none)\"\n        });\n      }\n\n      state.funct[\"(breakage)\"] += 1;\n      state.funct[\"(loopage)\"] += 1;\n\n      s = block(context, true, true);\n\n      if (nextop.value === \"in\" && state.option.forin) {\n        if (state.forinifchecks && state.forinifchecks.length > 0) {\n          var check = state.forinifchecks.pop();\n\n          if (// No if statement or not the first statement in loop body\n              s && s.length > 0 && (typeof s[0] !== \"object\" || s[0].value !== \"if\") ||\n              // Positive if statement is not the only one in loop body\n              check.type === \"(positive)\" && s.length > 1 ||\n              // Negative if statement but no continue\n              check.type === \"(negative)\") {\n            warning(\"W089\", this);\n          }\n        }\n\n        // Reset the flag in case no if statement was contained in the loop body\n        state.forinifcheckneeded = false;\n      }\n\n      state.funct[\"(breakage)\"] -= 1;\n      state.funct[\"(loopage)\"] -= 1;\n\n    } else {\n      if (foreachtok) {\n        error(\"E045\", foreachtok);\n      }\n\n      advance(\";\");\n      if (decl && decl.first && decl.first[0]) {\n        if (decl.value === \"const\"  && !decl.hasInitializer) {\n          warning(\"E012\", decl, decl.first[0].value);\n        }\n\n        decl.first.forEach(function(token) {\n          state.funct[\"(scope)\"].initialize(token.value);\n        });\n      }\n\n      // start loopage after the first ; as the next two expressions are executed\n      // on every loop\n      state.funct[\"(loopage)\"] += 1;\n      if (state.tokens.next.id !== \";\") {\n        checkCondAssignment(expression(context, 0));\n      }\n\n      advance(\";\");\n      if (state.tokens.next.id === \";\") {\n        error(\"E021\", state.tokens.next, \")\", \";\");\n      }\n      if (state.tokens.next.id !== \")\") {\n        for (;;) {\n          expression(context, 0);\n          if (state.tokens.next.id !== \",\") {\n            break;\n          }\n          advance(\",\");\n          checkComma();\n        }\n      }\n      advance(\")\", t);\n      state.funct[\"(breakage)\"] += 1;\n      block(context, true, true);\n      state.funct[\"(breakage)\"] -= 1;\n      state.funct[\"(loopage)\"] -= 1;\n    }\n\n    // unstack loop blockscope\n    if (letscope) {\n      state.funct[\"(scope)\"].unstack();\n    }\n    return this;\n  }).labelled = true;\n\n\n  stmt(\"break\", function() {\n    var v = state.tokens.next.value;\n\n    if (state.tokens.next.identifier &&\n        sameLine(state.tokens.curr, state.tokens.next)) {\n      if (!state.funct[\"(scope)\"].funct.hasLabel(v)) {\n        warning(\"W090\", state.tokens.next, v);\n      }\n      this.first = state.tokens.next;\n      advance();\n    } else {\n      if (state.funct[\"(breakage)\"] === 0)\n        warning(\"W052\", state.tokens.next, this.value);\n    }\n\n    reachable(this);\n\n    return this;\n  }).exps = true;\n\n\n  stmt(\"continue\", function() {\n    var v = state.tokens.next.value;\n\n    if (state.funct[\"(breakage)\"] === 0 || !state.funct[\"(loopage)\"]) {\n      warning(\"W052\", state.tokens.next, this.value);\n    }\n\n    if (state.tokens.next.identifier) {\n      if (sameLine(state.tokens.curr, state.tokens.next)) {\n        if (!state.funct[\"(scope)\"].funct.hasLabel(v)) {\n          warning(\"W090\", state.tokens.next, v);\n        }\n        this.first = state.tokens.next;\n        advance();\n      }\n    }\n\n    reachable(this);\n\n    return this;\n  }).exps = true;\n\n\n  stmt(\"return\", function(context) {\n    if (sameLine(this, state.tokens.next)) {\n      if (state.tokens.next.id !== \";\" && !state.tokens.next.reach) {\n        this.first = expression(context, 0);\n\n        if (this.first &&\n            this.first.type === \"(punctuator)\" && this.first.value === \"=\" &&\n            !this.first.paren && !state.option.boss) {\n          warning(\"W093\", this.first);\n        }\n\n        if (state.option.noreturnawait && context & prodParams.async &&\n            !(context & prodParams.tryClause) &&\n            this.first.identifier && this.first.value === \"await\") {\n          warning(\"W146\", this.first);\n        }\n      }\n    } else {\n      if (state.tokens.next.type === \"(punctuator)\" &&\n        [\"[\", \"{\", \"+\", \"-\"].indexOf(state.tokens.next.value) > -1) {\n        nolinebreak(this); // always warn (Line breaking error)\n      }\n    }\n\n    reachable(this);\n\n    return this;\n  }).exps = true;\n\n  prefix(\"await\", function(context) {\n    if (context & prodParams.async) {\n      // If the parameters of the current function scope have not been defined,\n      // it is because the current expression is contained within the parameter\n      // list.\n      if (!state.funct[\"(params)\"]) {\n        error(\"E024\", this, \"await\");\n      }\n\n      expression(context, 10);\n      return this;\n    } else {\n      this.exps = false;\n      return state.syntax[\"(identifier)\"].nud.apply(this, arguments);\n    }\n  }).exps = true;\n\n  (function(asyncSymbol) {\n    asyncSymbol.meta = { es5: true, isFutureReservedWord: true, strictOnly: true };\n    asyncSymbol.isFunc = function() {\n      var next = state.tokens.next;\n      var afterParens;\n\n      if (this.line !== next.line) {\n        return false;\n      }\n\n      if (next.id === \"function\") {\n        return true;\n      }\n\n      if (next.id === \"(\") {\n        afterParens = peekThroughParens(0);\n\n        return afterParens.id === \"=>\";\n      }\n\n      if (next.identifier) {\n        return peek().id === \"=>\";\n      }\n\n      return false;\n    };\n    asyncSymbol.useFud = asyncSymbol.isFunc;\n    // async function declaration\n    asyncSymbol.fud = function(context) {\n      if (!state.inES8()) {\n        warning(\"W119\", this, \"async functions\", \"8\");\n      }\n      context |= prodParams.preAsync;\n      context |= prodParams.initial;\n      this.func = expression(context, 0);\n      this.block = this.func.block;\n      this.exps = this.func.exps;\n      return this;\n    };\n    asyncSymbol.exps = true;\n    delete asyncSymbol.reserved;\n  }(prefix(\"async\", function(context, rbp) {\n    if (this.isFunc(context)) {\n      if (!state.inES8()) {\n        warning(\"W119\", this, \"async functions\", \"8\");\n      }\n\n      context |= prodParams.preAsync;\n      this.func = expression(context, rbp);\n      this.identifier = false;\n      return this;\n    }\n\n    this.exps = false;\n    return state.syntax[\"(identifier)\"].nud.apply(this, arguments);\n  })));\n\n  (function(yieldSymbol) {\n    yieldSymbol.rbp = yieldSymbol.lbp = 25;\n    yieldSymbol.exps = true;\n  })(prefix(\"yield\", function(context) {\n    if (state.inMoz()) {\n      return mozYield.call(this, context);\n    }\n\n    if (!(context & prodParams.yield)) {\n      this.exps = false;\n      return state.syntax[\"(identifier)\"].nud.apply(this, arguments);\n    }\n\n    var prev = state.tokens.prev;\n\n    // If the parameters of the current function scope have not been defined,\n    // it is because the current expression is contained within the parameter\n    // list.\n    if (!state.funct[\"(params)\"]) {\n      error(\"E024\", this, \"yield\");\n    }\n\n    if (!this.beginsStmt && prev.lbp > 30 && !checkPunctuators(prev, [\"(\"])) {\n      error(\"E061\", this);\n    }\n\n    if (!state.inES6()) {\n      warning(\"W104\", state.tokens.curr, \"yield\", \"6\");\n    }\n    state.funct[\"(yielded)\"] = true;\n\n    if (state.tokens.next.value === \"*\") {\n      advance(\"*\");\n    }\n\n    // Parse operand\n    if (state.tokens.curr.value === \"*\" || sameLine(state.tokens.curr, state.tokens.next)) {\n      if (state.tokens.next.nud) {\n\n        nobreaknonadjacent(state.tokens.curr, state.tokens.next);\n        this.first = expression(context, 10);\n\n        if (this.first.type === \"(punctuator)\" && this.first.value === \"=\" &&\n            !this.first.paren && !state.option.boss) {\n          warning(\"W093\", this.first);\n        }\n      } else if (state.tokens.next.led) {\n        if (state.tokens.next.id !== \",\") {\n          error(\"W017\", state.tokens.next);\n        }\n      }\n    }\n\n    return this;\n  }));\n\n  /**\n   * Parsing logic for non-standard Mozilla implementation of `yield`\n   * expressions.\n   */\n  var mozYield = function(context) {\n    var prev = state.tokens.prev;\n    if (state.inES6(true) && !(context & prodParams.yield)) {\n      error(\"E046\", state.tokens.curr, \"yield\");\n    }\n    state.funct[\"(yielded)\"] = true;\n    var delegatingYield = false;\n\n    if (state.tokens.next.value === \"*\") {\n      delegatingYield = true;\n      advance(\"*\");\n    }\n\n    if (sameLine(this, state.tokens.next)) {\n      if (delegatingYield ||\n          (state.tokens.next.id !== \";\" && !state.option.asi &&\n           !state.tokens.next.reach && state.tokens.next.nud)) {\n\n        nobreaknonadjacent(state.tokens.curr, state.tokens.next);\n        this.first = expression(context, 10);\n\n        if (this.first.type === \"(punctuator)\" && this.first.value === \"=\" &&\n            !this.first.paren && !state.option.boss) {\n          warning(\"W093\", this.first);\n        }\n      }\n      if (state.tokens.next.id !== \")\" &&\n          (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()))) {\n        error(\"E050\", this);\n      }\n    } else if (!state.option.asi) {\n      nolinebreak(this); // always warn (Line breaking error)\n    }\n    return this;\n  };\n\n  stmt(\"throw\", function(context) {\n    nolinebreak(this);\n    this.first = expression(context, 20);\n\n    reachable(this);\n\n    return this;\n  }).exps = true;\n\n  prefix(\"import\", function(context) {\n    var mp = metaProperty(context, \"meta\", function() {\n      if (!state.inES11(true)) {\n        warning(\"W119\", state.tokens.prev, \"import.meta\", \"11\");\n      }\n      if (!state.option.module) {\n        error(\"E070\", state.tokens.prev);\n      }\n    });\n\n    if (mp) {\n      return mp;\n    }\n\n    if (!checkPunctuator(state.tokens.next, \"(\")) {\n      return state.syntax[\"(identifier)\"].nud.call(this, context);\n    }\n\n    if (!state.inES11()) {\n      warning(\"W119\", state.tokens.curr, \"dynamic import\", \"11\");\n    }\n\n    advance(\"(\");\n    expression(context, 10);\n    advance(\")\");\n    return this;\n  });\n\n  var importSymbol = stmt(\"import\", function(context) {\n    if (!state.funct[\"(scope)\"].block.isGlobal()) {\n      error(\"E053\", state.tokens.curr, \"Import\");\n    }\n\n    if (!state.inES6()) {\n      warning(\"W119\", state.tokens.curr, \"import\", \"6\");\n    }\n\n    if (state.tokens.next.type === \"(string)\") {\n      // ModuleSpecifier :: StringLiteral\n      advance(\"(string)\");\n      return this;\n    }\n\n    if (state.tokens.next.identifier) {\n      // ImportClause :: ImportedDefaultBinding\n      this.name = identifier(context);\n      // Import bindings are immutable (see ES6 8.1.1.5.5)\n      state.funct[\"(scope)\"].addbinding(this.name, {\n        type: \"import\",\n        initialized: true,\n        token: state.tokens.curr });\n\n      if (state.tokens.next.value === \",\") {\n        // ImportClause :: ImportedDefaultBinding , NameSpaceImport\n        // ImportClause :: ImportedDefaultBinding , NamedImports\n        advance(\",\");\n        // At this point, we intentionally fall through to continue matching\n        // either NameSpaceImport or NamedImports.\n        // Discussion:\n        // https://github.com/jshint/jshint/pull/2144#discussion_r23978406\n      } else {\n        advance(\"from\");\n        advance(\"(string)\");\n        return this;\n      }\n    }\n\n    if (state.tokens.next.id === \"*\") {\n      // ImportClause :: NameSpaceImport\n      advance(\"*\");\n      advance(\"as\");\n      if (state.tokens.next.identifier) {\n        this.name = identifier(context);\n        // Import bindings are immutable (see ES6 8.1.1.5.5)\n        state.funct[\"(scope)\"].addbinding(this.name, {\n          type: \"import\",\n          initialized: true,\n          token: state.tokens.curr });\n      }\n    } else {\n      // ImportClause :: NamedImports\n      advance(\"{\");\n      for (;;) {\n        if (state.tokens.next.value === \"}\") {\n          advance(\"}\");\n          break;\n        }\n        var importName;\n        if (peek().value === \"as\") {\n          identifier(context, true);\n          advance(\"as\");\n          importName = identifier(context);\n        } else {\n          importName = identifier(context);\n        }\n\n        // Import bindings are immutable (see ES6 8.1.1.5.5)\n        state.funct[\"(scope)\"].addbinding(importName, {\n          type: \"import\",\n          initialized: true,\n          token: state.tokens.curr });\n\n        if (state.tokens.next.value === \",\") {\n          advance(\",\");\n        } else if (state.tokens.next.value === \"}\") {\n          advance(\"}\");\n          break;\n        } else {\n          error(\"E024\", state.tokens.next, state.tokens.next.value);\n          break;\n        }\n      }\n    }\n\n    // FromClause\n    advance(\"from\");\n    advance(\"(string)\");\n\n    // Support for ES2015 modules was released without warning for `import`\n    // declarations that lack bindings. Issuing a warning would therefor\n    // constitute a breaking change.\n    // TODO: enable this warning in JSHint 3\n    // if (hasBindings) {\n    //   warning(\"W142\", this, \"import\", moduleSpecifier);\n    // }\n\n    return this;\n  });\n  importSymbol.exps = true;\n  importSymbol.reserved = true;\n  importSymbol.meta = { isFutureReservedWord: true, es5: true };\n  importSymbol.useFud = function() {\n    return !(checkPunctuators(state.tokens.next, [\".\", \"(\"]));\n  };\n  importSymbol.rbp = 161;\n\n  stmt(\"export\", function(context) {\n    var ok = true;\n    var token;\n    var moduleSpecifier;\n    context = context | prodParams.export;\n\n    if (!state.inES6()) {\n      warning(\"W119\", state.tokens.curr, \"export\", \"6\");\n      ok = false;\n    }\n\n    if (!state.funct[\"(scope)\"].block.isGlobal()) {\n      error(\"E053\", state.tokens.curr, \"Export\");\n      ok = false;\n    }\n\n    if (state.tokens.next.value === \"*\") {\n      // ExportDeclaration :: export * FromClause\n      // ExportDeclaration :: export * as IdentifierName FromClause\n      advance(\"*\");\n\n      if (state.tokens.next.value === \"as\") {\n        if (!state.inES11()) {\n          warning(\"W119\", state.tokens.curr, \"export * as ns from\", \"11\");\n        }\n        advance(\"as\");\n        identifier(context, true);\n        state.funct[\"(scope)\"].setExported(null, state.tokens.curr);\n      }\n\n      advance(\"from\");\n      advance(\"(string)\");\n      return this;\n    }\n\n    if (state.tokens.next.type === \"default\") {\n      // ExportDeclaration ::\n      //      export default [lookahead ∉ { function, class }] AssignmentExpression[In] ;\n      //      export default HoistableDeclaration\n      //      export default ClassDeclaration\n\n      // because the 'name' of a default-exported function is, confusingly, 'default'\n      // see https://bocoup.com/blog/whats-in-a-function-name\n      state.nameStack.set(state.tokens.next);\n\n      advance(\"default\");\n      var def = state.tokens.curr;\n      var exportType = state.tokens.next.id;\n      if (exportType === \"function\") {\n        this.block = true;\n        advance(\"function\");\n        token = state.syntax[\"function\"].fud(context);\n        state.funct[\"(scope)\"].setExported(token.name, def);\n      } else if (exportType === \"async\" && peek().id === \"function\") {\n        this.block = true;\n        advance(\"async\");\n        advance(\"function\");\n        token = state.syntax[\"function\"].fud(context | prodParams.preAsync);\n        state.funct[\"(scope)\"].setExported(token.name, def);\n      } else if (exportType === \"class\") {\n        this.block = true;\n        advance(\"class\");\n        token = state.syntax[\"class\"].fud(context);\n        state.funct[\"(scope)\"].setExported(token.name, def);\n      } else {\n        expression(context, 10);\n        state.funct[\"(scope)\"].setExported(null, def);\n      }\n      return this;\n    }\n    if (state.tokens.next.value === \"{\") {\n      // ExportDeclaration :: export ExportClause\n      advance(\"{\");\n      var exportedTokens = [];\n      while (!checkPunctuator(state.tokens.next, \"}\")) {\n        if (!state.tokens.next.identifier) {\n          /* istanbul ignore next */\n          error(\"E030\", state.tokens.next, state.tokens.next.value);\n        }\n        advance();\n\n        if (state.tokens.next.value === \"as\") {\n          advance(\"as\");\n          if (!state.tokens.next.identifier) {\n            /* istanbul ignore next */\n            error(\"E030\", state.tokens.next, state.tokens.next.value);\n          }\n          exportedTokens.push({\n            local: state.tokens.prev,\n            export: state.tokens.next\n          });\n          advance();\n        } else {\n          exportedTokens.push({\n            local: state.tokens.curr,\n            export: state.tokens.curr\n          });\n        }\n\n        if (!checkPunctuator(state.tokens.next, \"}\")) {\n          advance(\",\");\n        }\n      }\n      advance(\"}\");\n      if (state.tokens.next.value === \"from\") {\n        // ExportDeclaration :: export ExportClause FromClause\n        advance(\"from\");\n        moduleSpecifier = state.tokens.next;\n        advance(\"(string)\");\n      } else if (ok) {\n        exportedTokens.forEach(function(x) {\n          state.funct[\"(scope)\"].setExported(x.local, x.export);\n        });\n      }\n\n      if (exportedTokens.length === 0) {\n        if (moduleSpecifier) {\n          warning(\"W142\", this, \"export\", moduleSpecifier.value);\n        } else {\n          warning(\"W141\", this, \"export\");\n        }\n      }\n\n      return this;\n    } else if (state.tokens.next.id === \"var\") {\n      // ExportDeclaration :: export VariableStatement\n      advance(\"var\");\n      token = state.tokens.curr.fud(context);\n      token.first.forEach(function(binding) {\n        state.funct[\"(scope)\"].setExported(binding, binding);\n      });\n    } else if (state.tokens.next.id === \"let\") {\n      // ExportDeclaration :: export VariableStatement\n      advance(\"let\");\n      token = state.tokens.curr.fud(context);\n      token.first.forEach(function(binding) {\n        state.funct[\"(scope)\"].setExported(binding, binding);\n      });\n    } else if (state.tokens.next.id === \"const\") {\n      // ExportDeclaration :: export VariableStatement\n      advance(\"const\");\n      token = state.tokens.curr.fud(context);\n      token.first.forEach(function(binding) {\n        state.funct[\"(scope)\"].setExported(binding, binding);\n      });\n    } else if (state.tokens.next.id === \"function\") {\n      // ExportDeclaration :: export Declaration\n      this.block = true;\n      advance(\"function\");\n      token = state.syntax[\"function\"].fud(context);\n      state.funct[\"(scope)\"].setExported(token.name, token.name);\n    } else if (state.tokens.next.id === \"async\" && peek().id === \"function\") {\n      // ExportDeclaration :: export Declaration\n      this.block = true;\n      advance(\"async\");\n      advance(\"function\");\n      token = state.syntax[\"function\"].fud(context | prodParams.preAsync);\n      state.funct[\"(scope)\"].setExported(token.name, token.name);\n    } else if (state.tokens.next.id === \"class\") {\n      // ExportDeclaration :: export Declaration\n      this.block = true;\n      advance(\"class\");\n      token = state.syntax[\"class\"].fud(context);\n      state.funct[\"(scope)\"].setExported(token.name, token.name);\n    } else {\n      /* istanbul ignore next */\n      error(\"E024\", state.tokens.next, state.tokens.next.value);\n    }\n\n    return this;\n  }).exps = true;\n\n  /**\n   * Determine if SuperCall or SuperProperty may be used in the current context\n   * (as described by the provided \"functor\" object).\n   *\n   * @param {string} type - one of \"property\" or \"call\"\n   * @param {object} funct - a \"functor\" object describing the current function\n   *                         context\n   *\n   * @returns {boolean}\n   */\n  function supportsSuper(type, funct) {\n    if (type === \"call\" && funct[\"(async)\"]) {\n      return false;\n    }\n\n    if (type === \"property\" && funct[\"(method)\"]) {\n      return true;\n    }\n\n    if (type === \"call\" && funct[\"(statement)\"] &&\n      funct[\"(statement)\"].id === \"class\") {\n      return true;\n    }\n\n    if (funct[\"(arrow)\"]) {\n      return supportsSuper(type, funct[\"(context)\"]);\n    }\n\n    return false;\n  }\n\n  var superNud = function() {\n    var next = state.tokens.next;\n\n    if (checkPunctuators(next, [\"[\", \".\"])) {\n      if (!supportsSuper(\"property\", state.funct)) {\n        error(\"E063\", this);\n      }\n    } else if (checkPunctuator(next, \"(\")) {\n      if (!supportsSuper(\"call\", state.funct)) {\n        error(\"E064\", this);\n      }\n    } else {\n      error(\"E024\", next, next.value || next.id);\n    }\n\n    return this;\n  };\n\n  // Future Reserved Words\n\n  FutureReservedWord(\"abstract\");\n  FutureReservedWord(\"boolean\");\n  FutureReservedWord(\"byte\");\n  FutureReservedWord(\"char\");\n  FutureReservedWord(\"double\");\n  FutureReservedWord(\"enum\", { es5: true });\n  FutureReservedWord(\"export\", { es5: true });\n  FutureReservedWord(\"extends\", { es5: true });\n  FutureReservedWord(\"final\");\n  FutureReservedWord(\"float\");\n  FutureReservedWord(\"goto\");\n  FutureReservedWord(\"implements\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"int\");\n  FutureReservedWord(\"interface\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"long\");\n  FutureReservedWord(\"native\");\n  FutureReservedWord(\"package\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"private\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"protected\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"public\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"short\");\n  FutureReservedWord(\"static\", { es5: true, strictOnly: true });\n  FutureReservedWord(\"synchronized\");\n  FutureReservedWord(\"transient\");\n  FutureReservedWord(\"volatile\");\n\n  // this function is used to determine whether a squarebracket or a curlybracket\n  // expression is a comprehension array, destructuring assignment or a json value.\n\n  var lookupBlockType = function() {\n    var pn, pn1, prev;\n    var i = -1;\n    var bracketStack = 0;\n    var ret = {};\n    if (checkPunctuators(state.tokens.curr, [\"[\", \"{\"])) {\n      bracketStack += 1;\n    }\n    do {\n      prev = i === -1 ? state.tokens.curr : pn;\n      pn = i === -1 ? state.tokens.next : peek(i);\n      pn1 = peek(i + 1);\n      i = i + 1;\n      if (checkPunctuators(pn, [\"[\", \"{\"])) {\n        bracketStack += 1;\n      } else if (checkPunctuators(pn, [\"]\", \"}\"])) {\n        bracketStack -= 1;\n      }\n      if (bracketStack === 1 && pn.identifier && pn.value === \"for\" &&\n          !checkPunctuator(prev, \".\")) {\n        ret.isCompArray = true;\n        ret.notJson = true;\n        break;\n      }\n      if (bracketStack === 0 && checkPunctuators(pn, [\"}\", \"]\"])) {\n        if (pn1.value === \"=\") {\n          ret.isDestAssign = true;\n          ret.notJson = true;\n          break;\n        } else if (pn1.value === \".\") {\n          ret.notJson = true;\n          break;\n        }\n      }\n      if (checkPunctuator(pn, \";\")) {\n        ret.notJson = true;\n      }\n    } while (bracketStack > 0 && pn.id !== \"(end)\");\n    return ret;\n  };\n\n  /**\n   * Update an object used to track property names within object initializers\n   * and class bodies. Produce warnings in response to duplicated names.\n   *\n   * @param {object} props - a collection of all properties of the object or\n   *                         class to which the current property is being\n   *                         assigned\n   * @param {string} name - the property name\n   * @param {object} tkn - the token defining the property\n   * @param {boolean} [isClass] - whether the accessor is part of an ES6 Class\n   *                              definition\n   * @param {boolean} [isStatic] - whether the accessor is a static method\n   * @param {boolean} [isComputed] - whether the property is a computed expression like [Symbol.iterator]\n   */\n  function saveProperty(props, name, tkn, isClass, isStatic, isComputed) {\n    if (tkn.identifier) {\n      name = tkn.value;\n    }\n    var key = name;\n    if (isClass && isStatic) {\n      key = \"static \" + name;\n    }\n\n    if (props[key] && name !== \"__proto__\" && !isComputed) {\n      var msg = [\"key\", \"class method\", \"static class method\"];\n      msg = msg[(isClass || false) + (isStatic || false)];\n      warning(\"W075\", state.tokens.next, msg, name);\n    } else {\n      props[key] = Object.create(null);\n    }\n\n    props[key].basic = true;\n    props[key].basictkn = tkn;\n  }\n\n  /**\n   * Update an object used to track property names within object initializers\n   * and class bodies. Produce warnings in response to duplicated names.\n   *\n   * @param {string} accessorType - Either \"get\" or \"set\"\n   * @param {object} props - a collection of all properties of the object or\n   *                         class to which the current accessor is being\n   *                         assigned\n   * @param {object} tkn - the identifier token representing the accessor name\n   * @param {boolean} [isClass] - whether the accessor is part of an ES6 Class\n   *                              definition\n   * @param {boolean} [isStatic] - whether the accessor is a static method\n   */\n  function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) {\n    var flagName = accessorType === \"get\" ? \"getterToken\" : \"setterToken\";\n    var key = name;\n    state.tokens.curr.accessorType = accessorType;\n    state.nameStack.set(tkn);\n    if (isClass && isStatic) {\n      key = \"static \" + name;\n    }\n\n    if (props[key]) {\n      if ((props[key].basic || props[key][flagName]) && name !== \"__proto__\") {\n        var msg = \"\";\n        if (isClass) {\n          if (isStatic) {\n            msg += \"static \";\n          }\n          msg += accessorType + \"ter method\";\n        } else {\n          msg = \"key\";\n        }\n        warning(\"W075\", state.tokens.next, msg, name);\n      }\n    } else {\n      props[key] = Object.create(null);\n    }\n\n    props[key][flagName] = tkn;\n    if (isStatic) {\n      props[key].static = true;\n    }\n  }\n\n  /**\n   * Parse a computed property name within object initializers and class bodies\n   * as introduced by ES2015. For example:\n   *\n   *     void {\n   *       [object.method()]: null\n   *     };\n   *\n   * @param {number} context - the parsing context\n   *\n   * @returns {object} - the token value that describes the expression which\n   *                     defines the property name\n   */\n  function computedPropertyName(context) {\n    advance(\"[\");\n\n    // Explicitly reclassify token as a delimeter to prevent its later\n    // interpretation as an \"infix\" operator.\n    state.tokens.curr.delim = true;\n    state.tokens.curr.lbp = 0;\n\n    if (!state.inES6()) {\n      warning(\"W119\", state.tokens.curr, \"computed property names\", \"6\");\n    }\n    var value = expression(context & ~prodParams.noin, 10);\n    advance(\"]\");\n    return value;\n  }\n\n  /**\n   * Test whether a given token is a punctuator whose `value` property matches\n   * one of the specified values. This function explicitly verifies the token's\n   * `type` property so that like-valued string literals (e.g. `\";\"`) do not\n   * produce false positives.\n   *\n   * @param {Token} token\n   * @param {Array.<string>} values\n   *\n   * @returns {boolean}\n   */\n  function checkPunctuators(token, values) {\n    if (token.type === \"(punctuator)\") {\n      return _.includes(values, token.value);\n    }\n    return false;\n  }\n\n  /**\n   * Test whether a given token is a punctuator whose `value` property matches\n   * the specified value. This function explicitly verifies the token's `type`\n   * property so that like-valued string literals (e.g. `\";\"`) do not produce\n   * false positives.\n   *\n   * @param {Token} token\n   * @param {string} value\n   *\n   * @returns {boolean}\n   */\n  function checkPunctuator(token, value) {\n    return token.type === \"(punctuator)\" && token.value === value;\n  }\n\n  // Check whether this function has been reached for a destructuring assign with undeclared values\n  function destructuringAssignOrJsonValue(context) {\n    // lookup for the assignment (ECMAScript 6 only)\n    // if it has semicolons, it is a block, so go parse it as a block\n    // or it's not a block, but there are assignments, check for undeclared variables\n\n    var block = lookupBlockType();\n    if (block.notJson) {\n      if (!state.inES6() && block.isDestAssign) {\n        /* istanbul ignore next */\n        warning(\"W104\", state.tokens.curr, \"destructuring assignment\", \"6\");\n      }\n      statements(context);\n    // otherwise parse json value\n    } else {\n      state.option.laxbreak = true;\n      state.jsonMode = true;\n      jsonValue();\n    }\n  }\n\n  /**\n   * Parse and define the three states of a list comprehension in order to\n   * avoid defining global variables, but keeping them to the list\n   * comprehension scope only. The order of the states are as follows:\n   *\n   * - \"use\" - which will be the returned iterative part of the list\n   *   comprehension\n   * - \"define\" - which will define the variables local to the list\n   *   comprehension\n   * - \"filter\" - which will help filter out values\n   */\n  var arrayComprehension = function() {\n    var CompArray = function() {\n      this.mode = \"use\";\n      this.variables = [];\n    };\n    var _carrays = [];\n    var _current;\n    function declare(v) {\n      var l = _current.variables.filter(function(elt) {\n        // if it has, change its undef state\n        if (elt.value === v) {\n          elt.undef = false;\n          return v;\n        }\n      }).length;\n      return l !== 0;\n    }\n    function use(v) {\n      var l = _current.variables.filter(function(elt) {\n        // and if it has been defined\n        if (elt.value === v && !elt.undef) {\n          if (elt.unused === true) {\n            elt.unused = false;\n          }\n          return v;\n        }\n      }).length;\n      // otherwise we warn about it\n      return (l === 0);\n    }\n    return { stack: function() {\n          _current = new CompArray();\n          _carrays.push(_current);\n        },\n        unstack: function() {\n          _current.variables.filter(function(v) {\n            if (v.unused)\n              warning(\"W098\", v.token, v.token.raw_text || v.value);\n            if (v.undef)\n              state.funct[\"(scope)\"].block.use(v.value, v.token);\n          });\n          _carrays.splice(-1, 1);\n          _current = _carrays[_carrays.length - 1];\n        },\n        setState: function(s) {\n          if (_.includes([\"use\", \"define\", \"generate\", \"filter\"], s))\n            _current.mode = s;\n        },\n        check: function(v) {\n          if (!_current) {\n            return;\n          }\n          // When we are in \"use\" state of the list comp, we enqueue that var\n          if (_current && _current.mode === \"use\") {\n            if (use(v)) {\n              _current.variables.push({\n                token: state.tokens.curr,\n                value: v,\n                undef: true,\n                unused: false\n              });\n            }\n            return true;\n          // When we are in \"define\" state of the list comp,\n          } else if (_current && _current.mode === \"define\") {\n            // check if the variable has been used previously\n            if (!declare(v)) {\n              _current.variables.push({\n                token: state.tokens.curr,\n                value: v,\n                undef: false,\n                unused: true\n              });\n            }\n            return true;\n          // When we are in the \"generate\" state of the list comp,\n          } else if (_current && _current.mode === \"generate\") {\n            state.funct[\"(scope)\"].block.use(v, state.tokens.curr);\n            return true;\n          // When we are in \"filter\" state,\n          } else if (_current && _current.mode === \"filter\") {\n            // we check whether current variable has been declared\n            if (use(v)) {\n              // if not we warn about it\n              /* istanbul ignore next */\n              state.funct[\"(scope)\"].block.use(v, state.tokens.curr);\n            }\n            return true;\n          }\n          /* istanbul ignore next */\n          return false;\n        }\n        };\n  };\n\n\n  /**\n   * Parse input according to the JSON format.\n   *\n   * http://json.org/\n   */\n  function jsonValue() {\n    function jsonObject() {\n      var o = {}, t = state.tokens.next;\n      advance(\"{\");\n      if (state.tokens.next.id !== \"}\") {\n        for (;;) {\n          if (state.tokens.next.id === \"(end)\") {\n            error(\"E026\", state.tokens.next, t.line);\n          } else if (state.tokens.next.id === \"}\") {\n            warning(\"W094\", state.tokens.curr);\n            break;\n          } else if (state.tokens.next.id === \",\") {\n            error(\"E028\", state.tokens.next);\n          } else if (state.tokens.next.id !== \"(string)\") {\n            warning(\"W095\", state.tokens.next, state.tokens.next.value);\n          }\n          if (o[state.tokens.next.value] === true) {\n            warning(\"W075\", state.tokens.next, \"key\", state.tokens.next.value);\n          } else if ((state.tokens.next.value === \"__proto__\" &&\n            !state.option.proto) || (state.tokens.next.value === \"__iterator__\" &&\n            !state.option.iterator)) {\n            warning(\"W096\", state.tokens.next, state.tokens.next.value);\n          } else {\n            o[state.tokens.next.value] = true;\n          }\n          advance();\n          advance(\":\");\n          jsonValue();\n          if (state.tokens.next.id !== \",\") {\n            break;\n          }\n          advance(\",\");\n        }\n      }\n      advance(\"}\");\n    }\n\n    function jsonArray() {\n      var t = state.tokens.next;\n      advance(\"[\");\n      if (state.tokens.next.id !== \"]\") {\n        for (;;) {\n          if (state.tokens.next.id === \"(end)\") {\n            error(\"E027\", state.tokens.next, t.line);\n          } else if (state.tokens.next.id === \"]\") {\n            warning(\"W094\", state.tokens.curr);\n            break;\n          } else if (state.tokens.next.id === \",\") {\n            error(\"E028\", state.tokens.next);\n          }\n          jsonValue();\n          if (state.tokens.next.id !== \",\") {\n            break;\n          }\n          advance(\",\");\n        }\n      }\n      advance(\"]\");\n    }\n\n    switch (state.tokens.next.id) {\n    case \"{\":\n      jsonObject();\n      break;\n    case \"[\":\n      jsonArray();\n      break;\n    case \"true\":\n    case \"false\":\n    case \"null\":\n    case \"(number)\":\n    case \"(string)\":\n      advance();\n      break;\n    case \"-\":\n      advance(\"-\");\n      advance(\"(number)\");\n      break;\n    default:\n      error(\"E003\", state.tokens.next);\n    }\n  }\n\n  /**\n   * Lint dynamically-evaluated code, appending any resulting errors/warnings\n   * into the global `errors` array.\n   *\n   * @param {array} internals - collection of \"internals\" objects describing\n   *                            string tokens that contain evaluated code\n   * @param {object} options - linting options to apply\n   * @param {object} globals - globally-defined bindings for the evaluated code\n   */\n  function lintEvalCode(internals, options, globals) {\n    var priorErrorCount, idx, jdx, internal;\n\n    for (idx = 0; idx < internals.length; idx += 1) {\n      internal = internals[idx];\n      options.scope = internal.elem;\n      priorErrorCount = JSHINT.errors.length;\n\n      itself(internal.code, options, globals);\n\n      for (jdx = priorErrorCount; jdx < JSHINT.errors.length; jdx += 1) {\n        JSHINT.errors[jdx].line += internal.token.line - 1;\n      }\n    }\n  }\n\n  var escapeRegex = function(str) {\n    return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n  };\n\n  // The actual JSHINT function itself.\n  var itself = function(s, o, g) {\n    var x, reIgnoreStr, reIgnore;\n    var optionKeys, newOptionObj, newIgnoredObj;\n\n    o = _.clone(o);\n    state.reset();\n    newOptionObj = state.option;\n    newIgnoredObj = state.ignored;\n\n    if (o && o.scope) {\n      JSHINT.scope = o.scope;\n    } else {\n      JSHINT.errors = [];\n      JSHINT.internals = [];\n      JSHINT.blacklist = {};\n      JSHINT.scope = \"(main)\";\n    }\n\n    predefined = Object.create(null);\n    combine(predefined, vars.ecmaIdentifiers[3]);\n    combine(predefined, vars.reservedVars);\n\n    declared = Object.create(null);\n    var exported = Object.create(null); // Variables that live outside the current file\n\n    function each(obj, cb) {\n      if (!obj)\n        return;\n\n      if (!Array.isArray(obj) && typeof obj === \"object\")\n        obj = Object.keys(obj);\n\n      obj.forEach(cb);\n    }\n\n    if (o) {\n\n      each([o.predef, o.globals], function(dict) {\n        each(dict, function(item) {\n          var slice, prop;\n\n          if (item[0] === \"-\") {\n            slice = item.slice(1);\n            JSHINT.blacklist[slice] = slice;\n            // remove from predefined if there\n            delete predefined[slice];\n          } else {\n            prop = Object.getOwnPropertyDescriptor(dict, item);\n            predefined[item] = prop ? prop.value : false;\n          }\n        });\n      });\n\n      each(o.exported || null, function(item) {\n        exported[item] = true;\n      });\n\n      delete o.predef;\n      delete o.exported;\n\n      optionKeys = Object.keys(o);\n      for (x = 0; x < optionKeys.length; x++) {\n        if (/^-W\\d{3}$/g.test(optionKeys[x])) {\n          newIgnoredObj[optionKeys[x].slice(1)] = true;\n        } else {\n          var optionKey = optionKeys[x];\n          newOptionObj[optionKey] = o[optionKey];\n        }\n      }\n    }\n\n    state.option = newOptionObj;\n    state.ignored = newIgnoredObj;\n\n    state.option.indent = state.option.indent || 4;\n    state.option.maxerr = state.option.maxerr || 50;\n\n    indent = 1;\n\n    var scopeManagerInst = scopeManager(state, predefined, exported, declared);\n    scopeManagerInst.on(\"warning\", function(ev) {\n      warning.apply(null, [ ev.code, ev.token].concat(ev.data));\n    });\n\n    scopeManagerInst.on(\"error\", function(ev) {\n      /* istanbul ignore next */\n      error.apply(null, [ ev.code, ev.token ].concat(ev.data));\n    });\n\n    state.funct = functor(\"(global)\", null, {\n      \"(global)\"    : true,\n      \"(scope)\"     : scopeManagerInst,\n      \"(comparray)\" : arrayComprehension(),\n      \"(metrics)\"   : createMetrics(state.tokens.next)\n    });\n\n    functions = [state.funct];\n    member = {};\n    membersOnly = null;\n    inblock = false;\n    lookahead = [];\n\n    if (!isString(s) && !Array.isArray(s)) {\n      errorAt(\"E004\", 0);\n      return false;\n    }\n\n    api = {\n      get isJSON() {\n        /* istanbul ignore next */\n        return state.jsonMode;\n      },\n\n      getOption: function(name) {\n        return state.option[name] || null;\n      },\n\n      getCache: function(name) {\n        return state.cache[name];\n      },\n\n      setCache: function(name, value) {\n        state.cache[name] = value;\n      },\n\n      warn: function(code, data) {\n        warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));\n      },\n\n      on: function(names, listener) {\n        names.split(\" \").forEach(function(name) {\n          emitter.on(name, listener);\n        }.bind(this));\n      }\n    };\n\n    emitter.removeAllListeners();\n    (extraModules || []).forEach(function(func) {\n      func(api);\n    });\n\n    state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax[\"(begin)\"];\n    if (o && o.ignoreDelimiters) {\n\n      if (!Array.isArray(o.ignoreDelimiters)) {\n        /* istanbul ignore next */\n        o.ignoreDelimiters = [o.ignoreDelimiters];\n      }\n\n      o.ignoreDelimiters.forEach(function(delimiterPair) {\n        if (!delimiterPair.start || !delimiterPair.end)\n            return;\n\n        reIgnoreStr = escapeRegex(delimiterPair.start) +\n                      \"[\\\\s\\\\S]*?\" +\n                      escapeRegex(delimiterPair.end);\n\n        reIgnore = new RegExp(reIgnoreStr, \"ig\");\n\n        s = s.replace(reIgnore, function(match) {\n          return match.replace(/./g, \" \");\n        });\n      });\n    }\n\n    lex = new Lexer(s);\n\n    lex.on(\"warning\", function(ev) {\n      warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));\n    });\n\n    lex.on(\"error\", function(ev) {\n      errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));\n    });\n\n    lex.on(\"fatal\", function(ev) {\n      quit(\"E041\", ev);\n    });\n\n    lex.on(\"Identifier\", function(ev) {\n      emitter.emit(\"Identifier\", ev);\n    });\n\n    lex.on(\"String\", function(ev) {\n      emitter.emit(\"String\", ev);\n    });\n\n    lex.on(\"Number\", function(ev) {\n      emitter.emit(\"Number\", ev);\n    });\n\n    // Check options\n    var name;\n    for (name in o) {\n      if (_.has(o, name)) {\n        checkOption(name, true, state.tokens.curr);\n      }\n    }\n    if (o) {\n      for (name in o.unstable) {\n        if (_.has(o.unstable, name)) {\n          checkOption(name, false, state.tokens.curr);\n        }\n      }\n    }\n\n    try {\n      applyOptions();\n\n      // combine the passed globals after we've assumed all our options\n      combine(predefined, g || {});\n\n      //reset values\n      checkComma.first = true;\n\n      advance();\n      switch (state.tokens.next.id) {\n      case \"{\":\n      case \"[\":\n        destructuringAssignOrJsonValue(0);\n        break;\n      default:\n        directives();\n\n        if (state.directive[\"use strict\"]) {\n          if (!state.allowsGlobalUsd()) {\n            warning(\"W097\", state.directive[\"use strict\"]);\n          }\n        }\n\n        statements(0);\n      }\n\n      if (state.tokens.next.id !== \"(end)\") {\n        quit(\"E041\", state.tokens.curr);\n      }\n\n      state.funct[\"(scope)\"].unstack();\n\n    } catch (err) {\n      if (err && err.name === \"JSHintError\") {\n        var nt = state.tokens.next || {};\n        JSHINT.errors.push({\n          scope     : \"(main)\",\n          raw       : err.raw,\n          code      : err.code,\n          reason    : err.reason,\n          line      : err.line || nt.line,\n          character : err.character || nt.from\n        });\n      } else {\n        /* istanbul ignore next */\n        throw err;\n      }\n    }\n\n    // Loop over the listed \"internals\", and check them as well.\n    if (JSHINT.scope === \"(main)\") {\n      lintEvalCode(JSHINT.internals, o || {}, g);\n    }\n\n    return JSHINT.errors.length === 0;\n  };\n\n  // Modules.\n  itself.addModule = function(func) {\n    extraModules.push(func);\n  };\n\n  itself.addModule(style.register);\n\n  // Data summary.\n  itself.data = function() {\n    var data = {\n      functions: [],\n      options: state.option\n    };\n\n    var fu, f, i, n, globals;\n\n    if (itself.errors.length) {\n      data.errors = itself.errors;\n    }\n\n    if (state.jsonMode) {\n      /* istanbul ignore next */\n      data.json = true;\n    }\n\n    var impliedGlobals = state.funct[\"(scope)\"].getImpliedGlobals();\n    if (impliedGlobals.length > 0) {\n      data.implieds = impliedGlobals;\n    }\n\n    globals = state.funct[\"(scope)\"].getUsedOrDefinedGlobals();\n    if (globals.length > 0) {\n      data.globals = globals;\n    }\n\n    for (i = 1; i < functions.length; i += 1) {\n      f = functions[i];\n      fu = {};\n\n      fu.name = f[\"(name)\"];\n      fu.param = f[\"(params)\"];\n      fu.line = f[\"(line)\"];\n      fu.character = f[\"(character)\"];\n      fu.last = f[\"(last)\"];\n      fu.lastcharacter = f[\"(lastcharacter)\"];\n\n      fu.metrics = {\n        complexity: f[\"(metrics)\"].ComplexityCount,\n        parameters: f[\"(metrics)\"].arity,\n        statements: f[\"(metrics)\"].statementCount\n      };\n\n      data.functions.push(fu);\n    }\n\n    var unuseds = state.funct[\"(scope)\"].getUnuseds();\n    if (unuseds.length > 0) {\n      data.unused = unuseds;\n    }\n\n    for (n in member) {\n      if (typeof member[n] === \"number\") {\n        data.member = member;\n        break;\n      }\n    }\n\n    return data;\n  };\n\n  itself.jshint = itself;\n\n  return itself;\n}());\n\n// Make JSHINT a Node module, if possible.\nif (typeof exports === \"object\" && exports) {\n  exports.JSHINT = JSHINT;\n}\n\n},{\"./lex.js\":17,\"./messages.js\":18,\"./options.js\":20,\"./prod-params.js\":21,\"./reg.js\":22,\"./scope-manager.js\":23,\"./state.js\":24,\"./style.js\":25,\"./vars.js\":27,\"console-browserify\":9,\"events\":11,\"lodash\":12}]},{},[]);\n\nJSHINT = require('jshint').JSHINT;\nif (typeof exports === 'object' && exports) exports.JSHINT = JSHINT;\n}());"
  },
  {
    "path": "web/assets/codemirror/jsonlint.js",
    "content": "var jsonlint=function(){var a=!0,b=!1,c={},d=function(){var a={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,\"{\":17,\"}\":18,JSONMemberList:19,JSONMember:20,\":\":21,\",\":22,\"[\":23,\"]\":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(b,c,d,e,f,g,h){var i=g.length-1;switch(f){case 1:this.$=b.replace(/\\\\(\\\\|\")/g,\"$1\").replace(/\\\\n/g,\"\\n\").replace(/\\\\r/g,\"\\r\").replace(/\\\\t/g,\"\t\").replace(/\\\\v/g,\"\u000b\").replace(/\\\\f/g,\"\\f\").replace(/\\\\b/g,\"\\b\");break;case 2:this.$=Number(b);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=g[i-1];case 13:this.$={};break;case 14:this.$=g[i-1];break;case 15:this.$=[g[i-2],g[i]];break;case 16:this.$={},this.$[g[i][0]]=g[i][1];break;case 17:this.$=g[i-2],g[i-2][g[i][0]]=g[i][1];break;case 18:this.$=[];break;case 19:this.$=g[i-1];break;case 20:this.$=[g[i]];break;case 21:this.$=g[i-2],g[i-2].push(g[i])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(b,c){throw new Error(b)},parse:function(b){function o(a){d.length=d.length-2*a,e.length=e.length-a,f.length=f.length-a}function p(){var a;return a=c.lexer.lex()||1,typeof a!=\"number\"&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h=\"\",i=0,j=0,k=0,l=2,m=1;this.lexer.setInput(b),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc==\"undefined\"&&(this.lexer.yylloc={});var n=this.lexer.yylloc;f.push(n),typeof this.yy.parseError==\"function\"&&(this.parseError=this.yy.parseError);var q,r,s,t,u,v,w={},x,y,z,A;for(;;){s=d[d.length-1],this.defaultActions[s]?t=this.defaultActions[s]:(q==null&&(q=p()),t=g[s]&&g[s][q]);if(typeof t==\"undefined\"||!t.length||!t[0]){if(!k){A=[];for(x in g[s])this.terminals_[x]&&x>2&&A.push(\"'\"+this.terminals_[x]+\"'\");var B=\"\";this.lexer.showPosition?B=\"Parse error on line \"+(i+1)+\":\\n\"+this.lexer.showPosition()+\"\\nExpecting \"+A.join(\", \")+\", got '\"+this.terminals_[q]+\"'\":B=\"Parse error on line \"+(i+1)+\": Unexpected \"+(q==1?\"end of input\":\"'\"+(this.terminals_[q]||q)+\"'\"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:n,expected:A})}if(k==3){if(q==m)throw new Error(B||\"Parsing halted.\");j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,q=p()}for(;;){if(l.toString()in g[s])break;if(s==0)throw new Error(B||\"Parsing halted.\");o(1),s=d[d.length-1]}r=q,q=l,s=d[d.length-1],t=g[s]&&g[s][l],k=3}if(t[0]instanceof Array&&t.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+s+\", token: \"+q);switch(t[0]){case 1:d.push(q),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(t[1]),q=null,r?(q=r,r=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,k>0&&k--);break;case 2:y=this.productions_[t[1]][1],w.$=e[e.length-y],w._$={first_line:f[f.length-(y||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(y||1)].first_column,last_column:f[f.length-1].last_column},v=this.performAction.call(w,h,j,i,this.yy,t[1],e,f);if(typeof v!=\"undefined\")return v;y&&(d=d.slice(0,-1*y*2),e=e.slice(0,-1*y),f=f.slice(0,-1*y)),d.push(this.productions_[t[1]][0]),e.push(w.$),f.push(w._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(b,c){if(!this.yy.parseError)throw new Error(b);this.yy.parseError(b,c)},setInput:function(a){return this._input=a,this._more=this._less=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},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},less:function(a){this._input=this.match.slice(a)+this._input},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?\"...\":\"\")+a.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var a=this.pastInput(),b=(new Array(a.length+1)).join(\"-\");return a+this.upcomingInput()+\"\\n\"+b+\"^\"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e,f;this._more||(this.yytext=\"\",this.match=\"\");var g=this._currentRules();for(var h=0;h<g.length;h++){c=this._input.match(this.rules[g[h]]);if(c&&(!b||c[0].length>b[0].length)){b=c,d=h;if(!this.options.flex)break}}if(b){f=b[0].match(/\\n.*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,g[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(a)return a;return}if(this._input===\"\")return this.EOF;this.parseError(\"Lexical error on line \"+(this.yylineno+1)+\". Unrecognized text.\\n\"+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){var b=this.next();return typeof b!=\"undefined\"?b:this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(b){this.begin(b)}};return a.options={},a.performAction=function(b,c,d,e){var f=e;switch(d){case 0:break;case 1:return 6;case 2:return c.yytext=c.yytext.substr(1,c.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return\"INVALID\"}},a.rules=[/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},a}();return a.lexer=b,a}();return typeof a!=\"undefined\"&&typeof c!=\"undefined\"&&(c.parser=d,c.parse=function(){return d.parse.apply(d,arguments)},c.main=function(d){if(!d[1])throw new Error(\"Usage: \"+d[0]+\" FILE\");if(typeof process!=\"undefined\")var e=a(\"fs\").readFileSync(a(\"path\").join(process.cwd(),d[1]),\"utf8\");else var f=a(\"file\").path(a(\"file\").cwd()),e=f.join(d[1]).read({charset:\"utf-8\"});return c.parser.parse(e)},typeof b!=\"undefined\"&&a.main===b&&c.main(typeof process!=\"undefined\"?process.argv.slice(1):a(\"system\").args)),c}();"
  },
  {
    "path": "web/assets/codemirror/lint/javascript-lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// Depends on jshint.js from https://github.com/jshint/jshint\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  // declare global: JSHINT\n\n  function validator(text, options) {\n    if (!window.JSHINT) {\n      if (window.console) {\n        window.console.error(\"Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.\");\n      }\n      return [];\n    }\n    if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation\n      options.indent = 1; // JSHint default value is 4\n    JSHINT(text, options, options.globals);\n    var errors = JSHINT.data().errors, result = [];\n    if (errors) parseErrors(errors, result);\n    return result;\n  }\n\n  CodeMirror.registerHelper(\"lint\", \"javascript\", validator);\n\n  function parseErrors(errors, output) {\n    for ( var i = 0; i < errors.length; i++) {\n      var error = errors[i];\n      if (error) {\n        if (error.line <= 0) {\n          if (window.console) {\n            window.console.warn(\"Cannot display JSHint error (invalid line \" + error.line + \")\", error);\n          }\n          continue;\n        }\n\n        var start = error.character - 1, end = start + 1;\n        if (error.evidence) {\n          var index = error.evidence.substring(start).search(/.\\b/);\n          if (index > -1) {\n            end += index;\n          }\n        }\n\n        // Convert to format expected by validation service\n        var hint = {\n          message: error.reason,\n          severity: error.code ? (error.code.startsWith('W') ? \"warning\" : \"error\") : \"error\",\n          from: CodeMirror.Pos(error.line - 1, start),\n          to: CodeMirror.Pos(error.line - 1, end)\n        };\n\n        output.push(hint);\n      }\n    }\n  }\n});\n"
  },
  {
    "path": "web/assets/codemirror/lint/lint.css",
    "content": "/* The lint marker gutter */\n.CodeMirror-lint-markers {\n  width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n  background-color: #ffd;\n  border: 1px solid black;\n  border-radius: 4px 4px 4px 4px;\n  color: black;\n  font-family: monospace;\n  font-size: 10pt;\n  overflow: hidden;\n  padding: 2px 5px;\n  position: fixed;\n  white-space: pre;\n  white-space: pre-wrap;\n  z-index: 100;\n  max-width: 600px;\n  opacity: 0;\n  transition: opacity .4s;\n  -moz-transition: opacity .4s;\n  -webkit-transition: opacity .4s;\n  -o-transition: opacity .4s;\n  -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark {\n  background-position: left bottom;\n  background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-mark-error {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==\");\n}\n\n.CodeMirror-lint-marker {\n  background-position: center center;\n  background-repeat: no-repeat;\n  cursor: pointer;\n  display: inline-block;\n  height: 16px;\n  width: 16px;\n  vertical-align: middle;\n  position: relative;\n}\n\n.CodeMirror-lint-message {\n  padding-left: 18px;\n  background-position: top left;\n  background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-multiple {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC\");\n  background-repeat: no-repeat;\n  background-position: right bottom;\n  width: 100%; height: 100%;\n}\n\n.CodeMirror-lint-line-error {\n  background-color: rgba(183, 76, 81, 0.08);\n}\n\n.CodeMirror-lint-line-warning {\n  background-color: rgba(255, 211, 0, 0.1);\n}\n"
  },
  {
    "path": "web/assets/codemirror/lint/lint.js",
    "content": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  var GUTTER_ID = \"CodeMirror-lint-markers\";\n  var LINT_LINE_ID = \"CodeMirror-lint-line-\";\n\n  function showTooltip(cm, e, content) {\n    var tt = document.createElement(\"div\");\n    tt.className = \"CodeMirror-lint-tooltip cm-s-\" + cm.options.theme;\n    tt.appendChild(content.cloneNode(true));\n    if (cm.state.lint.options.selfContain)\n      cm.getWrapperElement().appendChild(tt);\n    else\n      document.body.appendChild(tt);\n\n    function position(e) {\n      if (!tt.parentNode) return CodeMirror.off(document, \"mousemove\", position);\n      var top = Math.max(0, e.clientY - tt.offsetHeight - 5);\n      var left = Math.max(0, Math.min(e.clientX + 5, tt.ownerDocument.defaultView.innerWidth - tt.offsetWidth));\n      tt.style.top = top + \"px\"\n      tt.style.left = left + \"px\";\n    }\n    CodeMirror.on(document, \"mousemove\", position);\n    position(e);\n    if (tt.style.opacity != null) tt.style.opacity = 1;\n    return tt;\n  }\n  function rm(elt) {\n    if (elt.parentNode) elt.parentNode.removeChild(elt);\n  }\n  function hideTooltip(tt) {\n    if (!tt.parentNode) return;\n    if (tt.style.opacity == null) rm(tt);\n    tt.style.opacity = 0;\n    setTimeout(function() { rm(tt); }, 600);\n  }\n\n  function showTooltipFor(cm, e, content, node) {\n    var tooltip = showTooltip(cm, e, content);\n    function hide() {\n      CodeMirror.off(node, \"mouseout\", hide);\n      if (tooltip) { hideTooltip(tooltip); tooltip = null; }\n    }\n    var poll = setInterval(function() {\n      if (tooltip) for (var n = node;; n = n.parentNode) {\n        if (n && n.nodeType == 11) n = n.host;\n        if (n == document.body) return;\n        if (!n) { hide(); break; }\n      }\n      if (!tooltip) return clearInterval(poll);\n    }, 400);\n    CodeMirror.on(node, \"mouseout\", hide);\n  }\n\n  function LintState(cm, conf, hasGutter) {\n    this.marked = [];\n    if (conf instanceof Function) conf = {getAnnotations: conf};\n    if (!conf || conf === true) conf = {};\n    this.options = {};\n    this.linterOptions = conf.options || {};\n    for (var prop in defaults) this.options[prop] = defaults[prop];\n    for (var prop in conf) {\n      if (defaults.hasOwnProperty(prop)) {\n        if (conf[prop] != null) this.options[prop] = conf[prop];\n      } else if (!conf.options) {\n        this.linterOptions[prop] = conf[prop];\n      }\n    }\n    this.timeout = null;\n    this.hasGutter = hasGutter;\n    this.onMouseOver = function(e) { onMouseOver(cm, e); };\n    this.waitingFor = 0\n  }\n\n  var defaults = {\n    highlightLines: false,\n    tooltips: true,\n    delay: 500,\n    lintOnChange: true,\n    getAnnotations: null,\n    async: false,\n    selfContain: null,\n    formatAnnotation: null,\n    onUpdateLinting: null\n  }\n\n  function clearMarks(cm) {\n    var state = cm.state.lint;\n    if (state.hasGutter) cm.clearGutter(GUTTER_ID);\n    if (state.options.highlightLines) clearErrorLines(cm);\n    for (var i = 0; i < state.marked.length; ++i)\n      state.marked[i].clear();\n    state.marked.length = 0;\n  }\n\n  function clearErrorLines(cm) {\n    cm.eachLine(function(line) {\n      var has = line.wrapClass && /\\bCodeMirror-lint-line-\\w+\\b/.exec(line.wrapClass);\n      if (has) cm.removeLineClass(line, \"wrap\", has[0]);\n    })\n  }\n\n  function makeMarker(cm, labels, severity, multiple, tooltips) {\n    var marker = document.createElement(\"div\"), inner = marker;\n    marker.className = \"CodeMirror-lint-marker CodeMirror-lint-marker-\" + severity;\n    if (multiple) {\n      inner = marker.appendChild(document.createElement(\"div\"));\n      inner.className = \"CodeMirror-lint-marker CodeMirror-lint-marker-multiple\";\n    }\n\n    if (tooltips != false) CodeMirror.on(inner, \"mouseover\", function(e) {\n      showTooltipFor(cm, e, labels, inner);\n    });\n\n    return marker;\n  }\n\n  function getMaxSeverity(a, b) {\n    if (a == \"error\") return a;\n    else return b;\n  }\n\n  function groupByLine(annotations) {\n    var lines = [];\n    for (var i = 0; i < annotations.length; ++i) {\n      var ann = annotations[i], line = ann.from.line;\n      (lines[line] || (lines[line] = [])).push(ann);\n    }\n    return lines;\n  }\n\n  function annotationTooltip(ann) {\n    var severity = ann.severity;\n    if (!severity) severity = \"error\";\n    var tip = document.createElement(\"div\");\n    tip.className = \"CodeMirror-lint-message CodeMirror-lint-message-\" + severity;\n    if (typeof ann.messageHTML != 'undefined') {\n      tip.innerHTML = ann.messageHTML;\n    } else {\n      tip.appendChild(document.createTextNode(ann.message));\n    }\n    return tip;\n  }\n\n  function lintAsync(cm, getAnnotations) {\n    var state = cm.state.lint\n    var id = ++state.waitingFor\n    function abort() {\n      id = -1\n      cm.off(\"change\", abort)\n    }\n    cm.on(\"change\", abort)\n    getAnnotations(cm.getValue(), function(annotations, arg2) {\n      cm.off(\"change\", abort)\n      if (state.waitingFor != id) return\n      if (arg2 && annotations instanceof CodeMirror) annotations = arg2\n      cm.operation(function() {updateLinting(cm, annotations)})\n    }, state.linterOptions, cm);\n  }\n\n  function startLinting(cm) {\n    var state = cm.state.lint;\n    if (!state) return;\n    var options = state.options;\n    /*\n     * Passing rules in `options` property prevents JSHint (and other linters) from complaining\n     * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.\n     */\n    var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), \"lint\");\n    if (!getAnnotations) return;\n    if (options.async || getAnnotations.async) {\n      lintAsync(cm, getAnnotations)\n    } else {\n      var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm);\n      if (!annotations) return;\n      if (annotations.then) annotations.then(function(issues) {\n        cm.operation(function() {updateLinting(cm, issues)})\n      });\n      else cm.operation(function() {updateLinting(cm, annotations)})\n    }\n  }\n\n  function updateLinting(cm, annotationsNotSorted) {\n    var state = cm.state.lint;\n    if (!state) return;\n    var options = state.options;\n    clearMarks(cm);\n\n    var annotations = groupByLine(annotationsNotSorted);\n\n    for (var line = 0; line < annotations.length; ++line) {\n      var anns = annotations[line];\n      if (!anns) continue;\n\n      var maxSeverity = null;\n      var tipLabel = state.hasGutter && document.createDocumentFragment();\n\n      for (var i = 0; i < anns.length; ++i) {\n        var ann = anns[i];\n        var severity = ann.severity;\n        if (!severity) severity = \"error\";\n        maxSeverity = getMaxSeverity(maxSeverity, severity);\n\n        if (options.formatAnnotation) ann = options.formatAnnotation(ann);\n        if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));\n\n        if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {\n          className: \"CodeMirror-lint-mark CodeMirror-lint-mark-\" + severity,\n          __annotation: ann\n        }));\n      }\n      if (state.hasGutter)\n        cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, anns.length > 1,\n                                                       options.tooltips));\n\n      if (options.highlightLines)\n        cm.addLineClass(line, \"wrap\", LINT_LINE_ID + maxSeverity);\n    }\n    if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);\n  }\n\n  function onChange(cm) {\n    var state = cm.state.lint;\n    if (!state) return;\n    clearTimeout(state.timeout);\n    state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay);\n  }\n\n  function popupTooltips(cm, annotations, e) {\n    var target = e.target || e.srcElement;\n    var tooltip = document.createDocumentFragment();\n    for (var i = 0; i < annotations.length; i++) {\n      var ann = annotations[i];\n      tooltip.appendChild(annotationTooltip(ann));\n    }\n    showTooltipFor(cm, e, tooltip, target);\n  }\n\n  function onMouseOver(cm, e) {\n    var target = e.target || e.srcElement;\n    if (!/\\bCodeMirror-lint-mark-/.test(target.className)) return;\n    var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;\n    var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, \"client\"));\n\n    var annotations = [];\n    for (var i = 0; i < spans.length; ++i) {\n      var ann = spans[i].__annotation;\n      if (ann) annotations.push(ann);\n    }\n    if (annotations.length) popupTooltips(cm, annotations, e);\n  }\n\n  CodeMirror.defineOption(\"lint\", false, function(cm, val, old) {\n    if (old && old != CodeMirror.Init) {\n      clearMarks(cm);\n      if (cm.state.lint.options.lintOnChange !== false)\n        cm.off(\"change\", onChange);\n      CodeMirror.off(cm.getWrapperElement(), \"mouseover\", cm.state.lint.onMouseOver);\n      clearTimeout(cm.state.lint.timeout);\n      delete cm.state.lint;\n    }\n\n    if (val) {\n      var gutters = cm.getOption(\"gutters\"), hasLintGutter = false;\n      for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;\n      var state = cm.state.lint = new LintState(cm, val, hasLintGutter);\n      if (state.options.lintOnChange)\n        cm.on(\"change\", onChange);\n      if (state.options.tooltips != false && state.options.tooltips != \"gutter\")\n        CodeMirror.on(cm.getWrapperElement(), \"mouseover\", state.onMouseOver);\n\n      startLinting(cm);\n    }\n  });\n\n  CodeMirror.defineExtension(\"performLint\", function() {\n    startLinting(this);\n  });\n});\n"
  },
  {
    "path": "web/assets/codemirror/xq.css",
    "content": "/*\nCopyright (C) 2011 by MarkLogic Corporation\nAuthor: Mike Brevoort <mike@brevoort.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n.cm-s-xq.CodeMirror { border-radius: 1.5rem; border: 1px solid #d9d9d9; height: auto; }\n.cm-s-xq.CodeMirror:hover { background-color: rgb(232 244 242); border-color: #18947b; transition: all .3s; }\n.cm-s-xq .CodeMirror-gutters { border-right: 1px solid #ddd; background-color: rgb(221 221 221 / 20%); white-space: nowrap; }\n.cm-s-xq span.cm-keyword { line-height: 1em; font-weight: bold; color: #5A5CAD; }\n.cm-s-xq span.cm-atom { color: #7A316F; font-weight:bold; }\n.cm-s-xq span.cm-number { color: #e36209; }\n.cm-s-xq span.cm-def { text-decoration:underline; }\n.cm-s-xq span.cm-variable { color: black; }\n.cm-s-xq span.cm-variable-2 { color:black; }\n.cm-s-xq span.cm-variable-3, .cm-s-xq span.cm-type { color: black; }\n.cm-s-xq span.cm-property { color: #008771; }\n.cm-s-xq span.cm-operator {}\n.cm-s-xq span.cm-comment { color: #bbbbbb; font-style: italic; }\n.cm-s-xq span.cm-string {}\n.cm-s-xq span.cm-meta { color: yellow; }\n.cm-s-xq span.cm-qualifier { color: grey; }\n.cm-s-xq span.cm-builtin { color: #7EA656; }\n.cm-s-xq span.cm-bracket { color: #cc7; }\n.cm-s-xq span.cm-tag { color: #3F7F7F; }\n.cm-s-xq span.cm-attribute { color: #7F007F; }\n.cm-s-xq span.cm-error { color: #e04141; }\n\n.cm-s-xq .CodeMirror-activeline-background { background: #e8f2ff; }\n.cm-s-xq .CodeMirror-matchingbracket { outline:1px solid grey;color:black !important;background:yellow; }\n\n.dark .cm-s-xq.CodeMirror { background-color: var(--dark-color-surface-200); border-color: var(--dark-color-surface-300); color: rgb(255 255 255 / 65%); }\n.dark .cm-s-xq.CodeMirror:hover { background-color: rgb(0 50 42 / 30%); border-color: #008771; transition: all .3s; }\n.dark .cm-s-xq div.CodeMirror-selected { background: var(--dark-color-codemirror-line-selection); }\n.dark .cm-s-xq .CodeMirror-line::selection, .dark .cm-s-xq .CodeMirror-line > span::selection, .dark .cm-s-xq .CodeMirror-line > span > span::selection { background: var(--dark-color-codemirror-line-selection); }\n.dark .cm-s-xq .CodeMirror-line::-moz-selection, .dark .cm-s-xq .CodeMirror-line > span::-moz-selection, .dark .cm-s-xq .CodeMirror-line > span > span::-moz-selection { background: var(--dark-color-codemirror-line-selection); }\n.dark .cm-s-xq .CodeMirror-gutters { background: rgb(0 0 0 / 30%); border-right: 1px solid var(--dark-color-surface-300); }\n.dark .cm-s-xq .CodeMirror-guttermarker { color: #FFBD40; }\n.dark .cm-s-xq .CodeMirror-guttermarker-subtle { color: rgb(255 255 255 / 70%); }\n.dark .cm-s-xq .CodeMirror-linenumber { color: rgb(255 255 255 / 50%); }\n.dark .cm-s-xq .CodeMirror-cursor { border-left: 1px solid white; }\n\n.dark .cm-s-xq span.cm-keyword { color: #FFBD40; }\n.dark .cm-s-xq span.cm-atom { color: #c099ff; }\n.dark .cm-s-xq span.cm-number { color: #9ccfd8; }\n.dark .cm-s-xq span.cm-def { color: #FFF; text-decoration:underline; }\n.dark .cm-s-xq span.cm-variable { color: #FFF; }\n.dark .cm-s-xq span.cm-variable-2 { color: #EEE; }\n.dark .cm-s-xq span.cm-variable-3, .dark .cm-s-xq span.cm-type { color: #DDD; }\n.dark .cm-s-xq span.cm-property { color: #f6c177; }\n.dark .cm-s-xq span.cm-operator {}\n.dark .cm-s-xq span.cm-comment { color: gray; }\n.dark .cm-s-xq span.cm-string {}\n.dark .cm-s-xq span.cm-meta { color: yellow; }\n.dark .cm-s-xq span.cm-qualifier { color: #FFF700; }\n.dark .cm-s-xq span.cm-builtin { color: #30a; }\n.dark .cm-s-xq span.cm-bracket { color: #cc7; }\n.dark .cm-s-xq span.cm-tag { color: #FFBD40; }\n.dark .cm-s-xq span.cm-attribute { color: #FFF700; }\n.dark .cm-s-xq span.cm-error { color: #e04141; }\n\n.dark .cm-s-xq .CodeMirror-activeline-background { background: #27282E; }\n.dark .cm-s-xq .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }\n\n.Line-Hover{transition: all .2s;}\n.Line-Hover:hover{ background-color: rgba(0, 102, 85, 0.05) !important; }  \n.dark .Line-Hover:hover{ background-color: var(--dark-color-codemirror-line-hover) !important; }\n\n.CodeMirror-foldmarker { color: #fc8800; text-shadow: #ffd8aa 1px 1px 2px, #ffd8aa -1px -1px 2px, #ffd8aa 1px -1px 2px, #ffd8aa -1px 1px 2px; font-family: arial; line-height: .3; cursor: pointer; }\n.dark .CodeMirror-foldmarker { color: #ffffff; text-shadow: #bbb 1px 1px 2px, #bbb -1px -1px 2px, #bbb 1px -1px 2px, #bbb -1px 1px 2px; font-family: arial; line-height: .3; cursor: pointer; }\n"
  },
  {
    "path": "web/assets/css/custom.css",
    "content": ":root{--color-primary-100:#008771;--dark-color-background:#0a1222;--dark-color-surface-100:#151f31;--dark-color-surface-200:#222d42;--dark-color-surface-300:#2c3950;--dark-color-surface-400:rgba(65,85,119,.5);--dark-color-surface-500:#2c3950;--dark-color-surface-600:#313f5a;--dark-color-surface-700:#111929;--dark-color-table-hover:rgba(44,57,80,.2);--dark-color-text-primary:rgba(255,255,255,.75);--dark-color-stroke:#2c3950;--dark-color-btn-danger:#cd3838;--dark-color-btn-danger-border:transparent;--dark-color-btn-danger-hover:#e94b4b;--dark-color-tag-bg:rgba(255,255,255,.05);--dark-color-tag-border:rgba(255,255,255,.15);--dark-color-tag-color:rgba(255,255,255,.75);--dark-color-tag-green-bg:#112421;--dark-color-tag-green-border:#195141;--dark-color-tag-green-color:#3ad3ba;--dark-color-tag-purple-bg:#201425;--dark-color-tag-purple-border:#5a2969;--dark-color-tag-purple-color:#d988cd;--dark-color-tag-red-bg:#291515;--dark-color-tag-red-border:#5c2626;--dark-color-tag-red-color:#e04141;--dark-color-tag-orange-bg:#312313;--dark-color-tag-orange-border:#593914;--dark-color-tag-orange-color:#ffa031;--dark-color-tag-blue-bg:#111a2c;--dark-color-tag-blue-border:#1348ab;--dark-color-tag-blue-color:#529fff;--dark-color-codemirror-line-hover:rgba(0,135,113,.2);--dark-color-codemirror-line-selection:rgba(0,135,113,.3);--dark-color-login-background:var(--dark-color-background);--dark-color-login-wave:var(--dark-color-surface-200);--dark-color-tooltip:rgba(61,76,104,.9)}html[data-theme-animations='off']{.ant-menu,.ant-layout-sider,.ant-card,.ant-tag,.ant-progress-circle>*,.ant-input,.ant-table-row-expand-icon,.ant-switch,.ant-table-thead>tr>th,.ant-select-selection,.ant-btn,.ant-input-number,.ant-input-group-addon,.ant-checkbox-inner,.ant-progress-bg,.ant-progress-success-bg,.ant-radio-button-wrapper:not(:first-child):before,.ant-radio-button-wrapper,#login{transition:border 0s,background 0s!important}.ant-menu-item,.ant-menu-submenu-title,.ant-alert-close-icon .anticon-close,.ant-tabs-nav .ant-tabs-tab,.ant-input-number-input,.ant-collapse>.ant-collapse-item>.ant-collapse-header,.Line-Hover{transition:color 0s!important}.wave-btn-bg{transition:width 0s!important}}html[data-theme='ultra-dark']{--dark-color-background:#21242a;--dark-color-surface-100:#0c0e12;--dark-color-surface-200:#222327;--dark-color-surface-300:#32353b;--dark-color-surface-400:rgba(255,255,255,.1);--dark-color-surface-500:#3b404b;--dark-color-surface-600:#505663;--dark-color-surface-700:#101113;--dark-color-table-hover:rgba(89,89,89,.15);--dark-color-text-primary:rgb(255 255 255 / 85%);--dark-color-stroke:#202025;--dark-color-tag-green-bg:#112421;--dark-color-tag-green-border:#1d5f4d;--dark-color-tag-green-color:#59cbac;--dark-color-tag-purple-bg:#241121;--dark-color-tag-purple-border:#5a2969;--dark-color-tag-purple-color:#d686ca;--dark-color-tag-red-bg:#2a1215;--dark-color-tag-red-border:#58181c;--dark-color-tag-red-color:#e84749;--dark-color-tag-orange-bg:#2b1d11;--dark-color-tag-orange-border:#593815;--dark-color-tag-orange-color:#e89a3c;--dark-color-tag-blue-bg:#111a2c;--dark-color-tag-blue-border:#0f367e;--dark-color-tag-blue-color:#3c89e8;--dark-color-codemirror-line-hover:rgba(85,85,85,.3);--dark-color-codemirror-line-selection:rgba(85,85,85,.4);--dark-color-login-background:#0a2227;--dark-color-login-wave:#0f2d32;--dark-color-tooltip:rgba(88,93,100,.9);.ant-dropdown-menu-dark{background-color:var(--dark-color-surface-500)}.dark .ant-dropdown-menu-submenu-title:hover,.dark .ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),.dark .ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled){background-color:var(--dark-color-surface-300)}.dark .waves-header{background-color:#0a2227}.dark .ant-calendar-year-panel-year:hover,.dark .ant-calendar-month-panel-month:hover,.dark .ant-calendar-decade-panel-decade:hover{background-color:var(--dark-color-surface-600)}}html,body{height:100vh;width:100vw;margin:0;padding:0;overflow:hidden}body{color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;background-color:#fff;font-feature-settings:\"tnum\"}html{--antd-wave-shadow-color:var(--color-primary-100);line-height:1.15;text-size-adjust:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}::selection{color:var(--color-primary-100);background-color:#cfe8e4}#app{height:100%;position:fixed;top:0;left:0;right:0;bottom:0;margin:0;padding:0;overflow:auto}.ant-layout,.ant-layout *{box-sizing:border-box}.ant-spin-blur{border-radius:1.5rem}style attribute{text-align:center}.ant-table-thead>tr>th{padding:16px 8px}.ant-table-tbody>tr>td{padding:12px 8px}.ant-table-thead>tr>th{color:rgba(0,0,0,.85);font-weight:500;text-align:left;border-bottom:1px solid #e8e8e8;transition:background .3s ease}.ant-table table{width:100%;text-align:left;border-radius:1rem 1rem 0 0;border-collapse:separate;border-spacing:0}.ant-table{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:\"tnum\";position:relative;clear:both}.ant-table-wrapper>div>div>div>div>div>div{overflow-x:auto!important}.ant-card-hoverable{cursor:auto;cursor:pointer}.ant-card{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:\"tnum\";position:relative;background-color:#fff;border-radius:2px;transition:all .3s}.ant-space{width:100%}.ant-layout-sider-zero-width-trigger{display:none}@media (max-width:768px){.ant-layout-sider{display:none}.ant-card,.ant-alert-error{margin:.5rem}.ant-tabs{margin:.5rem;padding:.5rem}.ant-modal-body{padding:20px}.ant-form-item-label{line-height:1.5;padding:8px 0 0}}.ant-layout-content{min-height:auto}.ant-card,.ant-tabs{border-radius:1.5rem}.ant-card-hoverable{cursor:auto}.ant-card+.ant-card{margin-top:20px}.drawer-handle{position:absolute;top:72px;width:41px;height:40px;cursor:pointer;z-index:0;text-align:center;line-height:40px;font-size:16px;display:flex;justify-content:center;align-items:center;background-color:#fff;right:-40px;box-shadow:2px 0 8px rgba(0,0,0,.15);border-radius:0 4px 4px 0}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#006655!important;background-image:linear-gradient(270deg,rgba(123,199,77,0) 30%,#009980,rgba(123,199,77,0) 100%);background-repeat:no-repeat;animation:ma-bg-move linear 6.6s infinite;color:#fff;border-radius:.5rem}@-webkit-keyframes ma-bg-move{0%{background-position:-500px 0}100%{background-position:1000px 0}}@keyframes ma-bg-move{0%{background-position:-500px 0}50%{background-position:1000px 0}100%{background-position:1000px 0}}.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:var(--color-primary-100);background-color:rgb(232 244 242);border-radius:.5rem}.ant-menu-inline .ant-menu-item{border-radius:.5rem}.ant-menu-inline .ant-menu-item:after,.ant-menu{border-right-width:0}.ant-layout-sider-children,.ant-pagination ul{margin-top:-.1px;padding:.5rem}.ant-dropdown-menu,.ant-select-dropdown-menu{padding:.5rem}.ant-dropdown-menu-item,.ant-dropdown-menu-item:hover,.ant-select-dropdown-menu-item,.ant-select-dropdown-menu-item:hover,.ant-select-dropdown-menu-item-selected,.ant-select-selection--multiple .ant-select-selection__choice{border-radius:.5rem;margin-bottom:2px}@media (min-width:769px){.drawer-handle{display:none}.ant-tabs{padding:2rem}.ant-alert-error{margin-inline:.3rem}}.fade-in-enter,.fade-in-leave-active,.fade-in-linear-enter,.fade-in-linear-leave,.fade-in-linear-leave-active,.fade-in-linear-enter,.fade-in-linear-leave,.fade-in-linear-leave-active{opacity:0}.fade-in-linear-enter-active,.fade-in-linear-leave-active{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.fade-in-linear-enter-active,.fade-in-linear-leave-active{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.fade-in-enter-active,.fade-in-leave-active{-webkit-transition:all .3s cubic-bezier(.55,0,.1,1);transition:all .3s cubic-bezier(.55,0,.1,1)}.zoom-in-center-enter-active,.zoom-in-center-leave-active{-webkit-transition:all .3s cubic-bezier(.55,0,.1,1);transition:all .3s cubic-bezier(.55,0,.1,1)}.zoom-in-center-enter,.zoom-in-center-leave-active{opacity:0;-webkit-transform:scaleX(0);transform:scaleX(0)}.zoom-in-top-enter-active,.zoom-in-top-leave-active{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);-webkit-transform-origin:center top;transform-origin:center top}.zoom-in-top-enter,.zoom-in-top-leave-active{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}.zoom-in-bottom-enter-active,.zoom-in-bottom-leave-active{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);-webkit-transform-origin:center bottom;transform-origin:center bottom}.zoom-in-bottom-enter,.zoom-in-bottom-leave-active{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}.zoom-in-left-enter-active,.zoom-in-left-leave-active{opacity:1;-webkit-transform:scale(1,1);transform:scale(1,1);-webkit-transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);-webkit-transform-origin:top left;transform-origin:top left}.zoom-in-left-enter,.zoom-in-left-leave-active{opacity:0;-webkit-transform:scale(.45,.45);transform:scale(.45,.45)}.list-enter-active,.list-leave-active{-webkit-transition:all .3s;transition:all .3s}.list-enter,.list-leave-active{opacity:0;-webkit-transform:translateY(-30px);transform:translateY(-30px)}.ant-tooltip-inner{min-height:0}.ant-list-item-meta-title{font-size:14px}.ant-progress-inner{background-color:#ebeef5}.deactive-client .ant-collapse-header{color:rgb(255,255,255)!important;background-color:rgb(255,127,127)}.ant-table-expand-icon-th,.ant-table-row-expand-icon-cell{width:30px;min-width:30px}.ant-tabs{background-color:white}.ant-form-item{margin-bottom:0}.ant-setting-textarea{margin-top:1.5rem}.client-table-header{background-color:#f0f2f5}.client-table-odd-row{background-color:#fafafa}.ant-table-pagination.ant-pagination{float:left}.ant-tag-blue{background-color:#edf4fa;border-color:#a9c5e7;color:#0e49b5}.ant-tag-green{background-color:#eafff9;border-color:#76ccb4;color:#199270}.ant-tag-purple{background-color:#f2eaf1;border-color:#d5bed2;color:#7a316f}.ant-tag-orange,.ant-alert-warning{background-color:#ffeee1;border-color:#fec093;color:#f37b24}.ant-tag-red,.ant-alert-error{background-color:#ffe9e9;border-color:#ff9e9e;color:#cf3c3c}.ant-input::placeholder{opacity:.5}.ant-input:hover,.ant-input:focus{background-color:rgb(232 244 242)}.delete-icon:hover{color:#e04141}.normal-icon:hover{color:var(--color-primary-100)}.dark::selection{color:#fff;background-color:var(--color-primary-100)}.dark .normal-icon:hover{color:#ffffff}.dark .ant-layout-sider,.dark .ant-drawer-content,.ant-menu-dark,.ant-menu-dark .ant-menu-sub,.dark .ant-card,.dark .ant-table,.dark .ant-collapse-content,.dark .ant-tabs{background-color:var(--dark-color-surface-100);color:var(--dark-color-text-primary)}.dark .ant-card-hoverable:hover,.dark .ant-space-item>.ant-tabs:hover{box-shadow:0 2px 8px transparent}.dark>.ant-layout,.dark .drawer-handle,.dark .ant-table-thead>tr>th,.dark .ant-table-expanded-row,.dark .ant-table-expanded-row:hover,.dark .ant-table-expanded-row .ant-table-tbody,.dark .ant-calendar{background-color:var(--dark-color-background);color:var(--dark-color-text-primary)}.dark .ant-table-expanded-row .ant-table-thead>tr:first-child>th{border-radius:0}.dark .ant-calendar,.dark .ant-card-bordered{border-color:var(--dark-color-background)}.dark .ant-table-bordered,.dark .ant-table-bordered.ant-table-empty .ant-table-placeholder,.dark .ant-table-bordered .ant-table-body>table,.dark .ant-table-bordered .ant-table-fixed-left table,.dark .ant-table-bordered .ant-table-fixed-right table,.dark .ant-table-bordered .ant-table-header>table,.dark .ant-table-bordered .ant-table-thead>tr:not(:last-child)>th,.dark .ant-table-bordered .ant-table-tbody>tr>td,.dark .ant-table-bordered .ant-table-thead>tr>th{border-color:var(--dark-color-surface-400)}.dark .ant-table-tbody>tr>td,.dark .ant-table-thead>tr>th,.dark .ant-card-head,.dark .ant-modal-header,.dark .ant-collapse>.ant-collapse-item,.dark .ant-tabs-bar,.dark .ant-list-split .ant-list-item,.dark .ant-popover-title,.dark .ant-calendar-header,.dark .ant-calendar-input-wrap{border-bottom-color:var(--dark-color-surface-400)}.dark .ant-modal-footer,.dark .ant-collapse-content,.dark .ant-calendar-footer,.dark .ant-divider-horizontal.ant-divider-with-text-left:before,.dark .ant-divider-horizontal.ant-divider-with-text-left:after,.dark .ant-divider-horizontal.ant-divider-with-text-center:before,.dark .ant-divider-horizontal.ant-divider-with-text-center:after{border-top-color:var(--dark-color-surface-300)}.ant-divider-horizontal.ant-divider-with-text-left:before{width:10%}.dark .ant-progress-text,.dark .ant-card-head,.dark .ant-form,.dark .ant-collapse>.ant-collapse-item>.ant-collapse-header,.dark .ant-modal-close-x,.dark .ant-pagination-item a,.dark li:not(.ant-pagination-disabled) i,.dark .ant-form .anticon,.dark .ant-tabs-tab-arrow-show:not(.ant-tabs-tab-btn-disabled),.dark .anticon-close,.dark .ant-list-item-meta-title,.dark .ant-select-selection i,.dark .ant-modal-confirm-title,.dark .ant-modal-confirm-content,.dark .ant-popover-message,.dark .ant-modal,.dark .ant-divider-inner-text,.dark .ant-popover-title,.dark .ant-popover-inner-content,.dark h2,.dark .ant-modal-title,.dark .ant-form-item-label>label,.dark .ant-checkbox-wrapper,.dark .ant-form-item,.dark .ant-calendar-footer .ant-calendar-today-btn,.dark .ant-calendar-footer .ant-calendar-time-picker-btn,.dark .ant-calendar-day-select,.dark .ant-calendar-month-select,.dark .ant-calendar-year-select,.dark .ant-calendar-date,.dark .ant-calendar-year-panel-year,.dark .ant-calendar-month-panel-month,.dark .ant-calendar-decade-panel-decade{color:var(--dark-color-text-primary)}.dark .ant-list-item-meta-description{color:rgba(255,255,255,.45)}.dark .ant-pagination-disabled i,.dark .ant-tabs-tab-btn-disabled{color:rgba(255,255,255,.25)}.dark .ant-input,.dark .ant-input-group-addon,.dark .ant-collapse,.dark .ant-select-selection,.dark .ant-input-number,.dark .ant-input-number-handler-wrap,.dark .ant-pagination-item-active,.dark .ant-table-placeholder,.dark .ant-empty-normal,.dark.ant-select-dropdown,.dark .ant-select-dropdown,.dark .ant-select-dropdown li,.dark .ant-select-dropdown-menu-item,.dark .client-table-header,.dark .ant-select-selection--multiple .ant-select-selection__choice,.dark .ant-calendar-time-picker-inner{background-color:var(--dark-color-surface-200);border-color:var(--dark-color-surface-300);color:var(--dark-color-text-primary)}.dark .ant-select-selection:hover,.dark .ant-calendar-picker-clear,.dark .ant-input-number:hover,.dark .ant-input-number:focus,.dark .ant-input:hover,.dark .ant-input:focus{background-color:rgba(0,135,113,.3);border-color:var(--color-primary-100)}.dark .ant-btn:not(.ant-btn-primary):not(.ant-btn-danger){color:var(--dark-color-text-primary);background-color:rgb(10 117 87 / 30%);border:1px solid var(--color-primary-100)}.dark .ant-radio-button-wrapper,.dark .ant-radio-button-wrapper:before{color:var(--dark-color-text-primary);background-color:rgba(0,135,113,.3);border-color:var(--color-primary-100)}.dark .ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),.dark .ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){color:#fff;background-color:rgb(10 117 87 / 50%);border-color:var(--color-primary-100)}.dark .ant-btn-primary[disabled],.dark .ant-btn-danger[disabled],.dark .ant-calendar-ok-btn-disabled{color:rgb(255 255 255 / 35%);background-color:var(--dark-color-surface-200);border-color:var(--dark-color-surface-300)}.dark .ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.dark .client-table-odd-row{background-color:var(--dark-color-table-hover)}.dark .ant-table-row-expand-icon{color:#fff;background-color:#fff0;border-color:rgb(255 255 255 / 20%)}.dark .ant-table-row-expand-icon:hover{color:var(--color-primary-100);background-color:#fff0;border-color:var(--color-primary-100)}.dark .ant-switch:not(.ant-switch-checked),.dark .ant-progress-line .ant-progress-inner{background-color:var(--dark-color-surface-500)}.dark .ant-progress-circle-trail{stroke:var(--dark-color-stroke)!important}.dark .ant-popover-inner{background-color:var(--dark-color-surface-500)}.dark>.ant-popover-content>.ant-popover-arrow{border-color:var(--dark-color-surface-500)}@media (max-width:768px){.dark .ant-popover-inner{background-color:var(--dark-color-surface-200)}.dark>.ant-popover-content>.ant-popover-arrow{border-color:var(--dark-color-surface-200)}}.ant-dropdown-menu-dark .ant-dropdown-menu-item:hover,.dark .ant-select-dropdown-menu-item-selected,.dark .ant-calendar-time-picker-select-option-selected{background-color:var(--dark-color-surface-600)}.ant-menu-dark .ant-menu-item:hover{background-color:var(--dark-color-surface-300)}.dark .ant-alert-message{color:rgba(255,255,255,.85)}.dark .ant-tag{color:var(--dark-color-tag-color);background-color:var(--dark-color-tag-bg);border-color:var(--dark-color-tag-border)}.dark .ant-tag-blue{background-color:var(--dark-color-tag-blue-bg);border-color:var(--dark-color-tag-blue-border);color:var(--dark-color-tag-blue-color)}.dark .ant-tag-red,.dark .ant-alert-error{background-color:var(--dark-color-tag-red-bg);border-color:var(--dark-color-tag-red-border);color:var(--dark-color-tag-red-color)}.dark .ant-tag-orange,.dark .ant-alert-warning{background-color:var(--dark-color-tag-orange-bg);border-color:var(--dark-color-tag-orange-border);color:var(--dark-color-tag-orange-color)}.dark .ant-tag-green{background-color:var(--dark-color-tag-green-bg);border-color:var(--dark-color-tag-green-border);color:var(--dark-color-tag-green-color)}.dark .ant-tag-purple{background-color:var(--dark-color-tag-purple-bg);border-color:var(--dark-color-tag-purple-border);color:var(--dark-color-tag-purple-color)}.dark .ant-modal-content,.dark .ant-modal-header{background-color:var(--dark-color-surface-700)}.dark .ant-calendar-next-month-btn-day .ant-calendar-date,.dark .ant-calendar-last-month-cell .ant-calendar-date{color:var(--dark-color-surface-300)}.dark .ant-calendar-selected-day .ant-calendar-date{background-color:var(--color-primary-100)!important;color:#fff}.dark .ant-calendar-date:hover,.dark .ant-calendar-time-picker-select li:hover{background-color:var(--dark-color-surface-600);color:#fff}.dark .ant-calendar-header a:hover,.dark .ant-calendar-header a:hover::before,.dark .ant-calendar-header a:hover::after{border-color:#fff}.dark .ant-calendar-time-picker-select li:focus{color:#fff;font-weight:600;outline:none;background-color:var(--color-primary-100)}.dark .ant-calendar-time-picker-select{border-right-color:var(--dark-color-surface-300)}.has-warning .ant-select-selection,.has-warning .ant-select-selection:hover,.has-warning .ant-input,.has-warning .ant-input:hover{background-color:#ffeee1;border-color:#fec093}.has-warning .ant-input::placeholder{color:#f37b24}.has-warning .ant-input:not([disabled]):hover{border-color:#fec093}.dark .has-warning .ant-select-selection,.dark .has-warning .ant-select-selection:hover,.dark .has-warning .ant-input,.dark .has-warning .ant-input:hover{border-color:#784e1d;background:rgb(49,35,19)}.dark .has-warning .ant-input::placeholder{color:rgb(255 160 49 / 70%)}.dark .has-warning .anticon{color:#ffa031}.dark .has-success .anticon{color:var(--color-primary-100);animation-name:diffZoomIn1!important}.dark .anticon-close-circle{color:#e04141}.dark .ant-spin-nested-loading>div>.ant-spin .ant-spin-text{text-shadow:0 1px 2px #00000077}.dark .ant-spin{color:#fff}.dark .ant-spin-dot-item{background-color:#fff}.ant-checkbox-wrapper,.ant-input-group-addon,.ant-tabs-tab,.ant-input::placeholder,.ant-collapse-header,.ant-menu,.ant-radio-button-wrapper{-webkit-user-select:none;user-select:none}.ant-calendar-date,.ant-calendar-year-panel-year,.ant-calendar-decade-panel-decade,.ant-calendar-month-panel-month,.ant-checkbox-inner,.ant-checkbox-checked:after,.ant-table-row-expand-icon{border-radius:6px}.ant-calendar-date:hover{background-color:rgb(232 244 242)}.ant-calendar-date:active{background-color:rgb(232 244 242);color:rgba(0,0,0,.65)}.ant-calendar-today .ant-calendar-date{color:var(--color-primary-100);font-weight:700;border-color:var(--color-primary-100)}.dark .ant-calendar-today .ant-calendar-date{color:#fff;font-weight:700;border-color:var(--color-primary-100)}.ant-calendar-selected-day .ant-calendar-date{background:var(--color-primary-100);color:#ffffff}li.ant-select-dropdown-menu-item:empty:after{content:\"None\";font-weight:normal;color:rgba(0,0,0,.25)}.dark li.ant-select-dropdown-menu-item:empty:after{content:\"None\";font-weight:normal;color:rgba(255,255,255,.3)}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:hover .ant-select-selected-icon{color:rgba(0,0,0,.87)}.dark.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:hover .ant-select-selected-icon{color:rgb(255,255,255)}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected .ant-select-selected-icon,.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:hover .ant-select-selected-icon{color:var(--color-primary-100)}.ant-select-selection:hover,.ant-input-number-focused,.ant-input-number:hover{background-color:rgb(232 244 242)}.dark .ant-input-number-handler:active{background-color:var(--color-primary-100)}.dark .ant-input-number-handler:hover .ant-input-number-handler-down-inner,.dark .ant-input-number-handler:hover .ant-input-number-handler-up-inner{color:#fff}.dark .ant-input-number-handler-down{border-top:1px solid rgba(217,217,217,.3)}.dark .ant-calendar-year-panel-header .ant-calendar-year-panel-century-select,.dark .ant-calendar-year-panel-header .ant-calendar-year-panel-decade-select,.dark .ant-calendar-year-panel-header .ant-calendar-year-panel-month-select,.dark .ant-calendar-year-panel-header .ant-calendar-year-panel-year-select .dark .ant-calendar-month-panel-header .ant-calendar-month-panel-century-select,.dark .ant-calendar-month-panel-header .ant-calendar-month-panel-decade-select,.dark .ant-calendar-month-panel-header .ant-calendar-month-panel-month-select,.dark .ant-calendar-month-panel-header .ant-calendar-month-panel-year-select{color:rgba(255,255,255,.85)}.dark .ant-calendar-year-panel-header{border-bottom:1px solid var(--dark-color-surface-200)}.dark .ant-calendar-year-panel-last-decade-cell .ant-calendar-year-panel-year,.dark .ant-calendar-year-panel-next-decade-cell .ant-calendar-year-panel-year{color:rgba(255,255,255,.35)}.dark .ant-divider:not(.ant-divider-with-text-center,.ant-divider-with-text-left,.ant-divider-with-text-right),.ant-dropdown-menu-dark,.dark .ant-calendar-year-panel-year:hover,.dark .ant-calendar-month-panel-month:hover,.dark .ant-calendar-decade-panel-decade:hover{background-color:var(--dark-color-surface-200)}.dark .ant-calendar-header a:hover{color:#fff}.dark .ant-calendar-month-panel-header{background-color:var(--dark-color-background);border-bottom:1px solid var(--dark-color-surface-200)}.dark .ant-calendar-year-panel,.dark .ant-calendar table{background-color:var(--dark-color-background)}.dark .ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year,.dark .ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year:hover,.dark .ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month,.dark .ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month:hover,.dark .ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade,.dark .ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade:hover{color:#fff;background-color:var(--color-primary-100)}.dark .ant-calendar-last-month-cell .ant-calendar-date,.dark .ant-calendar-last-month-cell .ant-calendar-date:hover,.dark .ant-calendar-next-month-btn-day .ant-calendar-date,.dark .ant-calendar-next-month-btn-day .ant-calendar-date:hover{color:rgb(255 255 255 / 25%);background:transparent;border-color:transparent}.dark .ant-calendar-today .ant-calendar-date:hover{color:#fff;border-color:var(--color-primary-100);background-color:var(--color-primary-100)}.dark .ant-calendar-decade-panel-last-century-cell .ant-calendar-decade-panel-decade,.dark .ant-calendar-decade-panel-next-century-cell .ant-calendar-decade-panel-decade{color:rgb(255 255 255 / 25%)}.dark .ant-calendar-decade-panel-header{border-bottom:1px solid var(--dark-color-surface-200);background-color:var(--dark-color-background)}.dark .ant-checkbox-inner{background-color:rgba(0,135,113,.3);border-color:rgba(0,135,113,.3)}.dark .ant-checkbox-checked .ant-checkbox-inner{background-color:var(--color-primary-100);border-color:var(--color-primary-100)}.dark .ant-calendar-input{background-color:var(--dark-color-background);color:var(--dark-color-text-primary)}.dark .ant-calendar-input::placeholder{color:rgba(255,255,255,.25)}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child),.ant-input-number-handler,.ant-input-number-handler-wrap{border-radius:0}.ant-input-number{overflow:clip}.ant-modal-body,.ant-collapse-content>.ant-collapse-content-box{overflow-x:auto}.ant-calendar-year-panel-year:hover,.ant-calendar-decade-panel-decade:hover,.ant-calendar-month-panel-month:hover,.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover,.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),.ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled),.ant-table-tbody>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-calendar-time-picker-select li:hover{background-color:rgb(232 244 242)}.dark .ant-dropdown-menu-submenu-title:hover,.dark .ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),.dark .ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled){background-color:var(--dark-color-surface-600)}.ant-select-dropdown,.ant-popover-inner{overflow-x:hidden}.ant-popover-inner-content{max-height:400px;overflow-y:auto}.qr-cv{width:100%;height:100%;opacity:.8;transition:all .3s}.qr-cv:hover{opacity:1}.qr-cv:active{transform:scale(.98);transition:all .1s}.dark .qr-cv{filter:invert(1)}.qr-bg{background-color:#ffffff;display:flex;justify-content:center;align-content:center;padding:.8rem;border-radius:1rem;border:solid 1px #e8e8e8}.dark .qr-bg{background-color:var(--dark-color-surface-700);border-color:var(--dark-color-surface-300)}.ant-input-group-addon:not(:first-child):not(:last-child){border-radius:0 1rem 1rem 0}.ant-tag{margin-right:6px}b,strong{font-weight:500}.ant-collapse>.ant-collapse-item>.ant-collapse-header{padding:10px 16px 10px 40px}.dark .ant-message-notice-content{background-color:var(--dark-color-surface-200);border:1px solid var(--dark-color-surface-300);color:var(--dark-color-text-primary)}.ant-btn-danger{background-color:var(--dark-color-btn-danger);border-color:var(--dark-color-btn-danger-border)}.ant-btn-danger:focus,.ant-btn-danger:hover{background-color:var(--dark-color-btn-danger-hover);border-color:var(--dark-color-btn-danger-hover)}.dark .ant-alert-close-icon .anticon-close:hover{color:rgb(255 255 255)}.ant-empty-small{margin:4px 0;background-color:transparent!important}.ant-empty-small .ant-empty-image{height:20px}.ant-menu-theme-switch,.ant-menu-theme-switch:hover{background-color:transparent!important;cursor:default!important}.dark .ant-tooltip-inner,.dark .ant-tooltip-arrow:before{background-color:var(--dark-color-tooltip)}.ant-select-sm .ant-select-selection__rendered{margin-left:10px}.ant-collapse{-moz-animation:collfade .3s ease;-webkit-animation:.3s collfade .3s ease;animation:collfade .3s ease}@-webkit-keyframes collfade{0%{transform:scaleY(.8);transform-origin:0 0%;opacity:0}100%{transform:scaleY(1);transform-origin:0 0%;opacity:1}}@keyframes collfade{0%{transform:scaleY(.8);transform-origin:0 0%;opacity:0}100%{transform:scaleY(1);transform-origin:0 0%;opacity:1}}.ant-table-tbody>tr>td{border-color:#f0f0f0}.ant-table-row-expand-icon{vertical-align:middle;margin-inline-end:8px;position:relative;transform:scale(.9411764705882353)}.ant-table-row-collapsed::before{transform:rotate(-180deg);top:7px;inset-inline-end:3px;inset-inline-start:3px;height:1px;position:absolute;background:currentcolor;transition:transform .3s ease-out;content:\"\"}.ant-table-row-collapsed::after{transform:rotate(0deg);top:3px;bottom:3px;inset-inline-start:7px;width:1px;position:absolute;background:currentcolor;transition:transform .3s ease-out;content:\"\"}.ant-table-row-expanded::before{top:7px;inset-inline-end:3px;inset-inline-start:3px;height:1px;position:absolute;background:currentcolor;transition:transform .3s ease-out;content:\"\"}.ant-table-row-expanded::after{top:3px;bottom:3px;inset-inline-start:7px;width:1px;transform:rotate(90deg);position:absolute;background:currentcolor;transition:transform .3s ease-out;content:\"\"}.ant-menu-item:active,.ant-menu-submenu-title:active{background:transparent}.ant-menu-theme-switch.ant-menu-item .ant-switch:not(.ant-switch-disabled):active:after,.ant-switch:not(.ant-switch-disabled):active:before{width:16px}.dark .ant-select-disabled .ant-select-selection{background:var(--dark-color-surface-100);border-color:var(--dark-color-surface-200);color:rgba(255,255,255,.25)}"
  },
  {
    "path": "web/assets/element-ui/theme-chalk/display.css",
    "content": "@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}"
  },
  {
    "path": "web/assets/js/axios-init.js",
    "content": "axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\naxios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\naxios.interceptors.request.use(\n    (config) => {\n        if (config.data instanceof FormData) {\n            config.headers['Content-Type'] = 'multipart/form-data';\n        } else {\n            config.data = Qs.stringify(config.data, {\n                arrayFormat: 'repeat',\n            });\n        }\n        return config;\n    },\n    (error) => Promise.reject(error),\n);\n\naxios.interceptors.response.use(\n    (response) => response,\n    (error) => {\n        if (error.response) {\n            const statusCode = error.response.status;\n            // Check the status code\n            if (statusCode === 401) { // Unauthorized\n                return window.location.reload();\n            }\n        }\n        return Promise.reject(error);\n    }\n);\n"
  },
  {
    "path": "web/assets/js/langs.js",
    "content": "const supportLangs = [\n    {\n        name: 'English',\n        value: 'en-US',\n        icon: '🇺🇸',\n    },\n    {\n        name: 'فارسی',\n        value: 'fa-IR',\n        icon: '🇮🇷',\n    },\n    {\n        name: '汉语',\n        value: 'zh-Hans',\n        icon: '🇨🇳',\n    },\n    {\n        name: 'Русский',\n        value: 'ru-RU',\n        icon: '🇷🇺',\n    },\n    {\n        name: 'Tiếng Việt',\n        value: 'vi-VN',\n        icon: '🇻🇳',\n    },\n    {\n        name: 'Español',\n        value: 'es-ES',\n        icon: '🇪🇸',\n    },\n    {\n        name: 'Indonesian',\n        value: 'id-ID',\n        icon: '🇮🇩',\n    },\n    {\n        name: 'Український',\n        value: 'uk-UA',\n        icon: '🇺🇦',\n    },\n];\n\nfunction getLang() {\n    let lang = getCookie('lang');\n\n    if (!lang) {\n        if (window.navigator) {\n            lang = window.navigator.language || window.navigator.userLanguage;\n\n            if (isSupportLang(lang)) {\n                setCookie('lang', lang, 150);\n            } else {\n                setCookie('lang', 'zh-Hans', 150);\n                window.location.reload();\n            }\n        } else {\n            setCookie('lang', 'zh-Hans', 150);\n            window.location.reload();\n        }\n    }\n\n    return lang;\n}\n\nfunction setLang(lang) {\n    if (!isSupportLang(lang)) {\n        lang = 'zh-Hans';\n    }\n\n    setCookie('lang', lang, 150);\n    window.location.reload();\n}\n\nfunction isSupportLang(lang) {\n    for (l of supportLangs) {\n        if (l.value === lang) {\n            return true;\n        }\n    }\n\n    return false;\n}\n"
  },
  {
    "path": "web/assets/js/model/dbinbound.js",
    "content": "class DBInbound {\n\n    constructor(data) {\n        this.id = 0;\n        this.userId = 0;\n        this.up = 0;\n        this.down = 0;\n        this.total = 0;\n        this.remark = \"\";\n        this.enable = true;\n        this.expiryTime = 0;\n\n        this.listen = \"\";\n        this.port = 0;\n        this.protocol = \"\";\n        this.settings = \"\";\n        this.streamSettings = \"\";\n        this.tag = \"\";\n        this.sniffing = \"\";\n        this.clientStats = \"\"\n        if (data == null) {\n            return;\n        }\n        ObjectUtil.cloneProps(this, data);\n    }\n\n    get totalGB() {\n        return toFixed(this.total / ONE_GB, 2);\n    }\n\n    set totalGB(gb) {\n        this.total = toFixed(gb * ONE_GB, 0);\n    }\n\n    get isVMess() {\n        return this.protocol === Protocols.VMESS;\n    }\n\n    get isVLess() {\n        return this.protocol === Protocols.VLESS;\n    }\n\n    get isTrojan() {\n        return this.protocol === Protocols.TROJAN;\n    }\n\n    get isSS() {\n        return this.protocol === Protocols.SHADOWSOCKS;\n    }\n\n    get isSocks() {\n        return this.protocol === Protocols.SOCKS;\n    }\n\n    get isHTTP() {\n        return this.protocol === Protocols.HTTP;\n    }\n\n    get isWireguard() {\n        return this.protocol === Protocols.WIREGUARD;\n    }\n\n    get address() {\n        let address = location.hostname;\n        if (!ObjectUtil.isEmpty(this.listen) && this.listen !== \"0.0.0.0\") {\n            address = this.listen;\n        }\n        return address;\n    }\n\n    get _expiryTime() {\n        if (this.expiryTime === 0) {\n            return null;\n        }\n        return moment(this.expiryTime);\n    }\n\n    set _expiryTime(t) {\n        if (t == null) {\n            this.expiryTime = 0;\n        } else {\n            this.expiryTime = t.valueOf();\n        }\n    }\n\n    get isExpiry() {\n        return this.expiryTime < new Date().getTime();\n    }\n\n    toInbound() {\n        let settings = {};\n        if (!ObjectUtil.isEmpty(this.settings)) {\n            settings = JSON.parse(this.settings);\n        }\n\n        let streamSettings = {};\n        if (!ObjectUtil.isEmpty(this.streamSettings)) {\n            streamSettings = JSON.parse(this.streamSettings);\n        }\n\n        let sniffing = {};\n        if (!ObjectUtil.isEmpty(this.sniffing)) {\n            sniffing = JSON.parse(this.sniffing);\n        }\n\n        const config = {\n            port: this.port,\n            listen: this.listen,\n            protocol: this.protocol,\n            settings: settings,\n            streamSettings: streamSettings,\n            tag: this.tag,\n            sniffing: sniffing,\n            clientStats: this.clientStats,\n        };\n        return Inbound.fromJson(config);\n    }\n\n    isMultiUser() {\n        switch (this.protocol) {\n            case Protocols.VMESS:\n            case Protocols.VLESS:\n            case Protocols.TROJAN:\n                return true;\n            case Protocols.SHADOWSOCKS:\n                return this.toInbound().isSSMultiUser;\n            default:\n                return false;\n        }\n    }\n\n    hasLink() {\n        switch (this.protocol) {\n            case Protocols.VMESS:\n            case Protocols.VLESS:\n            case Protocols.TROJAN:\n            case Protocols.SHADOWSOCKS:\n                return true;\n            default:\n                return false;\n        }\n    }\n    \n\tgenInboundLinks(remarkModel) {\n        const inbound = this.toInbound();\n        return inbound.genInboundLinks(this.remark,remarkModel);\n    }\n}"
  },
  {
    "path": "web/assets/js/model/outbound.js",
    "content": "const Protocols = {\n    Freedom: \"freedom\",\n    Blackhole: \"blackhole\",\n    DNS: \"dns\",\n    VMess: \"vmess\",\n    VLESS: \"vless\",\n    Trojan: \"trojan\",\n    Shadowsocks: \"shadowsocks\",\n    Socks: \"socks\",\n    HTTP: \"http\",\n    Wireguard: \"wireguard\"\n};\n\nconst SSMethods = {\n    AES_256_GCM: 'aes-256-gcm',\n    AES_128_GCM: 'aes-128-gcm',\n    CHACHA20_POLY1305: 'chacha20-poly1305',\n    CHACHA20_IETF_POLY1305: 'chacha20-ietf-poly1305',\n    XCHACHA20_POLY1305: 'xchacha20-poly1305',\n    XCHACHA20_IETF_POLY1305: 'xchacha20-ietf-poly1305',\n    BLAKE3_AES_128_GCM: '2022-blake3-aes-128-gcm',\n    BLAKE3_AES_256_GCM: '2022-blake3-aes-256-gcm',\n    BLAKE3_CHACHA20_POLY1305: '2022-blake3-chacha20-poly1305',\n};\n\nconst TLS_FLOW_CONTROL = {\n    VISION: \"xtls-rprx-vision\",\n    VISION_UDP443: \"xtls-rprx-vision-udp443\",\n};\n\nconst UTLS_FINGERPRINT = {\n    UTLS_CHROME: \"chrome\",\n    UTLS_FIREFOX: \"firefox\",\n    UTLS_SAFARI: \"safari\",\n    UTLS_IOS: \"ios\",\n    UTLS_android: \"android\",\n    UTLS_EDGE: \"edge\",\n    UTLS_360: \"360\",\n    UTLS_QQ: \"qq\",\n    UTLS_RANDOM: \"random\",\n    UTLS_RANDOMIZED: \"randomized\",\n};\n\nconst ALPN_OPTION = {\n    H3: \"h3\",\n    H2: \"h2\",\n    HTTP1: \"http/1.1\",\n};\n\nconst OutboundDomainStrategies = [\n    \"AsIs\",\n    \"UseIP\",\n    \"UseIPv4\",\n    \"UseIPv6\",\n    \"UseIPv6v4\",\n    \"UseIPv4v6\",\n    \"ForceIP\",\n    \"ForceIPv6v4\",\n    \"ForceIPv6\",\n    \"ForceIPv4v6\",\n    \"ForceIPv4\"\n];\n\nconst WireguardDomainStrategy = [\n    \"ForceIP\",\n    \"ForceIPv4\",\n    \"ForceIPv4v6\",\n    \"ForceIPv6\",\n    \"ForceIPv6v4\"\n];\n\nObject.freeze(Protocols);\nObject.freeze(SSMethods);\nObject.freeze(TLS_FLOW_CONTROL);\nObject.freeze(ALPN_OPTION);\nObject.freeze(OutboundDomainStrategies);\nObject.freeze(WireguardDomainStrategy);\n\nclass CommonClass {\n\n    static toJsonArray(arr) {\n        return arr.map(obj => obj.toJson());\n    }\n\n    static fromJson() {\n        return new CommonClass();\n    }\n\n    toJson() {\n        return this;\n    }\n\n    toString(format=true) {\n        return format ? JSON.stringify(this.toJson(), null, 2) : JSON.stringify(this.toJson());\n    }\n}\n\nclass TcpStreamSettings extends CommonClass {\n    constructor(type='none', host, path) {\n        super();\n        this.type = type;\n        this.host = host;\n        this.path = path;\n    }\n\n    static fromJson(json={}) {\n        let header = json.header;\n        if (!header) return new TcpStreamSettings();\n        if(header.type == 'http' && header.request){\n            return new TcpStreamSettings(\n                header.type,\n                header.request.headers.Host.join(','),\n                header.request.path.join(','),\n            );\n        }\n        return new TcpStreamSettings(header.type,'','');\n    }\n\n    toJson() {\n        return {\n            header: {\n                type: this.type,\n                request: this.type === 'http' ? {\n                    headers: {\n                        Host: ObjectUtil.isEmpty(this.host) ? [] : this.host.split(',')\n                    },\n                    path: ObjectUtil.isEmpty(this.path) ? [\"/\"] : this.path.split(',')\n                } : undefined,\n            }\n        };\n    }\n}\n\nclass KcpStreamSettings extends CommonClass {\n    constructor(mtu=1350, tti=20,\n                uplinkCapacity=5,\n                downlinkCapacity=20,\n                congestion=false,\n                readBufferSize=2,\n                writeBufferSize=2,\n                type='none',\n                seed='',\n                ) {\n        super();\n        this.mtu = mtu;\n        this.tti = tti;\n        this.upCap = uplinkCapacity;\n        this.downCap = downlinkCapacity;\n        this.congestion = congestion;\n        this.readBuffer = readBufferSize;\n        this.writeBuffer = writeBufferSize;\n        this.type = type;\n        this.seed = seed;\n    }\n\n    static fromJson(json={}) {\n        return new KcpStreamSettings(\n            json.mtu,\n            json.tti,\n            json.uplinkCapacity,\n            json.downlinkCapacity,\n            json.congestion,\n            json.readBufferSize,\n            json.writeBufferSize,\n            ObjectUtil.isEmpty(json.header) ? 'none' : json.header.type,\n            json.seed,\n        );\n    }\n\n    toJson() {\n        return {\n            mtu: this.mtu,\n            tti: this.tti,\n            uplinkCapacity: this.upCap,\n            downlinkCapacity: this.downCap,\n            congestion: this.congestion,\n            readBufferSize: this.readBuffer,\n            writeBufferSize: this.writeBuffer,\n            header: {\n                type: this.type,\n            },\n            seed: this.seed,\n        };\n    }\n}\n\nclass WsStreamSettings extends CommonClass {\n    constructor(path='/', host='') {\n        super();\n        this.path = path;\n        this.host = host;\n    }\n\n    static fromJson(json={}) {\n        return new WsStreamSettings(\n            json.path,\n            json.host,\n        );\n    }\n\n    toJson() {\n        return {\n            path: this.path,\n            host: this.host,\n        };\n    }\n}\n\nclass HttpStreamSettings extends CommonClass {\n    constructor(path='/', host='') {\n        super();\n        this.path = path;\n        this.host = host;\n    }\n\n    static fromJson(json={}) {\n        return new HttpStreamSettings(\n            json.path,\n            json.host ? json.host.join(',') : '',\n        );\n    }\n\n    toJson() {\n        return {\n            path: this.path,\n            host: ObjectUtil.isEmpty(this.host) ? [''] : this.host.split(','),\n        }\n    }\n}\n\nclass QuicStreamSettings extends CommonClass {\n    constructor(security='none',\n                key='', type='none') {\n        super();\n        this.security = security;\n        this.key = key;\n        this.type = type;\n    }\n\n    static fromJson(json={}) {\n        return new QuicStreamSettings(\n            json.security,\n            json.key,\n            json.header ? json.header.type : 'none',\n        );\n    }\n\n    toJson() {\n        return {\n            security: this.security,\n            key: this.key,\n            header: {\n                type: this.type,\n            }\n        }\n    }\n}\n\nclass GrpcStreamSettings extends CommonClass {\n    constructor(serviceName=\"\", authority=\"\", multiMode=false) {\n        super();\n        this.serviceName = serviceName;\n        this.authority = authority;\n        this.multiMode = multiMode;\n    }\n\n    static fromJson(json={}) {\n        return new GrpcStreamSettings(json.serviceName, json.authority, json.multiMode );\n    }\n\n    toJson() {\n        return {\n            serviceName: this.serviceName,\n            authority: this.authority,\n            multiMode: this.multiMode\n        }\n    }\n}\n\nclass HttpUpgradeStreamSettings extends CommonClass {\n    constructor(path='/', host='') {\n        super();\n        this.path = path;\n        this.host = host;\n    }\n\n    static fromJson(json={}) {\n        return new HttpUpgradeStreamSettings(\n            json.path,\n            json.host,\n        );\n    }\n\n    toJson() {\n        return {\n            path: this.path,\n            host: this.host,\n        };\n    }\n}\n\nclass SplitHTTPStreamSettings extends CommonClass {\n    constructor(path='/', host='') {\n        super();\n        this.path = path;\n        this.host = host;\n    }\n\n    static fromJson(json={}) {\n        return new SplitHTTPStreamSettings(\n            json.path,\n            json.host,\n        );\n    }\n\n    toJson() {\n        return {\n            path: this.path,\n            host: this.host,\n        };\n    }\n}\n\nclass TlsStreamSettings extends CommonClass {\n    constructor(serverName='',\n                alpn=[],\n                fingerprint = '',\n                allowInsecure = false) {\n        super();\n        this.serverName = serverName;\n        this.alpn = alpn;\n        this.fingerprint = fingerprint;\n        this.allowInsecure = allowInsecure;\n    }\n\n    static fromJson(json={}) {\n        return new TlsStreamSettings(\n            json.serverName,\n            json.alpn,\n            json.fingerprint,\n            json.allowInsecure,\n        );\n    }\n\n    toJson() {\n        return {\n            serverName: this.serverName,\n            alpn: this.alpn,\n            fingerprint: this.fingerprint,\n            allowInsecure: this.allowInsecure,\n        };\n    }\n}\n\nclass RealityStreamSettings extends CommonClass {\n    constructor(publicKey = '', fingerprint = '', serverName = '', shortId = '', spiderX = '/') {\n        super();\n        this.publicKey = publicKey;\n        this.fingerprint = fingerprint;\n        this.serverName = serverName;\n        this.shortId = shortId\n        this.spiderX = spiderX;\n    }\n    static fromJson(json = {}) {\n        return new RealityStreamSettings(\n            json.publicKey,\n            json.fingerprint,\n            json.serverName,\n            json.shortId,\n            json.spiderX,\n        );\n    }\n    toJson() {\n        return {\n            publicKey: this.publicKey,\n            fingerprint: this.fingerprint,\n            serverName: this.serverName,\n            shortId: this.shortId,\n            spiderX: this.spiderX,\n        };\n    }\n};\nclass SockoptStreamSettings extends CommonClass {\n    constructor(dialerProxy = \"\", tcpFastOpen = false, tcpKeepAliveInterval = 0, tcpMptcp = false, tcpNoDelay = false) {\n        super();\n        this.dialerProxy = dialerProxy;\n        this.tcpFastOpen = tcpFastOpen;\n        this.tcpKeepAliveInterval = tcpKeepAliveInterval;\n        this.tcpMptcp = tcpMptcp;\n        this.tcpNoDelay = tcpNoDelay;\n    }\n\n    static fromJson(json = {}) {\n        if (Object.keys(json).length === 0) return undefined;\n        return new SockoptStreamSettings(\n            json.dialerProxy,\n            json.tcpFastOpen,\n            json.tcpKeepAliveInterval,\n            json.tcpMptcp,\n            json.tcpNoDelay,\n        );\n    }\n\n    toJson() {\n        return {\n            dialerProxy: this.dialerProxy,\n            tcpFastOpen: this.tcpFastOpen,\n            tcpKeepAliveInterval: this.tcpKeepAliveInterval,\n            tcpMptcp: this.tcpMptcp,\n            tcpNoDelay: this.tcpNoDelay,\n        };\n    }\n}\n\nclass StreamSettings extends CommonClass {\n    constructor(network='tcp',\n                security='none',\n                tlsSettings=new TlsStreamSettings(),\n                realitySettings = new RealityStreamSettings(),\n                tcpSettings=new TcpStreamSettings(),\n                kcpSettings=new KcpStreamSettings(),\n                wsSettings=new WsStreamSettings(),\n                httpSettings=new HttpStreamSettings(),\n                quicSettings=new QuicStreamSettings(),\n                grpcSettings=new GrpcStreamSettings(),\n                httpupgradeSettings=new HttpUpgradeStreamSettings(),\n                splithttpSettings=new SplitHTTPStreamSettings(),\n                sockopt = undefined,\n                ) {\n        super();\n        this.network = network;\n        this.security = security;\n        this.tls = tlsSettings;\n        this.reality = realitySettings;\n        this.tcp = tcpSettings;\n        this.kcp = kcpSettings;\n        this.ws = wsSettings;\n        this.http = httpSettings;\n        this.quic = quicSettings;\n        this.grpc = grpcSettings;\n        this.httpupgrade = httpupgradeSettings;\n        this.splithttp = splithttpSettings;\n        this.sockopt = sockopt;\n    }\n    \n    get isTls() {\n        return this.security === 'tls';\n    }\n\n    get isReality() {\n        return this.security === \"reality\";\n    }\n\n    get sockoptSwitch() {\n        return this.sockopt != undefined;\n    }\n\n    set sockoptSwitch(value) {\n        this.sockopt = value ? new SockoptStreamSettings() : undefined;\n    }\n\n    static fromJson(json={}) {\n        return new StreamSettings(\n            json.network,\n            json.security,\n            TlsStreamSettings.fromJson(json.tlsSettings),\n            RealityStreamSettings.fromJson(json.realitySettings),\n            TcpStreamSettings.fromJson(json.tcpSettings),\n            KcpStreamSettings.fromJson(json.kcpSettings),\n            WsStreamSettings.fromJson(json.wsSettings),\n            HttpStreamSettings.fromJson(json.httpSettings),\n            QuicStreamSettings.fromJson(json.quicSettings),\n            GrpcStreamSettings.fromJson(json.grpcSettings),\n            HttpUpgradeStreamSettings.fromJson(json.httpupgradeSettings),\n            SplitHTTPStreamSettings.fromJson(json.splithttpSettings),\n            SockoptStreamSettings.fromJson(json.sockopt),\n        );\n    }\n\n    toJson() {\n        const network = this.network;\n        return {\n            network: network,\n            security: this.security,\n            tlsSettings: this.security == 'tls' ? this.tls.toJson() : undefined,\n            realitySettings: this.security == 'reality' ? this.reality.toJson() : undefined,\n            tcpSettings: network === 'tcp' ? this.tcp.toJson() : undefined,\n            kcpSettings: network === 'kcp' ? this.kcp.toJson() : undefined,\n            wsSettings: network === 'ws' ? this.ws.toJson() : undefined,\n            httpSettings: network === 'http' ? this.http.toJson() : undefined,\n            quicSettings: network === 'quic' ? this.quic.toJson() : undefined,\n            grpcSettings: network === 'grpc' ? this.grpc.toJson() : undefined,\n            httpupgradeSettings: network === 'httpupgrade' ? this.httpupgrade.toJson() : undefined,\n            splithttpSettings: network === 'splithttp' ? this.splithttp.toJson() : undefined,\n            sockopt: this.sockopt != undefined ? this.sockopt.toJson() : undefined,\n        };\n    }\n}\n\nclass Mux extends CommonClass {\n    constructor(enabled = false, concurrency = 8, xudpConcurrency = 16, xudpProxyUDP443 = \"reject\") {\n        super();\n        this.enabled = enabled;\n        this.concurrency = concurrency;\n        this.xudpConcurrency = xudpConcurrency;\n        this.xudpProxyUDP443 = xudpProxyUDP443;\n    }\n\n    static fromJson(json = {}) {\n        if (Object.keys(json).length === 0) return undefined;\n        return new Mux(\n            json.enabled,\n            json.concurrency,\n            json.xudpConcurrency,\n            json.xudpProxyUDP443,\n        );\n    }\n\n    toJson() {\n        return {\n            enabled: this.enabled,\n            concurrency: this.concurrency,\n            xudpConcurrency: this.xudpConcurrency,\n            xudpProxyUDP443: this.xudpProxyUDP443,\n        };\n    }\n}\n\nclass Outbound extends CommonClass {\n    constructor(\n        tag='',\n        protocol=Protocols.VMess,\n        settings=null,\n        streamSettings = new StreamSettings(),\n        sendThrough,\n        mux = new Mux(),\n    ) {\n        super();\n        this.tag = tag;\n        this._protocol = protocol;\n        this.settings = settings == null ? Outbound.Settings.getSettings(protocol) : settings;\n        this.stream = streamSettings;\n        this.sendThrough = sendThrough;\n        this.mux = mux;\n    }\n\n    get protocol() {\n        return this._protocol;\n    }\n\n    set protocol(protocol) {\n        this._protocol = protocol;\n        this.settings = Outbound.Settings.getSettings(protocol);\n        this.stream = new StreamSettings();\n    }\n\n    canEnableTls() {\n        if (![Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks].includes(this.protocol)) return false;\n        return [\"tcp\", \"ws\", \"http\", \"quic\", \"grpc\", \"httpupgrade\" , \"splithttp\"].includes(this.stream.network);\n    }\n\n    //this is used for xtls-rprx-vision\n    canEnableTlsFlow() {\n        if ((this.stream.security != 'none') && (this.stream.network === \"tcp\")) {\n            return this.protocol === Protocols.VLESS;\n        }\n        return false;\n    }\n\n    canEnableReality() {\n        if (![Protocols.VLESS, Protocols.Trojan].includes(this.protocol)) return false;\n        return [\"tcp\", \"http\", \"grpc\"].includes(this.stream.network);\n    }\n\n    canEnableStream() {\n        return [Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks].includes(this.protocol);\n    }\n\n    canEnableMux() {\n        return [Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks, Protocols.HTTP, Protocols.Socks].includes(this.protocol);\n    }\n\n    hasVnext() {\n        return [Protocols.VMess, Protocols.VLESS].includes(this.protocol);\n    }\n\n    hasServers() {\n        return [Protocols.Trojan, Protocols.Shadowsocks, Protocols.Socks, Protocols.HTTP].includes(this.protocol);\n    }\n\n    hasAddressPort() {\n        return [\n            Protocols.DNS,\n            Protocols.VMess,\n            Protocols.VLESS,\n            Protocols.Trojan,\n            Protocols.Shadowsocks,\n            Protocols.Socks,\n            Protocols.HTTP\n        ].includes(this.protocol);\n    }\n\n    hasUsername() {\n        return [Protocols.Socks, Protocols.HTTP].includes(this.protocol);\n    }\n\n    static fromJson(json={}) {\n        return new Outbound(\n            json.tag,\n            json.protocol,\n            Outbound.Settings.fromJson(json.protocol, json.settings),\n            StreamSettings.fromJson(json.streamSettings),\n            json.sendThrough,\n            Mux.fromJson(json.mux),\n        )\n    }\n\n    toJson() {\n        var stream;\n        if (this.canEnableStream()) {\n            stream = this.stream.toJson();\n        } else {\n            if (this.stream?.sockopt)\n                stream = { sockopt: this.stream.sockopt.toJson() };\n        }\n        return {\n            tag: this.tag == '' ? undefined : this.tag,\n            protocol: this.protocol,\n            settings: this.settings instanceof CommonClass ? this.settings.toJson() : this.settings,\n            streamSettings: stream,\n            sendThrough: this.sendThrough != \"\" ? this.sendThrough : undefined,\n            mux: this.mux?.enabled ? this.mux : undefined,\n        };\n    }\n\n    static fromLink(link) {\n        data = link.split('://');\n        if(data.length !=2) return null;\n        switch(data[0].toLowerCase()){\n            case Protocols.VMess:\n                return this.fromVmessLink(JSON.parse(Base64.decode(data[1])));\n            case Protocols.VLESS:\n            case Protocols.Trojan:\n            case 'ss':\n                return this.fromParamLink(link);\n            default:\n                return null;\n        }\n    }\n\n    static fromVmessLink(json={}){\n        let stream = new StreamSettings(json.net, json.tls);\n\n        let network = json.net;\n        if (network === 'tcp') {\n            stream.tcp = new TcpStreamSettings(\n                json.type,\n                json.host ?? '',\n                json.path ?? '');\n        } else if (network === 'kcp') {\n            stream.kcp = new KcpStreamSettings();\n            stream.type = json.type;\n            stream.seed = json.path;\n        } else if (network === 'ws') {\n            stream.ws = new WsStreamSettings(json.path,json.host);\n        } else if (network === 'http' || network == 'h2') {\n            stream.network = 'http'\n            stream.http = new HttpStreamSettings(\n                json.path,\n                json.host);\n        } else if (network === 'quic') {\n            stream.quic = new QuicStreamSettings(\n                json.host ? json.host : 'none',\n                json.path,\n                json.type ? json.type : 'none');\n        } else if (network === 'grpc') {\n            stream.grpc = new GrpcStreamSettings(json.path, json.authority, json.type == 'multi');\n        } else if (network === 'httpupgrade') {\n            stream.httpupgrade = new HttpUpgradeStreamSettings(json.path,json.host);\n        } else if (network === 'splithttp') {\n            stream.splithttp = new SplitHTTPStreamSettings(json.path,json.host);\n        }\n\n        if(json.tls && json.tls == 'tls'){\n            stream.tls = new TlsStreamSettings(\n                json.sni,\n                json.alpn ? json.alpn.split(',') : [],\n                json.fp,\n                json.allowInsecure);\n        }\n\n        const port = json.port * 1;\n\n        return new Outbound(json.ps, Protocols.VMess, new Outbound.VmessSettings(json.add, port, json.id), stream);\n    }\n\n    static fromParamLink(link){\n        const url = new URL(link);\n        let type = url.searchParams.get('type') ?? 'tcp';\n        let security = url.searchParams.get('security') ?? 'none';\n        let stream = new StreamSettings(type, security);\n\n        let headerType = url.searchParams.get('headerType') ?? undefined;\n        let host = url.searchParams.get('host') ?? undefined;\n        let path = url.searchParams.get('path') ?? undefined;\n\n        if (type === 'tcp' || type === 'none') {\n            stream.tcp = new TcpStreamSettings(headerType ?? 'none', host, path);\n        } else if (type === 'kcp') {\n            stream.kcp = new KcpStreamSettings();\n            stream.kcp.type = headerType ?? 'none';\n            stream.kcp.seed = path;\n        } else if (type === 'ws') {\n            stream.ws = new WsStreamSettings(path,host);\n        } else if (type === 'http' || type == 'h2') {\n            stream.http = new HttpStreamSettings(path,host);\n        } else if (type === 'quic') {\n            stream.quic = new QuicStreamSettings(\n                url.searchParams.get('quicSecurity') ?? 'none',\n                url.searchParams.get('key') ?? '',\n                headerType ?? 'none');\n            } else if (type === 'grpc') {\n                stream.grpc = new GrpcStreamSettings(\n                    url.searchParams.get('serviceName') ?? '',\n                    url.searchParams.get('authority') ?? '',\n                    url.searchParams.get('mode') == 'multi');\n            } else if (type === 'httpupgrade') {\n            stream.httpupgrade = new HttpUpgradeStreamSettings(path,host);\n        } else if (type === 'splithttp') {\n            stream.splithttp = new SplitHTTPStreamSettings(path,host);\n        }\n\n        if(security == 'tls'){\n            let fp=url.searchParams.get('fp') ?? 'none';\n            let alpn=url.searchParams.get('alpn');\n            let allowInsecure=url.searchParams.get('allowInsecure');\n            let sni=url.searchParams.get('sni') ?? '';\n            stream.tls = new TlsStreamSettings(sni, alpn ? alpn.split(',') : [], fp, allowInsecure == 1);\n        }\n\n        if(security == 'reality'){\n            let pbk=url.searchParams.get('pbk');\n            let fp=url.searchParams.get('fp');\n            let sni=url.searchParams.get('sni') ?? '';\n            let sid=url.searchParams.get('sid') ?? '';\n            let spx=url.searchParams.get('spx') ?? '';\n            stream.reality = new RealityStreamSettings(pbk, fp, sni, sid, spx);\n        }\n\n        const regex = /([^@]+):\\/\\/([^@]+)@(.+):(\\d+)(.*)$/;\n        const match = link.match(regex);\n\n        if (!match) return null;\n        let [, protocol, userData, address, port, ] = match;\n        port *= 1;\n        if(protocol == 'ss') {\n            protocol = 'shadowsocks';\n            userData = atob(userData).split(':');\n        }\n        var settings;\n        switch(protocol){\n            case Protocols.VLESS:\n                settings = new Outbound.VLESSSettings(address, port, userData, url.searchParams.get('flow') ?? '');\n                break;\n            case Protocols.Trojan:\n                settings = new Outbound.TrojanSettings(address, port, userData);\n                break;\n            case Protocols.Shadowsocks:\n                let method = userData.splice(0,1)[0];\n                settings = new Outbound.ShadowsocksSettings(address, port, userData.join(\":\"), method, true);\n                break;\n            default:\n                return null;\n        }\n        let remark = decodeURIComponent(url.hash);\n        // Remove '#' from url.hash\n        remark = remark.length > 0 ? remark.substring(1) : 'out-' + protocol + '-' + port;\n        return new Outbound(remark, protocol, settings, stream);\n    }\n}\n\nOutbound.Settings = class extends CommonClass {\n    constructor(protocol) {\n        super();\n        this.protocol = protocol;\n    }\n\n    static getSettings(protocol) {\n        switch (protocol) {\n            case Protocols.Freedom: return new Outbound.FreedomSettings();\n            case Protocols.Blackhole: return new Outbound.BlackholeSettings();\n            case Protocols.DNS: return new Outbound.DNSSettings();\n            case Protocols.VMess: return new Outbound.VmessSettings();\n            case Protocols.VLESS: return new Outbound.VLESSSettings();\n            case Protocols.Trojan: return new Outbound.TrojanSettings();\n            case Protocols.Shadowsocks: return new Outbound.ShadowsocksSettings();\n            case Protocols.Socks: return new Outbound.SocksSettings();\n            case Protocols.HTTP: return new Outbound.HttpSettings();\n            case Protocols.Wireguard: return new Outbound.WireguardSettings();\n            default: return null;\n        }\n    }\n\n    static fromJson(protocol, json) {\n        switch (protocol) {\n            case Protocols.Freedom: return Outbound.FreedomSettings.fromJson(json);\n            case Protocols.Blackhole: return Outbound.BlackholeSettings.fromJson(json);\n            case Protocols.DNS: return Outbound.DNSSettings.fromJson(json);\n            case Protocols.VMess: return Outbound.VmessSettings.fromJson(json);\n            case Protocols.VLESS: return Outbound.VLESSSettings.fromJson(json);\n            case Protocols.Trojan: return Outbound.TrojanSettings.fromJson(json);\n            case Protocols.Shadowsocks: return Outbound.ShadowsocksSettings.fromJson(json);\n            case Protocols.Socks: return Outbound.SocksSettings.fromJson(json);\n            case Protocols.HTTP: return Outbound.HttpSettings.fromJson(json);\n            case Protocols.Wireguard: return Outbound.WireguardSettings.fromJson(json);\n            default: return null;\n        }\n    }\n\n    toJson() {\n        return {};\n    }\n};\nOutbound.FreedomSettings = class extends CommonClass {\n    constructor(domainStrategy='', fragment={}) {\n        super();\n        this.domainStrategy = domainStrategy;\n        this.fragment = fragment;\n    }\n\n    static fromJson(json={}) {\n        return new Outbound.FreedomSettings(\n            json.domainStrategy,\n            json.fragment ? Outbound.FreedomSettings.Fragment.fromJson(json.fragment) : undefined,\n        );\n    }\n\n    toJson() {\n        return {\n            domainStrategy: ObjectUtil.isEmpty(this.domainStrategy) ? undefined : this.domainStrategy,\n            fragment: Object.keys(this.fragment).length === 0 ? undefined : this.fragment,\n        };\n    }\n};\nOutbound.FreedomSettings.Fragment = class extends CommonClass {\n    constructor(packets='1-3',length='',interval=''){\n        super();\n        this.packets = packets;\n        this.length = length;\n        this.interval = interval;\n    }\n\n    static fromJson(json={}) {\n        return new Outbound.FreedomSettings.Fragment(\n            json.packets,\n            json.length,\n            json.interval,\n        );\n    }\n};\nOutbound.BlackholeSettings = class extends CommonClass {\n    constructor(type) {\n        super();\n        this.type = type;\n    }\n\n    static fromJson(json={}) {\n        return new Outbound.BlackholeSettings(\n            json.response ? json.response.type : undefined,\n        );\n    }\n\n    toJson() {\n        return {\n            response: ObjectUtil.isEmpty(this.type) ? undefined : {type: this.type},\n        };\n    }\n};\nOutbound.DNSSettings = class extends CommonClass {\n    constructor(network='udp', address='1.1.1.1', port=53) {\n        super();\n        this.network = network;\n        this.address = address;\n        this.port = port;\n    }\n\n    static fromJson(json={}){\n        return new Outbound.DNSSettings(\n            json.network,\n            json.address,\n            json.port,\n        );\n    }\n};\nOutbound.VmessSettings = class extends CommonClass {\n    constructor(address, port, id) {\n        super();\n        this.address = address;\n        this.port = port;\n        this.id = id;\n    }\n\n    static fromJson(json={}) {\n        if(ObjectUtil.isArrEmpty(json.vnext)) return new Outbound.VmessSettings();\n        return new Outbound.VmessSettings(\n            json.vnext[0].address,\n            json.vnext[0].port,\n            json.vnext[0].users[0].id,\n        );\n    }\n\n    toJson() {\n        return {\n            vnext: [{\n                address: this.address,\n                port: this.port,\n                users: [{id: this.id}],\n            }],\n        };\n    }\n};\nOutbound.VLESSSettings = class extends CommonClass {\n    constructor(address, port, id, flow, encryption='none') {\n        super();\n        this.address = address;\n        this.port = port;\n        this.id = id;\n        this.flow = flow;\n        this.encryption = encryption\n    }\n\n    static fromJson(json={}) {\n        if(ObjectUtil.isArrEmpty(json.vnext)) return new Outbound.VLESSSettings();\n        return new Outbound.VLESSSettings(\n            json.vnext[0].address,\n            json.vnext[0].port,\n            json.vnext[0].users[0].id,\n            json.vnext[0].users[0].flow,\n            json.vnext[0].users[0].encryption,\n        );\n    }\n\n    toJson() {\n        return {\n            vnext: [{\n                address: this.address,\n                port: this.port,\n                users: [{id: this.id, flow: this.flow, encryption: 'none',}],\n            }],\n        };\n    }\n};\nOutbound.TrojanSettings = class extends CommonClass {\n    constructor(address, port, password) {\n        super();\n        this.address = address;\n        this.port = port;\n        this.password = password;\n    }\n\n    static fromJson(json={}) {\n        if(ObjectUtil.isArrEmpty(json.servers)) return new Outbound.TrojanSettings();\n        return new Outbound.TrojanSettings(\n            json.servers[0].address,\n            json.servers[0].port,\n            json.servers[0].password,\n        );\n    }\n\n    toJson() {\n        return {\n            servers: [{\n                address: this.address,\n                port: this.port,\n                password: this.password,\n            }],\n        };\n    }\n};\nOutbound.ShadowsocksSettings = class extends CommonClass {\n    constructor(address, port, password, method, uot, UoTVersion) {\n        super();\n        this.address = address;\n        this.port = port;\n        this.password = password;\n        this.method = method;\n        this.uot = uot;\n        this.UoTVersion = UoTVersion;\n    }\n\n    static fromJson(json={}) {\n        let servers = json.servers;\n        if(ObjectUtil.isArrEmpty(servers)) servers=[{}];\n        return new Outbound.ShadowsocksSettings(\n            servers[0].address,\n            servers[0].port,\n            servers[0].password,\n            servers[0].method,\n            servers[0].uot,\n            servers[0].UoTVersion,\n        );\n    }\n\n    toJson() {\n        return {\n            servers: [{\n                address: this.address,\n                port: this.port,\n                password: this.password,\n                method: this.method,\n                uot: this.uot,\n                UoTVersion: this.UoTVersion,\n            }],\n        };\n    }\n};\n\nOutbound.SocksSettings = class extends CommonClass {\n    constructor(address, port, user, pass) {\n        super();\n        this.address = address;\n        this.port = port;\n        this.user = user;\n        this.pass = pass;\n    }\n\n    static fromJson(json={}) {\n        let servers = json.servers;\n        if(ObjectUtil.isArrEmpty(servers)) servers=[{users: [{}]}];\n        return new Outbound.SocksSettings(\n            servers[0].address,\n            servers[0].port,\n            ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user,\n            ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].pass,\n        );\n    }\n\n    toJson() {\n        return {\n            servers: [{\n                address: this.address,\n                port: this.port,\n                users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}],\n            }],\n        };\n    }\n};\nOutbound.HttpSettings = class extends CommonClass {\n    constructor(address, port, user, pass) {\n        super();\n        this.address = address;\n        this.port = port;\n        this.user = user;\n        this.pass = pass;\n    }\n\n    static fromJson(json={}) {\n        let servers = json.servers;\n        if(ObjectUtil.isArrEmpty(servers)) servers=[{users: [{}]}];\n        return new Outbound.HttpSettings(\n            servers[0].address,\n            servers[0].port,\n            ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user,\n            ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].pass,\n        );\n    }\n\n    toJson() {\n        return {\n            servers: [{\n                address: this.address,\n                port: this.port,\n                users: ObjectUtil.isEmpty(this.user) ? [] : [{user: this.user, pass: this.pass}],\n            }],\n        };\n    }\n};\n\nOutbound.WireguardSettings = class extends CommonClass {\n    constructor(\n            mtu=1420, secretKey='',\n            address=[''], workers=2, domainStrategy='', reserved='',\n            peers=[new Outbound.WireguardSettings.Peer()], kernelMode=false) {\n        super();\n        this.mtu = mtu;\n        this.secretKey = secretKey;\n        this.pubKey = secretKey.length>0 ? Wireguard.generateKeypair(secretKey).publicKey : '';\n        this.address = address instanceof Array ? address.join(',') : address;\n        this.workers = workers;\n        this.domainStrategy = domainStrategy;\n        this.reserved = reserved instanceof Array ? reserved.join(',') : reserved;\n        this.peers = peers;\n        this.kernelMode = kernelMode;\n    }\n\n    addPeer() {\n        this.peers.push(new Outbound.WireguardSettings.Peer());\n    }\n\n    delPeer(index) {\n        this.peers.splice(index, 1);\n    }\n\n    static fromJson(json={}){\n        return new Outbound.WireguardSettings(\n            json.mtu,\n            json.secretKey,\n            json.address,\n            json.workers,\n            json.domainStrategy,\n            json.reserved,\n            json.peers.map(peer => Outbound.WireguardSettings.Peer.fromJson(peer)),\n            json.kernelMode,\n        );\n    }\n\n    toJson() {\n        return {\n            mtu: this.mtu?? undefined,\n            secretKey: this.secretKey,\n            address: this.address ? this.address.split(\",\") : [],\n            workers: this.workers?? undefined,\n            domainStrategy: WireguardDomainStrategy.includes(this.domainStrategy) ? this.domainStrategy : undefined,\n            reserved: this.reserved ? this.reserved.split(\",\").map(Number) : undefined,\n            peers: Outbound.WireguardSettings.Peer.toJsonArray(this.peers),\n            kernelMode: this.kernelMode,\n        };\n    }\n};\n\nOutbound.WireguardSettings.Peer = class extends CommonClass {\n    constructor(publicKey='', psk='', allowedIPs=['0.0.0.0/0','::/0'], endpoint='', keepAlive=0) {\n        super();\n        this.publicKey = publicKey;\n        this.psk = psk;\n        this.allowedIPs = allowedIPs;\n        this.endpoint = endpoint;\n        this.keepAlive = keepAlive;\n    }\n\n    static fromJson(json={}){\n        return new Outbound.WireguardSettings.Peer(\n            json.publicKey,\n            json.preSharedKey,\n            json.allowedIPs,\n            json.endpoint,\n            json.keepAlive\n        );\n    }\n\n    toJson() {\n        return {\n            publicKey: this.publicKey,\n            preSharedKey: this.psk.length>0 ? this.psk : undefined,\n            allowedIPs: this.allowedIPs ? this.allowedIPs : undefined,\n            endpoint: this.endpoint,\n            keepAlive: this.keepAlive?? undefined,\n        };\n    }\n};"
  },
  {
    "path": "web/assets/js/model/setting.js",
    "content": "class AllSetting {\n\n    constructor(data) {\n        this.webListen = \"\";\n        this.webDomain = \"\";\n        this.webPort = 2053;\n        this.webCertFile = \"\";\n        this.webKeyFile = \"\";\n        this.webBasePath = \"/\";\n        this.sessionMaxAge = \"\";\n        this.pageSize = 50;\n        this.expireDiff = \"\";\n        this.trafficDiff = \"\";\n        this.remarkModel = \"-ieo\";\n        this.datepicker = \"gregorian\";\n        this.tgBotEnable = false;\n        this.tgBotToken = \"\";\n        this.tgBotProxy = \"\";\n        this.tgBotChatId = \"\";\n        this.tgRunTime = \"@daily\";\n        this.tgBotBackup = false;\n        this.tgBotLoginNotify = false;\n        this.tgCpu = \"\";\n        this.tgLang = \"zh-Hans\";\n        this.xrayTemplateConfig = \"\";\n        this.secretEnable = false;\n        this.subEnable = false;\n        this.subListen = \"\";\n        this.subPort = \"2096\";\n        this.subPath = \"/sub/\";\n        this.subJsonPath = \"/json/\";\n        this.subDomain = \"\";\n        this.subCertFile = \"\";\n        this.subKeyFile = \"\";\n        this.subUpdates = 0;\n        this.subEncrypt = true;\n        this.subShowInfo = false;\n        this.subURI = \"\";\n        this.subJsonURI = \"\";\n        this.subJsonFragment = \"\";\n        this.subJsonMux = \"\";\n        this.subJsonRules = \"\";\n\n        this.timeLocation = \"Asia/Shanghai\";\n\n        if (data == null) {\n            return\n        }\n        ObjectUtil.cloneProps(this, data);\n    }\n\n    equals(other) {\n        return ObjectUtil.equals(this, other);\n    }\n}\n"
  },
  {
    "path": "web/assets/js/model/xray.js",
    "content": "const Protocols = {\n    VMESS: 'vmess',\n    VLESS: 'vless',\n    TROJAN: 'trojan',\n    SHADOWSOCKS: 'shadowsocks',\n    DOKODEMO: 'dokodemo-door',\n    SOCKS: 'socks',\n    HTTP: 'http',\n    WIREGUARD: 'wireguard',\n};\n\nconst SSMethods = {\n    AES_256_GCM: 'aes-256-gcm',\n    AES_128_GCM: 'aes-128-gcm',\n    CHACHA20_POLY1305: 'chacha20-poly1305',\n    CHACHA20_IETF_POLY1305: 'chacha20-ietf-poly1305',\n    XCHACHA20_POLY1305: 'xchacha20-poly1305',\n    XCHACHA20_IETF_POLY1305: 'xchacha20-ietf-poly1305',\n    BLAKE3_AES_128_GCM: '2022-blake3-aes-128-gcm',\n    BLAKE3_AES_256_GCM: '2022-blake3-aes-256-gcm',\n    BLAKE3_CHACHA20_POLY1305: '2022-blake3-chacha20-poly1305',\n};\n\nconst XTLS_FLOW_CONTROL = {\n    ORIGIN: \"xtls-rprx-origin\",\n    DIRECT: \"xtls-rprx-direct\",\n};\n\nconst TLS_FLOW_CONTROL = {\n    VISION: \"xtls-rprx-vision\",\n    VISION_UDP443: \"xtls-rprx-vision-udp443\",\n};\n\nconst TLS_VERSION_OPTION = {\n    TLS10: \"1.0\",\n    TLS11: \"1.1\",\n    TLS12: \"1.2\",\n    TLS13: \"1.3\",\n};\n\nconst TLS_CIPHER_OPTION = {\n    RSA_AES_128_CBC: \"TLS_RSA_WITH_AES_128_CBC_SHA\",\n    RSA_AES_256_CBC: \"TLS_RSA_WITH_AES_256_CBC_SHA\",\n    RSA_AES_128_GCM: \"TLS_RSA_WITH_AES_128_GCM_SHA256\",\n    RSA_AES_256_GCM: \"TLS_RSA_WITH_AES_256_GCM_SHA384\",\n    AES_128_GCM: \"TLS_AES_128_GCM_SHA256\",\n    AES_256_GCM: \"TLS_AES_256_GCM_SHA384\",\n    CHACHA20_POLY1305: \"TLS_CHACHA20_POLY1305_SHA256\",\n    ECDHE_ECDSA_AES_128_CBC: \"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA\",\n    ECDHE_ECDSA_AES_256_CBC: \"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA\",\n    ECDHE_RSA_AES_128_CBC: \"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA\",\n    ECDHE_RSA_AES_256_CBC: \"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA\",\n    ECDHE_ECDSA_AES_128_GCM: \"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\",\n    ECDHE_ECDSA_AES_256_GCM: \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\",\n    ECDHE_RSA_AES_128_GCM: \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\",\n    ECDHE_RSA_AES_256_GCM: \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\",\n    ECDHE_ECDSA_CHACHA20_POLY1305: \"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256\",\n    ECDHE_RSA_CHACHA20_POLY1305: \"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256\",\n};\n\nconst UTLS_FINGERPRINT = {\n    UTLS_CHROME: \"chrome\",\n    UTLS_FIREFOX: \"firefox\",\n    UTLS_SAFARI: \"safari\",\n    UTLS_IOS: \"ios\",\n    UTLS_android: \"android\",\n    UTLS_EDGE: \"edge\",\n    UTLS_360: \"360\",\n    UTLS_QQ: \"qq\",\n    UTLS_RANDOM: \"random\",\n    UTLS_RANDOMIZED: \"randomized\",\n};\n\nconst ALPN_OPTION = {\n    H3: \"h3\",\n    H2: \"h2\",\n    HTTP1: \"http/1.1\",\n};\n\nconst SNIFFING_OPTION = {\n    HTTP:    \"http\",\n    TLS:     \"tls\",\n    QUIC:    \"quic\",\n    FAKEDNS: \"fakedns\"\n};\n\nconst USAGE_OPTION = {\n    ENCIPHERMENT: \"encipherment\",\n    VERIFY: \"verify\",\n    ISSUE: \"issue\",\n};\n\nconst DOMAIN_STRATEGY_OPTION = {\n    AS_IS: \"AsIs\",\n    USE_IP: \"UseIP\",\n    USE_IPV6V4: \"UseIPv6v4\",\n    USE_IPV6: \"UseIPv6\",\n    USE_IPV4V6: \"UseIPv4v6\",\n    USE_IPV4: \"UseIPv4\",\n    FORCE_IP: \"ForceIP\",\n    FORCE_IPV6V4: \"ForceIPv6v4\",\n    FORCE_IPV6: \"ForceIPv6\",\n    FORCE_IPV4V6: \"ForceIPv4v6\",\n    FORCE_IPV4: \"ForceIPv4\",\n};\nconst TCP_CONGESTION_OPTION = {\n    BBR: \"bbr\",\n    CUBIC: \"cubic\",\n    RENO: \"reno\",\n};\n\nObject.freeze(Protocols);\nObject.freeze(SSMethods);\nObject.freeze(XTLS_FLOW_CONTROL);\nObject.freeze(TLS_FLOW_CONTROL);\nObject.freeze(TLS_VERSION_OPTION);\nObject.freeze(TLS_CIPHER_OPTION);\nObject.freeze(UTLS_FINGERPRINT);\nObject.freeze(ALPN_OPTION);\nObject.freeze(SNIFFING_OPTION);\nObject.freeze(USAGE_OPTION);\nObject.freeze(DOMAIN_STRATEGY_OPTION);\nObject.freeze(TCP_CONGESTION_OPTION);\n\nclass XrayCommonClass {\n\n    static toJsonArray(arr) {\n        return arr.map(obj => obj.toJson());\n    }\n\n    static fromJson() {\n        return new XrayCommonClass();\n    }\n\n    toJson() {\n        return this;\n    }\n\n    toString(format=true) {\n        return format ? JSON.stringify(this.toJson(), null, 2) : JSON.stringify(this.toJson());\n    }\n\n    static toHeaders(v2Headers) {\n        let newHeaders = [];\n        if (v2Headers) {\n            Object.keys(v2Headers).forEach(key => {\n                let values = v2Headers[key];\n                if (typeof(values) === 'string') {\n                    newHeaders.push({ name: key, value: values });\n                } else {\n                    for (let i = 0; i < values.length; ++i) {\n                        newHeaders.push({ name: key, value: values[i] });\n                    }\n                }\n            });\n        }\n        return newHeaders;\n    }\n\n    static toV2Headers(headers, arr=true) {\n        let v2Headers = {};\n        for (let i = 0; i < headers.length; ++i) {\n            let name = headers[i].name;\n            let value = headers[i].value;\n            if (ObjectUtil.isEmpty(name) || ObjectUtil.isEmpty(value)) {\n                continue;\n            }\n            if (!(name in v2Headers)) {\n                v2Headers[name] = arr ? [value] : value;\n            } else {\n                if (arr) {\n                    v2Headers[name].push(value);\n                } else {\n                    v2Headers[name] = value;\n                }\n            }\n        }\n        return v2Headers;\n    }\n}\n\nclass TcpStreamSettings extends XrayCommonClass {\n    constructor(acceptProxyProtocol=false,\n                type='none',\n                request=new TcpStreamSettings.TcpRequest(),\n                response=new TcpStreamSettings.TcpResponse(),\n                ) {\n        super();\n        this.acceptProxyProtocol = acceptProxyProtocol;\n        this.type = type;\n        this.request = request;\n        this.response = response;\n    }\n\n    static fromJson(json={}) {\n        let header = json.header;\n        if (!header) {\n            header = {};\n        }\n        return new TcpStreamSettings(json.acceptProxyProtocol,\n            header.type,\n            TcpStreamSettings.TcpRequest.fromJson(header.request),\n            TcpStreamSettings.TcpResponse.fromJson(header.response),\n        );\n    }\n\n    toJson() {\n        return {\n            acceptProxyProtocol: this.acceptProxyProtocol,\n            header: {\n                type: this.type,\n                request: this.type === 'http' ? this.request.toJson() : undefined,\n                response: this.type === 'http' ? this.response.toJson() : undefined,\n            },\n        };\n    }\n}\n\nTcpStreamSettings.TcpRequest = class extends XrayCommonClass {\n    constructor(version='1.1',\n                method='GET',\n                path=['/'],\n                headers=[],\n    ) {\n        super();\n        this.version = version;\n        this.method = method;\n        this.path = path.length === 0 ? ['/'] : path;\n        this.headers = headers;\n    }\n\n    addPath(path) {\n        this.path.push(path);\n    }\n\n    removePath(index) {\n        this.path.splice(index, 1);\n    }\n\n    addHeader(name, value) {\n        this.headers.push({ name: name, value: value });\n    }\n\n    removeHeader(index) {\n        this.headers.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new TcpStreamSettings.TcpRequest(\n            json.version,\n            json.method,\n            json.path,\n            XrayCommonClass.toHeaders(json.headers),\n        );\n    }\n\n    toJson() {\n        return {\n            version: this.version,\n            method: this.method,\n            path: ObjectUtil.clone(this.path),\n            headers: XrayCommonClass.toV2Headers(this.headers),\n        };\n    }\n};\n\nTcpStreamSettings.TcpResponse = class extends XrayCommonClass {\n    constructor(version='1.1',\n                status='200',\n                reason='OK',\n                headers=[],\n    ) {\n        super();\n        this.version = version;\n        this.status = status;\n        this.reason = reason;\n        this.headers = headers;\n    }\n\n    addHeader(name, value) {\n        this.headers.push({ name: name, value: value });\n    }\n\n    removeHeader(index) {\n        this.headers.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new TcpStreamSettings.TcpResponse(\n            json.version,\n            json.status,\n            json.reason,\n            XrayCommonClass.toHeaders(json.headers),\n        );\n    }\n\n    toJson() {\n        return {\n            version: this.version,\n            status: this.status,\n            reason: this.reason,\n            headers: XrayCommonClass.toV2Headers(this.headers),\n        };\n    }\n};\n\nclass KcpStreamSettings extends XrayCommonClass {\n    constructor(mtu=1350, tti=20,\n                uplinkCapacity=5,\n                downlinkCapacity=20,\n                congestion=false,\n                readBufferSize=2,\n                writeBufferSize=2,\n                type='none',\n                seed=RandomUtil.randomSeq(10),\n                ) {\n        super();\n        this.mtu = mtu;\n        this.tti = tti;\n        this.upCap = uplinkCapacity;\n        this.downCap = downlinkCapacity;\n        this.congestion = congestion;\n        this.readBuffer = readBufferSize;\n        this.writeBuffer = writeBufferSize;\n        this.type = type;\n        this.seed = seed;\n    }\n\n    static fromJson(json={}) {\n        return new KcpStreamSettings(\n            json.mtu,\n            json.tti,\n            json.uplinkCapacity,\n            json.downlinkCapacity,\n            json.congestion,\n            json.readBufferSize,\n            json.writeBufferSize,\n            ObjectUtil.isEmpty(json.header) ? 'none' : json.header.type,\n            json.seed,\n        );\n    }\n\n    toJson() {\n        return {\n            mtu: this.mtu,\n            tti: this.tti,\n            uplinkCapacity: this.upCap,\n            downlinkCapacity: this.downCap,\n            congestion: this.congestion,\n            readBufferSize: this.readBuffer,\n            writeBufferSize: this.writeBuffer,\n            header: {\n                type: this.type,\n            },\n            seed: this.seed,\n        };\n    }\n}\n\nclass WsStreamSettings extends XrayCommonClass {\n    constructor(acceptProxyProtocol=false, path='/', host='', headers=[]) {\n        super();\n        this.acceptProxyProtocol = acceptProxyProtocol;\n        this.path = path;\n        this.host = host;\n        this.headers = headers;\n    }\n\n    addHeader(name, value) {\n        this.headers.push({ name: name, value: value });\n    }\n\n    removeHeader(index) {\n        this.headers.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new WsStreamSettings(\n            json.acceptProxyProtocol,\n            json.path,\n            json.host,\n            XrayCommonClass.toHeaders(json.headers),\n        );\n    }\n\n    toJson() {\n        return {\n            acceptProxyProtocol: this.acceptProxyProtocol,\n            path: this.path,\n            host: this.host,\n            headers: XrayCommonClass.toV2Headers(this.headers, false),\n        };\n    }\n}\n\nclass HttpStreamSettings extends XrayCommonClass {\n    constructor(\n        path='/',\n        host=[''],\n        ) {\n        super();\n        this.path = path;\n        this.host = host.length === 0 ? [''] : host;\n    }\n\n    addHost(host) {\n        this.host.push(host);\n    }\n\n    removeHost(index) {\n        this.host.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new HttpStreamSettings(json.path, json.host);\n    }\n\n    toJson() {\n        let host = [];\n        for (let i = 0; i < this.host.length; ++i) {\n            if (!ObjectUtil.isEmpty(this.host[i])) {\n                host.push(this.host[i]);\n            }\n        }\n        return {\n            path: this.path,\n            host: host,\n        }\n    }\n}\n\nclass QuicStreamSettings extends XrayCommonClass {\n    constructor(security='none',\n                key=RandomUtil.randomSeq(10), type='none') {\n        super();\n        this.security = security;\n        this.key = key;\n        this.type = type;\n    }\n\n    static fromJson(json={}) {\n        return new QuicStreamSettings(\n            json.security,\n            json.key,\n            json.header ? json.header.type : 'none',\n        );\n    }\n\n    toJson() {\n        return {\n            security: this.security,\n            key: this.key,\n            header: {\n                type: this.type,\n            }\n        }\n    }\n}\n\nclass GrpcStreamSettings extends XrayCommonClass {\n    constructor(\n        serviceName=\"\",\n        authority=\"\",\n        multiMode=false,\n        ) {\n        super();\n        this.serviceName = serviceName;\n        this.authority = authority;\n        this.multiMode = multiMode;\n    }\n\n    static fromJson(json={}) {\n        return new GrpcStreamSettings(\n            json.serviceName,\n            json.authority,\n            json.multiMode\n            );\n    }\n\n    toJson() {\n        return {\n            serviceName: this.serviceName,\n            authority: this.authority,\n            multiMode: this.multiMode,\n        }\n    }\n}\n\nclass HTTPUpgradeStreamSettings extends XrayCommonClass {\n    constructor(acceptProxyProtocol=false, path='/', host='', headers=[]) {\n        super();\n        this.acceptProxyProtocol = acceptProxyProtocol;\n        this.path = path;\n        this.host = host;\n        this.headers = headers;\n    }\n\n    addHeader(name, value) {\n        this.headers.push({ name: name, value: value });\n    }\n\n    removeHeader(index) {\n        this.headers.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new HTTPUpgradeStreamSettings(\n            json.acceptProxyProtocol,\n            json.path,\n            json.host,\n            XrayCommonClass.toHeaders(json.headers),\n        );\n    }\n\n    toJson() {\n        return {\n            acceptProxyProtocol: this.acceptProxyProtocol,\n            path: this.path,\n            host: this.host,\n            headers: XrayCommonClass.toV2Headers(this.headers, false),\n        };\n    }\n}\n\nclass SplitHTTPStreamSettings extends XrayCommonClass {\n    constructor(path='/', host='', headers=[] , maxUploadSize= 1000000, maxConcurrentUploads= 10) {\n        super();\n        this.path = path;\n        this.host = host;\n        this.headers = headers;\n        this.maxUploadSize = maxUploadSize;\n        this.maxConcurrentUploads = maxConcurrentUploads;\n    }\n\n    addHeader(name, value) {\n        this.headers.push({ name: name, value: value });\n    }\n\n    removeHeader(index) {\n        this.headers.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new SplitHTTPStreamSettings(\n            json.path,\n            json.host,\n            XrayCommonClass.toHeaders(json.headers),\n            json.maxUploadSize,\n            json.maxConcurrentUploads,\n        );\n    }\n\n    toJson() {\n        return {\n            path: this.path,\n            host: this.host,\n            headers: XrayCommonClass.toV2Headers(this.headers, false),\n            maxUploadSize: this.maxUploadSize,\n            maxConcurrentUploads: this.maxConcurrentUploads,\n        };\n    }\n}\n\nclass TlsStreamSettings extends XrayCommonClass {\n    constructor(serverName='',\n                minVersion = TLS_VERSION_OPTION.TLS12,\n                maxVersion = TLS_VERSION_OPTION.TLS13,\n                cipherSuites = '',\n                rejectUnknownSni = false,\n                disableSystemRoot = false,\n                enableSessionResumption = false,\n                certificates=[new TlsStreamSettings.Cert()],\n                alpn=[ALPN_OPTION.H2,ALPN_OPTION.HTTP1],\n                settings=new TlsStreamSettings.Settings()) {\n        super();\n        this.sni = serverName;\n        this.minVersion = minVersion;\n        this.maxVersion = maxVersion;\n        this.cipherSuites = cipherSuites;\n        this.rejectUnknownSni = rejectUnknownSni;\n        this.disableSystemRoot = disableSystemRoot;\n        this.enableSessionResumption = enableSessionResumption;\n        this.certs = certificates;\n        this.alpn = alpn;\n        this.settings = settings;\n    }\n\n    addCert() {\n        this.certs.push(new TlsStreamSettings.Cert());\n    }\n\n    removeCert(index) {\n        this.certs.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        let certs;\n        let settings;\n        if (!ObjectUtil.isEmpty(json.certificates)) {\n            certs = json.certificates.map(cert => TlsStreamSettings.Cert.fromJson(cert));\n        }\n\n\t\tif (!ObjectUtil.isEmpty(json.settings)) {\n            settings = new TlsStreamSettings.Settings(json.settings.allowInsecure , json.settings.fingerprint, json.settings.serverName, json.settings.domains);\n        }\n        return new TlsStreamSettings(\n            json.serverName,\n            json.minVersion,\n            json.maxVersion,\n            json.cipherSuites,\n            json.rejectUnknownSni,\n            json.disableSystemRoot,\n            json.enableSessionResumption,\n            certs,\n            json.alpn,\n            settings,\n        );\n    }\n\n    toJson() {\n        return {\n            serverName: this.sni,\n            minVersion: this.minVersion,\n            maxVersion: this.maxVersion,\n            cipherSuites: this.cipherSuites,\n            rejectUnknownSni: this.rejectUnknownSni,\n            disableSystemRoot: this.disableSystemRoot,\n            enableSessionResumption: this.enableSessionResumption,\n            certificates: TlsStreamSettings.toJsonArray(this.certs),\n            alpn: this.alpn,\n            settings: this.settings,\n        };\n    }\n}\n\nTlsStreamSettings.Cert = class extends XrayCommonClass {\n    constructor(useFile=true, certificateFile='', keyFile='', certificate='', key='', ocspStapling=3600, oneTimeLoading=false, usage=USAGE_OPTION.ENCIPHERMENT) {\n        super();\n        this.useFile = useFile;\n        this.certFile = certificateFile;\n        this.keyFile = keyFile;\n        this.cert = certificate instanceof Array ? certificate.join('\\n') : certificate;\n        this.key = key instanceof Array ? key.join('\\n') : key;\n        this.ocspStapling = ocspStapling;\n        this.oneTimeLoading = oneTimeLoading;\n        this.usage = usage;\n    }\n\n    static fromJson(json={}) {\n        if ('certificateFile' in json && 'keyFile' in json) {\n            return new TlsStreamSettings.Cert(\n                true,\n                json.certificateFile,\n                json.keyFile, '', '',\n                json.ocspStapling,\n                json.oneTimeLoading,\n                json.usage,\n            );\n        } else {\n            return new TlsStreamSettings.Cert(\n                false, '', '',\n                json.certificate.join('\\n'),\n                json.key.join('\\n'),\n                json.ocspStapling,\n                json.oneTimeLoading,\n                json.usage,\n            );\n        }\n    }\n\n    toJson() {\n        if (this.useFile) {\n            return {\n                certificateFile: this.certFile,\n                keyFile: this.keyFile,\n                ocspStapling: this.ocspStapling,\n                oneTimeLoading: this.oneTimeLoading,\n                usage: this.usage,\n            };\n        } else {\n            return {\n                certificate: this.cert.split('\\n'),\n                key: this.key.split('\\n'),\n                ocspStapling: this.ocspStapling,\n                oneTimeLoading: this.oneTimeLoading,\n                usage: this.usage,\n            };\n        }\n    }\n};\n\nTlsStreamSettings.Settings = class extends XrayCommonClass {\n    constructor(allowInsecure = false, fingerprint = '') {\n        super();\n        this.allowInsecure = allowInsecure;\n        this.fingerprint = fingerprint;\n    }\n    static fromJson(json = {}) {\n        return new TlsStreamSettings.Settings(\n            json.allowInsecure,\n            json.fingerprint,\n        );\n    }\n    toJson() {\n        return {\n            allowInsecure: this.allowInsecure,\n            fingerprint: this.fingerprint,\n        };\n    }\n};\n\nclass XtlsStreamSettings extends XrayCommonClass {\n    constructor(serverName='',\n                certificates=[new XtlsStreamSettings.Cert()],\n                alpn=[ALPN_OPTION.H2,ALPN_OPTION.HTTP1],\n                settings=new XtlsStreamSettings.Settings()) {\n        super();\n        this.sni = serverName;\n        this.certs = certificates;\n        this.alpn = alpn;\n        this.settings = settings;\n    }\n\n    addCert() {\n        this.certs.push(new XtlsStreamSettings.Cert());\n    }\n\n    removeCert(index) {\n        this.certs.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        let certs;\n        let settings;\n        if (!ObjectUtil.isEmpty(json.certificates)) {\n            certs = json.certificates.map(cert => XtlsStreamSettings.Cert.fromJson(cert));\n        }\n\n\t\tif (!ObjectUtil.isEmpty(json.settings)) {\n            settings = new XtlsStreamSettings.Settings(json.settings.allowInsecure , json.settings.serverName);\n        }\n        return new XtlsStreamSettings(\n            json.serverName,\n            certs,\n            json.alpn,\n            settings,\n        );\n    }\n\n    toJson() {\n        return {\n            serverName: this.sni,\n            certificates: XtlsStreamSettings.toJsonArray(this.certs),\n            alpn: this.alpn,\n            settings: this.settings,\n        };\n    }\n}\n\nXtlsStreamSettings.Cert = class extends XrayCommonClass {\n    constructor(useFile=true, certificateFile='', keyFile='', certificate='', key='', ocspStapling=3600, oneTimeLoading=false, usage=USAGE_OPTION.ENCIPHERMENT) {\n        super();\n        this.useFile = useFile;\n        this.certFile = certificateFile;\n        this.keyFile = keyFile;\n        this.cert = certificate instanceof Array ? certificate.join('\\n') : certificate;\n        this.key = key instanceof Array ? key.join('\\n') : key;\n        this.ocspStapling = ocspStapling;\n        this.oneTimeLoading = oneTimeLoading;\n        this.usage = usage;\n    }\n\n    static fromJson(json={}) {\n        if ('certificateFile' in json && 'keyFile' in json) {\n            return new XtlsStreamSettings.Cert(\n                true,\n                json.certificateFile,\n                json.keyFile, '', '',\n                json.ocspStapling,\n                json.oneTimeLoading,\n                json.usage,\n            );\n        } else {\n            return new XtlsStreamSettings.Cert(\n                false, '', '',\n                json.certificate.join('\\n'),\n                json.key.join('\\n'),\n                json.ocspStapling,\n                json.oneTimeLoading,\n                json.usage,\n            );\n        }\n    }\n\n    toJson() {\n        if (this.useFile) {\n            return {\n                certificateFile: this.certFile,\n                keyFile: this.keyFile,\n                ocspStapling: this.ocspStapling,\n                oneTimeLoading: this.oneTimeLoading,\n                usage: this.usage,\n            };\n        } else {\n            return {\n                certificate: this.cert.split('\\n'),\n                key: this.key.split('\\n'),\n                ocspStapling: this.ocspStapling,\n                oneTimeLoading: this.oneTimeLoading,\n                usage: this.usage,\n            };\n        }\n    }\n};\n\nXtlsStreamSettings.Settings = class extends XrayCommonClass {\n    constructor(allowInsecure = false) {\n        super();\n        this.allowInsecure = allowInsecure;\n    }\n    static fromJson(json = {}) {\n        return new XtlsStreamSettings.Settings(\n            json.allowInsecure,\n        );\n    }\n    toJson() {\n        return {\n            allowInsecure: this.allowInsecure,\n        };\n    }\n};\n\nclass RealityStreamSettings extends XrayCommonClass {\n    \n    constructor(\n        show = false,xver = 0,\n        dest = 'tesla.com:443',\n        serverNames = 'tesla.com,www.tesla.com',\n        privateKey = '',\n        minClient = '',\n        maxClient = '',\n        maxTimediff = 0,\n        shortIds = RandomUtil.randomShortId(),\n        settings= new RealityStreamSettings.Settings()\n        ){\n        super();\n        this.show = show;\n        this.xver = xver;\n        this.dest = dest;\n        this.serverNames = serverNames instanceof Array ? serverNames.join(\",\") : serverNames;\n        this.privateKey = privateKey;\n        this.minClient = minClient;\n        this.maxClient = maxClient;\n        this.maxTimediff = maxTimediff;\n        this.shortIds = shortIds instanceof Array ? shortIds.join(\",\") : shortIds; \n        this.settings = settings;\n    }\n\n    static fromJson(json = {}) {\n        let settings;\n\t\tif (!ObjectUtil.isEmpty(json.settings)) {\n            settings = new RealityStreamSettings.Settings(json.settings.publicKey , json.settings.fingerprint, json.settings.serverName, json.settings.spiderX);\n        }\n        return new RealityStreamSettings(\n            json.show,\n            json.xver,\n            json.dest,\n            json.serverNames,\n            json.privateKey,\n            json.minClient,\n            json.maxClient,\n            json.maxTimediff,\n            json.shortIds,\n            json.settings,\n        );\n\n    }\n    toJson() {\n        return {\n            show: this.show,\n            xver: this.xver,\n            dest: this.dest,\n            serverNames: this.serverNames.split(\",\"),\n            privateKey: this.privateKey,\n            minClient: this.minClient,\n            maxClient: this.maxClient,\n            maxTimediff: this.maxTimediff,\n            shortIds: this.shortIds.split(\",\"),\n            settings: this.settings,\n        };\n    }\n}\n\nRealityStreamSettings.Settings = class extends XrayCommonClass {\n    constructor(publicKey = '', fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, serverName = '', spiderX= '/') {\n        super();\n        this.publicKey = publicKey;\n        this.fingerprint = fingerprint;\n        this.serverName = serverName;\n        this.spiderX = spiderX;\n    }\n    static fromJson(json = {}) {\n        return new RealityStreamSettings.Settings(\n            json.publicKey,\n            json.fingerprint,\n            json.serverName,\n            json.spiderX,\n        );\n    }\n    toJson() {\n        return {\n            publicKey: this.publicKey,\n            fingerprint: this.fingerprint,\n            serverName: this.serverName,\n            spiderX: this.spiderX,\n        };\n    }\n};\n\nclass SockoptStreamSettings extends XrayCommonClass {\n    constructor(\n        acceptProxyProtocol = false,\n        tcpFastOpen = false,\n        mark = 0,\n        tproxy=\"off\",\n        tcpMptcp = false,\n        tcpNoDelay = false,\n        domainStrategy = DOMAIN_STRATEGY_OPTION.USE_IP,\n        tcpMaxSeg = 1440,\n        dialerProxy = \"\",\n        tcpKeepAliveInterval = 0,   \n        tcpKeepAliveIdle = 300,\n        tcpUserTimeout = 10000,\n        tcpcongestion = TCP_CONGESTION_OPTION.BBR,\n        V6Only = false,\n        tcpWindowClamp = 600,\n        interfaceName = \"\",\n    ) {\n        super();\n        this.acceptProxyProtocol = acceptProxyProtocol;\n        this.tcpFastOpen = tcpFastOpen;\n        this.mark = mark;\n        this.tproxy = tproxy;\n        this.tcpMptcp = tcpMptcp;\n        this.tcpNoDelay = tcpNoDelay;\n        this.domainStrategy = domainStrategy;\n        this.tcpMaxSeg = tcpMaxSeg;\n        this.dialerProxy = dialerProxy;\n        this.tcpKeepAliveInterval = tcpKeepAliveInterval;\n        this.tcpKeepAliveIdle = tcpKeepAliveIdle;\n        this.tcpUserTimeout = tcpUserTimeout;\n        this.tcpcongestion = tcpcongestion;\n        this.V6Only = V6Only;\n        this.tcpWindowClamp = tcpWindowClamp;\n        this.interfaceName = interfaceName;\n    }\n    \n    static fromJson(json = {}) {\n        if (Object.keys(json).length === 0) return undefined;\n        return new SockoptStreamSettings(\n            json.acceptProxyProtocol,\n            json.tcpFastOpen,\n            json.mark,\n            json.tproxy,\n            json.tcpMptcp,\n            json.tcpNoDelay,\n            json.domainStrategy,\n            json.tcpMaxSeg,\n            json.dialerProxy,\n            json.tcpKeepAliveInterval,\n            json.tcpKeepAliveIdle,\n            json.tcpUserTimeout,\n            json.tcpcongestion,\n            json.V6Only,\n            json.tcpWindowClamp,\n            json.interface,\n        );\n    }\n\n    toJson() {\n        return {\n            acceptProxyProtocol: this.acceptProxyProtocol,\n            tcpFastOpen: this.tcpFastOpen,\n            mark: this.mark,\n            tproxy: this.tproxy,\n            tcpMptcp: this.tcpMptcp,\n            tcpNoDelay: this.tcpNoDelay,\n            domainStrategy: this.domainStrategy,\n            tcpMaxSeg: this.tcpMaxSeg,\n            dialerProxy: this.dialerProxy,\n            tcpKeepAliveInterval: this.tcpKeepAliveInterval,\n            tcpKeepAliveIdle: this.tcpKeepAliveIdle,\n            tcpUserTimeout: this.tcpUserTimeout,\n            tcpcongestion: this.tcpcongestion,\n            V6Only: this.V6Only,\n            tcpWindowClamp: this.tcpWindowClamp,\n            interface: this.interfaceName,\n        };\n    }\n}\n\nclass StreamSettings extends XrayCommonClass {\n    constructor(network='tcp',\n        security='none',\n        externalProxy = [],\n        tlsSettings=new TlsStreamSettings(),\n        xtlsSettings=new XtlsStreamSettings(),\n        realitySettings = new RealityStreamSettings(),\n        tcpSettings=new TcpStreamSettings(),\n        kcpSettings=new KcpStreamSettings(),\n        wsSettings=new WsStreamSettings(),\n        httpSettings=new HttpStreamSettings(),\n        quicSettings=new QuicStreamSettings(),\n        grpcSettings=new GrpcStreamSettings(),\n        httpupgradeSettings=new HTTPUpgradeStreamSettings(),\n        splithttpSettings=new SplitHTTPStreamSettings(),\n        sockopt = undefined,\n        ) {\n        super();\n        this.network = network;\n        this.security = security;\n        this.externalProxy = externalProxy;\n        this.tls = tlsSettings;\n        this.xtls = xtlsSettings;\n        this.reality = realitySettings;\n        this.tcp = tcpSettings;\n        this.kcp = kcpSettings;\n        this.ws = wsSettings;\n        this.http = httpSettings;\n        this.quic = quicSettings;\n        this.grpc = grpcSettings;\n        this.httpupgrade = httpupgradeSettings;\n        this.splithttp = splithttpSettings;\n        this.sockopt = sockopt;\n    }\n\n    get isTls() {\n        return this.security === \"tls\";\n    }\n\n    set isTls(isTls) {\n        if (isTls) {\n            this.security = 'tls';\n        } else {\n            this.security = 'none';\n        }\n    }\n\n    get isXtls() {\n        return this.security === \"xtls\";\n    }\n\n    set isXtls(isXtls) {\n        if (isXtls) {\n            this.security = 'xtls';\n        } else {\n            this.security = 'none';\n        }\n    }\n\n    //for Reality\n    get isReality() {\n        return this.security === \"reality\";\n    }\n\n    set isReality(isReality) {\n        if (isReality) {\n            this.security = 'reality';\n        } else {\n            this.security = 'none';\n        }\n    }\n\n    get sockoptSwitch() {\n        return this.sockopt != undefined;\n    }\n\n    set sockoptSwitch(value) {\n        this.sockopt = value ? new SockoptStreamSettings() : undefined;\n    }\n\n    static fromJson(json={}) {\n        return new StreamSettings(\n            json.network,\n            json.security,\n            json.externalProxy,\n            TlsStreamSettings.fromJson(json.tlsSettings),\n            XtlsStreamSettings.fromJson(json.xtlsSettings),\n            RealityStreamSettings.fromJson(json.realitySettings),\n            TcpStreamSettings.fromJson(json.tcpSettings),\n            KcpStreamSettings.fromJson(json.kcpSettings),\n            WsStreamSettings.fromJson(json.wsSettings),\n            HttpStreamSettings.fromJson(json.httpSettings),\n            QuicStreamSettings.fromJson(json.quicSettings),\n            GrpcStreamSettings.fromJson(json.grpcSettings),\n            HTTPUpgradeStreamSettings.fromJson(json.httpupgradeSettings),\n            SplitHTTPStreamSettings.fromJson(json.splithttpSettings),\n            SockoptStreamSettings.fromJson(json.sockopt),\n        );\n    }\n\n    toJson() {\n        const network = this.network;\n        return {\n            network: network,\n            security: this.security,\n            externalProxy: this.externalProxy,\n            tlsSettings: this.isTls ? this.tls.toJson() : undefined,\n            xtlsSettings: this.isXtls ? this.xtls.toJson() : undefined,\n            realitySettings: this.isReality ? this.reality.toJson() : undefined,\n            tcpSettings: network === 'tcp' ? this.tcp.toJson() : undefined,\n            kcpSettings: network === 'kcp' ? this.kcp.toJson() : undefined,\n            wsSettings: network === 'ws' ? this.ws.toJson() : undefined,\n            httpSettings: network === 'http' ? this.http.toJson() : undefined,\n            quicSettings: network === 'quic' ? this.quic.toJson() : undefined,\n            grpcSettings: network === 'grpc' ? this.grpc.toJson() : undefined,\n            httpupgradeSettings: network === 'httpupgrade' ? this.httpupgrade.toJson() : undefined,\n            splithttpSettings: network === 'splithttp' ? this.splithttp.toJson() : undefined,\n            sockopt: this.sockopt != undefined ? this.sockopt.toJson() : undefined,\n        };\n    }\n}\n\nclass Sniffing extends XrayCommonClass {\n    constructor(\n        enabled=true,\n        destOverride=['http', 'tls', 'quic', 'fakedns'],\n        metadataOnly=false,\n        routeOnly=false) {\n        super();\n        this.enabled = enabled;\n        this.destOverride = destOverride;\n        this.metadataOnly = metadataOnly;\n        this.routeOnly = routeOnly;\n    }\n\n    static fromJson(json={}) {\n        let destOverride = ObjectUtil.clone(json.destOverride);\n        if (!ObjectUtil.isEmpty(destOverride) && !ObjectUtil.isArrEmpty(destOverride)) {\n            if (ObjectUtil.isEmpty(destOverride[0])) {\n                destOverride = ['http', 'tls', 'quic', 'fakedns'];\n            }\n        }\n        return new Sniffing(\n            !!json.enabled,\n            destOverride,\n            json.metadataOnly,\n            json.routeOnly,\n        );\n    }\n}\n\nclass Inbound extends XrayCommonClass {\n    constructor(port=RandomUtil.randomIntRange(10000, 60000),\n                listen='',\n                protocol=Protocols.VLESS,\n                settings=null,\n                streamSettings=new StreamSettings(),\n                tag='',\n                sniffing=new Sniffing(),\n                clientStats='',\n                ) {\n        super();\n        this.port = port;\n        this.listen = listen;\n        this._protocol = protocol;\n        this.settings = ObjectUtil.isEmpty(settings) ? Inbound.Settings.getSettings(protocol) : settings;\n        this.stream = streamSettings;\n        this.tag = tag;\n        this.sniffing = sniffing;\n        this.clientStats = clientStats;\n    }\n    getClientStats() {\n        return this.clientStats;\n    }\n\n    get clients() {\n        switch (this.protocol) {\n            case Protocols.VMESS: return this.settings.vmesses;\n            case Protocols.VLESS: return this.settings.vlesses;\n            case Protocols.TROJAN: return this.settings.trojans;\n            case Protocols.SHADOWSOCKS: return this.isSSMultiUser ? this.settings.shadowsockses : null;\n            default: return null;\n        }\n    }\n\n    get protocol() {\n        return this._protocol;\n    }\n\n    set protocol(protocol) {\n        this._protocol = protocol;\n        this.settings = Inbound.Settings.getSettings(protocol);\n        if (protocol === Protocols.TROJAN) {\n            this.tls = false;\n        }\n    }\n\n    get xtls() {\n        return this.stream.security === 'xtls';\n    }\n\n    set xtls(isXtls) {\n        if (isXtls) {\n            this.stream.security = 'xtls';\n        } else {\n            this.stream.security = 'none';\n        }\n    }\n    \n    get network() {\n        return this.stream.network;\n    }\n\n    set network(network) {\n        this.stream.network = network;\n    }\n\n    get isTcp() {\n        return this.network === \"tcp\";\n    }\n\n    get isWs() {\n        return this.network === \"ws\";\n    }\n\n    get isKcp() {\n        return this.network === \"kcp\";\n    }\n\n    get isQuic() {\n        return this.network === \"quic\"\n    }\n\n    get isGrpc() {\n        return this.network === \"grpc\";\n    }\n\n    get isH2() {\n        return this.network === \"http\";\n    }\n\n    get isHttpupgrade() {\n        return this.network === \"httpupgrade\";\n    }\n\n    get isSplithttp() {\n        return this.network === \"splithttp\";\n    }\n\n    // Shadowsocks\n    get method() {\n        switch (this.protocol) {\n            case Protocols.SHADOWSOCKS:\n                return this.settings.method;\n            default:\n                return \"\";\n        }\n    }\n    get isSSMultiUser() {\n        return this.method != SSMethods.BLAKE3_CHACHA20_POLY1305;\n    }\n    get isSS2022(){\n        return this.method.substring(0,4) === \"2022\";\n    }\n\n    get serverName() {\n        if (this.stream.isTls) return this.stream.tls.sni;\n        if (this.stream.isXtls) return this.stream.xtls.sni;\n        if (this.stream.isReality) return this.stream.reality.serverNames;\n        return \"\";\n    }\n\n    getHeader(obj, name) {\n        for (const header of obj.headers) {\n            if (header.name.toLowerCase() === name.toLowerCase()) {\n                return header.value;\n            }\n        }\n        return \"\";\n    }\n\n    get host() {\n        if (this.isTcp) {\n            return this.getHeader(this.stream.tcp.request, 'host');\n        } else if (this.isWs) {\n            return this.stream.ws.host?.length>0 ? this.stream.ws.host : this.getHeader(this.stream.ws, 'host');\n        } else if (this.isH2) {\n            return this.stream.http.host[0];\n        } else if (this.isHttpupgrade) {\n            return this.stream.httpupgrade.host?.length>0 ? this.stream.httpupgrade.host : this.getHeader(this.stream.httpupgrade, 'host');\n        } else if (this.isSplithttp) {\n            return this.stream.splithttp.host?.length>0 ? this.stream.splithttp.host : this.getHeader(this.stream.splithttp, 'host');\n        }\n        return null;\n    }\n\n    get path() {\n        if (this.isTcp) {\n            return this.stream.tcp.request.path[0];\n        } else if (this.isWs) {\n            return this.stream.ws.path;\n        } else if (this.isH2) {\n            return this.stream.http.path;\n        } else if (this.isHttpupgrade) {\n            return this.stream.httpupgrade.path;\n        } else if (this.isSplithttp) {\n            return this.stream.splithttp.path;\n        }\n        return null;\n    }\n\n    get quicSecurity() {\n        return this.stream.quic.security;\n    }\n\n    get quicKey() {\n        return this.stream.quic.key;\n    }\n\n    get quicType() {\n        return this.stream.quic.type;\n    }\n\n    get kcpType() {\n        return this.stream.kcp.type;\n    }\n\n    get kcpSeed() {\n        return this.stream.kcp.seed;\n    }\n\n    get serviceName() {\n        return this.stream.grpc.serviceName;\n    }\n\n    isExpiry(index) {\n        let exp = this.clients[index].expiryTime;\n        return exp > 0 ? exp < new Date().getTime() : false;\n    }\n\n    canEnableTls() {\n        if(![Protocols.VMESS, Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(this.protocol)) return false;\n        return [\"tcp\", \"ws\", \"http\", \"quic\", \"grpc\", \"httpupgrade\" , \"splithttp\"].includes(this.network);\n    }\n\n    //this is used for xtls-rprx-vision\n    canEnableTlsFlow() {\n        if (((this.stream.security === 'tls') || (this.stream.security === 'reality')) && (this.network === \"tcp\")) {\n            return this.protocol === Protocols.VLESS;\n        }\n        return false;\n    }\n\n    canEnableReality() {\n        if(![Protocols.VLESS, Protocols.TROJAN].includes(this.protocol)) return false;\n        return [\"tcp\", \"http\", \"grpc\"].includes(this.network);\n    }\n\n    canEnableXtls() {\n        if(![Protocols.VLESS, Protocols.TROJAN].includes(this.protocol)) return false;\n        return this.network === \"tcp\";\n    }\n\n    canEnableStream() {\n        return [Protocols.VMESS, Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(this.protocol);\n    }\n\n    reset() {\n        this.port = RandomUtil.randomIntRange(10000, 60000);\n        this.listen = '';\n        this.protocol = Protocols.VMESS;\n        this.settings = Inbound.Settings.getSettings(Protocols.VMESS);\n        this.stream = new StreamSettings();\n        this.tag = '';\n        this.sniffing = new Sniffing();\n    }\n\n    genVmessLink(address='', port=this.port, forceTls, remark='', clientId) {\n        if (this.protocol !== Protocols.VMESS) {\n            return '';\n        }\n        const security = forceTls == 'same' ? this.stream.security : forceTls;\n        let obj = {\n            v: '2',\n            ps: remark,\n            add: address,\n            port: port,\n            id: clientId,\n            net: this.stream.network,\n            type: 'none',\n            tls: security,\n        };\n        const network = this.stream.network;\n        if (network === 'tcp') {\n            const tcp = this.stream.tcp;\n            obj.type = tcp.type;\n            if (tcp.type === 'http') {\n                const request = tcp.request;\n                obj.path = request.path.join(',');\n                const host = this.getHeader(request,'host');\n                if (host) obj.host = host;\n            }\n        } else if (network === 'kcp') {\n            const kcp = this.stream.kcp;\n            obj.type = kcp.type;\n            obj.path = kcp.seed;\n        } else if (network === 'ws') {\n            const ws = this.stream.ws;\n            obj.path = ws.path;\n            obj.host = ws.host?.length>0 ? ws.host : this.getHeader(ws, 'host');\n        } else if (network === 'http') {\n            obj.net = 'h2';\n            obj.path = this.stream.http.path;\n            obj.host = this.stream.http.host.join(',');\n        } else if (network === 'quic') {\n            obj.type = this.stream.quic.type;\n            obj.host = this.stream.quic.security;\n            obj.path = this.stream.quic.key;\n        } else if (network === 'grpc') {\n            obj.path = this.stream.grpc.serviceName;\n            obj.authority = this.stream.grpc.authority;\n            if (this.stream.grpc.multiMode){\n                obj.type = 'multi'\n            }\n        } else if (network === 'httpupgrade') {\n            const httpupgrade = this.stream.httpupgrade;\n            obj.path = httpupgrade.path;\n            obj.host = httpupgrade.host?.length>0 ? httpupgrade.host : this.getHeader(httpupgrade, 'host');\n        } else if (network === 'splithttp') {\n            const splithttp = this.stream.splithttp;\n            obj.path = splithttp.path;\n            obj.host = splithttp.host?.length>0 ? splithttp.host : this.getHeader(splithttp, 'host');\n        }\n\n        if (security === 'tls') {\n            if (!ObjectUtil.isEmpty(this.stream.tls.sni)){\n                obj.sni = this.stream.tls.sni;\n            }\n            if (!ObjectUtil.isEmpty(this.stream.tls.settings.fingerprint)){\n                obj.fp = this.stream.tls.settings.fingerprint;\n            }\n            if (this.stream.tls.alpn.length>0){\n                obj.alpn = this.stream.tls.alpn.join(',');\n            }\n            if (this.stream.tls.settings.allowInsecure){\n                obj.allowInsecure = this.stream.tls.settings.allowInsecure;\n            }\n        }\n        \n        return 'vmess://' + base64(JSON.stringify(obj, null, 2));\n    }\n\n    genVLESSLink(address = '', port=this.port, forceTls, remark='', clientId, flow) {\n        const uuid = clientId;\n        const type = this.stream.network;\n        const security = forceTls == 'same' ? this.stream.security : forceTls;\n        const params = new Map();\n        params.set(\"type\", this.stream.network);\n        switch (type) {\n            case \"tcp\":\n                const tcp = this.stream.tcp;\n                if (tcp.type === 'http') {\n                    const request = tcp.request;\n                    params.set(\"path\", request.path.join(','));\n                    const index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');\n                    if (index >= 0) {\n                        const host = request.headers[index].value;\n                        params.set(\"host\", host);\n                    }\n                    params.set(\"headerType\", 'http');\n                }\n                break;\n            case \"kcp\":\n                const kcp = this.stream.kcp;\n                params.set(\"headerType\", kcp.type);\n                params.set(\"seed\", kcp.seed);\n                break;\n            case \"ws\":\n                const ws = this.stream.ws;\n                params.set(\"path\", ws.path);\n                params.set(\"host\", ws.host?.length>0 ? ws.host : this.getHeader(ws, 'host'));\n                break;\n            case \"http\":\n                const http = this.stream.http;\n                params.set(\"path\", http.path);\n                params.set(\"host\", http.host);\n                break;\n            case \"quic\":\n                const quic = this.stream.quic;\n                params.set(\"quicSecurity\", quic.security);\n                params.set(\"key\", quic.key);\n                params.set(\"headerType\", quic.type);\n                break;\n            case \"grpc\":\n                const grpc = this.stream.grpc;\n                params.set(\"serviceName\", grpc.serviceName);\n                params.set(\"authority\", grpc.authority);\n                if(grpc.multiMode){\n                    params.set(\"mode\", \"multi\");\n                }\n                break;\n            case \"httpupgrade\":\n                    const httpupgrade = this.stream.httpupgrade;\n                    params.set(\"path\", httpupgrade.path);\n                    params.set(\"host\", httpupgrade.host?.length>0 ? httpupgrade.host : this.getHeader(httpupgrade, 'host'));\n                break;\n            case \"splithttp\":\n                    const splithttp = this.stream.splithttp;\n                    params.set(\"path\", splithttp.path);\n                    params.set(\"host\", splithttp.host?.length>0 ? splithttp.host : this.getHeader(splithttp, 'host'));\n                break;\n        }\n\n        if (security === 'tls') {\n            params.set(\"security\", \"tls\");\n            if (this.stream.isTls){\n                params.set(\"fp\" , this.stream.tls.settings.fingerprint);\n                params.set(\"alpn\", this.stream.tls.alpn);\n                if(this.stream.tls.settings.allowInsecure){\n                    params.set(\"allowInsecure\", \"1\");\n                }\n                if (!ObjectUtil.isEmpty(this.stream.tls.sni)){\n                    params.set(\"sni\", this.stream.tls.sni);\n                }\n                if (type == \"tcp\" && !ObjectUtil.isEmpty(flow)) {\n                    params.set(\"flow\", flow);\n                }\n            }\n        }\n\n        else if (security === 'xtls') {\n            params.set(\"security\", \"xtls\");\n            params.set(\"alpn\", this.stream.xtls.alpn);\n            if(this.stream.xtls.settings.allowInsecure){\n                params.set(\"allowInsecure\", \"1\");\n            }\n            if (!ObjectUtil.isEmpty(this.stream.xtls.sni)){\n                params.set(\"sni\", this.stream.xtls.sni);\n\t\t\t}\n            params.set(\"flow\", flow);\n        }\n\n        else if (security === 'reality') {\n            params.set(\"security\", \"reality\");\n            params.set(\"pbk\", this.stream.reality.settings.publicKey);\n            params.set(\"fp\", this.stream.reality.settings.fingerprint);\n            if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {\n                params.set(\"sni\", this.stream.reality.serverNames.split(\",\")[0]);\n            }\n            if (this.stream.reality.shortIds.length > 0) {\n                params.set(\"sid\", this.stream.reality.shortIds.split(\",\")[0]);\n            }\n            if (!ObjectUtil.isEmpty(this.stream.reality.settings.spiderX)) {\n                params.set(\"spx\", this.stream.reality.settings.spiderX);\n            }\n            if (type == 'tcp' && !ObjectUtil.isEmpty(flow)) {\n                params.set(\"flow\", flow);\n            }\n        }\n\n        else {\n            params.set(\"security\", \"none\");\n        }\n\n        const link = `vless://${uuid}@${address}:${port}`;\n        const url = new URL(link);\n        for (const [key, value] of params) {\n            url.searchParams.set(key, value)\n        }\n        url.hash = encodeURIComponent(remark);\n        return url.toString();\n    }\n\n    genSSLink(address = '', port = this.port, forceTls, remark = '', clientPassword) {\n        let settings = this.settings;\n        const type = this.stream.network;\n        const security = forceTls == 'same' ? this.stream.security : forceTls;\n        const params = new Map();\n        params.set(\"type\", this.stream.network);\n        switch (type) {\n            case \"tcp\":\n                const tcp = this.stream.tcp;\n                if (tcp.type === 'http') {\n                    const request = tcp.request;\n                    params.set(\"path\", request.path.join(','));\n                    const index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');\n                    if (index >= 0) {\n                        const host = request.headers[index].value;\n                        params.set(\"host\", host);\n                    }\n                    params.set(\"headerType\", 'http');\n                }\n                break;\n            case \"kcp\":\n                const kcp = this.stream.kcp;\n                params.set(\"headerType\", kcp.type);\n                params.set(\"seed\", kcp.seed);\n                break;\n            case \"ws\":\n                const ws = this.stream.ws;\n                params.set(\"path\", ws.path);\n                params.set(\"host\", ws.host?.length>0 ? ws.host : this.getHeader(ws, 'host'));\n                break;\n            case \"http\":\n                const http = this.stream.http;\n                params.set(\"path\", http.path);\n                params.set(\"host\", http.host);\n                break;\n            case \"quic\":\n                const quic = this.stream.quic;\n                params.set(\"quicSecurity\", quic.security);\n                params.set(\"key\", quic.key);\n                params.set(\"headerType\", quic.type);\n                break;\n            case \"grpc\":\n                const grpc = this.stream.grpc;\n                params.set(\"serviceName\", grpc.serviceName);\n                params.set(\"authority\", grpc.authority);\n                if (grpc.multiMode) {\n                    params.set(\"mode\", \"multi\");\n                }\n                break;\n            case \"httpupgrade\":\n                    const httpupgrade = this.stream.httpupgrade;\n                    params.set(\"path\", httpupgrade.path);\n                    params.set(\"host\", httpupgrade.host?.length>0 ? httpupgrade.host : this.getHeader(httpupgrade, 'host'));\n                break;\n            case \"splithttp\":\n                    const splithttp = this.stream.splithttp;\n                    params.set(\"path\", splithttp.path);\n                    params.set(\"host\", splithttp.host?.length>0 ? splithttp.host : this.getHeader(splithttp, 'host'));\n                break;\n        }\n\n        if (security === 'tls') {\n            params.set(\"security\", \"tls\");\n            if (this.stream.isTls) {\n                params.set(\"fp\", this.stream.tls.settings.fingerprint);\n                params.set(\"alpn\", this.stream.tls.alpn);\n                if (this.stream.tls.settings.allowInsecure) {\n                    params.set(\"allowInsecure\", \"1\");\n                }\n                if (!ObjectUtil.isEmpty(this.stream.tls.sni)) {\n                    params.set(\"sni\", this.stream.tls.sni);\n                }\n            }\n        }\n\n\n        let password = new Array();\n        if (this.isSS2022) password.push(settings.password);\n        if (this.isSSMultiUser) password.push(clientPassword);\n\n        let link = `ss://${safeBase64(settings.method + ':' + password.join(':'))}@${address}:${port}`;\n        const url = new URL(link);\n        for (const [key, value] of params) {\n            url.searchParams.set(key, value)\n        }\n        url.hash = encodeURIComponent(remark);\n        return url.toString();\n    }\n\n    genTrojanLink(address = '', port=this.port, forceTls, remark = '', clientPassword) {\n        const security = forceTls == 'same' ? this.stream.security : forceTls;\n        const type = this.stream.network;\n        const params = new Map();\n        params.set(\"type\", this.stream.network);\n        switch (type) {\n            case \"tcp\":\n                const tcp = this.stream.tcp;\n                if (tcp.type === 'http') {\n                    const request = tcp.request;\n                    params.set(\"path\", request.path.join(','));\n                    const index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');\n                    if (index >= 0) {\n                        const host = request.headers[index].value;\n                        params.set(\"host\", host);\n                    }\n                    params.set(\"headerType\", 'http');\n                }\n                break;\n            case \"kcp\":\n                const kcp = this.stream.kcp;\n                params.set(\"headerType\", kcp.type);\n                params.set(\"seed\", kcp.seed);\n                break;\n            case \"ws\":\n                const ws = this.stream.ws;\n                params.set(\"path\", ws.path);\n                params.set(\"host\", ws.host?.length>0 ? ws.host : this.getHeader(ws, 'host'));\n                break;\n            case \"http\":\n                const http = this.stream.http;\n                params.set(\"path\", http.path);\n                params.set(\"host\", http.host);\n                break;\n            case \"quic\":\n                const quic = this.stream.quic;\n                params.set(\"quicSecurity\", quic.security);\n                params.set(\"key\", quic.key);\n                params.set(\"headerType\", quic.type);\n                break;\n            case \"grpc\":\n                const grpc = this.stream.grpc;\n                params.set(\"serviceName\", grpc.serviceName);\n                params.set(\"authority\", grpc.authority);\n                if(grpc.multiMode){\n                    params.set(\"mode\", \"multi\");\n                }\n                break;\n            case \"httpupgrade\":\n                    const httpupgrade = this.stream.httpupgrade;\n                    params.set(\"path\", httpupgrade.path);\n                    params.set(\"host\", httpupgrade.host?.length>0 ? httpupgrade.host : this.getHeader(httpupgrade, 'host'));\n                break;\n            case \"splithttp\":\n                    const splithttp = this.stream.splithttp;\n                    params.set(\"path\", splithttp.path);\n                    params.set(\"host\", splithttp.host?.length>0 ? splithttp.host : this.getHeader(splithttp, 'host'));\n                break;\n        }\n\n        if (security === 'tls') {\n            params.set(\"security\", \"tls\");\n            if (this.stream.isTls){\n                params.set(\"fp\" , this.stream.tls.settings.fingerprint);\n                params.set(\"alpn\", this.stream.tls.alpn);\n                if(this.stream.tls.settings.allowInsecure){\n                    params.set(\"allowInsecure\", \"1\");\n                }\n                if (!ObjectUtil.isEmpty(this.stream.tls.sni)){\n                    params.set(\"sni\", this.stream.tls.sni);\n                }\n            }\n        }\n\n        else if (security === 'reality') {\n            params.set(\"security\", \"reality\");\n            params.set(\"pbk\", this.stream.reality.settings.publicKey);\n            params.set(\"fp\", this.stream.reality.settings.fingerprint);\n            if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {\n                params.set(\"sni\", this.stream.reality.serverNames.split(\",\")[0]);\n            }\n            if (this.stream.reality.shortIds.length > 0) {\n                params.set(\"sid\", this.stream.reality.shortIds.split(\",\")[0]);\n            }\n            if (!ObjectUtil.isEmpty(this.stream.reality.settings.spiderX)) {\n                params.set(\"spx\", this.stream.reality.settings.spiderX);\n            }\n        }\n\n\t\telse if (security === 'xtls') {\n            params.set(\"security\", \"xtls\");\n            params.set(\"alpn\", this.stream.xtls.alpn);\n            if(this.stream.xtls.settings.allowInsecure){\n                params.set(\"allowInsecure\", \"1\");\n            }\n            if (!ObjectUtil.isEmpty(this.stream.xtls.sni)){\n                params.set(\"sni\", this.stream.xtls.sni);\n\t\t\t}\n            params.set(\"flow\", flow);\n        }\n\n        else {\n            params.set(\"security\", \"none\");\n        }\n\n        const link = `trojan://${clientPassword}@${address}:${port}`;\n        const url = new URL(link);\n        for (const [key, value] of params) {\n            url.searchParams.set(key, value)\n        }\n        url.hash = encodeURIComponent(remark);\n        return url.toString();\n    }\n\n    getWireguardLink(address, port, remark, peerId) {\n        let txt = `[Interface]\\n`\n        txt += `PrivateKey = ${this.settings.peers[peerId].privateKey}\\n`\n        txt += `Address = ${this.settings.peers[peerId].allowedIPs[0]}\\n`\n        txt += `DNS = 1.1.1.1, 1.0.0.1\\n`\n        if (this.settings.mtu) {\n            txt += `MTU = ${this.settings.mtu}\\n`\n        }\n        txt += `\\n# ${remark}\\n`\n        txt += `[Peer]\\n`\n        txt += `PublicKey = ${this.settings.pubKey}\\n`\n        txt += `AllowedIPs = 0.0.0.0/0, ::/0\\n`\n        txt += `Endpoint = ${address}:${port}`\n        if (this.settings.peers[peerId].psk) {\n            txt += `\\nPresharedKey = ${this.settings.peers[peerId].psk}`\n        }\n        if (this.settings.peers[peerId].keepAlive) {\n            txt += `\\nPersistentKeepalive = ${this.settings.peers[peerId].keepAlive}\\n`\n        }\n        return txt;\n    }\n\n    genLink(address='', port=this.port, forceTls='same', remark='', client) {\n        switch (this.protocol) {\n            case Protocols.VMESS:\n                return this.genVmessLink(address, port, forceTls, remark, client.id);\n            case Protocols.VLESS:\n                return this.genVLESSLink(address, port, forceTls, remark, client.id, client.flow);\n            case Protocols.SHADOWSOCKS: \n                return this.genSSLink(address, port, forceTls, remark, this.isSSMultiUser ? client.password : '');\n            case Protocols.TROJAN:\n                return this.genTrojanLink(address, port, forceTls, remark, client.password);\n            default: return '';\n        }\n    }\n\n    genAllLinks(remark='', remarkModel = '-ieo', client){\n        let result = [];\n        let email = client ? client.email : '';\n        let addr = !ObjectUtil.isEmpty(this.listen) && this.listen !== \"0.0.0.0\" ? this.listen : location.hostname;\n        let port = this.port;\n        const separationChar = remarkModel.charAt(0);\n        const orderChars = remarkModel.slice(1);\n        let orders = {\n            'i': remark,\n            'e': email,\n            'o': '',\n          };\n        if(ObjectUtil.isArrEmpty(this.stream.externalProxy)){\n            let r = orderChars.split('').map(char => orders[char]).filter(x => x.length > 0).join(separationChar);\n            result.push({\n                remark: r,\n                link: this.genLink(addr, port, 'same', r, client)\n            });\n        } else {\n            this.stream.externalProxy.forEach((ep) => {\n                orders['o'] = ep.remark;\n                let r = orderChars.split('').map(char => orders[char]).filter(x => x.length > 0).join(separationChar);\n                result.push({\n                    remark: r,\n                    link: this.genLink(ep.dest, ep.port, ep.forceTls, r, client)\n                });\n            });\n        }\n        return result;\n    }\n\n    genInboundLinks(remark = '', remarkModel = '-ieo') {\n        let addr = !ObjectUtil.isEmpty(this.listen) && this.listen !== \"0.0.0.0\" ? this.listen : location.hostname;\n        if(this.clients){\n           let links = [];\n           this.clients.forEach((client) => {\n                this.genAllLinks(remark,remarkModel,client).forEach(l => {\n                    links.push(l.link);\n                })\n            });\n            return links.join('\\r\\n');\n        } else {\n            if(this.protocol == Protocols.SHADOWSOCKS && !this.isSSMultiUser) return this.genSSLink(addr, this.port, 'same', remark);\n            if(this.protocol == Protocols.WIREGUARD) {\n                let links = [];\n                this.settings.peers.forEach((p,index) => {\n                    links.push(this.getWireguardLink(addr,this.port,remark + remarkModel.charAt(0) + (index+1),index));\n                });\n                return links.join('\\r\\n');\n            }\n            return '';\n        }\n    }\n\n    static fromJson(json={}) {\n        return new Inbound(\n            json.port,\n            json.listen,\n            json.protocol,\n            Inbound.Settings.fromJson(json.protocol, json.settings),\n            StreamSettings.fromJson(json.streamSettings),\n            json.tag,\n            Sniffing.fromJson(json.sniffing),\n            json.clientStats\n        )\n    }\n\n    toJson() {\n        let streamSettings;\n        if (this.canEnableStream()) {\n            streamSettings = this.stream.toJson();\n        }\n        return {\n            port: this.port,\n            listen: this.listen,\n            protocol: this.protocol,\n            settings: this.settings instanceof XrayCommonClass ? this.settings.toJson() : this.settings,\n            streamSettings: streamSettings,\n            tag: this.tag,\n            sniffing: this.sniffing.toJson(),\n            clientStats: this.clientStats\n        };\n    }\n}\n\nInbound.Settings = class extends XrayCommonClass {\n    constructor(protocol) {\n        super();\n        this.protocol = protocol;\n    }\n\n    static getSettings(protocol) {\n        switch (protocol) {\n            case Protocols.VMESS: return new Inbound.VmessSettings(protocol);\n            case Protocols.VLESS: return new Inbound.VLESSSettings(protocol);\n            case Protocols.TROJAN: return new Inbound.TrojanSettings(protocol);\n            case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings(protocol);\n            case Protocols.DOKODEMO: return new Inbound.DokodemoSettings(protocol);\n            case Protocols.SOCKS: return new Inbound.SocksSettings(protocol);\n            case Protocols.HTTP: return new Inbound.HttpSettings(protocol);            \n            case Protocols.WIREGUARD: return new Inbound.WireguardSettings(protocol);\n            default: return null;\n        }\n    }\n\n    static fromJson(protocol, json) {\n        switch (protocol) {\n            case Protocols.VMESS: return Inbound.VmessSettings.fromJson(json);\n            case Protocols.VLESS: return Inbound.VLESSSettings.fromJson(json);\n            case Protocols.TROJAN: return Inbound.TrojanSettings.fromJson(json);\n            case Protocols.SHADOWSOCKS: return Inbound.ShadowsocksSettings.fromJson(json);\n            case Protocols.DOKODEMO: return Inbound.DokodemoSettings.fromJson(json);\n            case Protocols.SOCKS: return Inbound.SocksSettings.fromJson(json);\n            case Protocols.HTTP: return Inbound.HttpSettings.fromJson(json);\n            case Protocols.WIREGUARD: return Inbound.WireguardSettings.fromJson(json);\n            default: return null;\n        }\n    }\n\n    toJson() {\n        return {};\n    }\n};\n\nInbound.VmessSettings = class extends Inbound.Settings {\n    constructor(protocol,\n        vmesses=[new Inbound.VmessSettings.Vmess()]) {\n        super(protocol);\n        this.vmesses = vmesses;\n    }\n\n    indexOfVmessById(id) {\n        return this.vmesses.findIndex(vmess => vmess.id === id);\n    }\n\n    addVmess(vmess) {\n        if (this.indexOfVmessById(vmess.id) >= 0) {\n            return false;\n        }\n        this.vmesses.push(vmess);\n    }\n\n    delVmess(vmess) {\n        const i = this.indexOfVmessById(vmess.id);\n        if (i >= 0) {\n            this.vmesses.splice(i, 1);\n        }\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.VmessSettings(\n            Protocols.VMESS,\n            json.clients.map(client => Inbound.VmessSettings.Vmess.fromJson(client)),\n        );\n    }\n\n    toJson() {\n        return {\n            clients: Inbound.VmessSettings.toJsonArray(this.vmesses),\n        };\n    }\n};\nInbound.VmessSettings.Vmess = class extends XrayCommonClass {\n    constructor(id=RandomUtil.randomUUID(), email=RandomUtil.randomLowerAndNum(8),limitIp=0, totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16), reset=0) {\n        super();\n        this.id = id;\n        this.email = email;\n        this.limitIp = limitIp;\n        this.totalGB = totalGB;\n        this.expiryTime = expiryTime;\n        this.enable = enable;\n        this.tgId = tgId;\n        this.subId = subId;\n        this.reset = reset;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.VmessSettings.Vmess(\n            json.id,\n            json.email,\n            json.limitIp,\n            json.totalGB,\n            json.expiryTime,\n            json.enable,\n            json.tgId,\n            json.subId,\n            json.reset,\n        );\n    }\n    get _expiryTime() {\n        if (this.expiryTime === 0 || this.expiryTime === \"\") {\n            return null;\n        }\n        if (this.expiryTime < 0){\n            return this.expiryTime / -86400000;\n        }\n        return moment(this.expiryTime);\n    }\n\n    set _expiryTime(t) {\n        if (t == null || t === \"\") {\n            this.expiryTime = 0;\n        } else {\n            this.expiryTime = t.valueOf();\n        }\n    }\n    get _totalGB() {\n        return toFixed(this.totalGB / ONE_GB, 2);\n    }\n\n    set _totalGB(gb) {\n        this.totalGB = toFixed(gb * ONE_GB, 0);\n    }\n\n};\n\nInbound.VLESSSettings = class extends Inbound.Settings {\n    constructor(protocol,\n                vlesses=[new Inbound.VLESSSettings.VLESS()],\n                decryption='none',\n                fallbacks=[]) {\n        super(protocol);\n        this.vlesses = vlesses;\n        this.decryption = decryption; \n        this.fallbacks = fallbacks;\n    }\n\n    addFallback() {\n        this.fallbacks.push(new Inbound.VLESSSettings.Fallback());\n    }\n\n    delFallback(index) {\n        this.fallbacks.splice(index, 1);\n    }\n\n    // decryption should be set to static value\n    static fromJson(json={}) {\n        return new Inbound.VLESSSettings(\n            Protocols.VLESS,\n            json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),\n            json.decryption || 'none',\n            Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),);\n    }\n\n    toJson() {\n        return {\n            clients: Inbound.VLESSSettings.toJsonArray(this.vlesses),\n            decryption: this.decryption, \n            fallbacks: Inbound.VLESSSettings.toJsonArray(this.fallbacks),\n        };\n    }\n};\n\nInbound.VLESSSettings.VLESS = class extends XrayCommonClass {\n    constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomLowerAndNum(8),limitIp=0, totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16), reset=0) {\n        super();\n        this.id = id;\n        this.flow = flow;\n        this.email = email;\n        this.limitIp = limitIp;\n        this.totalGB = totalGB;\n        this.expiryTime = expiryTime;\n        this.enable = enable;\n        this.tgId = tgId;\n        this.subId = subId;\n        this.reset = reset;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.VLESSSettings.VLESS(\n            json.id,\n            json.flow,\n            json.email,\n            json.limitIp,\n            json.totalGB,\n            json.expiryTime,\n            json.enable,\n            json.tgId,\n            json.subId,\n            json.reset,\n        );\n      }\n\n    get _expiryTime() {\n        if (this.expiryTime === 0 || this.expiryTime === \"\") {\n            return null;\n        }\n        if (this.expiryTime < 0){\n            return this.expiryTime / -86400000;\n        }\n        return moment(this.expiryTime);\n    }\n\n    set _expiryTime(t) {\n        if (t == null || t === \"\") {\n            this.expiryTime = 0;\n        } else {\n            this.expiryTime = t.valueOf();\n        }\n    }\n    get _totalGB() {\n        return toFixed(this.totalGB / ONE_GB, 2);\n    }\n\n    set _totalGB(gb) {\n        this.totalGB = toFixed(gb * ONE_GB, 0);\n    }\n};\nInbound.VLESSSettings.Fallback = class extends XrayCommonClass {\n    constructor(name=\"\", alpn='', path='', dest='', xver=0) {\n        super();\n        this.name = name;\n        this.alpn = alpn;\n        this.path = path;\n        this.dest = dest;\n        this.xver = xver;\n    }\n\n    toJson() {\n        let xver = this.xver;\n        if (!Number.isInteger(xver)) {\n            xver = 0;\n        }\n        return {\n            name: this.name,\n            alpn: this.alpn,\n            path: this.path,\n            dest: this.dest,\n            xver: xver,\n        }\n    }\n\n    static fromJson(json=[]) {\n        const fallbacks = [];\n        for (let fallback of json) {\n            fallbacks.push(new Inbound.VLESSSettings.Fallback(\n                fallback.name,\n                fallback.alpn,\n                fallback.path,\n                fallback.dest,\n                fallback.xver,\n            ))\n        }\n        return fallbacks;\n    }\n};\n\nInbound.TrojanSettings = class extends Inbound.Settings {\n    constructor(protocol,\n                trojans=[new Inbound.TrojanSettings.Trojan()],\n                fallbacks=[],) {\n        super(protocol);\n        this.trojans = trojans;\n        this.fallbacks = fallbacks;\n    }\n\n    addFallback() {\n        this.fallbacks.push(new Inbound.TrojanSettings.Fallback());\n    }\n\n    delFallback(index) {\n        this.fallbacks.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.TrojanSettings(\n            Protocols.TROJAN,\n            json.clients.map(client => Inbound.TrojanSettings.Trojan.fromJson(client)),\n            Inbound.TrojanSettings.Fallback.fromJson(json.fallbacks),);\n        }\n\n    toJson() {\n        return {\n            clients: Inbound.TrojanSettings.toJsonArray(this.trojans),\n            fallbacks: Inbound.TrojanSettings.toJsonArray(this.fallbacks)\n        };\n    }\n};\nInbound.TrojanSettings.Trojan = class extends XrayCommonClass {\n    constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomLowerAndNum(8),limitIp=0, totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16), reset=0) {\n        super();\n        this.password = password;\n        this.flow = flow;\n        this.email = email;\n        this.limitIp = limitIp;\n        this.totalGB = totalGB;\n        this.expiryTime = expiryTime;\n        this.enable = enable;\n        this.tgId = tgId;\n        this.subId = subId;\n        this.reset = reset;\n    }\n\n    toJson() {\n        return {\n            password: this.password,\n            flow: this.flow,\n            email: this.email,\n            limitIp: this.limitIp,\n            totalGB: this.totalGB,\n            expiryTime: this.expiryTime,\n            enable: this.enable,\n            tgId: this.tgId,\n            subId: this.subId,\n            reset: this.reset,\n        };\n    }\n\n    static fromJson(json = {}) {\n        return new Inbound.TrojanSettings.Trojan(\n            json.password,\n            json.flow,\n            json.email,\n            json.limitIp,\n            json.totalGB,\n            json.expiryTime,\n            json.enable,\n            json.tgId,\n            json.subId,\n            json.reset,\n        );\n    }\n\n    get _expiryTime() {\n        if (this.expiryTime === 0 || this.expiryTime === \"\") {\n            return null;\n        }\n        if (this.expiryTime < 0){\n            return this.expiryTime / -86400000;\n        }\n        return moment(this.expiryTime);\n    }\n\n    set _expiryTime(t) {\n        if (t == null || t === \"\") {\n            this.expiryTime = 0;\n        } else {\n            this.expiryTime = t.valueOf();\n        }\n    }\n    get _totalGB() {\n        return toFixed(this.totalGB / ONE_GB, 2);\n    }\n\n    set _totalGB(gb) {\n        this.totalGB = toFixed(gb * ONE_GB, 0);\n    }\n\n};\n\nInbound.TrojanSettings.Fallback = class extends XrayCommonClass {\n    constructor(name=\"\", alpn='', path='', dest='', xver=0) {\n        super();\n        this.name = name;\n        this.alpn = alpn;\n        this.path = path;\n        this.dest = dest;\n        this.xver = xver;\n    }\n\n    toJson() {\n        let xver = this.xver;\n        if (!Number.isInteger(xver)) {\n            xver = 0;\n        }\n        return {\n            name: this.name,\n            alpn: this.alpn,\n            path: this.path,\n            dest: this.dest,\n            xver: xver,\n        }\n    }\n\n    static fromJson(json=[]) {\n        const fallbacks = [];\n        for (let fallback of json) {\n            fallbacks.push(new Inbound.TrojanSettings.Fallback(\n                fallback.name,\n                fallback.alpn,\n                fallback.path,\n                fallback.dest,\n                fallback.xver,\n            ))\n        }\n        return fallbacks;\n    }\n};\n\nInbound.ShadowsocksSettings = class extends Inbound.Settings {\n    constructor(protocol,\n                method=SSMethods.BLAKE3_AES_256_GCM,\n                password=RandomUtil.randomShadowsocksPassword(),\n                network='tcp,udp',\n                shadowsockses=[new Inbound.ShadowsocksSettings.Shadowsocks()]\n    ) {\n        super(protocol);\n        this.method = method;\n        this.password = password;\n        this.network = network;\n        this.shadowsockses = shadowsockses;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.ShadowsocksSettings(\n            Protocols.SHADOWSOCKS,\n            json.method,\n            json.password,\n            json.network,\n            json.clients.map(client => Inbound.ShadowsocksSettings.Shadowsocks.fromJson(client)),\n        );\n    }\n\n    toJson() {\n        return {\n            method: this.method,\n            password: this.password,\n            network: this.network,\n            clients: Inbound.ShadowsocksSettings.toJsonArray(this.shadowsockses)\n        };\n    }\n};\n\nInbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {\n    constructor(method='', password=RandomUtil.randomShadowsocksPassword(), email=RandomUtil.randomLowerAndNum(8),limitIp=0, totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16), reset=0) {\n        super();\n        this.method = method;\n        this.password = password;\n        this.email = email;\n        this.limitIp = limitIp;\n        this.totalGB = totalGB;\n        this.expiryTime = expiryTime;\n        this.enable = enable;\n        this.tgId = tgId;\n        this.subId = subId;\n        this.reset = reset;\n    }\n\n    toJson() {\n        return {\n            method: this.method,\n            password: this.password,\n            email: this.email,\n            limitIp: this.limitIp,\n            totalGB: this.totalGB,\n            expiryTime: this.expiryTime,\n            enable: this.enable,\n            tgId: this.tgId,\n            subId: this.subId,\n            reset: this.reset,\n        };\n    }\n\n    static fromJson(json = {}) {\n        return new Inbound.ShadowsocksSettings.Shadowsocks(\n            json.method,\n            json.password,\n            json.email,\n            json.limitIp,\n            json.totalGB,\n            json.expiryTime,\n            json.enable,\n            json.tgId,\n            json.subId,\n            json.reset,\n        );\n    }\n\n    get _expiryTime() {\n        if (this.expiryTime === 0 || this.expiryTime === \"\") {\n            return null;\n        }\n        if (this.expiryTime < 0){\n            return this.expiryTime / -86400000;\n        }\n        return moment(this.expiryTime);\n    }\n\n    set _expiryTime(t) {\n        if (t == null || t === \"\") {\n            this.expiryTime = 0;\n        } else {\n            this.expiryTime = t.valueOf();\n        }\n    }\n    get _totalGB() {\n        return toFixed(this.totalGB / ONE_GB, 2);\n    }\n\n    set _totalGB(gb) {\n        this.totalGB = toFixed(gb * ONE_GB, 0);\n    }\n\n};\n\nInbound.DokodemoSettings = class extends Inbound.Settings {\n    constructor(protocol, address, port, network='tcp,udp', followRedirect=false, timeout=0) {\n        super(protocol);\n        this.address = address;\n        this.port = port;\n        this.network = network;\n        this.followRedirect = followRedirect;\n        this.timeout = timeout;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.DokodemoSettings(\n            Protocols.DOKODEMO,\n            json.address,\n            json.port,\n            json.network,\n            json.followRedirect,\n            json.timeout,\n        );\n    }\n\n    toJson() {\n        return {\n            address: this.address,\n            port: this.port,\n            network: this.network,\n            followRedirect: this.followRedirect,\n            timeout: this.timeout,\n        };\n    }\n};\n\nInbound.SocksSettings = class extends Inbound.Settings {\n    constructor(protocol, auth='password', accounts=[new Inbound.SocksSettings.SocksAccount()], udp=false, ip='127.0.0.1') {\n        super(protocol);\n        this.auth = auth;\n        this.accounts = accounts;\n        this.udp = udp;\n        this.ip = ip;\n    }\n\n    addAccount(account) {\n        this.accounts.push(account);\n    }\n\n    delAccount(index) {\n        this.accounts.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        let accounts;\n        if (json.auth === 'password') {\n            accounts = json.accounts.map(\n                account => Inbound.SocksSettings.SocksAccount.fromJson(account)\n            )\n        }\n        return new Inbound.SocksSettings(\n            Protocols.SOCKS,\n            json.auth,\n            accounts,\n            json.udp,\n            json.ip,\n        );\n    }\n\n    toJson() {\n        return {\n            auth: this.auth,\n            accounts: this.auth === 'password' ? this.accounts.map(account => account.toJson()) : undefined,\n            udp: this.udp,\n            ip: this.ip,\n        };\n    }\n};\nInbound.SocksSettings.SocksAccount = class extends XrayCommonClass {\n    constructor(user=RandomUtil.randomSeq(10), pass=RandomUtil.randomSeq(10)) {\n        super();\n        this.user = user;\n        this.pass = pass;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.SocksSettings.SocksAccount(json.user, json.pass);\n    }\n};\n\nInbound.HttpSettings = class extends Inbound.Settings {\n    constructor(protocol, accounts=[new Inbound.HttpSettings.HttpAccount()]) {\n        super(protocol);\n        this.accounts = accounts;\n    }\n\n    addAccount(account) {\n        this.accounts.push(account);\n    }\n\n    delAccount(index) {\n        this.accounts.splice(index, 1);\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.HttpSettings(\n            Protocols.HTTP,\n            json.accounts.map(account => Inbound.HttpSettings.HttpAccount.fromJson(account)),\n        );\n    }\n\n    toJson() {\n        return {\n            accounts: Inbound.HttpSettings.toJsonArray(this.accounts),\n        };\n    }\n};\n\nInbound.HttpSettings.HttpAccount = class extends XrayCommonClass {\n    constructor(user=RandomUtil.randomSeq(10), pass=RandomUtil.randomSeq(10)) {\n        super();\n        this.user = user;\n        this.pass = pass;\n    }\n\n    static fromJson(json={}) {\n        return new Inbound.HttpSettings.HttpAccount(json.user, json.pass);\n    }\n};\n\nInbound.WireguardSettings = class extends XrayCommonClass {\n    constructor(protocol, mtu=1420, secretKey=Wireguard.generateKeypair().privateKey, peers=[new Inbound.WireguardSettings.Peer()], kernelMode=false) {\n        super(protocol);\n        this.mtu = mtu;\n        this.secretKey = secretKey;\n        this.pubKey = secretKey.length>0 ? Wireguard.generateKeypair(secretKey).publicKey : '';\n        this.peers = peers;\n        this.kernelMode = kernelMode;\n    }\n\n    addPeer() {\n        this.peers.push(new Inbound.WireguardSettings.Peer(null,null,'',['10.0.0.' + (this.peers.length+2)]));\n    }\n\n    delPeer(index) {\n        this.peers.splice(index, 1);\n    }\n\n    static fromJson(json={}){\n        return new Inbound.WireguardSettings(\n            Protocols.WIREGUARD,\n            json.mtu,\n            json.secretKey,\n            json.peers.map(peer => Inbound.WireguardSettings.Peer.fromJson(peer)),\n            json.kernelMode,\n        );\n    }\n\n    toJson() {\n        return {\n            mtu: this.mtu?? undefined,\n            secretKey: this.secretKey,\n            peers: Inbound.WireguardSettings.Peer.toJsonArray(this.peers),\n            kernelMode: this.kernelMode,\n        };\n    }\n};\n\nInbound.WireguardSettings.Peer = class extends XrayCommonClass {\n    constructor(privateKey, publicKey, psk='', allowedIPs=['10.0.0.2/32'], keepAlive=0) {\n        super();\n        this.privateKey = privateKey\n        this.publicKey = publicKey;\n        if (!this.publicKey){\n            [this.publicKey, this.privateKey] = Object.values(Wireguard.generateKeypair())\n        }\n        this.psk = psk;\n        allowedIPs.forEach((a,index) => {\n            if (a.length>0 && !a.includes('/')) allowedIPs[index] += '/32';\n        })\n        this.allowedIPs = allowedIPs;\n        this.keepAlive = keepAlive;\n    }\n\n    static fromJson(json={}){\n        return new Inbound.WireguardSettings.Peer(\n            json.privateKey,\n            json.publicKey,\n            json.preSharedKey,\n            json.allowedIPs,\n            json.keepAlive\n        );\n    }\n\n    toJson() {\n        this.allowedIPs.forEach((a,index) => {\n            if (a.length>0 && !a.includes('/')) this.allowedIPs[index] += '/32';\n        });\n        return {\n            privateKey: this.privateKey,\n            publicKey: this.publicKey,\n            preSharedKey: this.psk.length>0 ? this.psk : undefined,\n            allowedIPs: this.allowedIPs,\n            keepAlive: this.keepAlive?? undefined,\n        };\n    }\n};\n"
  },
  {
    "path": "web/assets/js/util/common.js",
    "content": "const ONE_KB = 1024;\nconst ONE_MB = ONE_KB * 1024;\nconst ONE_GB = ONE_MB * 1024;\nconst ONE_TB = ONE_GB * 1024;\nconst ONE_PB = ONE_TB * 1024;\n\nfunction sizeFormat(size) {\n    if (size < 0) {\n        return \"0 B\";\n    } else if (size < ONE_KB) {\n        return size.toFixed(0) + \" B\";\n    } else if (size < ONE_MB) {\n        return (size / ONE_KB).toFixed(2) + \" KB\";\n    } else if (size < ONE_GB) {\n        return (size / ONE_MB).toFixed(2) + \" MB\";\n    } else if (size < ONE_TB) {\n        return (size / ONE_GB).toFixed(2) + \" GB\";\n    } else if (size < ONE_PB) {\n        return (size / ONE_TB).toFixed(2) + \" TB\";\n    } else {\n        return (size / ONE_PB).toFixed(2) + \" PB\";\n    }\n}\n\nfunction cpuSpeedFormat(speed) {\n    if (speed > 1000) {\n        const GHz = speed / 1000;\n        return GHz.toFixed(2) + \" GHz\";\n    } else {\n        return speed.toFixed(2) + \" MHz\";\n    }\n}\n\nfunction cpuCoreFormat(cores) {\n    if (cores === 1) {\n        return \"1 Core\";\n    } else {\n        return cores + \" Cores\";\n    }\n}\n\nfunction base64(str) {\n    return Base64.encode(str);\n}\n\nfunction safeBase64(str) {\n    return base64(str)\n        .replace(/\\+/g, '-')\n        .replace(/=/g, '')\n        .replace(/\\//g, '_');\n}\n\nfunction formatSecond(second) {\n    if (second < 60) {\n        return second.toFixed(0) + 's';\n    } else if (second < 3600) {\n        return (second / 60).toFixed(0) + 'm';\n    } else if (second < 3600 * 24) {\n        return (second / 3600).toFixed(0) + 'h';\n    } else {\n        day = Math.floor(second / 3600 / 24);\n        remain = ((second/3600) - (day*24)).toFixed(0);\n        return day + 'd' + (remain > 0 ? ' ' + remain + 'h' : '');\n    }\n}\n\nfunction addZero(num) {\n    if (num < 10) {\n        return \"0\" + num;\n    } else {\n        return num;\n    }\n}\n\nfunction toFixed(num, n) {\n    n = Math.pow(10, n);\n    return Math.floor(num * n) / n;\n}\n\nfunction debounce(fn, delay) {\n    var timeoutID = null;\n    return function () {\n        clearTimeout(timeoutID);\n        var args = arguments;\n        var that = this;\n        timeoutID = setTimeout(function () {\n            fn.apply(that, args);\n        }, delay);\n    };\n}\n\nfunction getCookie(cname) {\n    let name = cname + '=';\n    let ca = document.cookie.split(';');\n    for (let i = 0; i < ca.length; i++) {\n        let c = ca[i];\n        while (c.charAt(0) == ' ') {\n            c = c.substring(1);\n        }\n        if (c.indexOf(name) == 0) {\n            // decode cookie value only\n            return decodeURIComponent(c.substring(name.length, c.length));\n        }\n    }\n    return '';\n}\n\n\nfunction setCookie(cname, cvalue, exdays) {\n    const d = new Date();\n    d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n    let expires = 'expires=' + d.toUTCString();\n    // encode cookie value\n    document.cookie = cname + '=' + encodeURIComponent(cvalue) + ';' + expires + ';path=/';\n}\n\nfunction usageColor(data, threshold, total) {\n    switch (true) {\n        case data === null:\n            return \"purple\";\n        case total < 0:\n            return \"green\";\n        case total == 0:\n            return \"purple\";\n        case data < total - threshold:\n            return \"green\";\n        case data < total:\n            return \"orange\";\n        default:\n            return \"red\";\n    }\n}\n\nfunction clientUsageColor(clientStats, trafficDiff) {\n    switch (true) {\n        case !clientStats || clientStats.total == 0:\n            return \"#7a316f\"; // purple\n        case clientStats.up + clientStats.down < clientStats.total - trafficDiff:\n            return \"#008771\"; // Green\n        case clientStats.up + clientStats.down < clientStats.total:\n            return \"#f37b24\"; // Orange\n        default:\n            return \"#cf3c3c\"; // Red\n    }\n}\n\nfunction userExpiryColor(threshold, client, isDark = false) {\n    if (!client.enable) {\n        return isDark ? '#2c3950' : '#bcbcbc';\n    }\n    now = new Date().getTime(),\n    expiry = client.expiryTime;\n    switch (true) {\n        case expiry === null:\n            return \"#7a316f\"; // purple\n        case expiry < 0:\n            return \"#008771\"; // Green\n        case expiry == 0:\n            return \"#7a316f\"; // purple\n        case now < expiry - threshold:\n            return \"#008771\"; // Green\n        case now < expiry:\n            return \"#f37b24\"; // Orange\n        default:\n            return \"#cf3c3c\"; // Red\n    }\n}\n\nfunction doAllItemsExist(array1, array2) {\n    for (let i = 0; i < array1.length; i++) {\n        if (!array2.includes(array1[i])) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction buildURL({ host, port, isTLS, base, path }) {\n    if (!host || host.length === 0) host = window.location.hostname;\n    if (!port || port.length === 0) port = window.location.port;\n\n    if (isTLS === undefined) isTLS = window.location.protocol === \"https:\";\n\n    const protocol = isTLS ? \"https:\" : \"http:\";\n\n    port = String(port);\n    if (port === \"\" || (isTLS && port === \"443\") || (!isTLS && port === \"80\")) {\n        port = \"\";\n    } else {\n        port = `:${port}`;\n    }\n\n    return `${protocol}//${host}${port}${base}${path}`;\n}\n"
  },
  {
    "path": "web/assets/js/util/date-util.js",
    "content": "const oneMinute = 1000 * 60;  // MilliseConds in a Minute\nconst oneHour = oneMinute * 60;  // The milliseconds of one hour\nconst oneDay = oneHour * 24; // The Number of MilliseConds A Day\nconst oneWeek = oneDay * 7; // The milliseconds per week\nconst oneMonth = oneDay * 30; // The milliseconds of a month\n\n/**\n * Decrease according to the number of days\n *\n * @param days to reduce the number of days to be reduced\n */\nDate.prototype.minusDays = function (days) {\n    return this.minusMillis(oneDay * days);\n};\n\n/**\n * Increase according to the number of days\n *\n * @param days The number of days to be increased\n */\nDate.prototype.plusDays = function (days) {\n    return this.plusMillis(oneDay * days);\n};\n\n/**\n * A few\n *\n * @param hours to be reduced\n */\nDate.prototype.minusHours = function (hours) {\n    return this.minusMillis(oneHour * hours);\n};\n\n/**\n * Increase hourly\n *\n * @param hours to increase the number of hours\n */\nDate.prototype.plusHours = function (hours) {\n    return this.plusMillis(oneHour * hours);\n};\n\n/**\n * Make reduction in minutes\n *\n * @param minutes to reduce the number of minutes\n */\nDate.prototype.minusMinutes = function (minutes) {\n    return this.minusMillis(oneMinute * minutes);\n};\n\n/**\n * Add in minutes\n *\n * @param minutes to increase the number of minutes\n */\nDate.prototype.plusMinutes = function (minutes) {\n    return this.plusMillis(oneMinute * minutes);\n};\n\n/**\n * Decrease in milliseconds\n *\n * @param millis to reduce the milliseconds\n */\nDate.prototype.minusMillis = function(millis) {\n    let time = this.getTime() - millis;\n    let newDate = new Date();\n    newDate.setTime(time);\n    return newDate;\n};\n\n/**\n * Add in milliseconds to increase\n *\n * @param millis to increase the milliseconds to increase\n */\nDate.prototype.plusMillis = function(millis) {\n    let time = this.getTime() + millis;\n    let newDate = new Date();\n    newDate.setTime(time);\n    return newDate;\n};\n\n/**\n * Setting time is 00: 00: 00.000 on the day\n */\nDate.prototype.setMinTime = function () {\n    this.setHours(0);\n    this.setMinutes(0);\n    this.setSeconds(0);\n    this.setMilliseconds(0);\n    return this;\n};\n\n/**\n * Setting time is 23: 59: 59.999 on the same day\n */\nDate.prototype.setMaxTime = function () {\n    this.setHours(23);\n    this.setMinutes(59);\n    this.setSeconds(59);\n    this.setMilliseconds(999);\n    return this;\n};\n\n/**\n * Formatting date\n */\nDate.prototype.formatDate = function () {\n    return this.getFullYear() + \"-\" + addZero(this.getMonth() + 1) + \"-\" + addZero(this.getDate());\n};\n\n/**\n * Format time\n */\nDate.prototype.formatTime = function () {\n    return addZero(this.getHours()) + \":\" + addZero(this.getMinutes()) + \":\" + addZero(this.getSeconds());\n};\n\n/**\n * Formatting date plus time\n *\n * @param split Date and time separation symbols, default is a space\n */\nDate.prototype.formatDateTime = function (split = ' ') {\n    return this.formatDate() + split + this.formatTime();\n};\n\nclass DateUtil {\n    // String string to date object\n    static parseDate(str) {\n        return new Date(str.replace(/-/g, '/'));\n    }\n\n    static formatMillis(millis) {\n        return moment(millis).format('YYYY-M-D H:m:s');\n    }\n\n    static firstDayOfMonth() {\n        const date = new Date();\n        date.setDate(1);\n        date.setMinTime();\n        return date;\n    }\n}\n"
  },
  {
    "path": "web/assets/js/util/utils.js",
    "content": "class Msg {\n    constructor(success, msg, obj) {\n        this.success = false;\n        this.msg = \"\";\n        this.obj = null;\n\n        if (success != null) {\n            this.success = success;\n        }\n        if (msg != null) {\n            this.msg = msg;\n        }\n        if (obj != null) {\n            this.obj = obj;\n        }\n    }\n}\n\nclass HttpUtil {\n    static _handleMsg(msg) {\n        if (!(msg instanceof Msg)) {\n            return;\n        }\n        if (msg.msg === \"\") {\n            return;\n        }\n        if (msg.success) {\n            Vue.prototype.$message.success(msg.msg);\n        } else {\n            Vue.prototype.$message.error(msg.msg);\n        }\n    }\n\n    static _respToMsg(resp) {\n        const data = resp.data;\n        if (data == null) {\n            return new Msg(true);\n        } else if (typeof data === 'object') {\n            if (data.hasOwnProperty('success')) {\n                return new Msg(data.success, data.msg, data.obj);\n            } else {\n                return data;\n            }\n        } else {\n            return new Msg(false, 'unknown data:', data);\n        }\n    }\n\n    static async get(url, data, options) {\n        let msg;\n        try {\n            const resp = await axios.get(url, data, options);\n            msg = this._respToMsg(resp);\n        } catch (e) {\n            msg = new Msg(false, e.toString());\n        }\n        this._handleMsg(msg);\n        return msg;\n    }\n\n    static async post(url, data, options) {\n        let msg;\n        try {\n            const resp = await axios.post(url, data, options);\n            msg = this._respToMsg(resp);\n        } catch (e) {\n            msg = new Msg(false, e.toString());\n        }\n        this._handleMsg(msg);\n        return msg;\n    }\n\n    static async postWithModal(url, data, modal) {\n        if (modal) {\n            modal.loading(true);\n        }\n        const msg = await this.post(url, data);\n        if (modal) {\n            modal.loading(false);\n            if (msg instanceof Msg && msg.success) {\n                modal.close();\n            }\n        }\n        return msg;\n    }\n}\n\nclass PromiseUtil {\n    static async sleep(timeout) {\n        await new Promise(resolve => {\n            setTimeout(resolve, timeout)\n        });\n    }\n}\n\nconst seq = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nclass RandomUtil {\n    static randomIntRange(min, max) {\n        return Math.floor(Math.random() * (max - min) + min);\n    }\n\n    static randomInt(n) {\n        return this.randomIntRange(0, n);\n    }\n\n    static randomSeq(count) {\n        let str = '';\n        for (let i = 0; i < count; ++i) {\n            str += seq[this.randomInt(62)];\n        }\n        return str;\n    }\n\n    static randomShortId() {\n        let str = '';\n        for (let i = 0; i < 8; ++i) {\n            str += seq[this.randomInt(16)];\n        }\n        return str;\n    }\n\n    static randomLowerAndNum(len) {\n        let str = '';\n        for (let i = 0; i < len; ++i) {\n            str += seq[this.randomInt(36)];\n        }\n        return str;\n    }\n\n    static randomUUID() {\n        const template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n        return template.replace(/[xy]/g, function (c) {\n            const randomValues = new Uint8Array(1);\n            crypto.getRandomValues(randomValues);\n            let randomValue = randomValues[0] % 16;\n            let calculatedValue = (c === 'x') ? randomValue : (randomValue & 0x3 | 0x8);\n            return calculatedValue.toString(16);\n        });\n    }\n\n    static randomShadowsocksPassword() {\n        let array = new Uint8Array(32);\n        window.crypto.getRandomValues(array);\n        return btoa(String.fromCharCode.apply(null, array));\n    }\n}\n\nclass ObjectUtil {\n    static getPropIgnoreCase(obj, prop) {\n        for (const name in obj) {\n            if (!obj.hasOwnProperty(name)) {\n                continue;\n            }\n            if (name.toLowerCase() === prop.toLowerCase()) {\n                return obj[name];\n            }\n        }\n        return undefined;\n    }\n\n    static deepSearch(obj, key) {\n        if (obj instanceof Array) {\n            for (let i = 0; i < obj.length; ++i) {\n                if (this.deepSearch(obj[i], key)) {\n                    return true;\n                }\n            }\n        } else if (obj instanceof Object) {\n            for (let name in obj) {\n                if (!obj.hasOwnProperty(name)) {\n                    continue;\n                }\n                if (this.deepSearch(obj[name], key)) {\n                    return true;\n                }\n            }\n        } else {\n            return this.isEmpty(obj) ? false : obj.toString().toLowerCase().indexOf(key.toLowerCase()) >= 0;\n        }\n        return false;\n    }\n\n    static isEmpty(obj) {\n        return obj === null || obj === undefined || obj === '';\n    }\n\n    static isArrEmpty(arr) {\n        return !this.isEmpty(arr) && arr.length === 0;\n    }\n\n    static copyArr(dest, src) {\n        dest.splice(0);\n        for (const item of src) {\n            dest.push(item);\n        }\n    }\n\n    static clone(obj) {\n        let newObj;\n        if (obj instanceof Array) {\n            newObj = [];\n            this.copyArr(newObj, obj);\n        } else if (obj instanceof Object) {\n            newObj = {};\n            for (const key of Object.keys(obj)) {\n                newObj[key] = obj[key];\n            }\n        } else {\n            newObj = obj;\n        }\n        return newObj;\n    }\n\n    static deepClone(obj) {\n        let newObj;\n        if (obj instanceof Array) {\n            newObj = [];\n            for (const item of obj) {\n                newObj.push(this.deepClone(item));\n            }\n        } else if (obj instanceof Object) {\n            newObj = {};\n            for (const key of Object.keys(obj)) {\n                newObj[key] = this.deepClone(obj[key]);\n            }\n        } else {\n            newObj = obj;\n        }\n        return newObj;\n    }\n\n    static cloneProps(dest, src, ...ignoreProps) {\n        if (dest == null || src == null) {\n            return;\n        }\n        const ignoreEmpty = this.isArrEmpty(ignoreProps);\n        for (const key of Object.keys(src)) {\n            if (!src.hasOwnProperty(key)) {\n                continue;\n            } else if (!dest.hasOwnProperty(key)) {\n                continue;\n            } else if (src[key] === undefined) {\n                continue;\n            }\n            if (ignoreEmpty) {\n                dest[key] = src[key];\n            } else {\n                let ignore = false;\n                for (let i = 0; i < ignoreProps.length; ++i) {\n                    if (key === ignoreProps[i]) {\n                        ignore = true;\n                        break;\n                    }\n                }\n                if (!ignore) {\n                    dest[key] = src[key];\n                }\n            }\n        }\n    }\n\n    static delProps(obj, ...props) {\n        for (const prop of props) {\n            if (prop in obj) {\n                delete obj[prop];\n            }\n        }\n    }\n\n    static execute(func, ...args) {\n        if (!this.isEmpty(func) && typeof func === 'function') {\n            func(...args);\n        }\n    }\n\n    static orDefault(obj, defaultValue) {\n        if (obj == null) {\n            return defaultValue;\n        }\n        return obj;\n    }\n\n    static equals(a, b) {\n        for (const key in a) {\n            if (!a.hasOwnProperty(key)) {\n                continue;\n            }\n            if (!b.hasOwnProperty(key)) {\n                return false;\n            } else if (a[key] !== b[key]) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n\nclass Wireguard {\n\tstatic gf(init) {\n\t\tvar r = new Float64Array(16);\n\t\tif (init) {\n\t\t\tfor (var i = 0; i < init.length; ++i)\n\t\t\t\tr[i] = init[i];\n\t\t}\n\t\treturn r;\n\t}\n\n\tstatic pack(o, n) {\n\t\tvar b, m = this.gf(), t = this.gf();\n\t\tfor (var i = 0; i < 16; ++i)\n\t\t\tt[i] = n[i];\n\t\tthis.carry(t);\n\t\tthis.carry(t);\n\t\tthis.carry(t);\n\t\tfor (var j = 0; j < 2; ++j) {\n\t\t\tm[0] = t[0] - 0xffed;\n\t\t\tfor (var i = 1; i < 15; ++i) {\n\t\t\t\tm[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n\t\t\t\tm[i - 1] &= 0xffff;\n\t\t\t}\n\t\t\tm[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n\t\t\tb = (m[15] >> 16) & 1;\n\t\t\tm[14] &= 0xffff;\n\t\t\tthis.cswap(t, m, 1 - b);\n\t\t}\n\t\tfor (var i = 0; i < 16; ++i) {\n\t\t\to[2 * i] = t[i] & 0xff;\n\t\t\to[2 * i + 1] = t[i] >> 8;\n\t\t}\n\t}\n\n\tstatic carry(o) {\n\t\tvar c;\n\t\tfor (var i = 0; i < 16; ++i) {\n\t\t\to[(i + 1) % 16] += (i < 15 ? 1 : 38) * Math.floor(o[i] / 65536);\n\t\t\to[i] &= 0xffff;\n\t\t}\n\t}\n\n\tstatic cswap(p, q, b) {\n\t\tvar t, c = ~(b - 1);\n\t\tfor (var i = 0; i < 16; ++i) {\n\t\t\tt = c & (p[i] ^ q[i]);\n\t\t\tp[i] ^= t;\n\t\t\tq[i] ^= t;\n\t\t}\n\t}\n\n\tstatic add(o, a, b) {\n\t\tfor (var i = 0; i < 16; ++i)\n\t\t\to[i] = (a[i] + b[i]) | 0;\n\t}\n\n\tstatic subtract(o, a, b) {\n\t\tfor (var i = 0; i < 16; ++i)\n\t\t\to[i] = (a[i] - b[i]) | 0;\n\t}\n\n\tstatic multmod(o, a, b) {\n\t\tvar t = new Float64Array(31);\n\t\tfor (var i = 0; i < 16; ++i) {\n\t\t\tfor (var j = 0; j < 16; ++j)\n\t\t\t\tt[i + j] += a[i] * b[j];\n\t\t}\n\t\tfor (var i = 0; i < 15; ++i)\n\t\t\tt[i] += 38 * t[i + 16];\n\t\tfor (var i = 0; i < 16; ++i)\n\t\t\to[i] = t[i];\n\t\tthis.carry(o);\n\t\tthis.carry(o);\n\t}\n\n\tstatic invert(o, i) {\n\t\tvar c = this.gf();\n\t\tfor (var a = 0; a < 16; ++a)\n\t\t\tc[a] = i[a];\n\t\tfor (var a = 253; a >= 0; --a) {\n\t\t\tthis.multmod(c, c, c);\n\t\t\tif (a !== 2 && a !== 4)\n                this.multmod(c, c, i);\n\t\t}\n\t\tfor (var a = 0; a < 16; ++a)\n\t\t\to[a] = c[a];\n\t}\n\n\tstatic clamp(z) {\n\t\tz[31] = (z[31] & 127) | 64;\n\t\tz[0] &= 248;\n\t}\n\n\tstatic generatePublicKey(privateKey) {\n\t\tvar r, z = new Uint8Array(32);\n\t\tvar a = this.gf([1]),\n\t\t\tb = this.gf([9]),\n\t\t\tc = this.gf(),\n\t\t\td = this.gf([1]),\n\t\t\te = this.gf(),\n\t\t\tf = this.gf(),\n\t\t\t_121665 = this.gf([0xdb41, 1]),\n\t\t\t_9 = this.gf([9]);\n\t\tfor (var i = 0; i < 32; ++i)\n\t\t\tz[i] = privateKey[i];\n\t\tthis.clamp(z);\n\t\tfor (var i = 254; i >= 0; --i) {\n\t\t\tr = (z[i >>> 3] >>> (i & 7)) & 1;\n\t\t\tthis.cswap(a, b, r);\n\t\t\tthis.cswap(c, d, r);\n\t\t\tthis.add(e, a, c);\n\t\t\tthis.subtract(a, a, c);\n\t\t\tthis.add(c, b, d);\n\t\t\tthis.subtract(b, b, d);\n\t\t\tthis.multmod(d, e, e);\n\t\t\tthis.multmod(f, a, a);\n\t\t\tthis.multmod(a, c, a);\n\t\t\tthis.multmod(c, b, e);\n\t\t\tthis.add(e, a, c);\n\t\t\tthis.subtract(a, a, c);\n\t\t\tthis.multmod(b, a, a);\n\t\t\tthis.subtract(c, d, f);\n\t\t\tthis.multmod(a, c, _121665);\n\t\t\tthis.add(a, a, d);\n\t\t\tthis.multmod(c, c, a);\n\t\t\tthis.multmod(a, d, f);\n\t\t\tthis.multmod(d, b, _9);\n\t\t\tthis.multmod(b, e, e);\n\t\t\tthis.cswap(a, b, r);\n\t\t\tthis.cswap(c, d, r);\n\t\t}\n\t\tthis.invert(c, c);\n\t\tthis.multmod(a, a, c);\n\t\tthis.pack(z, a);\n\t\treturn z;\n\t}\n\n\tstatic generatePresharedKey() {\n\t\tvar privateKey = new Uint8Array(32);\n\t\twindow.crypto.getRandomValues(privateKey);\n\t\treturn privateKey;\n\t}\n\n\tstatic generatePrivateKey() {\n\t\tvar privateKey = this.generatePresharedKey();\n\t\tthis.clamp(privateKey);\n\t\treturn privateKey;\n\t}\n\n\tstatic encodeBase64(dest, src) {\n\t\tvar input = Uint8Array.from([(src[0] >> 2) & 63, ((src[0] << 4) | (src[1] >> 4)) & 63, ((src[1] << 2) | (src[2] >> 6)) & 63, src[2] & 63]);\n\t\tfor (var i = 0; i < 4; ++i)\n\t\t\tdest[i] = input[i] + 65 +\n\t\t\t(((25 - input[i]) >> 8) & 6) -\n\t\t\t(((51 - input[i]) >> 8) & 75) -\n\t\t\t(((61 - input[i]) >> 8) & 15) +\n\t\t\t(((62 - input[i]) >> 8) & 3);\n\t}\n\n\tstatic keyToBase64(key) {\n\t\tvar i, base64 = new Uint8Array(44);\n\t\tfor (i = 0; i < 32 / 3; ++i)\n            this.encodeBase64(base64.subarray(i * 4), key.subarray(i * 3));\n        this.encodeBase64(base64.subarray(i * 4), Uint8Array.from([key[i * 3 + 0], key[i * 3 + 1], 0]));\n\t\tbase64[43] = 61;\n\t\treturn String.fromCharCode.apply(null, base64);\n\t}\n\n    static keyFromBase64(encoded) {\n        const binaryStr = atob(encoded);\n        const bytes = new Uint8Array(binaryStr.length);\n        for (let i = 0; i < binaryStr.length; i++) {\n            bytes[i] = binaryStr.charCodeAt(i);\n        }\n        return bytes;\n    }\n\n\tstatic generateKeypair(secretKey='') {\n        var privateKey = secretKey.length>0 ? this.keyFromBase64(secretKey) : this.generatePrivateKey();\n        var publicKey = this.generatePublicKey(privateKey);\n        return {\n            publicKey: this.keyToBase64(publicKey),\n            privateKey: secretKey.length>0 ? secretKey : this.keyToBase64(privateKey)\n        };\n    }\n}"
  },
  {
    "path": "web/assets/vue/vue.common.dev.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\nconst emptyObject = Object.freeze({});\nconst isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n    return v === undefined || v === null;\n}\nfunction isDef(v) {\n    return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n    return v === true;\n}\nfunction isFalse(v) {\n    return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n    return (typeof value === 'string' ||\n        typeof value === 'number' ||\n        // $flow-disable-line\n        typeof value === 'symbol' ||\n        typeof value === 'boolean');\n}\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n    return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nconst _toString = Object.prototype.toString;\nfunction toRawType(value) {\n    return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n    return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n    return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n    const n = parseFloat(String(val));\n    return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n    return (isDef(val) &&\n        typeof val.then === 'function' &&\n        typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n    return val == null\n        ? ''\n        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n            ? JSON.stringify(val, replacer, 2)\n            : String(val);\n}\nfunction replacer(_key, val) {\n    // avoid circular deps from v3\n    if (val && val.__v_isRef) {\n        return val.value;\n    }\n    return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n    const n = parseFloat(val);\n    return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n    const map = Object.create(null);\n    const list = str.split(',');\n    for (let i = 0; i < list.length; i++) {\n        map[list[i]] = true;\n    }\n    return expectsLowerCase ? val => map[val.toLowerCase()] : val => map[val];\n}\n/**\n * Check if a tag is a built-in tag.\n */\nconst isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nconst isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n    const len = arr.length;\n    if (len) {\n        // fast path for the only / last item\n        if (item === arr[len - 1]) {\n            arr.length = len - 1;\n            return;\n        }\n        const index = arr.indexOf(item);\n        if (index > -1) {\n            return arr.splice(index, 1);\n        }\n    }\n}\n/**\n * Check whether an object has the property.\n */\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n    const cache = Object.create(null);\n    return function cachedFn(str) {\n        const hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cached((str) => {\n    return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));\n});\n/**\n * Capitalize a string.\n */\nconst capitalize = cached((str) => {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cached((str) => {\n    return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n    function boundFn(a) {\n        const l = arguments.length;\n        return l\n            ? l > 1\n                ? fn.apply(ctx, arguments)\n                : fn.call(ctx, a)\n            : fn.call(ctx);\n    }\n    boundFn._length = fn.length;\n    return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n    return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nconst bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n    start = start || 0;\n    let i = list.length - start;\n    const ret = new Array(i);\n    while (i--) {\n        ret[i] = list[i + start];\n    }\n    return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n    for (const key in _from) {\n        to[key] = _from[key];\n    }\n    return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n    const res = {};\n    for (let i = 0; i < arr.length; i++) {\n        if (arr[i]) {\n            extend(res, arr[i]);\n        }\n    }\n    return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nconst no = (a, b, c) => false;\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nconst identity = (_) => _;\n/**\n * Generate a string containing static keys from compiler modules.\n */\nfunction genStaticKeys$1(modules) {\n    return modules\n        .reduce((keys, m) => keys.concat(m.staticKeys || []), [])\n        .join(',');\n}\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n    if (a === b)\n        return true;\n    const isObjectA = isObject(a);\n    const isObjectB = isObject(b);\n    if (isObjectA && isObjectB) {\n        try {\n            const isArrayA = Array.isArray(a);\n            const isArrayB = Array.isArray(b);\n            if (isArrayA && isArrayB) {\n                return (a.length === b.length &&\n                    a.every((e, i) => {\n                        return looseEqual(e, b[i]);\n                    }));\n            }\n            else if (a instanceof Date && b instanceof Date) {\n                return a.getTime() === b.getTime();\n            }\n            else if (!isArrayA && !isArrayB) {\n                const keysA = Object.keys(a);\n                const keysB = Object.keys(b);\n                return (keysA.length === keysB.length &&\n                    keysA.every(key => {\n                        return looseEqual(a[key], b[key]);\n                    }));\n            }\n            else {\n                /* istanbul ignore next */\n                return false;\n            }\n        }\n        catch (e) {\n            /* istanbul ignore next */\n            return false;\n        }\n    }\n    else if (!isObjectA && !isObjectB) {\n        return String(a) === String(b);\n    }\n    else {\n        return false;\n    }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n    for (let i = 0; i < arr.length; i++) {\n        if (looseEqual(arr[i], val))\n            return i;\n    }\n    return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n    let called = false;\n    return function () {\n        if (!called) {\n            called = true;\n            fn.apply(this, arguments);\n        }\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n    if (x === y) {\n        return x === 0 && 1 / x !== 1 / y;\n    }\n    else {\n        return x === x || y === y;\n    }\n}\n\nconst SSR_ATTR = 'data-server-rendered';\nconst ASSET_TYPES = ['component', 'directive', 'filter'];\nconst LIFECYCLE_HOOKS = [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated',\n    'errorCaptured',\n    'serverPrefetch',\n    'renderTracked',\n    'renderTriggered'\n];\n\nvar config = {\n    /**\n     * Option merge strategies (used in core/util/options)\n     */\n    // $flow-disable-line\n    optionMergeStrategies: Object.create(null),\n    /**\n     * Whether to suppress warnings.\n     */\n    silent: false,\n    /**\n     * Show production mode tip message on boot?\n     */\n    productionTip: true,\n    /**\n     * Whether to enable devtools\n     */\n    devtools: true,\n    /**\n     * Whether to record perf\n     */\n    performance: false,\n    /**\n     * Error handler for watcher errors\n     */\n    errorHandler: null,\n    /**\n     * Warn handler for watcher warns\n     */\n    warnHandler: null,\n    /**\n     * Ignore certain custom elements\n     */\n    ignoredElements: [],\n    /**\n     * Custom user key aliases for v-on\n     */\n    // $flow-disable-line\n    keyCodes: Object.create(null),\n    /**\n     * Check if a tag is reserved so that it cannot be registered as a\n     * component. This is platform-dependent and may be overwritten.\n     */\n    isReservedTag: no,\n    /**\n     * Check if an attribute is reserved so that it cannot be used as a component\n     * prop. This is platform-dependent and may be overwritten.\n     */\n    isReservedAttr: no,\n    /**\n     * Check if a tag is an unknown element.\n     * Platform-dependent.\n     */\n    isUnknownElement: no,\n    /**\n     * Get the namespace of an element\n     */\n    getTagNamespace: noop,\n    /**\n     * Parse the real tag name for the specific platform.\n     */\n    parsePlatformTagName: identity,\n    /**\n     * Check if an attribute must be bound using property, e.g. value\n     * Platform-dependent.\n     */\n    mustUseProp: no,\n    /**\n     * Perform updates asynchronously. Intended to be used by Vue Test Utils\n     * This will significantly reduce performance if set to false.\n     */\n    async: true,\n    /**\n     * Exposed for legacy reasons\n     */\n    _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nconst unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n    const c = (str + '').charCodeAt(0);\n    return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n    Object.defineProperty(obj, key, {\n        value: val,\n        enumerable: !!enumerable,\n        writable: true,\n        configurable: true\n    });\n}\n/**\n * Parse simple path.\n */\nconst bailRE = new RegExp(`[^${unicodeRegExp.source}.$_\\\\d]`);\nfunction parsePath(path) {\n    if (bailRE.test(path)) {\n        return;\n    }\n    const segments = path.split('.');\n    return function (obj) {\n        for (let i = 0; i < segments.length; i++) {\n            if (!obj)\n                return;\n            obj = obj[segments[i]];\n        }\n        return obj;\n    };\n}\n\n// can we use __proto__?\nconst hasProto = '__proto__' in {};\n// Browser environment sniffing\nconst inBrowser = typeof window !== 'undefined';\nconst UA = inBrowser && window.navigator.userAgent.toLowerCase();\nconst isIE = UA && /msie|trident/.test(UA);\nconst isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nconst isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nconst isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nconst isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nconst nativeWatch = {}.watch;\nlet supportsPassive = false;\nif (inBrowser) {\n    try {\n        const opts = {};\n        Object.defineProperty(opts, 'passive', {\n            get() {\n                /* istanbul ignore next */\n                supportsPassive = true;\n            }\n        }); // https://github.com/facebook/flow/issues/285\n        window.addEventListener('test-passive', null, opts);\n    }\n    catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nlet _isServer;\nconst isServerRendering = () => {\n    if (_isServer === undefined) {\n        /* istanbul ignore if */\n        if (!inBrowser && typeof global !== 'undefined') {\n            // detect presence of vue-server-renderer and avoid\n            // Webpack shimming the process\n            _isServer =\n                global['process'] && global['process'].env.VUE_ENV === 'server';\n        }\n        else {\n            _isServer = false;\n        }\n    }\n    return _isServer;\n};\n// detect devtools\nconst devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nconst hasSymbol = typeof Symbol !== 'undefined' &&\n    isNative(Symbol) &&\n    typeof Reflect !== 'undefined' &&\n    isNative(Reflect.ownKeys);\nlet _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n    // use native Set when available.\n    _Set = Set;\n}\nelse {\n    // a non-standard Set polyfill that only works with primitive keys.\n    _Set = class Set {\n        constructor() {\n            this.set = Object.create(null);\n        }\n        has(key) {\n            return this.set[key] === true;\n        }\n        add(key) {\n            this.set[key] = true;\n        }\n        clear() {\n            this.set = Object.create(null);\n        }\n    };\n}\n\nlet currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n    return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm = null) {\n    if (!vm)\n        currentInstance && currentInstance._scope.off();\n    currentInstance = vm;\n    vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nclass VNode {\n    constructor(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n        this.tag = tag;\n        this.data = data;\n        this.children = children;\n        this.text = text;\n        this.elm = elm;\n        this.ns = undefined;\n        this.context = context;\n        this.fnContext = undefined;\n        this.fnOptions = undefined;\n        this.fnScopeId = undefined;\n        this.key = data && data.key;\n        this.componentOptions = componentOptions;\n        this.componentInstance = undefined;\n        this.parent = undefined;\n        this.raw = false;\n        this.isStatic = false;\n        this.isRootInsert = true;\n        this.isComment = false;\n        this.isCloned = false;\n        this.isOnce = false;\n        this.asyncFactory = asyncFactory;\n        this.asyncMeta = undefined;\n        this.isAsyncPlaceholder = false;\n    }\n    // DEPRECATED: alias for componentInstance for backwards compat.\n    /* istanbul ignore next */\n    get child() {\n        return this.componentInstance;\n    }\n}\nconst createEmptyVNode = (text = '') => {\n    const node = new VNode();\n    node.text = text;\n    node.isComment = true;\n    return node;\n};\nfunction createTextVNode(val) {\n    return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n    const cloned = new VNode(vnode.tag, vnode.data, \n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n    cloned.ns = vnode.ns;\n    cloned.isStatic = vnode.isStatic;\n    cloned.key = vnode.key;\n    cloned.isComment = vnode.isComment;\n    cloned.fnContext = vnode.fnContext;\n    cloned.fnOptions = vnode.fnOptions;\n    cloned.fnScopeId = vnode.fnScopeId;\n    cloned.asyncMeta = vnode.asyncMeta;\n    cloned.isCloned = true;\n    return cloned;\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\nlet initProxy;\n{\n    const allowedGlobals = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n        'require' // for Webpack/Browserify\n    );\n    const warnNonPresent = (target, key) => {\n        warn$2(`Property or method \"${key}\" is not defined on the instance but ` +\n            'referenced during render. Make sure that this property is reactive, ' +\n            'either in the data option, or for class-based components, by ' +\n            'initializing the property. ' +\n            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n    };\n    const warnReservedPrefix = (target, key) => {\n        warn$2(`Property \"${key}\" must be accessed with \"$data.${key}\" because ` +\n            'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n            'prevent conflicts with Vue internals. ' +\n            'See: https://v2.vuejs.org/v2/api/#data', target);\n    };\n    const hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);\n    if (hasProxy) {\n        const isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n        config.keyCodes = new Proxy(config.keyCodes, {\n            set(target, key, value) {\n                if (isBuiltInModifier(key)) {\n                    warn$2(`Avoid overwriting built-in modifier in config.keyCodes: .${key}`);\n                    return false;\n                }\n                else {\n                    target[key] = value;\n                    return true;\n                }\n            }\n        });\n    }\n    const hasHandler = {\n        has(target, key) {\n            const has = key in target;\n            const isAllowed = allowedGlobals(key) ||\n                (typeof key === 'string' &&\n                    key.charAt(0) === '_' &&\n                    !(key in target.$data));\n            if (!has && !isAllowed) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return has || !isAllowed;\n        }\n    };\n    const getHandler = {\n        get(target, key) {\n            if (typeof key === 'string' && !(key in target)) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return target[key];\n        }\n    };\n    initProxy = function initProxy(vm) {\n        if (hasProxy) {\n            // determine which proxy handler to use\n            const options = vm.$options;\n            const handlers = options.render && options.render._withStripped ? getHandler : hasHandler;\n            vm._renderProxy = new Proxy(vm, handlers);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n    };\n}\n\nlet uid$2 = 0;\nconst pendingCleanupDeps = [];\nconst cleanupDeps = () => {\n    for (let i = 0; i < pendingCleanupDeps.length; i++) {\n        const dep = pendingCleanupDeps[i];\n        dep.subs = dep.subs.filter(s => s);\n        dep._pending = false;\n    }\n    pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nclass Dep {\n    constructor() {\n        // pending subs cleanup\n        this._pending = false;\n        this.id = uid$2++;\n        this.subs = [];\n    }\n    addSub(sub) {\n        this.subs.push(sub);\n    }\n    removeSub(sub) {\n        // #12696 deps with massive amount of subscribers are extremely slow to\n        // clean up in Chromium\n        // to workaround this, we unset the sub for now, and clear them on\n        // next scheduler flush.\n        this.subs[this.subs.indexOf(sub)] = null;\n        if (!this._pending) {\n            this._pending = true;\n            pendingCleanupDeps.push(this);\n        }\n    }\n    depend(info) {\n        if (Dep.target) {\n            Dep.target.addDep(this);\n            if (info && Dep.target.onTrack) {\n                Dep.target.onTrack(Object.assign({ effect: Dep.target }, info));\n            }\n        }\n    }\n    notify(info) {\n        // stabilize the subscriber list first\n        const subs = this.subs.filter(s => s);\n        if (!config.async) {\n            // subs aren't sorted in scheduler if not running async\n            // we need to sort them now to make sure they fire in correct\n            // order\n            subs.sort((a, b) => a.id - b.id);\n        }\n        for (let i = 0, l = subs.length; i < l; i++) {\n            const sub = subs[i];\n            if (info) {\n                sub.onTrigger &&\n                    sub.onTrigger(Object.assign({ effect: subs[i] }, info));\n            }\n            sub.update();\n        }\n    }\n}\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nconst targetStack = [];\nfunction pushTarget(target) {\n    targetStack.push(target);\n    Dep.target = target;\n}\nfunction popTarget() {\n    targetStack.pop();\n    Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nconst arrayProto = Array.prototype;\nconst arrayMethods = Object.create(arrayProto);\nconst methodsToPatch = [\n    'push',\n    'pop',\n    'shift',\n    'unshift',\n    'splice',\n    'sort',\n    'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n    // cache original method\n    const original = arrayProto[method];\n    def(arrayMethods, method, function mutator(...args) {\n        const result = original.apply(this, args);\n        const ob = this.__ob__;\n        let inserted;\n        switch (method) {\n            case 'push':\n            case 'unshift':\n                inserted = args;\n                break;\n            case 'splice':\n                inserted = args.slice(2);\n                break;\n        }\n        if (inserted)\n            ob.observeArray(inserted);\n        // notify change\n        {\n            ob.dep.notify({\n                type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                target: this,\n                key: method\n            });\n        }\n        return result;\n    });\n});\n\nconst arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nconst NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nlet shouldObserve = true;\nfunction toggleObserving(value) {\n    shouldObserve = value;\n}\n// ssr mock dep\nconst mockDep = {\n    notify: noop,\n    depend: noop,\n    addSub: noop,\n    removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nclass Observer {\n    constructor(value, shallow = false, mock = false) {\n        this.value = value;\n        this.shallow = shallow;\n        this.mock = mock;\n        // this.value = value\n        this.dep = mock ? mockDep : new Dep();\n        this.vmCount = 0;\n        def(value, '__ob__', this);\n        if (isArray(value)) {\n            if (!mock) {\n                if (hasProto) {\n                    value.__proto__ = arrayMethods;\n                    /* eslint-enable no-proto */\n                }\n                else {\n                    for (let i = 0, l = arrayKeys.length; i < l; i++) {\n                        const key = arrayKeys[i];\n                        def(value, key, arrayMethods[key]);\n                    }\n                }\n            }\n            if (!shallow) {\n                this.observeArray(value);\n            }\n        }\n        else {\n            /**\n             * Walk through all properties and convert them into\n             * getter/setters. This method should only be called when\n             * value type is Object.\n             */\n            const keys = Object.keys(value);\n            for (let i = 0; i < keys.length; i++) {\n                const key = keys[i];\n                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n            }\n        }\n    }\n    /**\n     * Observe a list of Array items.\n     */\n    observeArray(value) {\n        for (let i = 0, l = value.length; i < l; i++) {\n            observe(value[i], false, this.mock);\n        }\n    }\n}\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n        return value.__ob__;\n    }\n    if (shouldObserve &&\n        (ssrMockReactivity || !isServerRendering()) &&\n        (isArray(value) || isPlainObject(value)) &&\n        Object.isExtensible(value) &&\n        !value.__v_skip /* ReactiveFlags.SKIP */ &&\n        !isRef(value) &&\n        !(value instanceof VNode)) {\n        return new Observer(value, shallow, ssrMockReactivity);\n    }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow = false) {\n    const dep = new Dep();\n    const property = Object.getOwnPropertyDescriptor(obj, key);\n    if (property && property.configurable === false) {\n        return;\n    }\n    // cater for pre-defined getter/setters\n    const getter = property && property.get;\n    const setter = property && property.set;\n    if ((!getter || setter) &&\n        (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n        val = obj[key];\n    }\n    let childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n    Object.defineProperty(obj, key, {\n        enumerable: true,\n        configurable: true,\n        get: function reactiveGetter() {\n            const value = getter ? getter.call(obj) : val;\n            if (Dep.target) {\n                {\n                    dep.depend({\n                        target: obj,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                if (childOb) {\n                    childOb.dep.depend();\n                    if (isArray(value)) {\n                        dependArray(value);\n                    }\n                }\n            }\n            return isRef(value) && !shallow ? value.value : value;\n        },\n        set: function reactiveSetter(newVal) {\n            const value = getter ? getter.call(obj) : val;\n            if (!hasChanged(value, newVal)) {\n                return;\n            }\n            if (customSetter) {\n                customSetter();\n            }\n            if (setter) {\n                setter.call(obj, newVal);\n            }\n            else if (getter) {\n                // #7981: for accessor properties without setter\n                return;\n            }\n            else if (!shallow && isRef(value) && !isRef(newVal)) {\n                value.value = newVal;\n                return;\n            }\n            else {\n                val = newVal;\n            }\n            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n            {\n                dep.notify({\n                    type: \"set\" /* TriggerOpTypes.SET */,\n                    target: obj,\n                    key,\n                    newValue: newVal,\n                    oldValue: value\n                });\n            }\n        }\n    });\n    return dep;\n}\nfunction set(target, key, val) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn$2(`Cannot set reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isReadonly(target)) {\n        warn$2(`Set operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    const ob = target.__ob__;\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.length = Math.max(target.length, key);\n        target.splice(key, 1, val);\n        // when mocking for SSR, array methods are not hijacked\n        if (ob && !ob.shallow && ob.mock) {\n            observe(val, false, true);\n        }\n        return val;\n    }\n    if (key in target && !(key in Object.prototype)) {\n        target[key] = val;\n        return val;\n    }\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                'at runtime - declare it upfront in the data option.');\n        return val;\n    }\n    if (!ob) {\n        target[key] = val;\n        return val;\n    }\n    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n    {\n        ob.dep.notify({\n            type: \"add\" /* TriggerOpTypes.ADD */,\n            target: target,\n            key,\n            newValue: val,\n            oldValue: undefined\n        });\n    }\n    return val;\n}\nfunction del(target, key) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn$2(`Cannot delete reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.splice(key, 1);\n        return;\n    }\n    const ob = target.__ob__;\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn$2('Avoid deleting properties on a Vue instance or its root $data ' +\n                '- just set it to null.');\n        return;\n    }\n    if (isReadonly(target)) {\n        warn$2(`Delete operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    if (!hasOwn(target, key)) {\n        return;\n    }\n    delete target[key];\n    if (!ob) {\n        return;\n    }\n    {\n        ob.dep.notify({\n            type: \"delete\" /* TriggerOpTypes.DELETE */,\n            target: target,\n            key\n        });\n    }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n    for (let e, i = 0, l = value.length; i < l; i++) {\n        e = value[i];\n        if (e && e.__ob__) {\n            e.__ob__.dep.depend();\n        }\n        if (isArray(e)) {\n            dependArray(e);\n        }\n    }\n}\n\nfunction reactive(target) {\n    makeReactive(target, false);\n    return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n    makeReactive(target, true);\n    def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    return target;\n}\nfunction makeReactive(target, shallow) {\n    // if trying to observe a readonly proxy, return the readonly version.\n    if (!isReadonly(target)) {\n        {\n            if (isArray(target)) {\n                warn$2(`Avoid using Array as root value for ${shallow ? `shallowReactive()` : `reactive()`} as it cannot be tracked in watch() or watchEffect(). Use ${shallow ? `shallowRef()` : `ref()`} instead. This is a Vue-2-only limitation.`);\n            }\n            const existingOb = target && target.__ob__;\n            if (existingOb && existingOb.shallow !== shallow) {\n                warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);\n            }\n        }\n        const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n        if (!ob) {\n            if (target == null || isPrimitive(target)) {\n                warn$2(`value cannot be made reactive: ${String(target)}`);\n            }\n            if (isCollectionType(target)) {\n                warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);\n            }\n        }\n    }\n}\nfunction isReactive(value) {\n    if (isReadonly(value)) {\n        return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n    }\n    return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n    return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n    return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n    return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n    const raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n    return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n    // non-extensible objects won't be observed anyway\n    if (Object.isExtensible(value)) {\n        def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n    }\n    return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n    const type = toRawType(value);\n    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nconst RefFlag = `__v_isRef`;\nfunction isRef(r) {\n    return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n    return createRef(value, false);\n}\nfunction shallowRef(value) {\n    return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n    if (isRef(rawValue)) {\n        return rawValue;\n    }\n    const ref = {};\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n    return ref;\n}\nfunction triggerRef(ref) {\n    if (!ref.dep) {\n        warn$2(`received object is not a triggerable ref.`);\n    }\n    {\n        ref.dep &&\n            ref.dep.notify({\n                type: \"set\" /* TriggerOpTypes.SET */,\n                target: ref,\n                key: 'value'\n            });\n    }\n}\nfunction unref(ref) {\n    return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n    if (isReactive(objectWithRefs)) {\n        return objectWithRefs;\n    }\n    const proxy = {};\n    const keys = Object.keys(objectWithRefs);\n    for (let i = 0; i < keys.length; i++) {\n        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n    }\n    return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n    Object.defineProperty(target, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => {\n            const val = source[key];\n            if (isRef(val)) {\n                return val.value;\n            }\n            else {\n                const ob = val && val.__ob__;\n                if (ob)\n                    ob.dep.depend();\n                return val;\n            }\n        },\n        set: value => {\n            const oldValue = source[key];\n            if (isRef(oldValue) && !isRef(value)) {\n                oldValue.value = value;\n            }\n            else {\n                source[key] = value;\n            }\n        }\n    });\n}\nfunction customRef(factory) {\n    const dep = new Dep();\n    const { get, set } = factory(() => {\n        {\n            dep.depend({\n                target: ref,\n                type: \"get\" /* TrackOpTypes.GET */,\n                key: 'value'\n            });\n        }\n    }, () => {\n        {\n            dep.notify({\n                target: ref,\n                type: \"set\" /* TriggerOpTypes.SET */,\n                key: 'value'\n            });\n        }\n    });\n    const ref = {\n        get value() {\n            return get();\n        },\n        set value(newVal) {\n            set(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\nfunction toRefs(object) {\n    if (!isReactive(object)) {\n        warn$2(`toRefs() expects a reactive object but received a plain one.`);\n    }\n    const ret = isArray(object) ? new Array(object.length) : {};\n    for (const key in object) {\n        ret[key] = toRef(object, key);\n    }\n    return ret;\n}\nfunction toRef(object, key, defaultValue) {\n    const val = object[key];\n    if (isRef(val)) {\n        return val;\n    }\n    const ref = {\n        get value() {\n            const val = object[key];\n            return val === undefined ? defaultValue : val;\n        },\n        set value(newVal) {\n            object[key] = newVal;\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\n\nconst rawToReadonlyFlag = `__v_rawToReadonly`;\nconst rawToShallowReadonlyFlag = `__v_rawToShallowReadonly`;\nfunction readonly(target) {\n    return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n    if (!isPlainObject(target)) {\n        {\n            if (isArray(target)) {\n                warn$2(`Vue 2 does not support readonly arrays.`);\n            }\n            else if (isCollectionType(target)) {\n                warn$2(`Vue 2 does not support readonly collection types such as Map or Set.`);\n            }\n            else {\n                warn$2(`value cannot be made readonly: ${typeof target}`);\n            }\n        }\n        return target;\n    }\n    if (!Object.isExtensible(target)) {\n        warn$2(`Vue 2 does not support creating readonly proxy for non-extensible object.`);\n    }\n    // already a readonly object\n    if (isReadonly(target)) {\n        return target;\n    }\n    // already has a readonly proxy\n    const existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n    const existingProxy = target[existingFlag];\n    if (existingProxy) {\n        return existingProxy;\n    }\n    const proxy = Object.create(Object.getPrototypeOf(target));\n    def(target, existingFlag, proxy);\n    def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n    def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n    if (isRef(target)) {\n        def(proxy, RefFlag, true);\n    }\n    if (shallow || isShallow(target)) {\n        def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    }\n    const keys = Object.keys(target);\n    for (let i = 0; i < keys.length; i++) {\n        defineReadonlyProperty(proxy, target, keys[i], shallow);\n    }\n    return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            const val = target[key];\n            return shallow || !isPlainObject(val) ? val : readonly(val);\n        },\n        set() {\n            warn$2(`Set operation on key \"${key}\" failed: target is readonly.`);\n        }\n    });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n    return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n    let getter;\n    let setter;\n    const onlyGetter = isFunction(getterOrOptions);\n    if (onlyGetter) {\n        getter = getterOrOptions;\n        setter = () => {\n                warn$2('Write operation failed: computed value is readonly');\n            }\n            ;\n    }\n    else {\n        getter = getterOrOptions.get;\n        setter = getterOrOptions.set;\n    }\n    const watcher = isServerRendering()\n        ? null\n        : new Watcher(currentInstance, getter, noop, { lazy: true });\n    if (watcher && debugOptions) {\n        watcher.onTrack = debugOptions.onTrack;\n        watcher.onTrigger = debugOptions.onTrigger;\n    }\n    const ref = {\n        // some libs rely on the presence effect for checking computed refs\n        // from normal refs, but the implementation doesn't matter\n        effect: watcher,\n        get value() {\n            if (watcher) {\n                if (watcher.dirty) {\n                    watcher.evaluate();\n                }\n                if (Dep.target) {\n                    if (Dep.target.onTrack) {\n                        Dep.target.onTrack({\n                            effect: Dep.target,\n                            target: ref,\n                            type: \"get\" /* TrackOpTypes.GET */,\n                            key: 'value'\n                        });\n                    }\n                    watcher.depend();\n                }\n                return watcher.value;\n            }\n            else {\n                return getter();\n            }\n        },\n        set value(newVal) {\n            setter(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n    return ref;\n}\n\nlet mark;\nlet measure;\n{\n    const perf = inBrowser && window.performance;\n    /* istanbul ignore if */\n    if (perf &&\n        // @ts-ignore\n        perf.mark &&\n        // @ts-ignore\n        perf.measure &&\n        // @ts-ignore\n        perf.clearMarks &&\n        // @ts-ignore\n        perf.clearMeasures) {\n        mark = tag => perf.mark(tag);\n        measure = (name, startTag, endTag) => {\n            perf.measure(name, startTag, endTag);\n            perf.clearMarks(startTag);\n            perf.clearMarks(endTag);\n            // perf.clearMeasures(name)\n        };\n    }\n}\n\nconst normalizeEvent = cached((name) => {\n    const passive = name.charAt(0) === '&';\n    name = passive ? name.slice(1) : name;\n    const once = name.charAt(0) === '~'; // Prefixed last, checked first\n    name = once ? name.slice(1) : name;\n    const capture = name.charAt(0) === '!';\n    name = capture ? name.slice(1) : name;\n    return {\n        name,\n        once,\n        capture,\n        passive\n    };\n});\nfunction createFnInvoker(fns, vm) {\n    function invoker() {\n        const fns = invoker.fns;\n        if (isArray(fns)) {\n            const cloned = fns.slice();\n            for (let i = 0; i < cloned.length; i++) {\n                invokeWithErrorHandling(cloned[i], null, arguments, vm, `v-on handler`);\n            }\n        }\n        else {\n            // return handler return value for single handlers\n            return invokeWithErrorHandling(fns, null, arguments, vm, `v-on handler`);\n        }\n    }\n    invoker.fns = fns;\n    return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n    let name, cur, old, event;\n    for (name in on) {\n        cur = on[name];\n        old = oldOn[name];\n        event = normalizeEvent(name);\n        if (isUndef(cur)) {\n            warn$2(`Invalid handler for event \"${event.name}\": got ` + String(cur), vm);\n        }\n        else if (isUndef(old)) {\n            if (isUndef(cur.fns)) {\n                cur = on[name] = createFnInvoker(cur, vm);\n            }\n            if (isTrue(event.once)) {\n                cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n            }\n            add(event.name, cur, event.capture, event.passive, event.params);\n        }\n        else if (cur !== old) {\n            old.fns = cur;\n            on[name] = old;\n        }\n    }\n    for (name in oldOn) {\n        if (isUndef(on[name])) {\n            event = normalizeEvent(name);\n            remove(event.name, oldOn[name], event.capture);\n        }\n    }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n    if (def instanceof VNode) {\n        def = def.data.hook || (def.data.hook = {});\n    }\n    let invoker;\n    const oldHook = def[hookKey];\n    function wrappedHook() {\n        hook.apply(this, arguments);\n        // important: remove merged hook to ensure it's called only once\n        // and prevent memory leak\n        remove$2(invoker.fns, wrappedHook);\n    }\n    if (isUndef(oldHook)) {\n        // no existing hook\n        invoker = createFnInvoker([wrappedHook]);\n    }\n    else {\n        /* istanbul ignore if */\n        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n            // already a merged invoker\n            invoker = oldHook;\n            invoker.fns.push(wrappedHook);\n        }\n        else {\n            // existing plain hook\n            invoker = createFnInvoker([oldHook, wrappedHook]);\n        }\n    }\n    invoker.merged = true;\n    def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n    // we are only extracting raw values here.\n    // validation and default values are handled in the child\n    // component itself.\n    const propOptions = Ctor.options.props;\n    if (isUndef(propOptions)) {\n        return;\n    }\n    const res = {};\n    const { attrs, props } = data;\n    if (isDef(attrs) || isDef(props)) {\n        for (const key in propOptions) {\n            const altKey = hyphenate(key);\n            {\n                const keyInLowerCase = key.toLowerCase();\n                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                    tip(`Prop \"${keyInLowerCase}\" is passed to component ` +\n                        `${formatComponentName(\n                        // @ts-expect-error tag is string\n                        tag || Ctor)}, but the declared prop name is` +\n                        ` \"${key}\". ` +\n                        `Note that HTML attributes are case-insensitive and camelCased ` +\n                        `props need to use their kebab-case equivalents when using in-DOM ` +\n                        `templates. You should probably use \"${altKey}\" instead of \"${key}\".`);\n                }\n            }\n            checkProp(res, props, key, altKey, true) ||\n                checkProp(res, attrs, key, altKey, false);\n        }\n    }\n    return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n    if (isDef(hash)) {\n        if (hasOwn(hash, key)) {\n            res[key] = hash[key];\n            if (!preserve) {\n                delete hash[key];\n            }\n            return true;\n        }\n        else if (hasOwn(hash, altKey)) {\n            res[key] = hash[altKey];\n            if (!preserve) {\n                delete hash[altKey];\n            }\n            return true;\n        }\n    }\n    return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n    for (let i = 0; i < children.length; i++) {\n        if (isArray(children[i])) {\n            return Array.prototype.concat.apply([], children);\n        }\n    }\n    return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren(children) {\n    return isPrimitive(children)\n        ? [createTextVNode(children)]\n        : isArray(children)\n            ? normalizeArrayChildren(children)\n            : undefined;\n}\nfunction isTextNode(node) {\n    return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n}\nfunction normalizeArrayChildren(children, nestedIndex) {\n    const res = [];\n    let i, c, lastIndex, last;\n    for (i = 0; i < children.length; i++) {\n        c = children[i];\n        if (isUndef(c) || typeof c === 'boolean')\n            continue;\n        lastIndex = res.length - 1;\n        last = res[lastIndex];\n        //  nested\n        if (isArray(c)) {\n            if (c.length > 0) {\n                c = normalizeArrayChildren(c, `${nestedIndex || ''}_${i}`);\n                // merge adjacent text nodes\n                if (isTextNode(c[0]) && isTextNode(last)) {\n                    res[lastIndex] = createTextVNode(last.text + c[0].text);\n                    c.shift();\n                }\n                res.push.apply(res, c);\n            }\n        }\n        else if (isPrimitive(c)) {\n            if (isTextNode(last)) {\n                // merge adjacent text nodes\n                // this is necessary for SSR hydration because text nodes are\n                // essentially merged when rendered to HTML strings\n                res[lastIndex] = createTextVNode(last.text + c);\n            }\n            else if (c !== '') {\n                // convert primitive to vnode\n                res.push(createTextVNode(c));\n            }\n        }\n        else {\n            if (isTextNode(c) && isTextNode(last)) {\n                // merge adjacent text nodes\n                res[lastIndex] = createTextVNode(last.text + c.text);\n            }\n            else {\n                // default key for nested array children (likely generated by v-for)\n                if (isTrue(children._isVList) &&\n                    isDef(c.tag) &&\n                    isUndef(c.key) &&\n                    isDef(nestedIndex)) {\n                    c.key = `__vlist${nestedIndex}_${i}__`;\n                }\n                res.push(c);\n            }\n        }\n    }\n    return res;\n}\n\nconst SIMPLE_NORMALIZE = 1;\nconst ALWAYS_NORMALIZE = 2;\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n    if (isArray(data) || isPrimitive(data)) {\n        normalizationType = children;\n        children = data;\n        data = undefined;\n    }\n    if (isTrue(alwaysNormalize)) {\n        normalizationType = ALWAYS_NORMALIZE;\n    }\n    return _createElement(context, tag, data, children, normalizationType);\n}\nfunction _createElement(context, tag, data, children, normalizationType) {\n    if (isDef(data) && isDef(data.__ob__)) {\n        warn$2(`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\\n` + 'Always create fresh vnode data objects in each render!', context);\n        return createEmptyVNode();\n    }\n    // object syntax in v-bind\n    if (isDef(data) && isDef(data.is)) {\n        tag = data.is;\n    }\n    if (!tag) {\n        // in case of component :is set to falsy value\n        return createEmptyVNode();\n    }\n    // warn against non-primitive key\n    if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n        warn$2('Avoid using non-primitive value as key, ' +\n            'use string/number value instead.', context);\n    }\n    // support single function children as default scoped slot\n    if (isArray(children) && isFunction(children[0])) {\n        data = data || {};\n        data.scopedSlots = { default: children[0] };\n        children.length = 0;\n    }\n    if (normalizationType === ALWAYS_NORMALIZE) {\n        children = normalizeChildren(children);\n    }\n    else if (normalizationType === SIMPLE_NORMALIZE) {\n        children = simpleNormalizeChildren(children);\n    }\n    let vnode, ns;\n    if (typeof tag === 'string') {\n        let Ctor;\n        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n        if (config.isReservedTag(tag)) {\n            // platform built-in elements\n            if (isDef(data) &&\n                isDef(data.nativeOn) &&\n                data.tag !== 'component') {\n                warn$2(`The .native modifier for v-on is only valid on components but it was used on <${tag}>.`, context);\n            }\n            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n        }\n        else if ((!data || !data.pre) &&\n            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n            // component\n            vnode = createComponent(Ctor, data, context, children, tag);\n        }\n        else {\n            // unknown or unlisted namespaced elements\n            // check at runtime because it may get assigned a namespace when its\n            // parent normalizes children\n            vnode = new VNode(tag, data, children, undefined, undefined, context);\n        }\n    }\n    else {\n        // direct component options / constructor\n        vnode = createComponent(tag, data, context, children);\n    }\n    if (isArray(vnode)) {\n        return vnode;\n    }\n    else if (isDef(vnode)) {\n        if (isDef(ns))\n            applyNS(vnode, ns);\n        if (isDef(data))\n            registerDeepBindings(data);\n        return vnode;\n    }\n    else {\n        return createEmptyVNode();\n    }\n}\nfunction applyNS(vnode, ns, force) {\n    vnode.ns = ns;\n    if (vnode.tag === 'foreignObject') {\n        // use default namespace inside foreignObject\n        ns = undefined;\n        force = true;\n    }\n    if (isDef(vnode.children)) {\n        for (let i = 0, l = vnode.children.length; i < l; i++) {\n            const child = vnode.children[i];\n            if (isDef(child.tag) &&\n                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                applyNS(child, ns, force);\n            }\n        }\n    }\n}\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings(data) {\n    if (isObject(data.style)) {\n        traverse(data.style);\n    }\n    if (isObject(data.class)) {\n        traverse(data.class);\n    }\n}\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList(val, render) {\n    let ret = null, i, l, keys, key;\n    if (isArray(val) || typeof val === 'string') {\n        ret = new Array(val.length);\n        for (i = 0, l = val.length; i < l; i++) {\n            ret[i] = render(val[i], i);\n        }\n    }\n    else if (typeof val === 'number') {\n        ret = new Array(val);\n        for (i = 0; i < val; i++) {\n            ret[i] = render(i + 1, i);\n        }\n    }\n    else if (isObject(val)) {\n        if (hasSymbol && val[Symbol.iterator]) {\n            ret = [];\n            const iterator = val[Symbol.iterator]();\n            let result = iterator.next();\n            while (!result.done) {\n                ret.push(render(result.value, ret.length));\n                result = iterator.next();\n            }\n        }\n        else {\n            keys = Object.keys(val);\n            ret = new Array(keys.length);\n            for (i = 0, l = keys.length; i < l; i++) {\n                key = keys[i];\n                ret[i] = render(val[key], key, i);\n            }\n        }\n    }\n    if (!isDef(ret)) {\n        ret = [];\n    }\n    ret._isVList = true;\n    return ret;\n}\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot(name, fallbackRender, props, bindObject) {\n    const scopedSlotFn = this.$scopedSlots[name];\n    let nodes;\n    if (scopedSlotFn) {\n        // scoped slot\n        props = props || {};\n        if (bindObject) {\n            if (!isObject(bindObject)) {\n                warn$2('slot v-bind without argument expects an Object', this);\n            }\n            props = extend(extend({}, bindObject), props);\n        }\n        nodes =\n            scopedSlotFn(props) ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    else {\n        nodes =\n            this.$slots[name] ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    const target = props && props.slot;\n    if (target) {\n        return this.$createElement('template', { slot: target }, nodes);\n    }\n    else {\n        return nodes;\n    }\n}\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter(id) {\n    return resolveAsset(this.$options, 'filters', id, true) || identity;\n}\n\nfunction isKeyNotMatch(expect, actual) {\n    if (isArray(expect)) {\n        return expect.indexOf(actual) === -1;\n    }\n    else {\n        return expect !== actual;\n    }\n}\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n    const mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n        return isKeyNotMatch(builtInKeyName, eventKeyName);\n    }\n    else if (mappedKeyCode) {\n        return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n    }\n    else if (eventKeyName) {\n        return hyphenate(eventKeyName) !== key;\n    }\n    return eventKeyCode === undefined;\n}\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps(data, tag, value, asProp, isSync) {\n    if (value) {\n        if (!isObject(value)) {\n            warn$2('v-bind without argument expects an Object or Array value', this);\n        }\n        else {\n            if (isArray(value)) {\n                value = toObject(value);\n            }\n            let hash;\n            for (const key in value) {\n                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                    hash = data;\n                }\n                else {\n                    const type = data.attrs && data.attrs.type;\n                    hash =\n                        asProp || config.mustUseProp(tag, type, key)\n                            ? data.domProps || (data.domProps = {})\n                            : data.attrs || (data.attrs = {});\n                }\n                const camelizedKey = camelize(key);\n                const hyphenatedKey = hyphenate(key);\n                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                    hash[key] = value[key];\n                    if (isSync) {\n                        const on = data.on || (data.on = {});\n                        on[`update:${key}`] = function ($event) {\n                            value[key] = $event;\n                        };\n                    }\n                }\n            }\n        }\n    }\n    return data;\n}\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic(index, isInFor) {\n    const cached = this._staticTrees || (this._staticTrees = []);\n    let tree = cached[index];\n    // if has already-rendered static tree and not inside v-for,\n    // we can reuse the same tree.\n    if (tree && !isInFor) {\n        return tree;\n    }\n    // otherwise, render a fresh tree.\n    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n    );\n    markStatic$1(tree, `__static__${index}`, false);\n    return tree;\n}\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce(tree, index, key) {\n    markStatic$1(tree, `__once__${index}${key ? `_${key}` : ``}`, true);\n    return tree;\n}\nfunction markStatic$1(tree, key, isOnce) {\n    if (isArray(tree)) {\n        for (let i = 0; i < tree.length; i++) {\n            if (tree[i] && typeof tree[i] !== 'string') {\n                markStaticNode(tree[i], `${key}_${i}`, isOnce);\n            }\n        }\n    }\n    else {\n        markStaticNode(tree, key, isOnce);\n    }\n}\nfunction markStaticNode(node, key, isOnce) {\n    node.isStatic = true;\n    node.key = key;\n    node.isOnce = isOnce;\n}\n\nfunction bindObjectListeners(data, value) {\n    if (value) {\n        if (!isPlainObject(value)) {\n            warn$2('v-on without argument expects an Object value', this);\n        }\n        else {\n            const on = (data.on = data.on ? extend({}, data.on) : {});\n            for (const key in value) {\n                const existing = on[key];\n                const ours = value[key];\n                on[key] = existing ? [].concat(existing, ours) : ours;\n            }\n        }\n    }\n    return data;\n}\n\nfunction resolveScopedSlots(fns, res, \n// the following are added in 2.6\nhasDynamicKeys, contentHashKey) {\n    res = res || { $stable: !hasDynamicKeys };\n    for (let i = 0; i < fns.length; i++) {\n        const slot = fns[i];\n        if (isArray(slot)) {\n            resolveScopedSlots(slot, res, hasDynamicKeys);\n        }\n        else if (slot) {\n            // marker for reverse proxying v-slot without scope on this.$slots\n            // @ts-expect-error\n            if (slot.proxy) {\n                // @ts-expect-error\n                slot.fn.proxy = true;\n            }\n            res[slot.key] = slot.fn;\n        }\n    }\n    if (contentHashKey) {\n        res.$key = contentHashKey;\n    }\n    return res;\n}\n\n// helper to process dynamic keys for dynamic arguments in v-bind and v-on.\nfunction bindDynamicKeys(baseObj, values) {\n    for (let i = 0; i < values.length; i += 2) {\n        const key = values[i];\n        if (typeof key === 'string' && key) {\n            baseObj[values[i]] = values[i + 1];\n        }\n        else if (key !== '' && key !== null) {\n            // null is a special value for explicitly removing a binding\n            warn$2(`Invalid value for dynamic directive argument (expected string or null): ${key}`, this);\n        }\n    }\n    return baseObj;\n}\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier(value, symbol) {\n    return typeof value === 'string' ? symbol + value : value;\n}\n\nfunction installRenderHelpers(target) {\n    target._o = markOnce;\n    target._n = toNumber;\n    target._s = toString;\n    target._l = renderList;\n    target._t = renderSlot;\n    target._q = looseEqual;\n    target._i = looseIndexOf;\n    target._m = renderStatic;\n    target._f = resolveFilter;\n    target._k = checkKeyCodes;\n    target._b = bindObjectProps;\n    target._v = createTextVNode;\n    target._e = createEmptyVNode;\n    target._u = resolveScopedSlots;\n    target._g = bindObjectListeners;\n    target._d = bindDynamicKeys;\n    target._p = prependModifier;\n}\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots(children, context) {\n    if (!children || !children.length) {\n        return {};\n    }\n    const slots = {};\n    for (let i = 0, l = children.length; i < l; i++) {\n        const child = children[i];\n        const data = child.data;\n        // remove slot attribute if the node is resolved as a Vue slot node\n        if (data && data.attrs && data.attrs.slot) {\n            delete data.attrs.slot;\n        }\n        // named slots should only be respected if the vnode was rendered in the\n        // same context.\n        if ((child.context === context || child.fnContext === context) &&\n            data &&\n            data.slot != null) {\n            const name = data.slot;\n            const slot = slots[name] || (slots[name] = []);\n            if (child.tag === 'template') {\n                slot.push.apply(slot, child.children || []);\n            }\n            else {\n                slot.push(child);\n            }\n        }\n        else {\n            (slots.default || (slots.default = [])).push(child);\n        }\n    }\n    // ignore slots that contains only whitespace\n    for (const name in slots) {\n        if (slots[name].every(isWhitespace)) {\n            delete slots[name];\n        }\n    }\n    return slots;\n}\nfunction isWhitespace(node) {\n    return (node.isComment && !node.asyncFactory) || node.text === ' ';\n}\n\nfunction isAsyncPlaceholder(node) {\n    // @ts-expect-error not really boolean type\n    return node.isComment && node.asyncFactory;\n}\n\nfunction normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n    let res;\n    const hasNormalSlots = Object.keys(normalSlots).length > 0;\n    const isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n    const key = scopedSlots && scopedSlots.$key;\n    if (!scopedSlots) {\n        res = {};\n    }\n    else if (scopedSlots._normalized) {\n        // fast path 1: child component re-render only, parent did not change\n        return scopedSlots._normalized;\n    }\n    else if (isStable &&\n        prevScopedSlots &&\n        prevScopedSlots !== emptyObject &&\n        key === prevScopedSlots.$key &&\n        !hasNormalSlots &&\n        !prevScopedSlots.$hasNormal) {\n        // fast path 2: stable scoped slots w/ no normal slots to proxy,\n        // only need to normalize once\n        return prevScopedSlots;\n    }\n    else {\n        res = {};\n        for (const key in scopedSlots) {\n            if (scopedSlots[key] && key[0] !== '$') {\n                res[key] = normalizeScopedSlot(ownerVm, normalSlots, key, scopedSlots[key]);\n            }\n        }\n    }\n    // expose normal slots on scopedSlots\n    for (const key in normalSlots) {\n        if (!(key in res)) {\n            res[key] = proxyNormalSlot(normalSlots, key);\n        }\n    }\n    // avoriaz seems to mock a non-extensible $scopedSlots object\n    // and when that is passed down this would cause an error\n    if (scopedSlots && Object.isExtensible(scopedSlots)) {\n        scopedSlots._normalized = res;\n    }\n    def(res, '$stable', isStable);\n    def(res, '$key', key);\n    def(res, '$hasNormal', hasNormalSlots);\n    return res;\n}\nfunction normalizeScopedSlot(vm, normalSlots, key, fn) {\n    const normalized = function () {\n        const cur = currentInstance;\n        setCurrentInstance(vm);\n        let res = arguments.length ? fn.apply(null, arguments) : fn({});\n        res =\n            res && typeof res === 'object' && !isArray(res)\n                ? [res] // single vnode\n                : normalizeChildren(res);\n        const vnode = res && res[0];\n        setCurrentInstance(cur);\n        return res &&\n            (!vnode ||\n                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n            ? undefined\n            : res;\n    };\n    // this is a slot using the new v-slot syntax without scope. although it is\n    // compiled as a scoped slot, render fn users would expect it to be present\n    // on this.$slots because the usage is semantically a normal slot.\n    if (fn.proxy) {\n        Object.defineProperty(normalSlots, key, {\n            get: normalized,\n            enumerable: true,\n            configurable: true\n        });\n    }\n    return normalized;\n}\nfunction proxyNormalSlot(slots, key) {\n    return () => slots[key];\n}\n\nfunction initSetup(vm) {\n    const options = vm.$options;\n    const setup = options.setup;\n    if (setup) {\n        const ctx = (vm._setupContext = createSetupContext(vm));\n        setCurrentInstance(vm);\n        pushTarget();\n        const setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, `setup`);\n        popTarget();\n        setCurrentInstance();\n        if (isFunction(setupResult)) {\n            // render function\n            // @ts-ignore\n            options.render = setupResult;\n        }\n        else if (isObject(setupResult)) {\n            // bindings\n            if (setupResult instanceof VNode) {\n                warn$2(`setup() should not return VNodes directly - ` +\n                    `return a render function instead.`);\n            }\n            vm._setupState = setupResult;\n            // __sfc indicates compiled bindings from <script setup>\n            if (!setupResult.__sfc) {\n                for (const key in setupResult) {\n                    if (!isReserved(key)) {\n                        proxyWithRefUnwrap(vm, setupResult, key);\n                    }\n                    else {\n                        warn$2(`Avoid using variables that start with _ or $ in setup().`);\n                    }\n                }\n            }\n            else {\n                // exposed for compiled render fn\n                const proxy = (vm._setupProxy = {});\n                for (const key in setupResult) {\n                    if (key !== '__sfc') {\n                        proxyWithRefUnwrap(proxy, setupResult, key);\n                    }\n                }\n            }\n        }\n        else if (setupResult !== undefined) {\n            warn$2(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);\n        }\n    }\n}\nfunction createSetupContext(vm) {\n    let exposeCalled = false;\n    return {\n        get attrs() {\n            if (!vm._attrsProxy) {\n                const proxy = (vm._attrsProxy = {});\n                def(proxy, '_v_attr_proxy', true);\n                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n            }\n            return vm._attrsProxy;\n        },\n        get listeners() {\n            if (!vm._listenersProxy) {\n                const proxy = (vm._listenersProxy = {});\n                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n            }\n            return vm._listenersProxy;\n        },\n        get slots() {\n            return initSlotsProxy(vm);\n        },\n        emit: bind$1(vm.$emit, vm),\n        expose(exposed) {\n            {\n                if (exposeCalled) {\n                    warn$2(`expose() should be called only once per setup().`, vm);\n                }\n                exposeCalled = true;\n            }\n            if (exposed) {\n                Object.keys(exposed).forEach(key => proxyWithRefUnwrap(vm, exposed, key));\n            }\n        }\n    };\n}\nfunction syncSetupProxy(to, from, prev, instance, type) {\n    let changed = false;\n    for (const key in from) {\n        if (!(key in to)) {\n            changed = true;\n            defineProxyAttr(to, key, instance, type);\n        }\n        else if (from[key] !== prev[key]) {\n            changed = true;\n        }\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            changed = true;\n            delete to[key];\n        }\n    }\n    return changed;\n}\nfunction defineProxyAttr(proxy, key, instance, type) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            return instance[type][key];\n        }\n    });\n}\nfunction initSlotsProxy(vm) {\n    if (!vm._slotsProxy) {\n        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n    }\n    return vm._slotsProxy;\n}\nfunction syncSetupSlots(to, from) {\n    for (const key in from) {\n        to[key] = from[key];\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            delete to[key];\n        }\n    }\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useSlots() {\n    return getContext().slots;\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useAttrs() {\n    return getContext().attrs;\n}\n/**\n * Vue 2 only\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useListeners() {\n    return getContext().listeners;\n}\nfunction getContext() {\n    if (!currentInstance) {\n        warn$2(`useContext() called without active instance.`);\n    }\n    const vm = currentInstance;\n    return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n}\n/**\n * Runtime helper for merging default declarations. Imported by compiled code\n * only.\n * @internal\n */\nfunction mergeDefaults(raw, defaults) {\n    const props = isArray(raw)\n        ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})\n        : raw;\n    for (const key in defaults) {\n        const opt = props[key];\n        if (opt) {\n            if (isArray(opt) || isFunction(opt)) {\n                props[key] = { type: opt, default: defaults[key] };\n            }\n            else {\n                opt.default = defaults[key];\n            }\n        }\n        else if (opt === null) {\n            props[key] = { default: defaults[key] };\n        }\n        else {\n            warn$2(`props default key \"${key}\" has no corresponding declaration.`);\n        }\n    }\n    return props;\n}\n\nfunction initRender(vm) {\n    vm._vnode = null; // the root of the child tree\n    vm._staticTrees = null; // v-once cached trees\n    const options = vm.$options;\n    const parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n    const renderContext = parentVnode && parentVnode.context;\n    vm.$slots = resolveSlots(options._renderChildren, renderContext);\n    vm.$scopedSlots = parentVnode\n        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n        : emptyObject;\n    // bind the createElement fn to this instance\n    // so that we get proper render context inside it.\n    // args order: tag, data, children, normalizationType, alwaysNormalize\n    // internal version is used by render functions compiled from templates\n    // @ts-expect-error\n    vm._c = (a, b, c, d) => createElement$1(vm, a, b, c, d, false);\n    // normalization is always applied for the public version, used in\n    // user-written render functions.\n    // @ts-expect-error\n    vm.$createElement = (a, b, c, d) => createElement$1(vm, a, b, c, d, true);\n    // $attrs & $listeners are exposed for easier HOC creation.\n    // they need to be reactive so that HOCs using them are always updated\n    const parentData = parentVnode && parentVnode.data;\n    /* istanbul ignore else */\n    {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, () => {\n            !isUpdatingChildComponent && warn$2(`$attrs is readonly.`, vm);\n        }, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, () => {\n            !isUpdatingChildComponent && warn$2(`$listeners is readonly.`, vm);\n        }, true);\n    }\n}\nlet currentRenderingInstance = null;\nfunction renderMixin(Vue) {\n    // install runtime convenience helpers\n    installRenderHelpers(Vue.prototype);\n    Vue.prototype.$nextTick = function (fn) {\n        return nextTick(fn, this);\n    };\n    Vue.prototype._render = function () {\n        const vm = this;\n        const { render, _parentVnode } = vm.$options;\n        if (_parentVnode && vm._isMounted) {\n            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n            if (vm._slotsProxy) {\n                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n            }\n        }\n        // set parent vnode. this allows render functions to have access\n        // to the data on the placeholder node.\n        vm.$vnode = _parentVnode;\n        // render self\n        const prevInst = currentInstance;\n        const prevRenderInst = currentRenderingInstance;\n        let vnode;\n        try {\n            setCurrentInstance(vm);\n            currentRenderingInstance = vm;\n            vnode = render.call(vm._renderProxy, vm.$createElement);\n        }\n        catch (e) {\n            handleError(e, vm, `render`);\n            // return error render result,\n            // or previous vnode to prevent render error causing blank component\n            /* istanbul ignore else */\n            if (vm.$options.renderError) {\n                try {\n                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                }\n                catch (e) {\n                    handleError(e, vm, `renderError`);\n                    vnode = vm._vnode;\n                }\n            }\n            else {\n                vnode = vm._vnode;\n            }\n        }\n        finally {\n            currentRenderingInstance = prevRenderInst;\n            setCurrentInstance(prevInst);\n        }\n        // if the returned array contains only a single node, allow it\n        if (isArray(vnode) && vnode.length === 1) {\n            vnode = vnode[0];\n        }\n        // return empty vnode in case the render function errored out\n        if (!(vnode instanceof VNode)) {\n            if (isArray(vnode)) {\n                warn$2('Multiple root nodes returned from render function. Render function ' +\n                    'should return a single root node.', vm);\n            }\n            vnode = createEmptyVNode();\n        }\n        // set parent\n        vnode.parent = _parentVnode;\n        return vnode;\n    };\n}\n\nfunction ensureCtor(comp, base) {\n    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n        comp = comp.default;\n    }\n    return isObject(comp) ? base.extend(comp) : comp;\n}\nfunction createAsyncPlaceholder(factory, data, context, children, tag) {\n    const node = createEmptyVNode();\n    node.asyncFactory = factory;\n    node.asyncMeta = { data, context, children, tag };\n    return node;\n}\nfunction resolveAsyncComponent(factory, baseCtor) {\n    if (isTrue(factory.error) && isDef(factory.errorComp)) {\n        return factory.errorComp;\n    }\n    if (isDef(factory.resolved)) {\n        return factory.resolved;\n    }\n    const owner = currentRenderingInstance;\n    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n        // already pending\n        factory.owners.push(owner);\n    }\n    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n        return factory.loadingComp;\n    }\n    if (owner && !isDef(factory.owners)) {\n        const owners = (factory.owners = [owner]);\n        let sync = true;\n        let timerLoading = null;\n        let timerTimeout = null;\n        owner.$on('hook:destroyed', () => remove$2(owners, owner));\n        const forceRender = (renderCompleted) => {\n            for (let i = 0, l = owners.length; i < l; i++) {\n                owners[i].$forceUpdate();\n            }\n            if (renderCompleted) {\n                owners.length = 0;\n                if (timerLoading !== null) {\n                    clearTimeout(timerLoading);\n                    timerLoading = null;\n                }\n                if (timerTimeout !== null) {\n                    clearTimeout(timerTimeout);\n                    timerTimeout = null;\n                }\n            }\n        };\n        const resolve = once((res) => {\n            // cache resolved\n            factory.resolved = ensureCtor(res, baseCtor);\n            // invoke callbacks only if this is not a synchronous resolve\n            // (async resolves are shimmed as synchronous during SSR)\n            if (!sync) {\n                forceRender(true);\n            }\n            else {\n                owners.length = 0;\n            }\n        });\n        const reject = once(reason => {\n            warn$2(`Failed to resolve async component: ${String(factory)}` +\n                    (reason ? `\\nReason: ${reason}` : ''));\n            if (isDef(factory.errorComp)) {\n                factory.error = true;\n                forceRender(true);\n            }\n        });\n        const res = factory(resolve, reject);\n        if (isObject(res)) {\n            if (isPromise(res)) {\n                // () => Promise\n                if (isUndef(factory.resolved)) {\n                    res.then(resolve, reject);\n                }\n            }\n            else if (isPromise(res.component)) {\n                res.component.then(resolve, reject);\n                if (isDef(res.error)) {\n                    factory.errorComp = ensureCtor(res.error, baseCtor);\n                }\n                if (isDef(res.loading)) {\n                    factory.loadingComp = ensureCtor(res.loading, baseCtor);\n                    if (res.delay === 0) {\n                        factory.loading = true;\n                    }\n                    else {\n                        // @ts-expect-error NodeJS timeout type\n                        timerLoading = setTimeout(() => {\n                            timerLoading = null;\n                            if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                factory.loading = true;\n                                forceRender(false);\n                            }\n                        }, res.delay || 200);\n                    }\n                }\n                if (isDef(res.timeout)) {\n                    // @ts-expect-error NodeJS timeout type\n                    timerTimeout = setTimeout(() => {\n                        timerTimeout = null;\n                        if (isUndef(factory.resolved)) {\n                            reject(`timeout (${res.timeout}ms)` );\n                        }\n                    }, res.timeout);\n                }\n            }\n        }\n        sync = false;\n        // return in case resolved synchronously\n        return factory.loading ? factory.loadingComp : factory.resolved;\n    }\n}\n\nfunction getFirstComponentChild(children) {\n    if (isArray(children)) {\n        for (let i = 0; i < children.length; i++) {\n            const c = children[i];\n            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                return c;\n            }\n        }\n    }\n}\n\nfunction initEvents(vm) {\n    vm._events = Object.create(null);\n    vm._hasHookEvent = false;\n    // init parent attached events\n    const listeners = vm.$options._parentListeners;\n    if (listeners) {\n        updateComponentListeners(vm, listeners);\n    }\n}\nlet target$1;\nfunction add$1(event, fn) {\n    target$1.$on(event, fn);\n}\nfunction remove$1(event, fn) {\n    target$1.$off(event, fn);\n}\nfunction createOnceHandler$1(event, fn) {\n    const _target = target$1;\n    return function onceHandler() {\n        const res = fn.apply(null, arguments);\n        if (res !== null) {\n            _target.$off(event, onceHandler);\n        }\n    };\n}\nfunction updateComponentListeners(vm, listeners, oldListeners) {\n    target$1 = vm;\n    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n    target$1 = undefined;\n}\nfunction eventsMixin(Vue) {\n    const hookRE = /^hook:/;\n    Vue.prototype.$on = function (event, fn) {\n        const vm = this;\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$on(event[i], fn);\n            }\n        }\n        else {\n            (vm._events[event] || (vm._events[event] = [])).push(fn);\n            // optimize hook:event cost by using a boolean flag marked at registration\n            // instead of a hash lookup\n            if (hookRE.test(event)) {\n                vm._hasHookEvent = true;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$once = function (event, fn) {\n        const vm = this;\n        function on() {\n            vm.$off(event, on);\n            fn.apply(vm, arguments);\n        }\n        on.fn = fn;\n        vm.$on(event, on);\n        return vm;\n    };\n    Vue.prototype.$off = function (event, fn) {\n        const vm = this;\n        // all\n        if (!arguments.length) {\n            vm._events = Object.create(null);\n            return vm;\n        }\n        // array of events\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$off(event[i], fn);\n            }\n            return vm;\n        }\n        // specific event\n        const cbs = vm._events[event];\n        if (!cbs) {\n            return vm;\n        }\n        if (!fn) {\n            vm._events[event] = null;\n            return vm;\n        }\n        // specific handler\n        let cb;\n        let i = cbs.length;\n        while (i--) {\n            cb = cbs[i];\n            if (cb === fn || cb.fn === fn) {\n                cbs.splice(i, 1);\n                break;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$emit = function (event) {\n        const vm = this;\n        {\n            const lowerCaseEvent = event.toLowerCase();\n            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                tip(`Event \"${lowerCaseEvent}\" is emitted in component ` +\n                    `${formatComponentName(vm)} but the handler is registered for \"${event}\". ` +\n                    `Note that HTML attributes are case-insensitive and you cannot use ` +\n                    `v-on to listen to camelCase events when using in-DOM templates. ` +\n                    `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\n            }\n        }\n        let cbs = vm._events[event];\n        if (cbs) {\n            cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n            const args = toArray(arguments, 1);\n            const info = `event handler for \"${event}\"`;\n            for (let i = 0, l = cbs.length; i < l; i++) {\n                invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n            }\n        }\n        return vm;\n    };\n}\n\nlet activeEffectScope;\nclass EffectScope {\n    constructor(detached = false) {\n        this.detached = detached;\n        /**\n         * @internal\n         */\n        this.active = true;\n        /**\n         * @internal\n         */\n        this.effects = [];\n        /**\n         * @internal\n         */\n        this.cleanups = [];\n        this.parent = activeEffectScope;\n        if (!detached && activeEffectScope) {\n            this.index =\n                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n        }\n    }\n    run(fn) {\n        if (this.active) {\n            const currentEffectScope = activeEffectScope;\n            try {\n                activeEffectScope = this;\n                return fn();\n            }\n            finally {\n                activeEffectScope = currentEffectScope;\n            }\n        }\n        else {\n            warn$2(`cannot run an inactive effect scope.`);\n        }\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    on() {\n        activeEffectScope = this;\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    off() {\n        activeEffectScope = this.parent;\n    }\n    stop(fromParent) {\n        if (this.active) {\n            let i, l;\n            for (i = 0, l = this.effects.length; i < l; i++) {\n                this.effects[i].teardown();\n            }\n            for (i = 0, l = this.cleanups.length; i < l; i++) {\n                this.cleanups[i]();\n            }\n            if (this.scopes) {\n                for (i = 0, l = this.scopes.length; i < l; i++) {\n                    this.scopes[i].stop(true);\n                }\n            }\n            // nested scope, dereference from parent to avoid memory leaks\n            if (!this.detached && this.parent && !fromParent) {\n                // optimized O(1) removal\n                const last = this.parent.scopes.pop();\n                if (last && last !== this) {\n                    this.parent.scopes[this.index] = last;\n                    last.index = this.index;\n                }\n            }\n            this.parent = undefined;\n            this.active = false;\n        }\n    }\n}\nfunction effectScope(detached) {\n    return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n    if (scope && scope.active) {\n        scope.effects.push(effect);\n    }\n}\nfunction getCurrentScope() {\n    return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n    if (activeEffectScope) {\n        activeEffectScope.cleanups.push(fn);\n    }\n    else {\n        warn$2(`onScopeDispose() is called when there is no active effect scope` +\n            ` to be associated with.`);\n    }\n}\n\nlet activeInstance = null;\nlet isUpdatingChildComponent = false;\nfunction setActiveInstance(vm) {\n    const prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    return () => {\n        activeInstance = prevActiveInstance;\n    };\n}\nfunction initLifecycle(vm) {\n    const options = vm.$options;\n    // locate first non-abstract parent\n    let parent = options.parent;\n    if (parent && !options.abstract) {\n        while (parent.$options.abstract && parent.$parent) {\n            parent = parent.$parent;\n        }\n        parent.$children.push(vm);\n    }\n    vm.$parent = parent;\n    vm.$root = parent ? parent.$root : vm;\n    vm.$children = [];\n    vm.$refs = {};\n    vm._provided = parent ? parent._provided : Object.create(null);\n    vm._watcher = null;\n    vm._inactive = null;\n    vm._directInactive = false;\n    vm._isMounted = false;\n    vm._isDestroyed = false;\n    vm._isBeingDestroyed = false;\n}\nfunction lifecycleMixin(Vue) {\n    Vue.prototype._update = function (vnode, hydrating) {\n        const vm = this;\n        const prevEl = vm.$el;\n        const prevVnode = vm._vnode;\n        const restoreActiveInstance = setActiveInstance(vm);\n        vm._vnode = vnode;\n        // Vue.prototype.__patch__ is injected in entry points\n        // based on the rendering backend used.\n        if (!prevVnode) {\n            // initial render\n            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n        }\n        else {\n            // updates\n            vm.$el = vm.__patch__(prevVnode, vnode);\n        }\n        restoreActiveInstance();\n        // update __vue__ reference\n        if (prevEl) {\n            prevEl.__vue__ = null;\n        }\n        if (vm.$el) {\n            vm.$el.__vue__ = vm;\n        }\n        // if parent is an HOC, update its $el as well\n        let wrapper = vm;\n        while (wrapper &&\n            wrapper.$vnode &&\n            wrapper.$parent &&\n            wrapper.$vnode === wrapper.$parent._vnode) {\n            wrapper.$parent.$el = wrapper.$el;\n            wrapper = wrapper.$parent;\n        }\n        // updated hook is called by the scheduler to ensure that children are\n        // updated in a parent's updated hook.\n    };\n    Vue.prototype.$forceUpdate = function () {\n        const vm = this;\n        if (vm._watcher) {\n            vm._watcher.update();\n        }\n    };\n    Vue.prototype.$destroy = function () {\n        const vm = this;\n        if (vm._isBeingDestroyed) {\n            return;\n        }\n        callHook$1(vm, 'beforeDestroy');\n        vm._isBeingDestroyed = true;\n        // remove self from parent\n        const parent = vm.$parent;\n        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n            remove$2(parent.$children, vm);\n        }\n        // teardown scope. this includes both the render watcher and other\n        // watchers created\n        vm._scope.stop();\n        // remove reference from data ob\n        // frozen object may not have observer.\n        if (vm._data.__ob__) {\n            vm._data.__ob__.vmCount--;\n        }\n        // call the last hook...\n        vm._isDestroyed = true;\n        // invoke destroy hooks on current rendered tree\n        vm.__patch__(vm._vnode, null);\n        // fire destroyed hook\n        callHook$1(vm, 'destroyed');\n        // turn off all instance listeners.\n        vm.$off();\n        // remove __vue__ reference\n        if (vm.$el) {\n            vm.$el.__vue__ = null;\n        }\n        // release circular reference (#6759)\n        if (vm.$vnode) {\n            vm.$vnode.parent = null;\n        }\n    };\n}\nfunction mountComponent(vm, el, hydrating) {\n    vm.$el = el;\n    if (!vm.$options.render) {\n        // @ts-expect-error invalid type\n        vm.$options.render = createEmptyVNode;\n        {\n            /* istanbul ignore if */\n            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                vm.$options.el ||\n                el) {\n                warn$2('You are using the runtime-only build of Vue where the template ' +\n                    'compiler is not available. Either pre-compile the templates into ' +\n                    'render functions, or use the compiler-included build.', vm);\n            }\n            else {\n                warn$2('Failed to mount component: template or render function not defined.', vm);\n            }\n        }\n    }\n    callHook$1(vm, 'beforeMount');\n    let updateComponent;\n    /* istanbul ignore if */\n    if (config.performance && mark) {\n        updateComponent = () => {\n            const name = vm._name;\n            const id = vm._uid;\n            const startTag = `vue-perf-start:${id}`;\n            const endTag = `vue-perf-end:${id}`;\n            mark(startTag);\n            const vnode = vm._render();\n            mark(endTag);\n            measure(`vue ${name} render`, startTag, endTag);\n            mark(startTag);\n            vm._update(vnode, hydrating);\n            mark(endTag);\n            measure(`vue ${name} patch`, startTag, endTag);\n        };\n    }\n    else {\n        updateComponent = () => {\n            vm._update(vm._render(), hydrating);\n        };\n    }\n    const watcherOptions = {\n        before() {\n            if (vm._isMounted && !vm._isDestroyed) {\n                callHook$1(vm, 'beforeUpdate');\n            }\n        }\n    };\n    {\n        watcherOptions.onTrack = e => callHook$1(vm, 'renderTracked', [e]);\n        watcherOptions.onTrigger = e => callHook$1(vm, 'renderTriggered', [e]);\n    }\n    // we set this to vm._watcher inside the watcher's constructor\n    // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n    // component's mounted hook), which relies on vm._watcher being already defined\n    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n    hydrating = false;\n    // flush buffer for flush: \"pre\" watchers queued in setup()\n    const preWatchers = vm._preWatchers;\n    if (preWatchers) {\n        for (let i = 0; i < preWatchers.length; i++) {\n            preWatchers[i].run();\n        }\n    }\n    // manually mounted instance, call mounted on self\n    // mounted is called for render-created child components in its inserted hook\n    if (vm.$vnode == null) {\n        vm._isMounted = true;\n        callHook$1(vm, 'mounted');\n    }\n    return vm;\n}\nfunction updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n    {\n        isUpdatingChildComponent = true;\n    }\n    // determine whether component has slot children\n    // we need to do this before overwriting $options._renderChildren.\n    // check if there are dynamic scopedSlots (hand-written or compiled but with\n    // dynamic slot names). Static scoped slots compiled from template has the\n    // \"$stable\" marker.\n    const newScopedSlots = parentVnode.data.scopedSlots;\n    const oldScopedSlots = vm.$scopedSlots;\n    const hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n        (!newScopedSlots && vm.$scopedSlots.$key));\n    // Any static slot children from the parent may have changed during parent's\n    // update. Dynamic scoped slots may also have changed. In such cases, a forced\n    // update is necessary to ensure correctness.\n    let needsForceUpdate = !!(renderChildren || // has new static slots\n        vm.$options._renderChildren || // has old static slots\n        hasDynamicScopedSlot);\n    const prevVNode = vm.$vnode;\n    vm.$options._parentVnode = parentVnode;\n    vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n    if (vm._vnode) {\n        // update child tree's parent\n        vm._vnode.parent = parentVnode;\n    }\n    vm.$options._renderChildren = renderChildren;\n    // update $attrs and $listeners hash\n    // these are also reactive so they may trigger child update if the child\n    // used them during render\n    const attrs = parentVnode.data.attrs || emptyObject;\n    if (vm._attrsProxy) {\n        // force update if attrs are accessed and has changed since it may be\n        // passed to a child component.\n        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n            needsForceUpdate = true;\n        }\n    }\n    vm.$attrs = attrs;\n    // update listeners\n    listeners = listeners || emptyObject;\n    const prevListeners = vm.$options._parentListeners;\n    if (vm._listenersProxy) {\n        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n    }\n    vm.$listeners = vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, prevListeners);\n    // update props\n    if (propsData && vm.$options.props) {\n        toggleObserving(false);\n        const props = vm._props;\n        const propKeys = vm.$options._propKeys || [];\n        for (let i = 0; i < propKeys.length; i++) {\n            const key = propKeys[i];\n            const propOptions = vm.$options.props; // wtf flow?\n            props[key] = validateProp(key, propOptions, propsData, vm);\n        }\n        toggleObserving(true);\n        // keep a copy of raw propsData\n        vm.$options.propsData = propsData;\n    }\n    // resolve slots + force update if has children\n    if (needsForceUpdate) {\n        vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n        vm.$forceUpdate();\n    }\n    {\n        isUpdatingChildComponent = false;\n    }\n}\nfunction isInInactiveTree(vm) {\n    while (vm && (vm = vm.$parent)) {\n        if (vm._inactive)\n            return true;\n    }\n    return false;\n}\nfunction activateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = false;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    else if (vm._directInactive) {\n        return;\n    }\n    if (vm._inactive || vm._inactive === null) {\n        vm._inactive = false;\n        for (let i = 0; i < vm.$children.length; i++) {\n            activateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'activated');\n    }\n}\nfunction deactivateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = true;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    if (!vm._inactive) {\n        vm._inactive = true;\n        for (let i = 0; i < vm.$children.length; i++) {\n            deactivateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'deactivated');\n    }\n}\nfunction callHook$1(vm, hook, args, setContext = true) {\n    // #7573 disable dep collection when invoking lifecycle hooks\n    pushTarget();\n    const prevInst = currentInstance;\n    const prevScope = getCurrentScope();\n    setContext && setCurrentInstance(vm);\n    const handlers = vm.$options[hook];\n    const info = `${hook} hook`;\n    if (handlers) {\n        for (let i = 0, j = handlers.length; i < j; i++) {\n            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n        }\n    }\n    if (vm._hasHookEvent) {\n        vm.$emit('hook:' + hook);\n    }\n    if (setContext) {\n        setCurrentInstance(prevInst);\n        prevScope && prevScope.on();\n    }\n    popTarget();\n}\n\nconst MAX_UPDATE_COUNT = 100;\nconst queue = [];\nconst activatedChildren = [];\nlet has = {};\nlet circular = {};\nlet waiting = false;\nlet flushing = false;\nlet index$1 = 0;\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState() {\n    index$1 = queue.length = activatedChildren.length = 0;\n    has = {};\n    {\n        circular = {};\n    }\n    waiting = flushing = false;\n}\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nlet currentFlushTimestamp = 0;\n// Async edge case fix requires storing an event listener's attach timestamp.\nlet getNow = Date.now;\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n    const performance = window.performance;\n    if (performance &&\n        typeof performance.now === 'function' &&\n        getNow() > document.createEvent('Event').timeStamp) {\n        // if the event timestamp, although evaluated AFTER the Date.now(), is\n        // smaller than it, it means the event is using a hi-res timestamp,\n        // and we need to use the hi-res version for event listener timestamps as\n        // well.\n        getNow = () => performance.now();\n    }\n}\nconst sortCompareFn = (a, b) => {\n    if (a.post) {\n        if (!b.post)\n            return 1;\n    }\n    else if (b.post) {\n        return -1;\n    }\n    return a.id - b.id;\n};\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue() {\n    currentFlushTimestamp = getNow();\n    flushing = true;\n    let watcher, id;\n    // Sort queue before flush.\n    // This ensures that:\n    // 1. Components are updated from parent to child. (because parent is always\n    //    created before the child)\n    // 2. A component's user watchers are run before its render watcher (because\n    //    user watchers are created before the render watcher)\n    // 3. If a component is destroyed during a parent component's watcher run,\n    //    its watchers can be skipped.\n    queue.sort(sortCompareFn);\n    // do not cache length because more watchers might be pushed\n    // as we run existing watchers\n    for (index$1 = 0; index$1 < queue.length; index$1++) {\n        watcher = queue[index$1];\n        if (watcher.before) {\n            watcher.before();\n        }\n        id = watcher.id;\n        has[id] = null;\n        watcher.run();\n        // in dev build, check and stop circular updates.\n        if (has[id] != null) {\n            circular[id] = (circular[id] || 0) + 1;\n            if (circular[id] > MAX_UPDATE_COUNT) {\n                warn$2('You may have an infinite update loop ' +\n                    (watcher.user\n                        ? `in watcher with expression \"${watcher.expression}\"`\n                        : `in a component render function.`), watcher.vm);\n                break;\n            }\n        }\n    }\n    // keep copies of post queues before resetting state\n    const activatedQueue = activatedChildren.slice();\n    const updatedQueue = queue.slice();\n    resetSchedulerState();\n    // call component updated and activated hooks\n    callActivatedHooks(activatedQueue);\n    callUpdatedHooks(updatedQueue);\n    cleanupDeps();\n    // devtool hook\n    /* istanbul ignore if */\n    if (devtools && config.devtools) {\n        devtools.emit('flush');\n    }\n}\nfunction callUpdatedHooks(queue) {\n    let i = queue.length;\n    while (i--) {\n        const watcher = queue[i];\n        const vm = watcher.vm;\n        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n            callHook$1(vm, 'updated');\n        }\n    }\n}\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent(vm) {\n    // setting _inactive to false here so that a render function can\n    // rely on checking whether it's in an inactive tree (e.g. router-view)\n    vm._inactive = false;\n    activatedChildren.push(vm);\n}\nfunction callActivatedHooks(queue) {\n    for (let i = 0; i < queue.length; i++) {\n        queue[i]._inactive = true;\n        activateChildComponent(queue[i], true /* true */);\n    }\n}\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher(watcher) {\n    const id = watcher.id;\n    if (has[id] != null) {\n        return;\n    }\n    if (watcher === Dep.target && watcher.noRecurse) {\n        return;\n    }\n    has[id] = true;\n    if (!flushing) {\n        queue.push(watcher);\n    }\n    else {\n        // if already flushing, splice the watcher based on its id\n        // if already past its id, it will be run next immediately.\n        let i = queue.length - 1;\n        while (i > index$1 && queue[i].id > watcher.id) {\n            i--;\n        }\n        queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n        waiting = true;\n        if (!config.async) {\n            flushSchedulerQueue();\n            return;\n        }\n        nextTick(flushSchedulerQueue);\n    }\n}\n\nconst WATCHER = `watcher`;\nconst WATCHER_CB = `${WATCHER} callback`;\nconst WATCHER_GETTER = `${WATCHER} getter`;\nconst WATCHER_CLEANUP = `${WATCHER} cleanup`;\n// Simple effect.\nfunction watchEffect(effect, options) {\n    return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));\n}\nfunction watchSyncEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));\n}\n// initial value for watchers to trigger on undefined initial values\nconst INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n    if (typeof cb !== 'function') {\n        warn$2(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\n            `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\n            `supports \\`watch(source, cb, options?) signature.`);\n    }\n    return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigger } = emptyObject) {\n    if (!cb) {\n        if (immediate !== undefined) {\n            warn$2(`watch() \"immediate\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n        if (deep !== undefined) {\n            warn$2(`watch() \"deep\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n    }\n    const warnInvalidSource = (s) => {\n        warn$2(`Invalid watch source: ${s}. A watch source can only be a getter/effect ` +\n            `function, a ref, a reactive object, or an array of these types.`);\n    };\n    const instance = currentInstance;\n    const call = (fn, type, args = null) => {\n        const res = invokeWithErrorHandling(fn, null, args, instance, type);\n        if (deep && res && res.__ob__)\n            res.__ob__.dep.depend();\n        return res;\n    };\n    let getter;\n    let forceTrigger = false;\n    let isMultiSource = false;\n    if (isRef(source)) {\n        getter = () => source.value;\n        forceTrigger = isShallow(source);\n    }\n    else if (isReactive(source)) {\n        getter = () => {\n            source.__ob__.dep.depend();\n            return source;\n        };\n        deep = true;\n    }\n    else if (isArray(source)) {\n        isMultiSource = true;\n        forceTrigger = source.some(s => isReactive(s) || isShallow(s));\n        getter = () => source.map(s => {\n            if (isRef(s)) {\n                return s.value;\n            }\n            else if (isReactive(s)) {\n                s.__ob__.dep.depend();\n                return traverse(s);\n            }\n            else if (isFunction(s)) {\n                return call(s, WATCHER_GETTER);\n            }\n            else {\n                warnInvalidSource(s);\n            }\n        });\n    }\n    else if (isFunction(source)) {\n        if (cb) {\n            // getter with cb\n            getter = () => call(source, WATCHER_GETTER);\n        }\n        else {\n            // no cb -> simple effect\n            getter = () => {\n                if (instance && instance._isDestroyed) {\n                    return;\n                }\n                if (cleanup) {\n                    cleanup();\n                }\n                return call(source, WATCHER, [onCleanup]);\n            };\n        }\n    }\n    else {\n        getter = noop;\n        warnInvalidSource(source);\n    }\n    if (cb && deep) {\n        const baseGetter = getter;\n        getter = () => traverse(baseGetter());\n    }\n    let cleanup;\n    let onCleanup = (fn) => {\n        cleanup = watcher.onStop = () => {\n            call(fn, WATCHER_CLEANUP);\n        };\n    };\n    // in SSR there is no need to setup an actual effect, and it should be noop\n    // unless it's eager\n    if (isServerRendering()) {\n        // we will also not call the invalidate callback (+ runner is not set up)\n        onCleanup = noop;\n        if (!cb) {\n            getter();\n        }\n        else if (immediate) {\n            call(cb, WATCHER_CB, [\n                getter(),\n                isMultiSource ? [] : undefined,\n                onCleanup\n            ]);\n        }\n        return noop;\n    }\n    const watcher = new Watcher(currentInstance, getter, noop, {\n        lazy: true\n    });\n    watcher.noRecurse = !cb;\n    let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n    // overwrite default run\n    watcher.run = () => {\n        if (!watcher.active) {\n            return;\n        }\n        if (cb) {\n            // watch(source, cb)\n            const newValue = watcher.get();\n            if (deep ||\n                forceTrigger ||\n                (isMultiSource\n                    ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\n                    : hasChanged(newValue, oldValue))) {\n                // cleanup before running cb again\n                if (cleanup) {\n                    cleanup();\n                }\n                call(cb, WATCHER_CB, [\n                    newValue,\n                    // pass undefined as the old value when it's changed for the first time\n                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                    onCleanup\n                ]);\n                oldValue = newValue;\n            }\n        }\n        else {\n            // watchEffect\n            watcher.get();\n        }\n    };\n    if (flush === 'sync') {\n        watcher.update = watcher.run;\n    }\n    else if (flush === 'post') {\n        watcher.post = true;\n        watcher.update = () => queueWatcher(watcher);\n    }\n    else {\n        // pre\n        watcher.update = () => {\n            if (instance && instance === currentInstance && !instance._isMounted) {\n                // pre-watcher triggered before\n                const buffer = instance._preWatchers || (instance._preWatchers = []);\n                if (buffer.indexOf(watcher) < 0)\n                    buffer.push(watcher);\n            }\n            else {\n                queueWatcher(watcher);\n            }\n        };\n    }\n    {\n        watcher.onTrack = onTrack;\n        watcher.onTrigger = onTrigger;\n    }\n    // initial run\n    if (cb) {\n        if (immediate) {\n            watcher.run();\n        }\n        else {\n            oldValue = watcher.get();\n        }\n    }\n    else if (flush === 'post' && instance) {\n        instance.$once('hook:mounted', () => watcher.get());\n    }\n    else {\n        watcher.get();\n    }\n    return () => {\n        watcher.teardown();\n    };\n}\n\nfunction provide(key, value) {\n    if (!currentInstance) {\n        {\n            warn$2(`provide() can only be used inside setup().`);\n        }\n    }\n    else {\n        // TS doesn't allow symbol as index type\n        resolveProvided(currentInstance)[key] = value;\n    }\n}\nfunction resolveProvided(vm) {\n    // by default an instance inherits its parent's provides object\n    // but when it needs to provide values of its own, it creates its\n    // own provides object using parent provides object as prototype.\n    // this way in `inject` we can simply look up injections from direct\n    // parent and let the prototype chain do the work.\n    const existing = vm._provided;\n    const parentProvides = vm.$parent && vm.$parent._provided;\n    if (parentProvides === existing) {\n        return (vm._provided = Object.create(parentProvides));\n    }\n    else {\n        return existing;\n    }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n    // fallback to `currentRenderingInstance` so that this can be called in\n    // a functional component\n    const instance = currentInstance;\n    if (instance) {\n        // #2400\n        // to support `app.use` plugins,\n        // fallback to appContext's `provides` if the instance is at root\n        const provides = instance.$parent && instance.$parent._provided;\n        if (provides && key in provides) {\n            // TS doesn't allow symbol as index type\n            return provides[key];\n        }\n        else if (arguments.length > 1) {\n            return treatDefaultAsFactory && isFunction(defaultValue)\n                ? defaultValue.call(instance)\n                : defaultValue;\n        }\n        else {\n            warn$2(`injection \"${String(key)}\" not found.`);\n        }\n    }\n    else {\n        warn$2(`inject() can only be used inside setup() or functional components.`);\n    }\n}\n\n/**\n * @internal this function needs manual public type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction h(type, props, children) {\n    if (!currentInstance) {\n        warn$2(`globally imported h() can only be invoked when there is an active ` +\n                `component instance, e.g. synchronously in a component's render or setup function.`);\n    }\n    return createElement$1(currentInstance, type, props, children, 2, true);\n}\n\nfunction handleError(err, vm, info) {\n    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n    // See: https://github.com/vuejs/vuex/issues/1505\n    pushTarget();\n    try {\n        if (vm) {\n            let cur = vm;\n            while ((cur = cur.$parent)) {\n                const hooks = cur.$options.errorCaptured;\n                if (hooks) {\n                    for (let i = 0; i < hooks.length; i++) {\n                        try {\n                            const capture = hooks[i].call(cur, err, vm, info) === false;\n                            if (capture)\n                                return;\n                        }\n                        catch (e) {\n                            globalHandleError(e, cur, 'errorCaptured hook');\n                        }\n                    }\n                }\n            }\n        }\n        globalHandleError(err, vm, info);\n    }\n    finally {\n        popTarget();\n    }\n}\nfunction invokeWithErrorHandling(handler, context, args, vm, info) {\n    let res;\n    try {\n        res = args ? handler.apply(context, args) : handler.call(context);\n        if (res && !res._isVue && isPromise(res) && !res._handled) {\n            res.catch(e => handleError(e, vm, info + ` (Promise/async)`));\n            res._handled = true;\n        }\n    }\n    catch (e) {\n        handleError(e, vm, info);\n    }\n    return res;\n}\nfunction globalHandleError(err, vm, info) {\n    if (config.errorHandler) {\n        try {\n            return config.errorHandler.call(null, err, vm, info);\n        }\n        catch (e) {\n            // if the user intentionally throws the original error in the handler,\n            // do not log it twice\n            if (e !== err) {\n                logError(e, null, 'config.errorHandler');\n            }\n        }\n    }\n    logError(err, vm, info);\n}\nfunction logError(err, vm, info) {\n    {\n        warn$2(`Error in ${info}: \"${err.toString()}\"`, vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n        console.error(err);\n    }\n    else {\n        throw err;\n    }\n}\n\n/* globals MutationObserver */\nlet isUsingMicroTask = false;\nconst callbacks = [];\nlet pending = false;\nfunction flushCallbacks() {\n    pending = false;\n    const copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (let i = 0; i < copies.length; i++) {\n        copies[i]();\n    }\n}\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nlet timerFunc;\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n    const p = Promise.resolve();\n    timerFunc = () => {\n        p.then(flushCallbacks);\n        // In problematic UIWebViews, Promise.then doesn't completely break, but\n        // it can get stuck in a weird state where callbacks are pushed into the\n        // microtask queue but the queue isn't being flushed, until the browser\n        // needs to do some other work, e.g. handle a timer. Therefore we can\n        // \"force\" the microtask queue to be flushed by adding an empty timer.\n        if (isIOS)\n            setTimeout(noop);\n    };\n    isUsingMicroTask = true;\n}\nelse if (!isIE &&\n    typeof MutationObserver !== 'undefined' &&\n    (isNative(MutationObserver) ||\n        // PhantomJS and iOS 7.x\n        MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n    // Use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS, iOS7, Android 4.4\n    // (#6466 MutationObserver is unreliable in IE11)\n    let counter = 1;\n    const observer = new MutationObserver(flushCallbacks);\n    const textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n        characterData: true\n    });\n    timerFunc = () => {\n        counter = (counter + 1) % 2;\n        textNode.data = String(counter);\n    };\n    isUsingMicroTask = true;\n}\nelse if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n    // Fallback to setImmediate.\n    // Technically it leverages the (macro) task queue,\n    // but it is still a better choice than setTimeout.\n    timerFunc = () => {\n        setImmediate(flushCallbacks);\n    };\n}\nelse {\n    // Fallback to setTimeout.\n    timerFunc = () => {\n        setTimeout(flushCallbacks, 0);\n    };\n}\n/**\n * @internal\n */\nfunction nextTick(cb, ctx) {\n    let _resolve;\n    callbacks.push(() => {\n        if (cb) {\n            try {\n                cb.call(ctx);\n            }\n            catch (e) {\n                handleError(e, ctx, 'nextTick');\n            }\n        }\n        else if (_resolve) {\n            _resolve(ctx);\n        }\n    });\n    if (!pending) {\n        pending = true;\n        timerFunc();\n    }\n    // $flow-disable-line\n    if (!cb && typeof Promise !== 'undefined') {\n        return new Promise(resolve => {\n            _resolve = resolve;\n        });\n    }\n}\n\nfunction useCssModule(name = '$style') {\n    /* istanbul ignore else */\n    {\n        if (!currentInstance) {\n            warn$2(`useCssModule must be called inside setup()`);\n            return emptyObject;\n        }\n        const mod = currentInstance[name];\n        if (!mod) {\n            warn$2(`Current instance does not have CSS module named \"${name}\".`);\n            return emptyObject;\n        }\n        return mod;\n    }\n}\n\n/**\n * Runtime helper for SFC's CSS variable injection feature.\n * @private\n */\nfunction useCssVars(getter) {\n    if (!inBrowser && !false)\n        return;\n    const instance = currentInstance;\n    if (!instance) {\n        warn$2(`useCssVars is called without current active component instance.`);\n        return;\n    }\n    watchPostEffect(() => {\n        const el = instance.$el;\n        const vars = getter(instance, instance._setupProxy);\n        if (el && el.nodeType === 1) {\n            const style = el.style;\n            for (const key in vars) {\n                style.setProperty(`--${key}`, vars[key]);\n            }\n        }\n    });\n}\n\n/**\n * v3-compatible async component API.\n * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n * because it relies on existing manual types\n */\nfunction defineAsyncComponent(source) {\n    if (isFunction(source)) {\n        source = { loader: source };\n    }\n    const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\n    suspensible = false, // in Vue 3 default is true\n    onError: userOnError } = source;\n    if (suspensible) {\n        warn$2(`The suspensible option for async components is not supported in Vue2. It is ignored.`);\n    }\n    let pendingRequest = null;\n    let retries = 0;\n    const retry = () => {\n        retries++;\n        pendingRequest = null;\n        return load();\n    };\n    const load = () => {\n        let thisRequest;\n        return (pendingRequest ||\n            (thisRequest = pendingRequest =\n                loader()\n                    .catch(err => {\n                    err = err instanceof Error ? err : new Error(String(err));\n                    if (userOnError) {\n                        return new Promise((resolve, reject) => {\n                            const userRetry = () => resolve(retry());\n                            const userFail = () => reject(err);\n                            userOnError(err, userRetry, userFail, retries + 1);\n                        });\n                    }\n                    else {\n                        throw err;\n                    }\n                })\n                    .then((comp) => {\n                    if (thisRequest !== pendingRequest && pendingRequest) {\n                        return pendingRequest;\n                    }\n                    if (!comp) {\n                        warn$2(`Async component loader resolved to undefined. ` +\n                            `If you are using retry(), make sure to return its return value.`);\n                    }\n                    // interop module default\n                    if (comp &&\n                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                        comp = comp.default;\n                    }\n                    if (comp && !isObject(comp) && !isFunction(comp)) {\n                        throw new Error(`Invalid async component load result: ${comp}`);\n                    }\n                    return comp;\n                })));\n    };\n    return () => {\n        const component = load();\n        return {\n            component,\n            delay,\n            timeout,\n            error: errorComponent,\n            loading: loadingComponent\n        };\n    };\n}\n\nfunction createLifeCycle(hookName) {\n    return (fn, target = currentInstance) => {\n        if (!target) {\n            warn$2(`${formatName(hookName)} is called when there is no active component instance to be ` +\n                    `associated with. ` +\n                    `Lifecycle injection APIs can only be used during execution of setup().`);\n            return;\n        }\n        return injectHook(target, hookName, fn);\n    };\n}\nfunction formatName(name) {\n    if (name === 'beforeDestroy') {\n        name = 'beforeUnmount';\n    }\n    else if (name === 'destroyed') {\n        name = 'unmounted';\n    }\n    return `on${name[0].toUpperCase() + name.slice(1)}`;\n}\nfunction injectHook(instance, hookName, fn) {\n    const options = instance.$options;\n    options[hookName] = mergeLifecycleHook(options[hookName], fn);\n}\nconst onBeforeMount = createLifeCycle('beforeMount');\nconst onMounted = createLifeCycle('mounted');\nconst onBeforeUpdate = createLifeCycle('beforeUpdate');\nconst onUpdated = createLifeCycle('updated');\nconst onBeforeUnmount = createLifeCycle('beforeDestroy');\nconst onUnmounted = createLifeCycle('destroyed');\nconst onActivated = createLifeCycle('activated');\nconst onDeactivated = createLifeCycle('deactivated');\nconst onServerPrefetch = createLifeCycle('serverPrefetch');\nconst onRenderTracked = createLifeCycle('renderTracked');\nconst onRenderTriggered = createLifeCycle('renderTriggered');\nconst injectErrorCapturedHook = createLifeCycle('errorCaptured');\nfunction onErrorCaptured(hook, target = currentInstance) {\n    injectErrorCapturedHook(hook, target);\n}\n\n/**\n * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n */\nconst version = '2.7.16';\n/**\n * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n */\nfunction defineComponent(options) {\n    return options;\n}\n\nvar vca = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  version: version,\n  defineComponent: defineComponent,\n  ref: ref$1,\n  shallowRef: shallowRef,\n  isRef: isRef,\n  toRef: toRef,\n  toRefs: toRefs,\n  unref: unref,\n  proxyRefs: proxyRefs,\n  customRef: customRef,\n  triggerRef: triggerRef,\n  reactive: reactive,\n  isReactive: isReactive,\n  isReadonly: isReadonly,\n  isShallow: isShallow,\n  isProxy: isProxy,\n  shallowReactive: shallowReactive,\n  markRaw: markRaw,\n  toRaw: toRaw,\n  readonly: readonly,\n  shallowReadonly: shallowReadonly,\n  computed: computed,\n  watch: watch,\n  watchEffect: watchEffect,\n  watchPostEffect: watchPostEffect,\n  watchSyncEffect: watchSyncEffect,\n  EffectScope: EffectScope,\n  effectScope: effectScope,\n  onScopeDispose: onScopeDispose,\n  getCurrentScope: getCurrentScope,\n  provide: provide,\n  inject: inject,\n  h: h,\n  getCurrentInstance: getCurrentInstance,\n  useSlots: useSlots,\n  useAttrs: useAttrs,\n  useListeners: useListeners,\n  mergeDefaults: mergeDefaults,\n  nextTick: nextTick,\n  set: set,\n  del: del,\n  useCssModule: useCssModule,\n  useCssVars: useCssVars,\n  defineAsyncComponent: defineAsyncComponent,\n  onBeforeMount: onBeforeMount,\n  onMounted: onMounted,\n  onBeforeUpdate: onBeforeUpdate,\n  onUpdated: onUpdated,\n  onBeforeUnmount: onBeforeUnmount,\n  onUnmounted: onUnmounted,\n  onActivated: onActivated,\n  onDeactivated: onDeactivated,\n  onServerPrefetch: onServerPrefetch,\n  onRenderTracked: onRenderTracked,\n  onRenderTriggered: onRenderTriggered,\n  onErrorCaptured: onErrorCaptured\n});\n\nconst seenObjects = new _Set();\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse(val) {\n    _traverse(val, seenObjects);\n    seenObjects.clear();\n    return val;\n}\nfunction _traverse(val, seen) {\n    let i, keys;\n    const isA = isArray(val);\n    if ((!isA && !isObject(val)) ||\n        val.__v_skip /* ReactiveFlags.SKIP */ ||\n        Object.isFrozen(val) ||\n        val instanceof VNode) {\n        return;\n    }\n    if (val.__ob__) {\n        const depId = val.__ob__.dep.id;\n        if (seen.has(depId)) {\n            return;\n        }\n        seen.add(depId);\n    }\n    if (isA) {\n        i = val.length;\n        while (i--)\n            _traverse(val[i], seen);\n    }\n    else if (isRef(val)) {\n        _traverse(val.value, seen);\n    }\n    else {\n        keys = Object.keys(val);\n        i = keys.length;\n        while (i--)\n            _traverse(val[keys[i]], seen);\n    }\n}\n\nlet uid$1 = 0;\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n * @internal\n */\nclass Watcher {\n    constructor(vm, expOrFn, cb, options, isRenderWatcher) {\n        recordEffectScope(this, \n        // if the active effect scope is manually created (not a component scope),\n        // prioritize it\n        activeEffectScope && !activeEffectScope._vm\n            ? activeEffectScope\n            : vm\n                ? vm._scope\n                : undefined);\n        if ((this.vm = vm) && isRenderWatcher) {\n            vm._watcher = this;\n        }\n        // options\n        if (options) {\n            this.deep = !!options.deep;\n            this.user = !!options.user;\n            this.lazy = !!options.lazy;\n            this.sync = !!options.sync;\n            this.before = options.before;\n            {\n                this.onTrack = options.onTrack;\n                this.onTrigger = options.onTrigger;\n            }\n        }\n        else {\n            this.deep = this.user = this.lazy = this.sync = false;\n        }\n        this.cb = cb;\n        this.id = ++uid$1; // uid for batching\n        this.active = true;\n        this.post = false;\n        this.dirty = this.lazy; // for lazy watchers\n        this.deps = [];\n        this.newDeps = [];\n        this.depIds = new _Set();\n        this.newDepIds = new _Set();\n        this.expression = expOrFn.toString() ;\n        // parse expression for getter\n        if (isFunction(expOrFn)) {\n            this.getter = expOrFn;\n        }\n        else {\n            this.getter = parsePath(expOrFn);\n            if (!this.getter) {\n                this.getter = noop;\n                warn$2(`Failed watching path: \"${expOrFn}\" ` +\n                        'Watcher only accepts simple dot-delimited paths. ' +\n                        'For full control, use a function instead.', vm);\n            }\n        }\n        this.value = this.lazy ? undefined : this.get();\n    }\n    /**\n     * Evaluate the getter, and re-collect dependencies.\n     */\n    get() {\n        pushTarget(this);\n        let value;\n        const vm = this.vm;\n        try {\n            value = this.getter.call(vm, vm);\n        }\n        catch (e) {\n            if (this.user) {\n                handleError(e, vm, `getter for watcher \"${this.expression}\"`);\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // \"touch\" every property so they are all tracked as\n            // dependencies for deep watching\n            if (this.deep) {\n                traverse(value);\n            }\n            popTarget();\n            this.cleanupDeps();\n        }\n        return value;\n    }\n    /**\n     * Add a dependency to this directive.\n     */\n    addDep(dep) {\n        const id = dep.id;\n        if (!this.newDepIds.has(id)) {\n            this.newDepIds.add(id);\n            this.newDeps.push(dep);\n            if (!this.depIds.has(id)) {\n                dep.addSub(this);\n            }\n        }\n    }\n    /**\n     * Clean up for dependency collection.\n     */\n    cleanupDeps() {\n        let i = this.deps.length;\n        while (i--) {\n            const dep = this.deps[i];\n            if (!this.newDepIds.has(dep.id)) {\n                dep.removeSub(this);\n            }\n        }\n        let tmp = this.depIds;\n        this.depIds = this.newDepIds;\n        this.newDepIds = tmp;\n        this.newDepIds.clear();\n        tmp = this.deps;\n        this.deps = this.newDeps;\n        this.newDeps = tmp;\n        this.newDeps.length = 0;\n    }\n    /**\n     * Subscriber interface.\n     * Will be called when a dependency changes.\n     */\n    update() {\n        /* istanbul ignore else */\n        if (this.lazy) {\n            this.dirty = true;\n        }\n        else if (this.sync) {\n            this.run();\n        }\n        else {\n            queueWatcher(this);\n        }\n    }\n    /**\n     * Scheduler job interface.\n     * Will be called by the scheduler.\n     */\n    run() {\n        if (this.active) {\n            const value = this.get();\n            if (value !== this.value ||\n                // Deep watchers and watchers on Object/Arrays should fire even\n                // when the value is the same, because the value may\n                // have mutated.\n                isObject(value) ||\n                this.deep) {\n                // set new value\n                const oldValue = this.value;\n                this.value = value;\n                if (this.user) {\n                    const info = `callback for watcher \"${this.expression}\"`;\n                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                }\n                else {\n                    this.cb.call(this.vm, value, oldValue);\n                }\n            }\n        }\n    }\n    /**\n     * Evaluate the value of the watcher.\n     * This only gets called for lazy watchers.\n     */\n    evaluate() {\n        this.value = this.get();\n        this.dirty = false;\n    }\n    /**\n     * Depend on all deps collected by this watcher.\n     */\n    depend() {\n        let i = this.deps.length;\n        while (i--) {\n            this.deps[i].depend();\n        }\n    }\n    /**\n     * Remove self from all dependencies' subscriber list.\n     */\n    teardown() {\n        if (this.vm && !this.vm._isBeingDestroyed) {\n            remove$2(this.vm._scope.effects, this);\n        }\n        if (this.active) {\n            let i = this.deps.length;\n            while (i--) {\n                this.deps[i].removeSub(this);\n            }\n            this.active = false;\n            if (this.onStop) {\n                this.onStop();\n            }\n        }\n    }\n}\n\nconst sharedPropertyDefinition = {\n    enumerable: true,\n    configurable: true,\n    get: noop,\n    set: noop\n};\nfunction proxy(target, sourceKey, key) {\n    sharedPropertyDefinition.get = function proxyGetter() {\n        return this[sourceKey][key];\n    };\n    sharedPropertyDefinition.set = function proxySetter(val) {\n        this[sourceKey][key] = val;\n    };\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction initState(vm) {\n    const opts = vm.$options;\n    if (opts.props)\n        initProps$1(vm, opts.props);\n    // Composition API\n    initSetup(vm);\n    if (opts.methods)\n        initMethods(vm, opts.methods);\n    if (opts.data) {\n        initData(vm);\n    }\n    else {\n        const ob = observe((vm._data = {}));\n        ob && ob.vmCount++;\n    }\n    if (opts.computed)\n        initComputed$1(vm, opts.computed);\n    if (opts.watch && opts.watch !== nativeWatch) {\n        initWatch(vm, opts.watch);\n    }\n}\nfunction initProps$1(vm, propsOptions) {\n    const propsData = vm.$options.propsData || {};\n    const props = (vm._props = shallowReactive({}));\n    // cache prop keys so that future props updates can iterate using Array\n    // instead of dynamic object key enumeration.\n    const keys = (vm.$options._propKeys = []);\n    const isRoot = !vm.$parent;\n    // root instance props should be converted\n    if (!isRoot) {\n        toggleObserving(false);\n    }\n    for (const key in propsOptions) {\n        keys.push(key);\n        const value = validateProp(key, propsOptions, propsData, vm);\n        /* istanbul ignore else */\n        {\n            const hyphenatedKey = hyphenate(key);\n            if (isReservedAttribute(hyphenatedKey) ||\n                config.isReservedAttr(hyphenatedKey)) {\n                warn$2(`\"${hyphenatedKey}\" is a reserved attribute and cannot be used as component prop.`, vm);\n            }\n            defineReactive(props, key, value, () => {\n                if (!isRoot && !isUpdatingChildComponent) {\n                    warn$2(`Avoid mutating a prop directly since the value will be ` +\n                        `overwritten whenever the parent component re-renders. ` +\n                        `Instead, use a data or computed property based on the prop's ` +\n                        `value. Prop being mutated: \"${key}\"`, vm);\n                }\n            }, true /* shallow */);\n        }\n        // static props are already proxied on the component's prototype\n        // during Vue.extend(). We only need to proxy props defined at\n        // instantiation here.\n        if (!(key in vm)) {\n            proxy(vm, `_props`, key);\n        }\n    }\n    toggleObserving(true);\n}\nfunction initData(vm) {\n    let data = vm.$options.data;\n    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n    if (!isPlainObject(data)) {\n        data = {};\n        warn$2('data functions should return an object:\\n' +\n                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n    }\n    // proxy data on instance\n    const keys = Object.keys(data);\n    const props = vm.$options.props;\n    const methods = vm.$options.methods;\n    let i = keys.length;\n    while (i--) {\n        const key = keys[i];\n        {\n            if (methods && hasOwn(methods, key)) {\n                warn$2(`Method \"${key}\" has already been defined as a data property.`, vm);\n            }\n        }\n        if (props && hasOwn(props, key)) {\n            warn$2(`The data property \"${key}\" is already declared as a prop. ` +\n                    `Use prop default value instead.`, vm);\n        }\n        else if (!isReserved(key)) {\n            proxy(vm, `_data`, key);\n        }\n    }\n    // observe data\n    const ob = observe(data);\n    ob && ob.vmCount++;\n}\nfunction getData(data, vm) {\n    // #7573 disable dep collection when invoking data getters\n    pushTarget();\n    try {\n        return data.call(vm, vm);\n    }\n    catch (e) {\n        handleError(e, vm, `data()`);\n        return {};\n    }\n    finally {\n        popTarget();\n    }\n}\nconst computedWatcherOptions = { lazy: true };\nfunction initComputed$1(vm, computed) {\n    // $flow-disable-line\n    const watchers = (vm._computedWatchers = Object.create(null));\n    // computed properties are just getters during SSR\n    const isSSR = isServerRendering();\n    for (const key in computed) {\n        const userDef = computed[key];\n        const getter = isFunction(userDef) ? userDef : userDef.get;\n        if (getter == null) {\n            warn$2(`Getter is missing for computed property \"${key}\".`, vm);\n        }\n        if (!isSSR) {\n            // create internal watcher for the computed property.\n            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n        }\n        // component-defined computed properties are already defined on the\n        // component prototype. We only need to define computed properties defined\n        // at instantiation here.\n        if (!(key in vm)) {\n            defineComputed(vm, key, userDef);\n        }\n        else {\n            if (key in vm.$data) {\n                warn$2(`The computed property \"${key}\" is already defined in data.`, vm);\n            }\n            else if (vm.$options.props && key in vm.$options.props) {\n                warn$2(`The computed property \"${key}\" is already defined as a prop.`, vm);\n            }\n            else if (vm.$options.methods && key in vm.$options.methods) {\n                warn$2(`The computed property \"${key}\" is already defined as a method.`, vm);\n            }\n        }\n    }\n}\nfunction defineComputed(target, key, userDef) {\n    const shouldCache = !isServerRendering();\n    if (isFunction(userDef)) {\n        sharedPropertyDefinition.get = shouldCache\n            ? createComputedGetter(key)\n            : createGetterInvoker(userDef);\n        sharedPropertyDefinition.set = noop;\n    }\n    else {\n        sharedPropertyDefinition.get = userDef.get\n            ? shouldCache && userDef.cache !== false\n                ? createComputedGetter(key)\n                : createGetterInvoker(userDef.get)\n            : noop;\n        sharedPropertyDefinition.set = userDef.set || noop;\n    }\n    if (sharedPropertyDefinition.set === noop) {\n        sharedPropertyDefinition.set = function () {\n            warn$2(`Computed property \"${key}\" was assigned to but it has no setter.`, this);\n        };\n    }\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction createComputedGetter(key) {\n    return function computedGetter() {\n        const watcher = this._computedWatchers && this._computedWatchers[key];\n        if (watcher) {\n            if (watcher.dirty) {\n                watcher.evaluate();\n            }\n            if (Dep.target) {\n                if (Dep.target.onTrack) {\n                    Dep.target.onTrack({\n                        effect: Dep.target,\n                        target: this,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                watcher.depend();\n            }\n            return watcher.value;\n        }\n    };\n}\nfunction createGetterInvoker(fn) {\n    return function computedGetter() {\n        return fn.call(this, this);\n    };\n}\nfunction initMethods(vm, methods) {\n    const props = vm.$options.props;\n    for (const key in methods) {\n        {\n            if (typeof methods[key] !== 'function') {\n                warn$2(`Method \"${key}\" has type \"${typeof methods[key]}\" in the component definition. ` +\n                    `Did you reference the function correctly?`, vm);\n            }\n            if (props && hasOwn(props, key)) {\n                warn$2(`Method \"${key}\" has already been defined as a prop.`, vm);\n            }\n            if (key in vm && isReserved(key)) {\n                warn$2(`Method \"${key}\" conflicts with an existing Vue instance method. ` +\n                    `Avoid defining component methods that start with _ or $.`);\n            }\n        }\n        vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);\n    }\n}\nfunction initWatch(vm, watch) {\n    for (const key in watch) {\n        const handler = watch[key];\n        if (isArray(handler)) {\n            for (let i = 0; i < handler.length; i++) {\n                createWatcher(vm, key, handler[i]);\n            }\n        }\n        else {\n            createWatcher(vm, key, handler);\n        }\n    }\n}\nfunction createWatcher(vm, expOrFn, handler, options) {\n    if (isPlainObject(handler)) {\n        options = handler;\n        handler = handler.handler;\n    }\n    if (typeof handler === 'string') {\n        handler = vm[handler];\n    }\n    return vm.$watch(expOrFn, handler, options);\n}\nfunction stateMixin(Vue) {\n    // flow somehow has problems with directly declared definition object\n    // when using Object.defineProperty, so we have to procedurally build up\n    // the object here.\n    const dataDef = {};\n    dataDef.get = function () {\n        return this._data;\n    };\n    const propsDef = {};\n    propsDef.get = function () {\n        return this._props;\n    };\n    {\n        dataDef.set = function () {\n            warn$2('Avoid replacing instance root $data. ' +\n                'Use nested data properties instead.', this);\n        };\n        propsDef.set = function () {\n            warn$2(`$props is readonly.`, this);\n        };\n    }\n    Object.defineProperty(Vue.prototype, '$data', dataDef);\n    Object.defineProperty(Vue.prototype, '$props', propsDef);\n    Vue.prototype.$set = set;\n    Vue.prototype.$delete = del;\n    Vue.prototype.$watch = function (expOrFn, cb, options) {\n        const vm = this;\n        if (isPlainObject(cb)) {\n            return createWatcher(vm, expOrFn, cb, options);\n        }\n        options = options || {};\n        options.user = true;\n        const watcher = new Watcher(vm, expOrFn, cb, options);\n        if (options.immediate) {\n            const info = `callback for immediate watcher \"${watcher.expression}\"`;\n            pushTarget();\n            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n            popTarget();\n        }\n        return function unwatchFn() {\n            watcher.teardown();\n        };\n    };\n}\n\nfunction initProvide(vm) {\n    const provideOption = vm.$options.provide;\n    if (provideOption) {\n        const provided = isFunction(provideOption)\n            ? provideOption.call(vm)\n            : provideOption;\n        if (!isObject(provided)) {\n            return;\n        }\n        const source = resolveProvided(vm);\n        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n        // iterate the keys ourselves.\n        const keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n        }\n    }\n}\nfunction initInjections(vm) {\n    const result = resolveInject(vm.$options.inject, vm);\n    if (result) {\n        toggleObserving(false);\n        Object.keys(result).forEach(key => {\n            /* istanbul ignore else */\n            {\n                defineReactive(vm, key, result[key], () => {\n                    warn$2(`Avoid mutating an injected value directly since the changes will be ` +\n                        `overwritten whenever the provided component re-renders. ` +\n                        `injection being mutated: \"${key}\"`, vm);\n                });\n            }\n        });\n        toggleObserving(true);\n    }\n}\nfunction resolveInject(inject, vm) {\n    if (inject) {\n        // inject is :any because flow is not smart enough to figure out cached\n        const result = Object.create(null);\n        const keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            // #6574 in case the inject object is observed...\n            if (key === '__ob__')\n                continue;\n            const provideKey = inject[key].from;\n            if (provideKey in vm._provided) {\n                result[key] = vm._provided[provideKey];\n            }\n            else if ('default' in inject[key]) {\n                const provideDefault = inject[key].default;\n                result[key] = isFunction(provideDefault)\n                    ? provideDefault.call(vm)\n                    : provideDefault;\n            }\n            else {\n                warn$2(`Injection \"${key}\" not found`, vm);\n            }\n        }\n        return result;\n    }\n}\n\nlet uid = 0;\nfunction initMixin$1(Vue) {\n    Vue.prototype._init = function (options) {\n        const vm = this;\n        // a uid\n        vm._uid = uid++;\n        let startTag, endTag;\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            startTag = `vue-perf-start:${vm._uid}`;\n            endTag = `vue-perf-end:${vm._uid}`;\n            mark(startTag);\n        }\n        // a flag to mark this as a Vue instance without having to do instanceof\n        // check\n        vm._isVue = true;\n        // avoid instances from being observed\n        vm.__v_skip = true;\n        // effect scope\n        vm._scope = new EffectScope(true /* detached */);\n        // #13134 edge case where a child component is manually created during the\n        // render of a parent component\n        vm._scope.parent = undefined;\n        vm._scope._vm = true;\n        // merge options\n        if (options && options._isComponent) {\n            // optimize internal component instantiation\n            // since dynamic options merging is pretty slow, and none of the\n            // internal component options needs special treatment.\n            initInternalComponent(vm, options);\n        }\n        else {\n            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n        }\n        /* istanbul ignore else */\n        {\n            initProxy(vm);\n        }\n        // expose real self\n        vm._self = vm;\n        initLifecycle(vm);\n        initEvents(vm);\n        initRender(vm);\n        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n        initInjections(vm); // resolve injections before data/props\n        initState(vm);\n        initProvide(vm); // resolve provide after data/props\n        callHook$1(vm, 'created');\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            vm._name = formatComponentName(vm, false);\n            mark(endTag);\n            measure(`vue ${vm._name} init`, startTag, endTag);\n        }\n        if (vm.$options.el) {\n            vm.$mount(vm.$options.el);\n        }\n    };\n}\nfunction initInternalComponent(vm, options) {\n    const opts = (vm.$options = Object.create(vm.constructor.options));\n    // doing this because it's faster than dynamic enumeration.\n    const parentVnode = options._parentVnode;\n    opts.parent = options.parent;\n    opts._parentVnode = parentVnode;\n    const vnodeComponentOptions = parentVnode.componentOptions;\n    opts.propsData = vnodeComponentOptions.propsData;\n    opts._parentListeners = vnodeComponentOptions.listeners;\n    opts._renderChildren = vnodeComponentOptions.children;\n    opts._componentTag = vnodeComponentOptions.tag;\n    if (options.render) {\n        opts.render = options.render;\n        opts.staticRenderFns = options.staticRenderFns;\n    }\n}\nfunction resolveConstructorOptions(Ctor) {\n    let options = Ctor.options;\n    if (Ctor.super) {\n        const superOptions = resolveConstructorOptions(Ctor.super);\n        const cachedSuperOptions = Ctor.superOptions;\n        if (superOptions !== cachedSuperOptions) {\n            // super option changed,\n            // need to resolve new options.\n            Ctor.superOptions = superOptions;\n            // check if there are any late-modified/attached options (#4976)\n            const modifiedOptions = resolveModifiedOptions(Ctor);\n            // update base extend options\n            if (modifiedOptions) {\n                extend(Ctor.extendOptions, modifiedOptions);\n            }\n            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n            if (options.name) {\n                options.components[options.name] = Ctor;\n            }\n        }\n    }\n    return options;\n}\nfunction resolveModifiedOptions(Ctor) {\n    let modified;\n    const latest = Ctor.options;\n    const sealed = Ctor.sealedOptions;\n    for (const key in latest) {\n        if (latest[key] !== sealed[key]) {\n            if (!modified)\n                modified = {};\n            modified[key] = latest[key];\n        }\n    }\n    return modified;\n}\n\nfunction FunctionalRenderContext(data, props, children, parent, Ctor) {\n    const options = Ctor.options;\n    // ensure the createElement function in functional components\n    // gets a unique context - this is necessary for correct named slot check\n    let contextVm;\n    if (hasOwn(parent, '_uid')) {\n        contextVm = Object.create(parent);\n        contextVm._original = parent;\n    }\n    else {\n        // the context vm passed in is a functional context as well.\n        // in this case we want to make sure we are able to get a hold to the\n        // real context instance.\n        contextVm = parent;\n        // @ts-ignore\n        parent = parent._original;\n    }\n    const isCompiled = isTrue(options._compiled);\n    const needNormalization = !isCompiled;\n    this.data = data;\n    this.props = props;\n    this.children = children;\n    this.parent = parent;\n    this.listeners = data.on || emptyObject;\n    this.injections = resolveInject(options.inject, parent);\n    this.slots = () => {\n        if (!this.$slots) {\n            normalizeScopedSlots(parent, data.scopedSlots, (this.$slots = resolveSlots(children, parent)));\n        }\n        return this.$slots;\n    };\n    Object.defineProperty(this, 'scopedSlots', {\n        enumerable: true,\n        get() {\n            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n        }\n    });\n    // support for compiled functional template\n    if (isCompiled) {\n        // exposing $options for renderStatic()\n        this.$options = options;\n        // pre-resolve slots for renderSlot()\n        this.$slots = this.slots();\n        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n    }\n    if (options._scopeId) {\n        this._c = (a, b, c, d) => {\n            const vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n            if (vnode && !isArray(vnode)) {\n                vnode.fnScopeId = options._scopeId;\n                vnode.fnContext = parent;\n            }\n            return vnode;\n        };\n    }\n    else {\n        this._c = (a, b, c, d) => createElement$1(contextVm, a, b, c, d, needNormalization);\n    }\n}\ninstallRenderHelpers(FunctionalRenderContext.prototype);\nfunction createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n    const options = Ctor.options;\n    const props = {};\n    const propOptions = options.props;\n    if (isDef(propOptions)) {\n        for (const key in propOptions) {\n            props[key] = validateProp(key, propOptions, propsData || emptyObject);\n        }\n    }\n    else {\n        if (isDef(data.attrs))\n            mergeProps(props, data.attrs);\n        if (isDef(data.props))\n            mergeProps(props, data.props);\n    }\n    const renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n    const vnode = options.render.call(null, renderContext._c, renderContext);\n    if (vnode instanceof VNode) {\n        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n    }\n    else if (isArray(vnode)) {\n        const vnodes = normalizeChildren(vnode) || [];\n        const res = new Array(vnodes.length);\n        for (let i = 0; i < vnodes.length; i++) {\n            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n        }\n        return res;\n    }\n}\nfunction cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n    // #7817 clone node before setting fnContext, otherwise if the node is reused\n    // (e.g. it was from a cached normal slot) the fnContext causes named slots\n    // that should not be matched to match.\n    const clone = cloneVNode(vnode);\n    clone.fnContext = contextVm;\n    clone.fnOptions = options;\n    {\n        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n            renderContext;\n    }\n    if (data.slot) {\n        (clone.data || (clone.data = {})).slot = data.slot;\n    }\n    return clone;\n}\nfunction mergeProps(to, from) {\n    for (const key in from) {\n        to[camelize(key)] = from[key];\n    }\n}\n\nfunction getComponentName(options) {\n    return options.name || options.__name || options._componentTag;\n}\n// inline hooks to be invoked on component VNodes during patch\nconst componentVNodeHooks = {\n    init(vnode, hydrating) {\n        if (vnode.componentInstance &&\n            !vnode.componentInstance._isDestroyed &&\n            vnode.data.keepAlive) {\n            // kept-alive components, treat as a patch\n            const mountedNode = vnode; // work around flow\n            componentVNodeHooks.prepatch(mountedNode, mountedNode);\n        }\n        else {\n            const child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n            child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n        }\n    },\n    prepatch(oldVnode, vnode) {\n        const options = vnode.componentOptions;\n        const child = (vnode.componentInstance = oldVnode.componentInstance);\n        updateChildComponent(child, options.propsData, // updated props\n        options.listeners, // updated listeners\n        vnode, // new parent vnode\n        options.children // new children\n        );\n    },\n    insert(vnode) {\n        const { context, componentInstance } = vnode;\n        if (!componentInstance._isMounted) {\n            componentInstance._isMounted = true;\n            callHook$1(componentInstance, 'mounted');\n        }\n        if (vnode.data.keepAlive) {\n            if (context._isMounted) {\n                // vue-router#1212\n                // During updates, a kept-alive component's child components may\n                // change, so directly walking the tree here may call activated hooks\n                // on incorrect children. Instead we push them into a queue which will\n                // be processed after the whole patch process ended.\n                queueActivatedComponent(componentInstance);\n            }\n            else {\n                activateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    },\n    destroy(vnode) {\n        const { componentInstance } = vnode;\n        if (!componentInstance._isDestroyed) {\n            if (!vnode.data.keepAlive) {\n                componentInstance.$destroy();\n            }\n            else {\n                deactivateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    }\n};\nconst hooksToMerge = Object.keys(componentVNodeHooks);\nfunction createComponent(Ctor, data, context, children, tag) {\n    if (isUndef(Ctor)) {\n        return;\n    }\n    const baseCtor = context.$options._base;\n    // plain options object: turn it into a constructor\n    if (isObject(Ctor)) {\n        Ctor = baseCtor.extend(Ctor);\n    }\n    // if at this stage it's not a constructor or an async component factory,\n    // reject.\n    if (typeof Ctor !== 'function') {\n        {\n            warn$2(`Invalid Component definition: ${String(Ctor)}`, context);\n        }\n        return;\n    }\n    // async component\n    let asyncFactory;\n    // @ts-expect-error\n    if (isUndef(Ctor.cid)) {\n        asyncFactory = Ctor;\n        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n        if (Ctor === undefined) {\n            // return a placeholder node for async component, which is rendered\n            // as a comment node but preserves all the raw information for the node.\n            // the information will be used for async server-rendering and hydration.\n            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n        }\n    }\n    data = data || {};\n    // resolve constructor options in case global mixins are applied after\n    // component constructor creation\n    resolveConstructorOptions(Ctor);\n    // transform component v-model data into props & events\n    if (isDef(data.model)) {\n        // @ts-expect-error\n        transformModel(Ctor.options, data);\n    }\n    // extract props\n    // @ts-expect-error\n    const propsData = extractPropsFromVNodeData(data, Ctor, tag);\n    // functional component\n    // @ts-expect-error\n    if (isTrue(Ctor.options.functional)) {\n        return createFunctionalComponent(Ctor, propsData, data, context, children);\n    }\n    // extract listeners, since these needs to be treated as\n    // child component listeners instead of DOM listeners\n    const listeners = data.on;\n    // replace with listeners with .native modifier\n    // so it gets processed during parent component patch.\n    data.on = data.nativeOn;\n    // @ts-expect-error\n    if (isTrue(Ctor.options.abstract)) {\n        // abstract components do not keep anything\n        // other than props & listeners & slot\n        // work around flow\n        const slot = data.slot;\n        data = {};\n        if (slot) {\n            data.slot = slot;\n        }\n    }\n    // install component management hooks onto the placeholder node\n    installComponentHooks(data);\n    // return a placeholder vnode\n    // @ts-expect-error\n    const name = getComponentName(Ctor.options) || tag;\n    const vnode = new VNode(\n    // @ts-expect-error\n    `vue-component-${Ctor.cid}${name ? `-${name}` : ''}`, data, undefined, undefined, undefined, context, \n    // @ts-expect-error\n    { Ctor, propsData, listeners, tag, children }, asyncFactory);\n    return vnode;\n}\nfunction createComponentInstanceForVnode(\n// we know it's MountedComponentVNode but flow doesn't\nvnode, \n// activeInstance in lifecycle state\nparent) {\n    const options = {\n        _isComponent: true,\n        _parentVnode: vnode,\n        parent\n    };\n    // check inline-template render functions\n    const inlineTemplate = vnode.data.inlineTemplate;\n    if (isDef(inlineTemplate)) {\n        options.render = inlineTemplate.render;\n        options.staticRenderFns = inlineTemplate.staticRenderFns;\n    }\n    return new vnode.componentOptions.Ctor(options);\n}\nfunction installComponentHooks(data) {\n    const hooks = data.hook || (data.hook = {});\n    for (let i = 0; i < hooksToMerge.length; i++) {\n        const key = hooksToMerge[i];\n        const existing = hooks[key];\n        const toMerge = componentVNodeHooks[key];\n        // @ts-expect-error\n        if (existing !== toMerge && !(existing && existing._merged)) {\n            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n        }\n    }\n}\nfunction mergeHook(f1, f2) {\n    const merged = (a, b) => {\n        // flow complains about extra args which is why we use any\n        f1(a, b);\n        f2(a, b);\n    };\n    merged._merged = true;\n    return merged;\n}\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel(options, data) {\n    const prop = (options.model && options.model.prop) || 'value';\n    const event = (options.model && options.model.event) || 'input';\n    (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n    const on = data.on || (data.on = {});\n    const existing = on[event];\n    const callback = data.model.callback;\n    if (isDef(existing)) {\n        if (isArray(existing)\n            ? existing.indexOf(callback) === -1\n            : existing !== callback) {\n            on[event] = [callback].concat(existing);\n        }\n    }\n    else {\n        on[event] = callback;\n    }\n}\n\nlet warn$2 = noop;\nlet tip = noop;\nlet generateComponentTrace; // work around flow check\nlet formatComponentName;\n{\n    const hasConsole = typeof console !== 'undefined';\n    const classifyRE = /(?:^|[-_])(\\w)/g;\n    const classify = str => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n    warn$2 = (msg, vm = currentInstance) => {\n        const trace = vm ? generateComponentTrace(vm) : '';\n        if (config.warnHandler) {\n            config.warnHandler.call(null, msg, vm, trace);\n        }\n        else if (hasConsole && !config.silent) {\n            console.error(`[Vue warn]: ${msg}${trace}`);\n        }\n    };\n    tip = (msg, vm) => {\n        if (hasConsole && !config.silent) {\n            console.warn(`[Vue tip]: ${msg}` + (vm ? generateComponentTrace(vm) : ''));\n        }\n    };\n    formatComponentName = (vm, includeFile) => {\n        if (vm.$root === vm) {\n            return '<Root>';\n        }\n        const options = isFunction(vm) && vm.cid != null\n            ? vm.options\n            : vm._isVue\n                ? vm.$options || vm.constructor.options\n                : vm;\n        let name = getComponentName(options);\n        const file = options.__file;\n        if (!name && file) {\n            const match = file.match(/([^/\\\\]+)\\.vue$/);\n            name = match && match[1];\n        }\n        return ((name ? `<${classify(name)}>` : `<Anonymous>`) +\n            (file && includeFile !== false ? ` at ${file}` : ''));\n    };\n    const repeat = (str, n) => {\n        let res = '';\n        while (n) {\n            if (n % 2 === 1)\n                res += str;\n            if (n > 1)\n                str += str;\n            n >>= 1;\n        }\n        return res;\n    };\n    generateComponentTrace = (vm) => {\n        if (vm._isVue && vm.$parent) {\n            const tree = [];\n            let currentRecursiveSequence = 0;\n            while (vm) {\n                if (tree.length > 0) {\n                    const last = tree[tree.length - 1];\n                    if (last.constructor === vm.constructor) {\n                        currentRecursiveSequence++;\n                        vm = vm.$parent;\n                        continue;\n                    }\n                    else if (currentRecursiveSequence > 0) {\n                        tree[tree.length - 1] = [last, currentRecursiveSequence];\n                        currentRecursiveSequence = 0;\n                    }\n                }\n                tree.push(vm);\n                vm = vm.$parent;\n            }\n            return ('\\n\\nfound in\\n\\n' +\n                tree\n                    .map((vm, i) => `${i === 0 ? '---> ' : repeat(' ', 5 + i * 2)}${isArray(vm)\n                    ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n                    : formatComponentName(vm)}`)\n                    .join('\\n'));\n        }\n        else {\n            return `\\n\\n(found in ${formatComponentName(vm)})`;\n        }\n    };\n}\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nconst strats = config.optionMergeStrategies;\n/**\n * Options with restrictions\n */\n{\n    strats.el = strats.propsData = function (parent, child, vm, key) {\n        if (!vm) {\n            warn$2(`option \"${key}\" can only be used during instance ` +\n                'creation with the `new` keyword.');\n        }\n        return defaultStrat(parent, child);\n    };\n}\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData(to, from, recursive = true) {\n    if (!from)\n        return to;\n    let key, toVal, fromVal;\n    const keys = hasSymbol\n        ? Reflect.ownKeys(from)\n        : Object.keys(from);\n    for (let i = 0; i < keys.length; i++) {\n        key = keys[i];\n        // in case the object is already observed...\n        if (key === '__ob__')\n            continue;\n        toVal = to[key];\n        fromVal = from[key];\n        if (!recursive || !hasOwn(to, key)) {\n            set(to, key, fromVal);\n        }\n        else if (toVal !== fromVal &&\n            isPlainObject(toVal) &&\n            isPlainObject(fromVal)) {\n            mergeData(toVal, fromVal);\n        }\n    }\n    return to;\n}\n/**\n * Data\n */\nfunction mergeDataOrFn(parentVal, childVal, vm) {\n    if (!vm) {\n        // in a Vue.extend merge, both should be functions\n        if (!childVal) {\n            return parentVal;\n        }\n        if (!parentVal) {\n            return childVal;\n        }\n        // when parentVal & childVal are both present,\n        // we need to return a function that returns the\n        // merged result of both functions... no need to\n        // check if parentVal is a function here because\n        // it has to be a function to pass previous merges.\n        return function mergedDataFn() {\n            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n        };\n    }\n    else {\n        return function mergedInstanceDataFn() {\n            // instance merge\n            const instanceData = isFunction(childVal)\n                ? childVal.call(vm, vm)\n                : childVal;\n            const defaultData = isFunction(parentVal)\n                ? parentVal.call(vm, vm)\n                : parentVal;\n            if (instanceData) {\n                return mergeData(instanceData, defaultData);\n            }\n            else {\n                return defaultData;\n            }\n        };\n    }\n}\nstrats.data = function (parentVal, childVal, vm) {\n    if (!vm) {\n        if (childVal && typeof childVal !== 'function') {\n            warn$2('The \"data\" option should be a function ' +\n                    'that returns a per-instance value in component ' +\n                    'definitions.', vm);\n            return parentVal;\n        }\n        return mergeDataOrFn(parentVal, childVal);\n    }\n    return mergeDataOrFn(parentVal, childVal, vm);\n};\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeLifecycleHook(parentVal, childVal) {\n    const res = childVal\n        ? parentVal\n            ? parentVal.concat(childVal)\n            : isArray(childVal)\n                ? childVal\n                : [childVal]\n        : parentVal;\n    return res ? dedupeHooks(res) : res;\n}\nfunction dedupeHooks(hooks) {\n    const res = [];\n    for (let i = 0; i < hooks.length; i++) {\n        if (res.indexOf(hooks[i]) === -1) {\n            res.push(hooks[i]);\n        }\n    }\n    return res;\n}\nLIFECYCLE_HOOKS.forEach(hook => {\n    strats[hook] = mergeLifecycleHook;\n});\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets(parentVal, childVal, vm, key) {\n    const res = Object.create(parentVal || null);\n    if (childVal) {\n        assertObjectType(key, childVal, vm);\n        return extend(res, childVal);\n    }\n    else {\n        return res;\n    }\n}\nASSET_TYPES.forEach(function (type) {\n    strats[type + 's'] = mergeAssets;\n});\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal, vm, key) {\n    // work around Firefox's Object.prototype.watch...\n    //@ts-expect-error work around\n    if (parentVal === nativeWatch)\n        parentVal = undefined;\n    //@ts-expect-error work around\n    if (childVal === nativeWatch)\n        childVal = undefined;\n    /* istanbul ignore if */\n    if (!childVal)\n        return Object.create(parentVal || null);\n    {\n        assertObjectType(key, childVal, vm);\n    }\n    if (!parentVal)\n        return childVal;\n    const ret = {};\n    extend(ret, parentVal);\n    for (const key in childVal) {\n        let parent = ret[key];\n        const child = childVal[key];\n        if (parent && !isArray(parent)) {\n            parent = [parent];\n        }\n        ret[key] = parent ? parent.concat(child) : isArray(child) ? child : [child];\n    }\n    return ret;\n};\n/**\n * Other object hashes.\n */\nstrats.props =\n    strats.methods =\n        strats.inject =\n            strats.computed =\n                function (parentVal, childVal, vm, key) {\n                    if (childVal && true) {\n                        assertObjectType(key, childVal, vm);\n                    }\n                    if (!parentVal)\n                        return childVal;\n                    const ret = Object.create(null);\n                    extend(ret, parentVal);\n                    if (childVal)\n                        extend(ret, childVal);\n                    return ret;\n                };\nstrats.provide = function (parentVal, childVal) {\n    if (!parentVal)\n        return childVal;\n    return function () {\n        const ret = Object.create(null);\n        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n        if (childVal) {\n            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n            );\n        }\n        return ret;\n    };\n};\n/**\n * Default strategy.\n */\nconst defaultStrat = function (parentVal, childVal) {\n    return childVal === undefined ? parentVal : childVal;\n};\n/**\n * Validate component names\n */\nfunction checkComponents(options) {\n    for (const key in options.components) {\n        validateComponentName(key);\n    }\n}\nfunction validateComponentName(name) {\n    if (!new RegExp(`^[a-zA-Z][\\\\-\\\\.0-9_${unicodeRegExp.source}]*$`).test(name)) {\n        warn$2('Invalid component name: \"' +\n            name +\n            '\". Component names ' +\n            'should conform to valid custom element name in html5 specification.');\n    }\n    if (isBuiltInTag(name) || config.isReservedTag(name)) {\n        warn$2('Do not use built-in or reserved HTML elements as component ' +\n            'id: ' +\n            name);\n    }\n}\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps(options, vm) {\n    const props = options.props;\n    if (!props)\n        return;\n    const res = {};\n    let i, val, name;\n    if (isArray(props)) {\n        i = props.length;\n        while (i--) {\n            val = props[i];\n            if (typeof val === 'string') {\n                name = camelize(val);\n                res[name] = { type: null };\n            }\n            else {\n                warn$2('props must be strings when using array syntax.');\n            }\n        }\n    }\n    else if (isPlainObject(props)) {\n        for (const key in props) {\n            val = props[key];\n            name = camelize(key);\n            res[name] = isPlainObject(val) ? val : { type: val };\n        }\n    }\n    else {\n        warn$2(`Invalid value for option \"props\": expected an Array or an Object, ` +\n            `but got ${toRawType(props)}.`, vm);\n    }\n    options.props = res;\n}\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject(options, vm) {\n    const inject = options.inject;\n    if (!inject)\n        return;\n    const normalized = (options.inject = {});\n    if (isArray(inject)) {\n        for (let i = 0; i < inject.length; i++) {\n            normalized[inject[i]] = { from: inject[i] };\n        }\n    }\n    else if (isPlainObject(inject)) {\n        for (const key in inject) {\n            const val = inject[key];\n            normalized[key] = isPlainObject(val)\n                ? extend({ from: key }, val)\n                : { from: val };\n        }\n    }\n    else {\n        warn$2(`Invalid value for option \"inject\": expected an Array or an Object, ` +\n            `but got ${toRawType(inject)}.`, vm);\n    }\n}\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives$1(options) {\n    const dirs = options.directives;\n    if (dirs) {\n        for (const key in dirs) {\n            const def = dirs[key];\n            if (isFunction(def)) {\n                dirs[key] = { bind: def, update: def };\n            }\n        }\n    }\n}\nfunction assertObjectType(name, value, vm) {\n    if (!isPlainObject(value)) {\n        warn$2(`Invalid value for option \"${name}\": expected an Object, ` +\n            `but got ${toRawType(value)}.`, vm);\n    }\n}\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions(parent, child, vm) {\n    {\n        checkComponents(child);\n    }\n    if (isFunction(child)) {\n        // @ts-expect-error\n        child = child.options;\n    }\n    normalizeProps(child, vm);\n    normalizeInject(child, vm);\n    normalizeDirectives$1(child);\n    // Apply extends and mixins on the child options,\n    // but only if it is a raw options object that isn't\n    // the result of another mergeOptions call.\n    // Only merged options has the _base property.\n    if (!child._base) {\n        if (child.extends) {\n            parent = mergeOptions(parent, child.extends, vm);\n        }\n        if (child.mixins) {\n            for (let i = 0, l = child.mixins.length; i < l; i++) {\n                parent = mergeOptions(parent, child.mixins[i], vm);\n            }\n        }\n    }\n    const options = {};\n    let key;\n    for (key in parent) {\n        mergeField(key);\n    }\n    for (key in child) {\n        if (!hasOwn(parent, key)) {\n            mergeField(key);\n        }\n    }\n    function mergeField(key) {\n        const strat = strats[key] || defaultStrat;\n        options[key] = strat(parent[key], child[key], vm, key);\n    }\n    return options;\n}\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset(options, type, id, warnMissing) {\n    /* istanbul ignore if */\n    if (typeof id !== 'string') {\n        return;\n    }\n    const assets = options[type];\n    // check local registration variations first\n    if (hasOwn(assets, id))\n        return assets[id];\n    const camelizedId = camelize(id);\n    if (hasOwn(assets, camelizedId))\n        return assets[camelizedId];\n    const PascalCaseId = capitalize(camelizedId);\n    if (hasOwn(assets, PascalCaseId))\n        return assets[PascalCaseId];\n    // fallback to prototype chain\n    const res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n    if (warnMissing && !res) {\n        warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n    }\n    return res;\n}\n\nfunction validateProp(key, propOptions, propsData, vm) {\n    const prop = propOptions[key];\n    const absent = !hasOwn(propsData, key);\n    let value = propsData[key];\n    // boolean casting\n    const booleanIndex = getTypeIndex(Boolean, prop.type);\n    if (booleanIndex > -1) {\n        if (absent && !hasOwn(prop, 'default')) {\n            value = false;\n        }\n        else if (value === '' || value === hyphenate(key)) {\n            // only cast empty string / same name to boolean if\n            // boolean has higher priority\n            const stringIndex = getTypeIndex(String, prop.type);\n            if (stringIndex < 0 || booleanIndex < stringIndex) {\n                value = true;\n            }\n        }\n    }\n    // check default value\n    if (value === undefined) {\n        value = getPropDefaultValue(vm, prop, key);\n        // since the default value is a fresh copy,\n        // make sure to observe it.\n        const prevShouldObserve = shouldObserve;\n        toggleObserving(true);\n        observe(value);\n        toggleObserving(prevShouldObserve);\n    }\n    {\n        assertProp(prop, key, value, vm, absent);\n    }\n    return value;\n}\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue(vm, prop, key) {\n    // no default, return undefined\n    if (!hasOwn(prop, 'default')) {\n        return undefined;\n    }\n    const def = prop.default;\n    // warn against non-factory defaults for Object & Array\n    if (isObject(def)) {\n        warn$2('Invalid default value for prop \"' +\n            key +\n            '\": ' +\n            'Props with type Object/Array must use a factory function ' +\n            'to return the default value.', vm);\n    }\n    // the raw prop value was also undefined from previous render,\n    // return previous default value to avoid unnecessary watcher trigger\n    if (vm &&\n        vm.$options.propsData &&\n        vm.$options.propsData[key] === undefined &&\n        vm._props[key] !== undefined) {\n        return vm._props[key];\n    }\n    // call factory function for non-Function types\n    // a value is Function if its prototype is function even across different execution context\n    return isFunction(def) && getType(prop.type) !== 'Function'\n        ? def.call(vm)\n        : def;\n}\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp(prop, name, value, vm, absent) {\n    if (prop.required && absent) {\n        warn$2('Missing required prop: \"' + name + '\"', vm);\n        return;\n    }\n    if (value == null && !prop.required) {\n        return;\n    }\n    let type = prop.type;\n    let valid = !type || type === true;\n    const expectedTypes = [];\n    if (type) {\n        if (!isArray(type)) {\n            type = [type];\n        }\n        for (let i = 0; i < type.length && !valid; i++) {\n            const assertedType = assertType(value, type[i], vm);\n            expectedTypes.push(assertedType.expectedType || '');\n            valid = assertedType.valid;\n        }\n    }\n    const haveExpectedTypes = expectedTypes.some(t => t);\n    if (!valid && haveExpectedTypes) {\n        warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);\n        return;\n    }\n    const validator = prop.validator;\n    if (validator) {\n        if (!validator(value)) {\n            warn$2('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n        }\n    }\n}\nconst simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\nfunction assertType(value, type, vm) {\n    let valid;\n    const expectedType = getType(type);\n    if (simpleCheckRE.test(expectedType)) {\n        const t = typeof value;\n        valid = t === expectedType.toLowerCase();\n        // for primitive wrapper objects\n        if (!valid && t === 'object') {\n            valid = value instanceof type;\n        }\n    }\n    else if (expectedType === 'Object') {\n        valid = isPlainObject(value);\n    }\n    else if (expectedType === 'Array') {\n        valid = isArray(value);\n    }\n    else {\n        try {\n            valid = value instanceof type;\n        }\n        catch (e) {\n            warn$2('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n            valid = false;\n        }\n    }\n    return {\n        valid,\n        expectedType\n    };\n}\nconst functionTypeCheckRE = /^\\s*function (\\w+)/;\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType(fn) {\n    const match = fn && fn.toString().match(functionTypeCheckRE);\n    return match ? match[1] : '';\n}\nfunction isSameType(a, b) {\n    return getType(a) === getType(b);\n}\nfunction getTypeIndex(type, expectedTypes) {\n    if (!isArray(expectedTypes)) {\n        return isSameType(expectedTypes, type) ? 0 : -1;\n    }\n    for (let i = 0, len = expectedTypes.length; i < len; i++) {\n        if (isSameType(expectedTypes[i], type)) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n    let message = `Invalid prop: type check failed for prop \"${name}\".` +\n        ` Expected ${expectedTypes.map(capitalize).join(', ')}`;\n    const expectedType = expectedTypes[0];\n    const receivedType = toRawType(value);\n    // check if we need to specify expected value\n    if (expectedTypes.length === 1 &&\n        isExplicable(expectedType) &&\n        isExplicable(typeof value) &&\n        !isBoolean(expectedType, receivedType)) {\n        message += ` with value ${styleValue(value, expectedType)}`;\n    }\n    message += `, got ${receivedType} `;\n    // check if we need to specify received value\n    if (isExplicable(receivedType)) {\n        message += `with value ${styleValue(value, receivedType)}.`;\n    }\n    return message;\n}\nfunction styleValue(value, type) {\n    if (type === 'String') {\n        return `\"${value}\"`;\n    }\n    else if (type === 'Number') {\n        return `${Number(value)}`;\n    }\n    else {\n        return `${value}`;\n    }\n}\nconst EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable(value) {\n    return EXPLICABLE_TYPES.some(elem => value.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n    return args.some(elem => elem.toLowerCase() === 'boolean');\n}\n\nfunction Vue(options) {\n    if (!(this instanceof Vue)) {\n        warn$2('Vue is a constructor and should be called with the `new` keyword');\n    }\n    this._init(options);\n}\n//@ts-expect-error Vue has function type\ninitMixin$1(Vue);\n//@ts-expect-error Vue has function type\nstateMixin(Vue);\n//@ts-expect-error Vue has function type\neventsMixin(Vue);\n//@ts-expect-error Vue has function type\nlifecycleMixin(Vue);\n//@ts-expect-error Vue has function type\nrenderMixin(Vue);\n\nfunction initUse(Vue) {\n    Vue.use = function (plugin) {\n        const installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n        if (installedPlugins.indexOf(plugin) > -1) {\n            return this;\n        }\n        // additional parameters\n        const args = toArray(arguments, 1);\n        args.unshift(this);\n        if (isFunction(plugin.install)) {\n            plugin.install.apply(plugin, args);\n        }\n        else if (isFunction(plugin)) {\n            plugin.apply(null, args);\n        }\n        installedPlugins.push(plugin);\n        return this;\n    };\n}\n\nfunction initMixin(Vue) {\n    Vue.mixin = function (mixin) {\n        this.options = mergeOptions(this.options, mixin);\n        return this;\n    };\n}\n\nfunction initExtend(Vue) {\n    /**\n     * Each instance constructor, including Vue, has a unique\n     * cid. This enables us to create wrapped \"child\n     * constructors\" for prototypal inheritance and cache them.\n     */\n    Vue.cid = 0;\n    let cid = 1;\n    /**\n     * Class inheritance\n     */\n    Vue.extend = function (extendOptions) {\n        extendOptions = extendOptions || {};\n        const Super = this;\n        const SuperId = Super.cid;\n        const cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n        if (cachedCtors[SuperId]) {\n            return cachedCtors[SuperId];\n        }\n        const name = getComponentName(extendOptions) || getComponentName(Super.options);\n        if (name) {\n            validateComponentName(name);\n        }\n        const Sub = function VueComponent(options) {\n            this._init(options);\n        };\n        Sub.prototype = Object.create(Super.prototype);\n        Sub.prototype.constructor = Sub;\n        Sub.cid = cid++;\n        Sub.options = mergeOptions(Super.options, extendOptions);\n        Sub['super'] = Super;\n        // For props and computed properties, we define the proxy getters on\n        // the Vue instances at extension time, on the extended prototype. This\n        // avoids Object.defineProperty calls for each instance created.\n        if (Sub.options.props) {\n            initProps(Sub);\n        }\n        if (Sub.options.computed) {\n            initComputed(Sub);\n        }\n        // allow further extension/mixin/plugin usage\n        Sub.extend = Super.extend;\n        Sub.mixin = Super.mixin;\n        Sub.use = Super.use;\n        // create asset registers, so extended classes\n        // can have their private assets too.\n        ASSET_TYPES.forEach(function (type) {\n            Sub[type] = Super[type];\n        });\n        // enable recursive self-lookup\n        if (name) {\n            Sub.options.components[name] = Sub;\n        }\n        // keep a reference to the super options at extension time.\n        // later at instantiation we can check if Super's options have\n        // been updated.\n        Sub.superOptions = Super.options;\n        Sub.extendOptions = extendOptions;\n        Sub.sealedOptions = extend({}, Sub.options);\n        // cache constructor\n        cachedCtors[SuperId] = Sub;\n        return Sub;\n    };\n}\nfunction initProps(Comp) {\n    const props = Comp.options.props;\n    for (const key in props) {\n        proxy(Comp.prototype, `_props`, key);\n    }\n}\nfunction initComputed(Comp) {\n    const computed = Comp.options.computed;\n    for (const key in computed) {\n        defineComputed(Comp.prototype, key, computed[key]);\n    }\n}\n\nfunction initAssetRegisters(Vue) {\n    /**\n     * Create asset registration methods.\n     */\n    ASSET_TYPES.forEach(type => {\n        // @ts-expect-error function is not exact same type\n        Vue[type] = function (id, definition) {\n            if (!definition) {\n                return this.options[type + 's'][id];\n            }\n            else {\n                /* istanbul ignore if */\n                if (type === 'component') {\n                    validateComponentName(id);\n                }\n                if (type === 'component' && isPlainObject(definition)) {\n                    // @ts-expect-error\n                    definition.name = definition.name || id;\n                    definition = this.options._base.extend(definition);\n                }\n                if (type === 'directive' && isFunction(definition)) {\n                    definition = { bind: definition, update: definition };\n                }\n                this.options[type + 's'][id] = definition;\n                return definition;\n            }\n        };\n    });\n}\n\nfunction _getComponentName(opts) {\n    return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n}\nfunction matches(pattern, name) {\n    if (isArray(pattern)) {\n        return pattern.indexOf(name) > -1;\n    }\n    else if (typeof pattern === 'string') {\n        return pattern.split(',').indexOf(name) > -1;\n    }\n    else if (isRegExp(pattern)) {\n        return pattern.test(name);\n    }\n    /* istanbul ignore next */\n    return false;\n}\nfunction pruneCache(keepAliveInstance, filter) {\n    const { cache, keys, _vnode, $vnode } = keepAliveInstance;\n    for (const key in cache) {\n        const entry = cache[key];\n        if (entry) {\n            const name = entry.name;\n            if (name && !filter(name)) {\n                pruneCacheEntry(cache, key, keys, _vnode);\n            }\n        }\n    }\n    $vnode.componentOptions.children = undefined;\n}\nfunction pruneCacheEntry(cache, key, keys, current) {\n    const entry = cache[key];\n    if (entry && (!current || entry.tag !== current.tag)) {\n        // @ts-expect-error can be undefined\n        entry.componentInstance.$destroy();\n    }\n    cache[key] = null;\n    remove$2(keys, key);\n}\nconst patternTypes = [String, RegExp, Array];\n// TODO defineComponent\nvar KeepAlive = {\n    name: 'keep-alive',\n    abstract: true,\n    props: {\n        include: patternTypes,\n        exclude: patternTypes,\n        max: [String, Number]\n    },\n    methods: {\n        cacheVNode() {\n            const { cache, keys, vnodeToCache, keyToCache } = this;\n            if (vnodeToCache) {\n                const { tag, componentInstance, componentOptions } = vnodeToCache;\n                cache[keyToCache] = {\n                    name: _getComponentName(componentOptions),\n                    tag,\n                    componentInstance\n                };\n                keys.push(keyToCache);\n                // prune oldest entry\n                if (this.max && keys.length > parseInt(this.max)) {\n                    pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                }\n                this.vnodeToCache = null;\n            }\n        }\n    },\n    created() {\n        this.cache = Object.create(null);\n        this.keys = [];\n    },\n    destroyed() {\n        for (const key in this.cache) {\n            pruneCacheEntry(this.cache, key, this.keys);\n        }\n    },\n    mounted() {\n        this.cacheVNode();\n        this.$watch('include', val => {\n            pruneCache(this, name => matches(val, name));\n        });\n        this.$watch('exclude', val => {\n            pruneCache(this, name => !matches(val, name));\n        });\n    },\n    updated() {\n        this.cacheVNode();\n    },\n    render() {\n        const slot = this.$slots.default;\n        const vnode = getFirstComponentChild(slot);\n        const componentOptions = vnode && vnode.componentOptions;\n        if (componentOptions) {\n            // check pattern\n            const name = _getComponentName(componentOptions);\n            const { include, exclude } = this;\n            if (\n            // not included\n            (include && (!name || !matches(include, name))) ||\n                // excluded\n                (exclude && name && matches(exclude, name))) {\n                return vnode;\n            }\n            const { cache, keys } = this;\n            const key = vnode.key == null\n                ? // same constructor may get registered as different local components\n                    // so cid alone is not enough (#3269)\n                    componentOptions.Ctor.cid +\n                        (componentOptions.tag ? `::${componentOptions.tag}` : '')\n                : vnode.key;\n            if (cache[key]) {\n                vnode.componentInstance = cache[key].componentInstance;\n                // make current key freshest\n                remove$2(keys, key);\n                keys.push(key);\n            }\n            else {\n                // delay setting the cache until update\n                this.vnodeToCache = vnode;\n                this.keyToCache = key;\n            }\n            // @ts-expect-error can vnode.data can be undefined\n            vnode.data.keepAlive = true;\n        }\n        return vnode || (slot && slot[0]);\n    }\n};\n\nvar builtInComponents = {\n    KeepAlive\n};\n\nfunction initGlobalAPI(Vue) {\n    // config\n    const configDef = {};\n    configDef.get = () => config;\n    {\n        configDef.set = () => {\n            warn$2('Do not replace the Vue.config object, set individual fields instead.');\n        };\n    }\n    Object.defineProperty(Vue, 'config', configDef);\n    // exposed util methods.\n    // NOTE: these are not considered part of the public API - avoid relying on\n    // them unless you are aware of the risk.\n    Vue.util = {\n        warn: warn$2,\n        extend,\n        mergeOptions,\n        defineReactive\n    };\n    Vue.set = set;\n    Vue.delete = del;\n    Vue.nextTick = nextTick;\n    // 2.6 explicit observable API\n    Vue.observable = (obj) => {\n        observe(obj);\n        return obj;\n    };\n    Vue.options = Object.create(null);\n    ASSET_TYPES.forEach(type => {\n        Vue.options[type + 's'] = Object.create(null);\n    });\n    // this is used to identify the \"base\" constructor to extend all plain-object\n    // components with in Weex's multi-instance scenarios.\n    Vue.options._base = Vue;\n    extend(Vue.options.components, builtInComponents);\n    initUse(Vue);\n    initMixin(Vue);\n    initExtend(Vue);\n    initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\nObject.defineProperty(Vue.prototype, '$isServer', {\n    get: isServerRendering\n});\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n    get() {\n        /* istanbul ignore next */\n        return this.$vnode && this.$vnode.ssrContext;\n    }\n});\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n    value: FunctionalRenderContext\n});\nVue.version = version;\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nconst isReservedAttr = makeMap('style,class');\n// attributes that should be using props for binding\nconst acceptValue = makeMap('input,textarea,option,select,progress');\nconst mustUseProp = (tag, type, attr) => {\n    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n        (attr === 'selected' && tag === 'option') ||\n        (attr === 'checked' && tag === 'input') ||\n        (attr === 'muted' && tag === 'video'));\n};\nconst isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\nconst isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\nconst convertEnumeratedValue = (key, value) => {\n    return isFalsyAttrValue(value) || value === 'false'\n        ? 'false'\n        : // allow arbitrary string value for contenteditable\n            key === 'contenteditable' && isValidContentEditableValue(value)\n                ? value\n                : 'true';\n};\nconst isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n    'required,reversed,scoped,seamless,selected,sortable,' +\n    'truespeed,typemustmatch,visible');\nconst xlinkNS = 'http://www.w3.org/1999/xlink';\nconst isXlink = (name) => {\n    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n};\nconst getXlinkProp = (name) => {\n    return isXlink(name) ? name.slice(6, name.length) : '';\n};\nconst isFalsyAttrValue = (val) => {\n    return val == null || val === false;\n};\n\nfunction genClassForVnode(vnode) {\n    let data = vnode.data;\n    let parentNode = vnode;\n    let childNode = vnode;\n    while (isDef(childNode.componentInstance)) {\n        childNode = childNode.componentInstance._vnode;\n        if (childNode && childNode.data) {\n            data = mergeClassData(childNode.data, data);\n        }\n    }\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while (isDef((parentNode = parentNode.parent))) {\n        if (parentNode && parentNode.data) {\n            data = mergeClassData(data, parentNode.data);\n        }\n    }\n    return renderClass(data.staticClass, data.class);\n}\nfunction mergeClassData(child, parent) {\n    return {\n        staticClass: concat(child.staticClass, parent.staticClass),\n        class: isDef(child.class) ? [child.class, parent.class] : parent.class\n    };\n}\nfunction renderClass(staticClass, dynamicClass) {\n    if (isDef(staticClass) || isDef(dynamicClass)) {\n        return concat(staticClass, stringifyClass(dynamicClass));\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction concat(a, b) {\n    return a ? (b ? a + ' ' + b : a) : b || '';\n}\nfunction stringifyClass(value) {\n    if (Array.isArray(value)) {\n        return stringifyArray(value);\n    }\n    if (isObject(value)) {\n        return stringifyObject(value);\n    }\n    if (typeof value === 'string') {\n        return value;\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction stringifyArray(value) {\n    let res = '';\n    let stringified;\n    for (let i = 0, l = value.length; i < l; i++) {\n        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n            if (res)\n                res += ' ';\n            res += stringified;\n        }\n    }\n    return res;\n}\nfunction stringifyObject(value) {\n    let res = '';\n    for (const key in value) {\n        if (value[key]) {\n            if (res)\n                res += ' ';\n            res += key;\n        }\n    }\n    return res;\n}\n\nconst namespaceMap = {\n    svg: 'http://www.w3.org/2000/svg',\n    math: 'http://www.w3.org/1998/Math/MathML'\n};\nconst isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n    'embed,object,param,source,canvas,script,noscript,del,ins,' +\n    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n    'output,progress,select,textarea,' +\n    'details,dialog,menu,menuitem,summary,' +\n    'content,element,shadow,template,blockquote,iframe,tfoot');\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nconst isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\nconst isPreTag = (tag) => tag === 'pre';\nconst isReservedTag = (tag) => {\n    return isHTMLTag(tag) || isSVG(tag);\n};\nfunction getTagNamespace(tag) {\n    if (isSVG(tag)) {\n        return 'svg';\n    }\n    // basic support for MathML\n    // note it doesn't support other MathML elements being component roots\n    if (tag === 'math') {\n        return 'math';\n    }\n}\nconst unknownElementCache = Object.create(null);\nfunction isUnknownElement(tag) {\n    /* istanbul ignore if */\n    if (!inBrowser) {\n        return true;\n    }\n    if (isReservedTag(tag)) {\n        return false;\n    }\n    tag = tag.toLowerCase();\n    /* istanbul ignore if */\n    if (unknownElementCache[tag] != null) {\n        return unknownElementCache[tag];\n    }\n    const el = document.createElement(tag);\n    if (tag.indexOf('-') > -1) {\n        // https://stackoverflow.com/a/28210364/1070244\n        return (unknownElementCache[tag] =\n            el.constructor === window.HTMLUnknownElement ||\n                el.constructor === window.HTMLElement);\n    }\n    else {\n        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n    }\n}\nconst isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query(el) {\n    if (typeof el === 'string') {\n        const selected = document.querySelector(el);\n        if (!selected) {\n            warn$2('Cannot find element: ' + el);\n            return document.createElement('div');\n        }\n        return selected;\n    }\n    else {\n        return el;\n    }\n}\n\nfunction createElement(tagName, vnode) {\n    const elm = document.createElement(tagName);\n    if (tagName !== 'select') {\n        return elm;\n    }\n    // false or null will remove the attribute but undefined will not\n    if (vnode.data &&\n        vnode.data.attrs &&\n        vnode.data.attrs.multiple !== undefined) {\n        elm.setAttribute('multiple', 'multiple');\n    }\n    return elm;\n}\nfunction createElementNS(namespace, tagName) {\n    return document.createElementNS(namespaceMap[namespace], tagName);\n}\nfunction createTextNode(text) {\n    return document.createTextNode(text);\n}\nfunction createComment(text) {\n    return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n    parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n    node.removeChild(child);\n}\nfunction appendChild(node, child) {\n    node.appendChild(child);\n}\nfunction parentNode(node) {\n    return node.parentNode;\n}\nfunction nextSibling(node) {\n    return node.nextSibling;\n}\nfunction tagName(node) {\n    return node.tagName;\n}\nfunction setTextContent(node, text) {\n    node.textContent = text;\n}\nfunction setStyleScope(node, scopeId) {\n    node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\nvar ref = {\n    create(_, vnode) {\n        registerRef(vnode);\n    },\n    update(oldVnode, vnode) {\n        if (oldVnode.data.ref !== vnode.data.ref) {\n            registerRef(oldVnode, true);\n            registerRef(vnode);\n        }\n    },\n    destroy(vnode) {\n        registerRef(vnode, true);\n    }\n};\nfunction registerRef(vnode, isRemoval) {\n    const ref = vnode.data.ref;\n    if (!isDef(ref))\n        return;\n    const vm = vnode.context;\n    const refValue = vnode.componentInstance || vnode.elm;\n    const value = isRemoval ? null : refValue;\n    const $refsValue = isRemoval ? undefined : refValue;\n    if (isFunction(ref)) {\n        invokeWithErrorHandling(ref, vm, [value], vm, `template ref function`);\n        return;\n    }\n    const isFor = vnode.data.refInFor;\n    const _isString = typeof ref === 'string' || typeof ref === 'number';\n    const _isRef = isRef(ref);\n    const refs = vm.$refs;\n    if (_isString || _isRef) {\n        if (isFor) {\n            const existing = _isString ? refs[ref] : ref.value;\n            if (isRemoval) {\n                isArray(existing) && remove$2(existing, refValue);\n            }\n            else {\n                if (!isArray(existing)) {\n                    if (_isString) {\n                        refs[ref] = [refValue];\n                        setSetupRef(vm, ref, refs[ref]);\n                    }\n                    else {\n                        ref.value = [refValue];\n                    }\n                }\n                else if (!existing.includes(refValue)) {\n                    existing.push(refValue);\n                }\n            }\n        }\n        else if (_isString) {\n            if (isRemoval && refs[ref] !== refValue) {\n                return;\n            }\n            refs[ref] = $refsValue;\n            setSetupRef(vm, ref, value);\n        }\n        else if (_isRef) {\n            if (isRemoval && ref.value !== refValue) {\n                return;\n            }\n            ref.value = value;\n        }\n        else {\n            warn$2(`Invalid template ref type: ${typeof ref}`);\n        }\n    }\n}\nfunction setSetupRef({ _setupState }, key, val) {\n    if (_setupState && hasOwn(_setupState, key)) {\n        if (isRef(_setupState[key])) {\n            _setupState[key].value = val;\n        }\n        else {\n            _setupState[key] = val;\n        }\n    }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\nconst emptyNode = new VNode('', {}, []);\nconst hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\nfunction sameVnode(a, b) {\n    return (a.key === b.key &&\n        a.asyncFactory === b.asyncFactory &&\n        ((a.tag === b.tag &&\n            a.isComment === b.isComment &&\n            isDef(a.data) === isDef(b.data) &&\n            sameInputType(a, b)) ||\n            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n}\nfunction sameInputType(a, b) {\n    if (a.tag !== 'input')\n        return true;\n    let i;\n    const typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n    const typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n    let i, key;\n    const map = {};\n    for (i = beginIdx; i <= endIdx; ++i) {\n        key = children[i].key;\n        if (isDef(key))\n            map[key] = i;\n    }\n    return map;\n}\nfunction createPatchFunction(backend) {\n    let i, j;\n    const cbs = {};\n    const { modules, nodeOps } = backend;\n    for (i = 0; i < hooks.length; ++i) {\n        cbs[hooks[i]] = [];\n        for (j = 0; j < modules.length; ++j) {\n            if (isDef(modules[j][hooks[i]])) {\n                cbs[hooks[i]].push(modules[j][hooks[i]]);\n            }\n        }\n    }\n    function emptyNodeAt(elm) {\n        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n    }\n    function createRmCb(childElm, listeners) {\n        function remove() {\n            if (--remove.listeners === 0) {\n                removeNode(childElm);\n            }\n        }\n        remove.listeners = listeners;\n        return remove;\n    }\n    function removeNode(el) {\n        const parent = nodeOps.parentNode(el);\n        // element may have already been removed due to v-html / v-text\n        if (isDef(parent)) {\n            nodeOps.removeChild(parent, el);\n        }\n    }\n    function isUnknownElement(vnode, inVPre) {\n        return (!inVPre &&\n            !vnode.ns &&\n            !(config.ignoredElements.length &&\n                config.ignoredElements.some(ignore => {\n                    return isRegExp(ignore)\n                        ? ignore.test(vnode.tag)\n                        : ignore === vnode.tag;\n                })) &&\n            config.isUnknownElement(vnode.tag));\n    }\n    let creatingElmInVPre = 0;\n    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // This vnode was used in a previous render!\n            // now it's used as a new node, overwriting its elm would cause\n            // potential patch errors down the road when it's used as an insertion\n            // reference node. Instead, we clone the node on-demand before creating\n            // associated DOM element for it.\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        vnode.isRootInsert = !nested; // for transition enter check\n        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n            return;\n        }\n        const data = vnode.data;\n        const children = vnode.children;\n        const tag = vnode.tag;\n        if (isDef(tag)) {\n            {\n                if (data && data.pre) {\n                    creatingElmInVPre++;\n                }\n                if (isUnknownElement(vnode, creatingElmInVPre)) {\n                    warn$2('Unknown custom element: <' +\n                        tag +\n                        '> - did you ' +\n                        'register the component correctly? For recursive components, ' +\n                        'make sure to provide the \"name\" option.', vnode.context);\n                }\n            }\n            vnode.elm = vnode.ns\n                ? nodeOps.createElementNS(vnode.ns, tag)\n                : nodeOps.createElement(tag, vnode);\n            setScope(vnode);\n            createChildren(vnode, children, insertedVnodeQueue);\n            if (isDef(data)) {\n                invokeCreateHooks(vnode, insertedVnodeQueue);\n            }\n            insert(parentElm, vnode.elm, refElm);\n            if (data && data.pre) {\n                creatingElmInVPre--;\n            }\n        }\n        else if (isTrue(vnode.isComment)) {\n            vnode.elm = nodeOps.createComment(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n        else {\n            vnode.elm = nodeOps.createTextNode(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n    }\n    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i = vnode.data;\n        if (isDef(i)) {\n            const isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n            if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                i(vnode, false /* hydrating */);\n            }\n            // after calling the init hook, if the vnode is a child component\n            // it should've created a child instance and mounted it. the child\n            // component also has set the placeholder vnode's elm.\n            // in that case we can just return the element and be done.\n            if (isDef(vnode.componentInstance)) {\n                initComponent(vnode, insertedVnodeQueue);\n                insert(parentElm, vnode.elm, refElm);\n                if (isTrue(isReactivated)) {\n                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                }\n                return true;\n            }\n        }\n    }\n    function initComponent(vnode, insertedVnodeQueue) {\n        if (isDef(vnode.data.pendingInsert)) {\n            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n            vnode.data.pendingInsert = null;\n        }\n        vnode.elm = vnode.componentInstance.$el;\n        if (isPatchable(vnode)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            setScope(vnode);\n        }\n        else {\n            // empty component root.\n            // skip all element-related modules except for ref (#3455)\n            registerRef(vnode);\n            // make sure to invoke the insert hook\n            insertedVnodeQueue.push(vnode);\n        }\n    }\n    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i;\n        // hack for #4339: a reactivated component with inner transition\n        // does not trigger because the inner node's created hooks are not called\n        // again. It's not ideal to involve module-specific logic in here but\n        // there doesn't seem to be a better way to do it.\n        let innerNode = vnode;\n        while (innerNode.componentInstance) {\n            innerNode = innerNode.componentInstance._vnode;\n            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                for (i = 0; i < cbs.activate.length; ++i) {\n                    cbs.activate[i](emptyNode, innerNode);\n                }\n                insertedVnodeQueue.push(innerNode);\n                break;\n            }\n        }\n        // unlike a newly created component,\n        // a reactivated keep-alive component doesn't insert itself\n        insert(parentElm, vnode.elm, refElm);\n    }\n    function insert(parent, elm, ref) {\n        if (isDef(parent)) {\n            if (isDef(ref)) {\n                if (nodeOps.parentNode(ref) === parent) {\n                    nodeOps.insertBefore(parent, elm, ref);\n                }\n            }\n            else {\n                nodeOps.appendChild(parent, elm);\n            }\n        }\n    }\n    function createChildren(vnode, children, insertedVnodeQueue) {\n        if (isArray(children)) {\n            {\n                checkDuplicateKeys(children);\n            }\n            for (let i = 0; i < children.length; ++i) {\n                createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n            }\n        }\n        else if (isPrimitive(vnode.text)) {\n            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n        }\n    }\n    function isPatchable(vnode) {\n        while (vnode.componentInstance) {\n            vnode = vnode.componentInstance._vnode;\n        }\n        return isDef(vnode.tag);\n    }\n    function invokeCreateHooks(vnode, insertedVnodeQueue) {\n        for (let i = 0; i < cbs.create.length; ++i) {\n            cbs.create[i](emptyNode, vnode);\n        }\n        i = vnode.data.hook; // Reuse variable\n        if (isDef(i)) {\n            if (isDef(i.create))\n                i.create(emptyNode, vnode);\n            if (isDef(i.insert))\n                insertedVnodeQueue.push(vnode);\n        }\n    }\n    // set scope id attribute for scoped CSS.\n    // this is implemented as a special case to avoid the overhead\n    // of going through the normal attribute patching process.\n    function setScope(vnode) {\n        let i;\n        if (isDef((i = vnode.fnScopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n        else {\n            let ancestor = vnode;\n            while (ancestor) {\n                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                    nodeOps.setStyleScope(vnode.elm, i);\n                }\n                ancestor = ancestor.parent;\n            }\n        }\n        // for slot content they should also get the scopeId from the host instance.\n        if (isDef((i = activeInstance)) &&\n            i !== vnode.context &&\n            i !== vnode.fnContext &&\n            isDef((i = i.$options._scopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n    }\n    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n        }\n    }\n    function invokeDestroyHook(vnode) {\n        let i, j;\n        const data = vnode.data;\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                i(vnode);\n            for (i = 0; i < cbs.destroy.length; ++i)\n                cbs.destroy[i](vnode);\n        }\n        if (isDef((i = vnode.children))) {\n            for (j = 0; j < vnode.children.length; ++j) {\n                invokeDestroyHook(vnode.children[j]);\n            }\n        }\n    }\n    function removeVnodes(vnodes, startIdx, endIdx) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            const ch = vnodes[startIdx];\n            if (isDef(ch)) {\n                if (isDef(ch.tag)) {\n                    removeAndInvokeRemoveHook(ch);\n                    invokeDestroyHook(ch);\n                }\n                else {\n                    // Text node\n                    removeNode(ch.elm);\n                }\n            }\n        }\n    }\n    function removeAndInvokeRemoveHook(vnode, rm) {\n        if (isDef(rm) || isDef(vnode.data)) {\n            let i;\n            const listeners = cbs.remove.length + 1;\n            if (isDef(rm)) {\n                // we have a recursively passed down rm callback\n                // increase the listeners count\n                rm.listeners += listeners;\n            }\n            else {\n                // directly removing\n                rm = createRmCb(vnode.elm, listeners);\n            }\n            // recursively invoke hooks on child component root node\n            if (isDef((i = vnode.componentInstance)) &&\n                isDef((i = i._vnode)) &&\n                isDef(i.data)) {\n                removeAndInvokeRemoveHook(i, rm);\n            }\n            for (i = 0; i < cbs.remove.length; ++i) {\n                cbs.remove[i](vnode, rm);\n            }\n            if (isDef((i = vnode.data.hook)) && isDef((i = i.remove))) {\n                i(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n        else {\n            removeNode(vnode.elm);\n        }\n    }\n    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n        let oldStartIdx = 0;\n        let newStartIdx = 0;\n        let oldEndIdx = oldCh.length - 1;\n        let oldStartVnode = oldCh[0];\n        let oldEndVnode = oldCh[oldEndIdx];\n        let newEndIdx = newCh.length - 1;\n        let newStartVnode = newCh[0];\n        let newEndVnode = newCh[newEndIdx];\n        let oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n        // removeOnly is a special flag used only by <transition-group>\n        // to ensure removed elements stay in correct relative positions\n        // during leaving transitions\n        const canMove = !removeOnly;\n        {\n            checkDuplicateKeys(newCh);\n        }\n        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n            if (isUndef(oldStartVnode)) {\n                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n            }\n            else if (isUndef(oldEndVnode)) {\n                oldEndVnode = oldCh[--oldEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newStartVnode)) {\n                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                oldStartVnode = oldCh[++oldStartIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else if (sameVnode(oldEndVnode, newEndVnode)) {\n                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newEndVnode)) {\n                // Vnode moved right\n                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                oldStartVnode = oldCh[++oldStartIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldEndVnode, newStartVnode)) {\n                // Vnode moved left\n                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else {\n                if (isUndef(oldKeyToIdx))\n                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                idxInOld = isDef(newStartVnode.key)\n                    ? oldKeyToIdx[newStartVnode.key]\n                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                if (isUndef(idxInOld)) {\n                    // New element\n                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                }\n                else {\n                    vnodeToMove = oldCh[idxInOld];\n                    if (sameVnode(vnodeToMove, newStartVnode)) {\n                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                        oldCh[idxInOld] = undefined;\n                        canMove &&\n                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                    }\n                    else {\n                        // same key but different element. treat as new element\n                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                    }\n                }\n                newStartVnode = newCh[++newStartIdx];\n            }\n        }\n        if (oldStartIdx > oldEndIdx) {\n            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n        }\n        else if (newStartIdx > newEndIdx) {\n            removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n        }\n    }\n    function checkDuplicateKeys(children) {\n        const seenKeys = {};\n        for (let i = 0; i < children.length; i++) {\n            const vnode = children[i];\n            const key = vnode.key;\n            if (isDef(key)) {\n                if (seenKeys[key]) {\n                    warn$2(`Duplicate keys detected: '${key}'. This may cause an update error.`, vnode.context);\n                }\n                else {\n                    seenKeys[key] = true;\n                }\n            }\n        }\n    }\n    function findIdxInOld(node, oldCh, start, end) {\n        for (let i = start; i < end; i++) {\n            const c = oldCh[i];\n            if (isDef(c) && sameVnode(node, c))\n                return i;\n        }\n    }\n    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n        if (oldVnode === vnode) {\n            return;\n        }\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // clone reused vnode\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        const elm = (vnode.elm = oldVnode.elm);\n        if (isTrue(oldVnode.isAsyncPlaceholder)) {\n            if (isDef(vnode.asyncFactory.resolved)) {\n                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n            }\n            else {\n                vnode.isAsyncPlaceholder = true;\n            }\n            return;\n        }\n        // reuse element for static trees.\n        // note we only do this if the vnode is cloned -\n        // if the new node is not cloned it means the render functions have been\n        // reset by the hot-reload-api and we need to do a proper re-render.\n        if (isTrue(vnode.isStatic) &&\n            isTrue(oldVnode.isStatic) &&\n            vnode.key === oldVnode.key &&\n            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n            vnode.componentInstance = oldVnode.componentInstance;\n            return;\n        }\n        let i;\n        const data = vnode.data;\n        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n            i(oldVnode, vnode);\n        }\n        const oldCh = oldVnode.children;\n        const ch = vnode.children;\n        if (isDef(data) && isPatchable(vnode)) {\n            for (i = 0; i < cbs.update.length; ++i)\n                cbs.update[i](oldVnode, vnode);\n            if (isDef((i = data.hook)) && isDef((i = i.update)))\n                i(oldVnode, vnode);\n        }\n        if (isUndef(vnode.text)) {\n            if (isDef(oldCh) && isDef(ch)) {\n                if (oldCh !== ch)\n                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n            }\n            else if (isDef(ch)) {\n                {\n                    checkDuplicateKeys(ch);\n                }\n                if (isDef(oldVnode.text))\n                    nodeOps.setTextContent(elm, '');\n                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n            }\n            else if (isDef(oldCh)) {\n                removeVnodes(oldCh, 0, oldCh.length - 1);\n            }\n            else if (isDef(oldVnode.text)) {\n                nodeOps.setTextContent(elm, '');\n            }\n        }\n        else if (oldVnode.text !== vnode.text) {\n            nodeOps.setTextContent(elm, vnode.text);\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                i(oldVnode, vnode);\n        }\n    }\n    function invokeInsertHook(vnode, queue, initial) {\n        // delay insert hooks for component root nodes, invoke them after the\n        // element is really inserted\n        if (isTrue(initial) && isDef(vnode.parent)) {\n            vnode.parent.data.pendingInsert = queue;\n        }\n        else {\n            for (let i = 0; i < queue.length; ++i) {\n                queue[i].data.hook.insert(queue[i]);\n            }\n        }\n    }\n    let hydrationBailed = false;\n    // list of modules that can skip create hook during hydration because they\n    // are already rendered on the client or has no need for initialization\n    // Note: style is excluded because it relies on initial clone for future\n    // deep updates (#7063).\n    const isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n    // Note: this is a browser-only function so we can assume elms are DOM nodes.\n    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n        let i;\n        const { tag, data, children } = vnode;\n        inVPre = inVPre || (data && data.pre);\n        vnode.elm = elm;\n        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n            vnode.isAsyncPlaceholder = true;\n            return true;\n        }\n        // assert node match\n        {\n            if (!assertNodeMatch(elm, vnode, inVPre)) {\n                return false;\n            }\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.init)))\n                i(vnode, true /* hydrating */);\n            if (isDef((i = vnode.componentInstance))) {\n                // child component. it should have hydrated its own tree.\n                initComponent(vnode, insertedVnodeQueue);\n                return true;\n            }\n        }\n        if (isDef(tag)) {\n            if (isDef(children)) {\n                // empty element, allow client to pick up and populate children\n                if (!elm.hasChildNodes()) {\n                    createChildren(vnode, children, insertedVnodeQueue);\n                }\n                else {\n                    // v-html and domProps: innerHTML\n                    if (isDef((i = data)) &&\n                        isDef((i = i.domProps)) &&\n                        isDef((i = i.innerHTML))) {\n                        if (i !== elm.innerHTML) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('server innerHTML: ', i);\n                                console.warn('client innerHTML: ', elm.innerHTML);\n                            }\n                            return false;\n                        }\n                    }\n                    else {\n                        // iterate and compare children lists\n                        let childrenMatch = true;\n                        let childNode = elm.firstChild;\n                        for (let i = 0; i < children.length; i++) {\n                            if (!childNode ||\n                                !hydrate(childNode, children[i], insertedVnodeQueue, inVPre)) {\n                                childrenMatch = false;\n                                break;\n                            }\n                            childNode = childNode.nextSibling;\n                        }\n                        // if childNode is not null, it means the actual childNodes list is\n                        // longer than the virtual children list.\n                        if (!childrenMatch || childNode) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                            }\n                            return false;\n                        }\n                    }\n                }\n            }\n            if (isDef(data)) {\n                let fullInvoke = false;\n                for (const key in data) {\n                    if (!isRenderedModule(key)) {\n                        fullInvoke = true;\n                        invokeCreateHooks(vnode, insertedVnodeQueue);\n                        break;\n                    }\n                }\n                if (!fullInvoke && data['class']) {\n                    // ensure collecting deps for deep class bindings for future updates\n                    traverse(data['class']);\n                }\n            }\n        }\n        else if (elm.data !== vnode.text) {\n            elm.data = vnode.text;\n        }\n        return true;\n    }\n    function assertNodeMatch(node, vnode, inVPre) {\n        if (isDef(vnode.tag)) {\n            return (vnode.tag.indexOf('vue-component') === 0 ||\n                (!isUnknownElement(vnode, inVPre) &&\n                    vnode.tag.toLowerCase() ===\n                        (node.tagName && node.tagName.toLowerCase())));\n        }\n        else {\n            return node.nodeType === (vnode.isComment ? 8 : 3);\n        }\n    }\n    return function patch(oldVnode, vnode, hydrating, removeOnly) {\n        if (isUndef(vnode)) {\n            if (isDef(oldVnode))\n                invokeDestroyHook(oldVnode);\n            return;\n        }\n        let isInitialPatch = false;\n        const insertedVnodeQueue = [];\n        if (isUndef(oldVnode)) {\n            // empty mount (likely as component), create new root element\n            isInitialPatch = true;\n            createElm(vnode, insertedVnodeQueue);\n        }\n        else {\n            const isRealElement = isDef(oldVnode.nodeType);\n            if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                // patch existing root node\n                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n            }\n            else {\n                if (isRealElement) {\n                    // mounting to a real element\n                    // check if this is server-rendered content and if we can perform\n                    // a successful hydration.\n                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                        oldVnode.removeAttribute(SSR_ATTR);\n                        hydrating = true;\n                    }\n                    if (isTrue(hydrating)) {\n                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                            invokeInsertHook(vnode, insertedVnodeQueue, true);\n                            return oldVnode;\n                        }\n                        else {\n                            warn$2('The client-side rendered virtual DOM tree is not matching ' +\n                                'server-rendered content. This is likely caused by incorrect ' +\n                                'HTML markup, for example nesting block-level elements inside ' +\n                                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                'full client-side render.');\n                        }\n                    }\n                    // either not server-rendered, or hydration failed.\n                    // create an empty node and replace it\n                    oldVnode = emptyNodeAt(oldVnode);\n                }\n                // replacing existing element\n                const oldElm = oldVnode.elm;\n                const parentElm = nodeOps.parentNode(oldElm);\n                // create new node\n                createElm(vnode, insertedVnodeQueue, \n                // extremely rare edge case: do not insert if old element is in a\n                // leaving transition. Only happens when combining transition +\n                // keep-alive + HOCs. (#4590)\n                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                // update parent placeholder node element, recursively\n                if (isDef(vnode.parent)) {\n                    let ancestor = vnode.parent;\n                    const patchable = isPatchable(vnode);\n                    while (ancestor) {\n                        for (let i = 0; i < cbs.destroy.length; ++i) {\n                            cbs.destroy[i](ancestor);\n                        }\n                        ancestor.elm = vnode.elm;\n                        if (patchable) {\n                            for (let i = 0; i < cbs.create.length; ++i) {\n                                cbs.create[i](emptyNode, ancestor);\n                            }\n                            // #6513\n                            // invoke insert hooks that may have been merged by create hooks.\n                            // e.g. for directives that uses the \"inserted\" hook.\n                            const insert = ancestor.data.hook.insert;\n                            if (insert.merged) {\n                                // start at index 1 to avoid re-invoking component mounted hook\n                                // clone insert hooks to avoid being mutated during iteration.\n                                // e.g. for customed directives under transition group.\n                                const cloned = insert.fns.slice(1);\n                                for (let i = 0; i < cloned.length; i++) {\n                                    cloned[i]();\n                                }\n                            }\n                        }\n                        else {\n                            registerRef(ancestor);\n                        }\n                        ancestor = ancestor.parent;\n                    }\n                }\n                // destroy old node\n                if (isDef(parentElm)) {\n                    removeVnodes([oldVnode], 0, 0);\n                }\n                else if (isDef(oldVnode.tag)) {\n                    invokeDestroyHook(oldVnode);\n                }\n            }\n        }\n        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n        return vnode.elm;\n    };\n}\n\nvar directives$1 = {\n    create: updateDirectives,\n    update: updateDirectives,\n    destroy: function unbindDirectives(vnode) {\n        // @ts-expect-error emptyNode is not VNodeWithData\n        updateDirectives(vnode, emptyNode);\n    }\n};\nfunction updateDirectives(oldVnode, vnode) {\n    if (oldVnode.data.directives || vnode.data.directives) {\n        _update(oldVnode, vnode);\n    }\n}\nfunction _update(oldVnode, vnode) {\n    const isCreate = oldVnode === emptyNode;\n    const isDestroy = vnode === emptyNode;\n    const oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n    const newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n    const dirsWithInsert = [];\n    const dirsWithPostpatch = [];\n    let key, oldDir, dir;\n    for (key in newDirs) {\n        oldDir = oldDirs[key];\n        dir = newDirs[key];\n        if (!oldDir) {\n            // new directive, bind\n            callHook(dir, 'bind', vnode, oldVnode);\n            if (dir.def && dir.def.inserted) {\n                dirsWithInsert.push(dir);\n            }\n        }\n        else {\n            // existing directive, update\n            dir.oldValue = oldDir.value;\n            dir.oldArg = oldDir.arg;\n            callHook(dir, 'update', vnode, oldVnode);\n            if (dir.def && dir.def.componentUpdated) {\n                dirsWithPostpatch.push(dir);\n            }\n        }\n    }\n    if (dirsWithInsert.length) {\n        const callInsert = () => {\n            for (let i = 0; i < dirsWithInsert.length; i++) {\n                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n            }\n        };\n        if (isCreate) {\n            mergeVNodeHook(vnode, 'insert', callInsert);\n        }\n        else {\n            callInsert();\n        }\n    }\n    if (dirsWithPostpatch.length) {\n        mergeVNodeHook(vnode, 'postpatch', () => {\n            for (let i = 0; i < dirsWithPostpatch.length; i++) {\n                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n            }\n        });\n    }\n    if (!isCreate) {\n        for (key in oldDirs) {\n            if (!newDirs[key]) {\n                // no longer present, unbind\n                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n            }\n        }\n    }\n}\nconst emptyModifiers = Object.create(null);\nfunction normalizeDirectives(dirs, vm) {\n    const res = Object.create(null);\n    if (!dirs) {\n        // $flow-disable-line\n        return res;\n    }\n    let i, dir;\n    for (i = 0; i < dirs.length; i++) {\n        dir = dirs[i];\n        if (!dir.modifiers) {\n            // $flow-disable-line\n            dir.modifiers = emptyModifiers;\n        }\n        res[getRawDirName(dir)] = dir;\n        if (vm._setupState && vm._setupState.__sfc) {\n            const setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n            if (typeof setupDef === 'function') {\n                dir.def = {\n                    bind: setupDef,\n                    update: setupDef,\n                };\n            }\n            else {\n                dir.def = setupDef;\n            }\n        }\n        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n    }\n    // $flow-disable-line\n    return res;\n}\nfunction getRawDirName(dir) {\n    return (dir.rawName || `${dir.name}.${Object.keys(dir.modifiers || {}).join('.')}`);\n}\nfunction callHook(dir, hook, vnode, oldVnode, isDestroy) {\n    const fn = dir.def && dir.def[hook];\n    if (fn) {\n        try {\n            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n        }\n        catch (e) {\n            handleError(e, vnode.context, `directive ${dir.name} ${hook} hook`);\n        }\n    }\n}\n\nvar baseModules = [ref, directives$1];\n\nfunction updateAttrs(oldVnode, vnode) {\n    const opts = vnode.componentOptions;\n    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n        return;\n    }\n    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n        return;\n    }\n    let key, cur, old;\n    const elm = vnode.elm;\n    const oldAttrs = oldVnode.data.attrs || {};\n    let attrs = vnode.data.attrs || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n        attrs = vnode.data.attrs = extend({}, attrs);\n    }\n    for (key in attrs) {\n        cur = attrs[key];\n        old = oldAttrs[key];\n        if (old !== cur) {\n            setAttr(elm, key, cur, vnode.data.pre);\n        }\n    }\n    // #4391: in IE9, setting type can reset value for input[type=radio]\n    // #6666: IE/Edge forces progress value down to 1 before setting a max\n    /* istanbul ignore if */\n    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n        setAttr(elm, 'value', attrs.value);\n    }\n    for (key in oldAttrs) {\n        if (isUndef(attrs[key])) {\n            if (isXlink(key)) {\n                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n            }\n            else if (!isEnumeratedAttr(key)) {\n                elm.removeAttribute(key);\n            }\n        }\n    }\n}\nfunction setAttr(el, key, value, isInPre) {\n    if (isInPre || el.tagName.indexOf('-') > -1) {\n        baseSetAttr(el, key, value);\n    }\n    else if (isBooleanAttr(key)) {\n        // set attribute for blank value\n        // e.g. <option disabled>Select one</option>\n        if (isFalsyAttrValue(value)) {\n            el.removeAttribute(key);\n        }\n        else {\n            // technically allowfullscreen is a boolean attribute for <iframe>,\n            // but Flash expects a value of \"true\" when used on <embed> tag\n            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n            el.setAttribute(key, value);\n        }\n    }\n    else if (isEnumeratedAttr(key)) {\n        el.setAttribute(key, convertEnumeratedValue(key, value));\n    }\n    else if (isXlink(key)) {\n        if (isFalsyAttrValue(value)) {\n            el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n        }\n        else {\n            el.setAttributeNS(xlinkNS, key, value);\n        }\n    }\n    else {\n        baseSetAttr(el, key, value);\n    }\n}\nfunction baseSetAttr(el, key, value) {\n    if (isFalsyAttrValue(value)) {\n        el.removeAttribute(key);\n    }\n    else {\n        // #7138: IE10 & 11 fires input event when setting placeholder on\n        // <textarea>... block the first input event and remove the blocker\n        // immediately.\n        /* istanbul ignore if */\n        if (isIE &&\n            !isIE9 &&\n            el.tagName === 'TEXTAREA' &&\n            key === 'placeholder' &&\n            value !== '' &&\n            !el.__ieph) {\n            const blocker = e => {\n                e.stopImmediatePropagation();\n                el.removeEventListener('input', blocker);\n            };\n            el.addEventListener('input', blocker);\n            // $flow-disable-line\n            el.__ieph = true; /* IE placeholder patched */\n        }\n        el.setAttribute(key, value);\n    }\n}\nvar attrs = {\n    create: updateAttrs,\n    update: updateAttrs\n};\n\nfunction updateClass(oldVnode, vnode) {\n    const el = vnode.elm;\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticClass) &&\n        isUndef(data.class) &&\n        (isUndef(oldData) ||\n            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n        return;\n    }\n    let cls = genClassForVnode(vnode);\n    // handle transition classes\n    const transitionClass = el._transitionClasses;\n    if (isDef(transitionClass)) {\n        cls = concat(cls, stringifyClass(transitionClass));\n    }\n    // set the class\n    if (cls !== el._prevClass) {\n        el.setAttribute('class', cls);\n        el._prevClass = cls;\n    }\n}\nvar klass$1 = {\n    create: updateClass,\n    update: updateClass\n};\n\nconst validDivisionCharRE = /[\\w).+\\-_$\\]]/;\nfunction parseFilters(exp) {\n    let inSingle = false;\n    let inDouble = false;\n    let inTemplateString = false;\n    let inRegex = false;\n    let curly = 0;\n    let square = 0;\n    let paren = 0;\n    let lastFilterIndex = 0;\n    let c, prev, i, expression, filters;\n    for (i = 0; i < exp.length; i++) {\n        prev = c;\n        c = exp.charCodeAt(i);\n        if (inSingle) {\n            if (c === 0x27 && prev !== 0x5c)\n                inSingle = false;\n        }\n        else if (inDouble) {\n            if (c === 0x22 && prev !== 0x5c)\n                inDouble = false;\n        }\n        else if (inTemplateString) {\n            if (c === 0x60 && prev !== 0x5c)\n                inTemplateString = false;\n        }\n        else if (inRegex) {\n            if (c === 0x2f && prev !== 0x5c)\n                inRegex = false;\n        }\n        else if (c === 0x7c && // pipe\n            exp.charCodeAt(i + 1) !== 0x7c &&\n            exp.charCodeAt(i - 1) !== 0x7c &&\n            !curly &&\n            !square &&\n            !paren) {\n            if (expression === undefined) {\n                // first filter, end of expression\n                lastFilterIndex = i + 1;\n                expression = exp.slice(0, i).trim();\n            }\n            else {\n                pushFilter();\n            }\n        }\n        else {\n            switch (c) {\n                case 0x22:\n                    inDouble = true;\n                    break; // \"\n                case 0x27:\n                    inSingle = true;\n                    break; // '\n                case 0x60:\n                    inTemplateString = true;\n                    break; // `\n                case 0x28:\n                    paren++;\n                    break; // (\n                case 0x29:\n                    paren--;\n                    break; // )\n                case 0x5b:\n                    square++;\n                    break; // [\n                case 0x5d:\n                    square--;\n                    break; // ]\n                case 0x7b:\n                    curly++;\n                    break; // {\n                case 0x7d:\n                    curly--;\n                    break; // }\n            }\n            if (c === 0x2f) {\n                // /\n                let j = i - 1;\n                let p;\n                // find first non-whitespace prev char\n                for (; j >= 0; j--) {\n                    p = exp.charAt(j);\n                    if (p !== ' ')\n                        break;\n                }\n                if (!p || !validDivisionCharRE.test(p)) {\n                    inRegex = true;\n                }\n            }\n        }\n    }\n    if (expression === undefined) {\n        expression = exp.slice(0, i).trim();\n    }\n    else if (lastFilterIndex !== 0) {\n        pushFilter();\n    }\n    function pushFilter() {\n        (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n        lastFilterIndex = i + 1;\n    }\n    if (filters) {\n        for (i = 0; i < filters.length; i++) {\n            expression = wrapFilter(expression, filters[i]);\n        }\n    }\n    return expression;\n}\nfunction wrapFilter(exp, filter) {\n    const i = filter.indexOf('(');\n    if (i < 0) {\n        // _f: resolveFilter\n        return `_f(\"${filter}\")(${exp})`;\n    }\n    else {\n        const name = filter.slice(0, i);\n        const args = filter.slice(i + 1);\n        return `_f(\"${name}\")(${exp}${args !== ')' ? ',' + args : args}`;\n    }\n}\n\n/* eslint-disable no-unused-vars */\nfunction baseWarn(msg, range) {\n    console.error(`[Vue compiler]: ${msg}`);\n}\n/* eslint-enable no-unused-vars */\nfunction pluckModuleFunction(modules, key) {\n    return modules ? modules.map(m => m[key]).filter(_ => _) : [];\n}\nfunction addProp(el, name, value, range, dynamic) {\n    (el.props || (el.props = [])).push(rangeSetItem({ name, value, dynamic }, range));\n    el.plain = false;\n}\nfunction addAttr(el, name, value, range, dynamic) {\n    const attrs = dynamic\n        ? el.dynamicAttrs || (el.dynamicAttrs = [])\n        : el.attrs || (el.attrs = []);\n    attrs.push(rangeSetItem({ name, value, dynamic }, range));\n    el.plain = false;\n}\n// add a raw attr (use this in preTransforms)\nfunction addRawAttr(el, name, value, range) {\n    el.attrsMap[name] = value;\n    el.attrsList.push(rangeSetItem({ name, value }, range));\n}\nfunction addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {\n    (el.directives || (el.directives = [])).push(rangeSetItem({\n        name,\n        rawName,\n        value,\n        arg,\n        isDynamicArg,\n        modifiers\n    }, range));\n    el.plain = false;\n}\nfunction prependModifierMarker(symbol, name, dynamic) {\n    return dynamic ? `_p(${name},\"${symbol}\")` : symbol + name; // mark the event as captured\n}\nfunction addHandler(el, name, value, modifiers, important, warn, range, dynamic) {\n    modifiers = modifiers || emptyObject;\n    // warn prevent and passive modifier\n    /* istanbul ignore if */\n    if (warn && modifiers.prevent && modifiers.passive) {\n        warn(\"passive and prevent can't be used together. \" +\n            \"Passive handler can't prevent default event.\", range);\n    }\n    // normalize click.right and click.middle since they don't actually fire\n    // this is technically browser-specific, but at least for now browsers are\n    // the only target envs that have right/middle clicks.\n    if (modifiers.right) {\n        if (dynamic) {\n            name = `(${name})==='click'?'contextmenu':(${name})`;\n        }\n        else if (name === 'click') {\n            name = 'contextmenu';\n            delete modifiers.right;\n        }\n    }\n    else if (modifiers.middle) {\n        if (dynamic) {\n            name = `(${name})==='click'?'mouseup':(${name})`;\n        }\n        else if (name === 'click') {\n            name = 'mouseup';\n        }\n    }\n    // check capture modifier\n    if (modifiers.capture) {\n        delete modifiers.capture;\n        name = prependModifierMarker('!', name, dynamic);\n    }\n    if (modifiers.once) {\n        delete modifiers.once;\n        name = prependModifierMarker('~', name, dynamic);\n    }\n    /* istanbul ignore if */\n    if (modifiers.passive) {\n        delete modifiers.passive;\n        name = prependModifierMarker('&', name, dynamic);\n    }\n    let events;\n    if (modifiers.native) {\n        delete modifiers.native;\n        events = el.nativeEvents || (el.nativeEvents = {});\n    }\n    else {\n        events = el.events || (el.events = {});\n    }\n    const newHandler = rangeSetItem({ value: value.trim(), dynamic }, range);\n    if (modifiers !== emptyObject) {\n        newHandler.modifiers = modifiers;\n    }\n    const handlers = events[name];\n    /* istanbul ignore if */\n    if (Array.isArray(handlers)) {\n        important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n    }\n    else if (handlers) {\n        events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n    }\n    else {\n        events[name] = newHandler;\n    }\n    el.plain = false;\n}\nfunction getRawBindingAttr(el, name) {\n    return (el.rawAttrsMap[':' + name] ||\n        el.rawAttrsMap['v-bind:' + name] ||\n        el.rawAttrsMap[name]);\n}\nfunction getBindingAttr(el, name, getStatic) {\n    const dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);\n    if (dynamicValue != null) {\n        return parseFilters(dynamicValue);\n    }\n    else if (getStatic !== false) {\n        const staticValue = getAndRemoveAttr(el, name);\n        if (staticValue != null) {\n            return JSON.stringify(staticValue);\n        }\n    }\n}\n// note: this only removes the attr from the Array (attrsList) so that it\n// doesn't get processed by processAttrs.\n// By default it does NOT remove it from the map (attrsMap) because the map is\n// needed during codegen.\nfunction getAndRemoveAttr(el, name, removeFromMap) {\n    let val;\n    if ((val = el.attrsMap[name]) != null) {\n        const list = el.attrsList;\n        for (let i = 0, l = list.length; i < l; i++) {\n            if (list[i].name === name) {\n                list.splice(i, 1);\n                break;\n            }\n        }\n    }\n    if (removeFromMap) {\n        delete el.attrsMap[name];\n    }\n    return val;\n}\nfunction getAndRemoveAttrByRegex(el, name) {\n    const list = el.attrsList;\n    for (let i = 0, l = list.length; i < l; i++) {\n        const attr = list[i];\n        if (name.test(attr.name)) {\n            list.splice(i, 1);\n            return attr;\n        }\n    }\n}\nfunction rangeSetItem(item, range) {\n    if (range) {\n        if (range.start != null) {\n            item.start = range.start;\n        }\n        if (range.end != null) {\n            item.end = range.end;\n        }\n    }\n    return item;\n}\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel(el, value, modifiers) {\n    const { number, trim } = modifiers || {};\n    const baseValueExpression = '$$v';\n    let valueExpression = baseValueExpression;\n    if (trim) {\n        valueExpression =\n            `(typeof ${baseValueExpression} === 'string'` +\n                `? ${baseValueExpression}.trim()` +\n                `: ${baseValueExpression})`;\n    }\n    if (number) {\n        valueExpression = `_n(${valueExpression})`;\n    }\n    const assignment = genAssignmentCode(value, valueExpression);\n    el.model = {\n        value: `(${value})`,\n        expression: JSON.stringify(value),\n        callback: `function (${baseValueExpression}) {${assignment}}`\n    };\n}\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode(value, assignment) {\n    const res = parseModel(value);\n    if (res.key === null) {\n        return `${value}=${assignment}`;\n    }\n    else {\n        return `$set(${res.exp}, ${res.key}, ${assignment})`;\n    }\n}\n/**\n * Parse a v-model expression into a base path and a final key segment.\n * Handles both dot-path and possible square brackets.\n *\n * Possible cases:\n *\n * - test\n * - test[key]\n * - test[test1[key]]\n * - test[\"a\"][key]\n * - xxx.test[a[a].test1[key]]\n * - test.xxx.a[\"asa\"][test1[key]]\n *\n */\nlet len, str, chr, index, expressionPos, expressionEndPos;\nfunction parseModel(val) {\n    // Fix https://github.com/vuejs/vue/pull/7730\n    // allow v-model=\"obj.val \" (trailing whitespace)\n    val = val.trim();\n    len = val.length;\n    if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n        index = val.lastIndexOf('.');\n        if (index > -1) {\n            return {\n                exp: val.slice(0, index),\n                key: '\"' + val.slice(index + 1) + '\"'\n            };\n        }\n        else {\n            return {\n                exp: val,\n                key: null\n            };\n        }\n    }\n    str = val;\n    index = expressionPos = expressionEndPos = 0;\n    while (!eof()) {\n        chr = next();\n        /* istanbul ignore if */\n        if (isStringStart(chr)) {\n            parseString(chr);\n        }\n        else if (chr === 0x5b) {\n            parseBracket(chr);\n        }\n    }\n    return {\n        exp: val.slice(0, expressionPos),\n        key: val.slice(expressionPos + 1, expressionEndPos)\n    };\n}\nfunction next() {\n    return str.charCodeAt(++index);\n}\nfunction eof() {\n    return index >= len;\n}\nfunction isStringStart(chr) {\n    return chr === 0x22 || chr === 0x27;\n}\nfunction parseBracket(chr) {\n    let inBracket = 1;\n    expressionPos = index;\n    while (!eof()) {\n        chr = next();\n        if (isStringStart(chr)) {\n            parseString(chr);\n            continue;\n        }\n        if (chr === 0x5b)\n            inBracket++;\n        if (chr === 0x5d)\n            inBracket--;\n        if (inBracket === 0) {\n            expressionEndPos = index;\n            break;\n        }\n    }\n}\nfunction parseString(chr) {\n    const stringQuote = chr;\n    while (!eof()) {\n        chr = next();\n        if (chr === stringQuote) {\n            break;\n        }\n    }\n}\n\nlet warn$1;\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nconst RANGE_TOKEN = '__r';\nconst CHECKBOX_RADIO_TOKEN = '__c';\nfunction model$1(el, dir, _warn) {\n    warn$1 = _warn;\n    const value = dir.value;\n    const modifiers = dir.modifiers;\n    const tag = el.tag;\n    const type = el.attrsMap.type;\n    {\n        // inputs with type=\"file\" are read only and setting the input's\n        // value will throw an error.\n        if (tag === 'input' && type === 'file') {\n            warn$1(`<${el.tag} v-model=\"${value}\" type=\"file\">:\\n` +\n                `File inputs are read only. Use a v-on:change listener instead.`, el.rawAttrsMap['v-model']);\n        }\n    }\n    if (el.component) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else if (tag === 'select') {\n        genSelect(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'checkbox') {\n        genCheckboxModel(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'radio') {\n        genRadioModel(el, value, modifiers);\n    }\n    else if (tag === 'input' || tag === 'textarea') {\n        genDefaultModel(el, value, modifiers);\n    }\n    else if (!config.isReservedTag(tag)) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else {\n        warn$1(`<${el.tag} v-model=\"${value}\">: ` +\n            `v-model is not supported on this element type. ` +\n            \"If you are working with contenteditable, it's recommended to \" +\n            'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);\n    }\n    // ensure runtime directive metadata\n    return true;\n}\nfunction genCheckboxModel(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    const valueBinding = getBindingAttr(el, 'value') || 'null';\n    const trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n    const falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n    addProp(el, 'checked', `Array.isArray(${value})` +\n        `?_i(${value},${valueBinding})>-1` +\n        (trueValueBinding === 'true'\n            ? `:(${value})`\n            : `:_q(${value},${trueValueBinding})`));\n    addHandler(el, 'change', `var $$a=${value},` +\n        '$$el=$event.target,' +\n        `$$c=$$el.checked?(${trueValueBinding}):(${falseValueBinding});` +\n        'if(Array.isArray($$a)){' +\n        `var $$v=${number ? '_n(' + valueBinding + ')' : valueBinding},` +\n        '$$i=_i($$a,$$v);' +\n        `if($$el.checked){$$i<0&&(${genAssignmentCode(value, '$$a.concat([$$v])')})}` +\n        `else{$$i>-1&&(${genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')})}` +\n        `}else{${genAssignmentCode(value, '$$c')}}`, null, true);\n}\nfunction genRadioModel(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    let valueBinding = getBindingAttr(el, 'value') || 'null';\n    valueBinding = number ? `_n(${valueBinding})` : valueBinding;\n    addProp(el, 'checked', `_q(${value},${valueBinding})`);\n    addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\n}\nfunction genSelect(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    const selectedVal = `Array.prototype.filter` +\n        `.call($event.target.options,function(o){return o.selected})` +\n        `.map(function(o){var val = \"_value\" in o ? o._value : o.value;` +\n        `return ${number ? '_n(val)' : 'val'}})`;\n    const assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n    let code = `var $$selectedVal = ${selectedVal};`;\n    code = `${code} ${genAssignmentCode(value, assignment)}`;\n    addHandler(el, 'change', code, null, true);\n}\nfunction genDefaultModel(el, value, modifiers) {\n    const type = el.attrsMap.type;\n    // warn if v-bind:value conflicts with v-model\n    // except for inputs with v-bind:type\n    {\n        const value = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];\n        const typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n        if (value && !typeBinding) {\n            const binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';\n            warn$1(`${binding}=\"${value}\" conflicts with v-model on the same element ` +\n                'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);\n        }\n    }\n    const { lazy, number, trim } = modifiers || {};\n    const needCompositionGuard = !lazy && type !== 'range';\n    const event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';\n    let valueExpression = '$event.target.value';\n    if (trim) {\n        valueExpression = `$event.target.value.trim()`;\n    }\n    if (number) {\n        valueExpression = `_n(${valueExpression})`;\n    }\n    let code = genAssignmentCode(value, valueExpression);\n    if (needCompositionGuard) {\n        code = `if($event.target.composing)return;${code}`;\n    }\n    addProp(el, 'value', `(${value})`);\n    addHandler(el, event, code, null, true);\n    if (trim || number) {\n        addHandler(el, 'blur', '$forceUpdate()');\n    }\n}\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents(on) {\n    /* istanbul ignore if */\n    if (isDef(on[RANGE_TOKEN])) {\n        // IE input[type=range] only supports `change` event\n        const event = isIE ? 'change' : 'input';\n        on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n        delete on[RANGE_TOKEN];\n    }\n    // This was originally intended to fix #4521 but no longer necessary\n    // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n    /* istanbul ignore if */\n    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n        delete on[CHECKBOX_RADIO_TOKEN];\n    }\n}\nlet target;\nfunction createOnceHandler(event, handler, capture) {\n    const _target = target; // save current target element in closure\n    return function onceHandler() {\n        const res = handler.apply(null, arguments);\n        if (res !== null) {\n            remove(event, onceHandler, capture, _target);\n        }\n    };\n}\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nconst useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\nfunction add(name, handler, capture, passive) {\n    // async edge case #6566: inner click event triggers patch, event handler\n    // attached to outer element during patch, and triggered again. This\n    // happens because browsers fire microtask ticks between event propagation.\n    // the solution is simple: we save the timestamp when a handler is attached,\n    // and the handler would only fire if the event passed to it was fired\n    // AFTER it was attached.\n    if (useMicrotaskFix) {\n        const attachedTimestamp = currentFlushTimestamp;\n        const original = handler;\n        //@ts-expect-error\n        handler = original._wrapper = function (e) {\n            if (\n            // no bubbling, should always fire.\n            // this is just a safety net in case event.timeStamp is unreliable in\n            // certain weird environments...\n            e.target === e.currentTarget ||\n                // event is fired after handler attachment\n                e.timeStamp >= attachedTimestamp ||\n                // bail for environments that have buggy event.timeStamp implementations\n                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                // #9681 QtWebEngine event.timeStamp is negative value\n                e.timeStamp <= 0 ||\n                // #9448 bail if event is fired in another document in a multi-page\n                // electron/nw.js app, since event.timeStamp will be using a different\n                // starting reference\n                e.target.ownerDocument !== document) {\n                return original.apply(this, arguments);\n            }\n        };\n    }\n    target.addEventListener(name, handler, supportsPassive ? { capture, passive } : capture);\n}\nfunction remove(name, handler, capture, _target) {\n    (_target || target).removeEventListener(name, \n    //@ts-expect-error\n    handler._wrapper || handler, capture);\n}\nfunction updateDOMListeners(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n        return;\n    }\n    const on = vnode.data.on || {};\n    const oldOn = oldVnode.data.on || {};\n    // vnode is empty when removing all listeners,\n    // and use old vnode dom element\n    target = vnode.elm || oldVnode.elm;\n    normalizeEvents(on);\n    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n    target = undefined;\n}\nvar events = {\n    create: updateDOMListeners,\n    update: updateDOMListeners,\n    // @ts-expect-error emptyNode has actually data\n    destroy: (vnode) => updateDOMListeners(vnode, emptyNode)\n};\n\nlet svgContainer;\nfunction updateDOMProps(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n        return;\n    }\n    let key, cur;\n    const elm = vnode.elm;\n    const oldProps = oldVnode.data.domProps || {};\n    let props = vnode.data.domProps || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n        props = vnode.data.domProps = extend({}, props);\n    }\n    for (key in oldProps) {\n        if (!(key in props)) {\n            elm[key] = '';\n        }\n    }\n    for (key in props) {\n        cur = props[key];\n        // ignore children if the node has textContent or innerHTML,\n        // as these will throw away existing DOM nodes and cause removal errors\n        // on subsequent patches (#3360)\n        if (key === 'textContent' || key === 'innerHTML') {\n            if (vnode.children)\n                vnode.children.length = 0;\n            if (cur === oldProps[key])\n                continue;\n            // #6601 work around Chrome version <= 55 bug where single textNode\n            // replaced by innerHTML/textContent retains its parentNode property\n            if (elm.childNodes.length === 1) {\n                elm.removeChild(elm.childNodes[0]);\n            }\n        }\n        if (key === 'value' && elm.tagName !== 'PROGRESS') {\n            // store value as _value as well since\n            // non-string values will be stringified\n            elm._value = cur;\n            // avoid resetting cursor position when value is the same\n            const strCur = isUndef(cur) ? '' : String(cur);\n            if (shouldUpdateValue(elm, strCur)) {\n                elm.value = strCur;\n            }\n        }\n        else if (key === 'innerHTML' &&\n            isSVG(elm.tagName) &&\n            isUndef(elm.innerHTML)) {\n            // IE doesn't support innerHTML for SVG elements\n            svgContainer = svgContainer || document.createElement('div');\n            svgContainer.innerHTML = `<svg>${cur}</svg>`;\n            const svg = svgContainer.firstChild;\n            while (elm.firstChild) {\n                elm.removeChild(elm.firstChild);\n            }\n            while (svg.firstChild) {\n                elm.appendChild(svg.firstChild);\n            }\n        }\n        else if (\n        // skip the update if old and new VDOM state is the same.\n        // `value` is handled separately because the DOM value may be temporarily\n        // out of sync with VDOM state due to focus, composition and modifiers.\n        // This  #4521 by skipping the unnecessary `checked` update.\n        cur !== oldProps[key]) {\n            // some property updates can throw\n            // e.g. `value` on <progress> w/ non-finite value\n            try {\n                elm[key] = cur;\n            }\n            catch (e) { }\n        }\n    }\n}\nfunction shouldUpdateValue(elm, checkVal) {\n    return (\n    //@ts-expect-error\n    !elm.composing &&\n        (elm.tagName === 'OPTION' ||\n            isNotInFocusAndDirty(elm, checkVal) ||\n            isDirtyWithModifiers(elm, checkVal)));\n}\nfunction isNotInFocusAndDirty(elm, checkVal) {\n    // return true when textbox (.number and .trim) loses focus and its value is\n    // not equal to the updated value\n    let notInFocus = true;\n    // #6157\n    // work around IE bug when accessing document.activeElement in an iframe\n    try {\n        notInFocus = document.activeElement !== elm;\n    }\n    catch (e) { }\n    return notInFocus && elm.value !== checkVal;\n}\nfunction isDirtyWithModifiers(elm, newVal) {\n    const value = elm.value;\n    const modifiers = elm._vModifiers; // injected by v-model runtime\n    if (isDef(modifiers)) {\n        if (modifiers.number) {\n            return toNumber(value) !== toNumber(newVal);\n        }\n        if (modifiers.trim) {\n            return value.trim() !== newVal.trim();\n        }\n    }\n    return value !== newVal;\n}\nvar domProps = {\n    create: updateDOMProps,\n    update: updateDOMProps\n};\n\nconst parseStyleText = cached(function (cssText) {\n    const res = {};\n    const listDelimiter = /;(?![^(]*\\))/g;\n    const propertyDelimiter = /:(.+)/;\n    cssText.split(listDelimiter).forEach(function (item) {\n        if (item) {\n            const tmp = item.split(propertyDelimiter);\n            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n        }\n    });\n    return res;\n});\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData(data) {\n    const style = normalizeStyleBinding(data.style);\n    // static style is pre-processed into an object during compilation\n    // and is always a fresh object, so it's safe to merge into it\n    return data.staticStyle ? extend(data.staticStyle, style) : style;\n}\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding(bindingStyle) {\n    if (Array.isArray(bindingStyle)) {\n        return toObject(bindingStyle);\n    }\n    if (typeof bindingStyle === 'string') {\n        return parseStyleText(bindingStyle);\n    }\n    return bindingStyle;\n}\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle(vnode, checkChild) {\n    const res = {};\n    let styleData;\n    if (checkChild) {\n        let childNode = vnode;\n        while (childNode.componentInstance) {\n            childNode = childNode.componentInstance._vnode;\n            if (childNode &&\n                childNode.data &&\n                (styleData = normalizeStyleData(childNode.data))) {\n                extend(res, styleData);\n            }\n        }\n    }\n    if ((styleData = normalizeStyleData(vnode.data))) {\n        extend(res, styleData);\n    }\n    let parentNode = vnode;\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while ((parentNode = parentNode.parent)) {\n        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n            extend(res, styleData);\n        }\n    }\n    return res;\n}\n\nconst cssVarRE = /^--/;\nconst importantRE = /\\s*!important$/;\nconst setProp = (el, name, val) => {\n    /* istanbul ignore if */\n    if (cssVarRE.test(name)) {\n        el.style.setProperty(name, val);\n    }\n    else if (importantRE.test(val)) {\n        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n    }\n    else {\n        const normalizedName = normalize(name);\n        if (Array.isArray(val)) {\n            // Support values array created by autoprefixer, e.g.\n            // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n            // Set them one by one, and the browser will only set those it can recognize\n            for (let i = 0, len = val.length; i < len; i++) {\n                el.style[normalizedName] = val[i];\n            }\n        }\n        else {\n            el.style[normalizedName] = val;\n        }\n    }\n};\nconst vendorNames = ['Webkit', 'Moz', 'ms'];\nlet emptyStyle;\nconst normalize = cached(function (prop) {\n    emptyStyle = emptyStyle || document.createElement('div').style;\n    prop = camelize(prop);\n    if (prop !== 'filter' && prop in emptyStyle) {\n        return prop;\n    }\n    const capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n    for (let i = 0; i < vendorNames.length; i++) {\n        const name = vendorNames[i] + capName;\n        if (name in emptyStyle) {\n            return name;\n        }\n    }\n});\nfunction updateStyle(oldVnode, vnode) {\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticStyle) &&\n        isUndef(data.style) &&\n        isUndef(oldData.staticStyle) &&\n        isUndef(oldData.style)) {\n        return;\n    }\n    let cur, name;\n    const el = vnode.elm;\n    const oldStaticStyle = oldData.staticStyle;\n    const oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n    // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n    const oldStyle = oldStaticStyle || oldStyleBinding;\n    const style = normalizeStyleBinding(vnode.data.style) || {};\n    // store normalized style under a different key for next diff\n    // make sure to clone it if it's reactive, since the user likely wants\n    // to mutate it.\n    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n    const newStyle = getStyle(vnode, true);\n    for (name in oldStyle) {\n        if (isUndef(newStyle[name])) {\n            setProp(el, name, '');\n        }\n    }\n    for (name in newStyle) {\n        cur = newStyle[name];\n        // ie9 setting to null has no effect, must use empty string\n        setProp(el, name, cur == null ? '' : cur);\n    }\n}\nvar style$1 = {\n    create: updateStyle,\n    update: updateStyle\n};\n\nconst whitespaceRE$1 = /\\s+/;\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(c => el.classList.add(c));\n        }\n        else {\n            el.classList.add(cls);\n        }\n    }\n    else {\n        const cur = ` ${el.getAttribute('class') || ''} `;\n        if (cur.indexOf(' ' + cls + ' ') < 0) {\n            el.setAttribute('class', (cur + cls).trim());\n        }\n    }\n}\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(c => el.classList.remove(c));\n        }\n        else {\n            el.classList.remove(cls);\n        }\n        if (!el.classList.length) {\n            el.removeAttribute('class');\n        }\n    }\n    else {\n        let cur = ` ${el.getAttribute('class') || ''} `;\n        const tar = ' ' + cls + ' ';\n        while (cur.indexOf(tar) >= 0) {\n            cur = cur.replace(tar, ' ');\n        }\n        cur = cur.trim();\n        if (cur) {\n            el.setAttribute('class', cur);\n        }\n        else {\n            el.removeAttribute('class');\n        }\n    }\n}\n\nfunction resolveTransition(def) {\n    if (!def) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (typeof def === 'object') {\n        const res = {};\n        if (def.css !== false) {\n            extend(res, autoCssTransition(def.name || 'v'));\n        }\n        extend(res, def);\n        return res;\n    }\n    else if (typeof def === 'string') {\n        return autoCssTransition(def);\n    }\n}\nconst autoCssTransition = cached(name => {\n    return {\n        enterClass: `${name}-enter`,\n        enterToClass: `${name}-enter-to`,\n        enterActiveClass: `${name}-enter-active`,\n        leaveClass: `${name}-leave`,\n        leaveToClass: `${name}-leave-to`,\n        leaveActiveClass: `${name}-leave-active`\n    };\n});\nconst hasTransition = inBrowser && !isIE9;\nconst TRANSITION = 'transition';\nconst ANIMATION = 'animation';\n// Transition property/event sniffing\nlet transitionProp = 'transition';\nlet transitionEndEvent = 'transitionend';\nlet animationProp = 'animation';\nlet animationEndEvent = 'animationend';\nif (hasTransition) {\n    /* istanbul ignore if */\n    if (window.ontransitionend === undefined &&\n        window.onwebkittransitionend !== undefined) {\n        transitionProp = 'WebkitTransition';\n        transitionEndEvent = 'webkitTransitionEnd';\n    }\n    if (window.onanimationend === undefined &&\n        window.onwebkitanimationend !== undefined) {\n        animationProp = 'WebkitAnimation';\n        animationEndEvent = 'webkitAnimationEnd';\n    }\n}\n// binding to window is necessary to make hot reload work in IE in strict mode\nconst raf = inBrowser\n    ? window.requestAnimationFrame\n        ? window.requestAnimationFrame.bind(window)\n        : setTimeout\n    : /* istanbul ignore next */ /* istanbul ignore next */ fn => fn();\nfunction nextFrame(fn) {\n    raf(() => {\n        // @ts-expect-error\n        raf(fn);\n    });\n}\nfunction addTransitionClass(el, cls) {\n    const transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n    if (transitionClasses.indexOf(cls) < 0) {\n        transitionClasses.push(cls);\n        addClass(el, cls);\n    }\n}\nfunction removeTransitionClass(el, cls) {\n    if (el._transitionClasses) {\n        remove$2(el._transitionClasses, cls);\n    }\n    removeClass(el, cls);\n}\nfunction whenTransitionEnds(el, expectedType, cb) {\n    const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n    if (!type)\n        return cb();\n    const event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n    let ended = 0;\n    const end = () => {\n        el.removeEventListener(event, onEnd);\n        cb();\n    };\n    const onEnd = e => {\n        if (e.target === el) {\n            if (++ended >= propCount) {\n                end();\n            }\n        }\n    };\n    setTimeout(() => {\n        if (ended < propCount) {\n            end();\n        }\n    }, timeout + 1);\n    el.addEventListener(event, onEnd);\n}\nconst transformRE = /\\b(transform|all)(,|$)/;\nfunction getTransitionInfo(el, expectedType) {\n    const styles = window.getComputedStyle(el);\n    // JSDOM may return undefined for transition properties\n    const transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n    const transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n    const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n    const animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n    const animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n    const animationTimeout = getTimeout(animationDelays, animationDurations);\n    let type;\n    let timeout = 0;\n    let propCount = 0;\n    /* istanbul ignore if */\n    if (expectedType === TRANSITION) {\n        if (transitionTimeout > 0) {\n            type = TRANSITION;\n            timeout = transitionTimeout;\n            propCount = transitionDurations.length;\n        }\n    }\n    else if (expectedType === ANIMATION) {\n        if (animationTimeout > 0) {\n            type = ANIMATION;\n            timeout = animationTimeout;\n            propCount = animationDurations.length;\n        }\n    }\n    else {\n        timeout = Math.max(transitionTimeout, animationTimeout);\n        type =\n            timeout > 0\n                ? transitionTimeout > animationTimeout\n                    ? TRANSITION\n                    : ANIMATION\n                : null;\n        propCount = type\n            ? type === TRANSITION\n                ? transitionDurations.length\n                : animationDurations.length\n            : 0;\n    }\n    const hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n    return {\n        type,\n        timeout,\n        propCount,\n        hasTransform\n    };\n}\nfunction getTimeout(delays, durations) {\n    /* istanbul ignore next */\n    while (delays.length < durations.length) {\n        delays = delays.concat(delays);\n    }\n    return Math.max.apply(null, durations.map((d, i) => {\n        return toMs(d) + toMs(delays[i]);\n    }));\n}\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs(s) {\n    return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n}\n\nfunction enter(vnode, toggleDisplay) {\n    const el = vnode.elm;\n    // call leave callback now\n    if (isDef(el._leaveCb)) {\n        el._leaveCb.cancelled = true;\n        el._leaveCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data)) {\n        return;\n    }\n    /* istanbul ignore if */\n    if (isDef(el._enterCb) || el.nodeType !== 1) {\n        return;\n    }\n    const { css, type, enterClass, enterToClass, enterActiveClass, appearClass, appearToClass, appearActiveClass, beforeEnter, enter, afterEnter, enterCancelled, beforeAppear, appear, afterAppear, appearCancelled, duration } = data;\n    // activeInstance will always be the <transition> component managing this\n    // transition. One edge case to check is when the <transition> is placed\n    // as the root node of a child component. In that case we need to check\n    // <transition>'s parent for appear check.\n    let context = activeInstance;\n    let transitionNode = activeInstance.$vnode;\n    while (transitionNode && transitionNode.parent) {\n        context = transitionNode.context;\n        transitionNode = transitionNode.parent;\n    }\n    const isAppear = !context._isMounted || !vnode.isRootInsert;\n    if (isAppear && !appear && appear !== '') {\n        return;\n    }\n    const startClass = isAppear && appearClass ? appearClass : enterClass;\n    const activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n    const toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n    const beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n    const enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n    const afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n    const enterCancelledHook = isAppear\n        ? appearCancelled || enterCancelled\n        : enterCancelled;\n    const explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n    if (explicitEnterDuration != null) {\n        checkDuration(explicitEnterDuration, 'enter', vnode);\n    }\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(enterHook);\n    const cb = (el._enterCb = once(() => {\n        if (expectsCSS) {\n            removeTransitionClass(el, toClass);\n            removeTransitionClass(el, activeClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, startClass);\n            }\n            enterCancelledHook && enterCancelledHook(el);\n        }\n        else {\n            afterEnterHook && afterEnterHook(el);\n        }\n        el._enterCb = null;\n    }));\n    if (!vnode.data.show) {\n        // remove pending leave element on enter by injecting an insert hook\n        mergeVNodeHook(vnode, 'insert', () => {\n            const parent = el.parentNode;\n            const pendingNode = parent && parent._pending && parent._pending[vnode.key];\n            if (pendingNode &&\n                pendingNode.tag === vnode.tag &&\n                pendingNode.elm._leaveCb) {\n                pendingNode.elm._leaveCb();\n            }\n            enterHook && enterHook(el, cb);\n        });\n    }\n    // start enter transition\n    beforeEnterHook && beforeEnterHook(el);\n    if (expectsCSS) {\n        addTransitionClass(el, startClass);\n        addTransitionClass(el, activeClass);\n        nextFrame(() => {\n            removeTransitionClass(el, startClass);\n            // @ts-expect-error\n            if (!cb.cancelled) {\n                addTransitionClass(el, toClass);\n                if (!userWantsControl) {\n                    if (isValidDuration(explicitEnterDuration)) {\n                        setTimeout(cb, explicitEnterDuration);\n                    }\n                    else {\n                        whenTransitionEnds(el, type, cb);\n                    }\n                }\n            }\n        });\n    }\n    if (vnode.data.show) {\n        toggleDisplay && toggleDisplay();\n        enterHook && enterHook(el, cb);\n    }\n    if (!expectsCSS && !userWantsControl) {\n        cb();\n    }\n}\nfunction leave(vnode, rm) {\n    const el = vnode.elm;\n    // call enter callback now\n    if (isDef(el._enterCb)) {\n        el._enterCb.cancelled = true;\n        el._enterCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data) || el.nodeType !== 1) {\n        return rm();\n    }\n    /* istanbul ignore if */\n    if (isDef(el._leaveCb)) {\n        return;\n    }\n    const { css, type, leaveClass, leaveToClass, leaveActiveClass, beforeLeave, leave, afterLeave, leaveCancelled, delayLeave, duration } = data;\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(leave);\n    const explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n    if (isDef(explicitLeaveDuration)) {\n        checkDuration(explicitLeaveDuration, 'leave', vnode);\n    }\n    const cb = (el._leaveCb = once(() => {\n        if (el.parentNode && el.parentNode._pending) {\n            el.parentNode._pending[vnode.key] = null;\n        }\n        if (expectsCSS) {\n            removeTransitionClass(el, leaveToClass);\n            removeTransitionClass(el, leaveActiveClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, leaveClass);\n            }\n            leaveCancelled && leaveCancelled(el);\n        }\n        else {\n            rm();\n            afterLeave && afterLeave(el);\n        }\n        el._leaveCb = null;\n    }));\n    if (delayLeave) {\n        delayLeave(performLeave);\n    }\n    else {\n        performLeave();\n    }\n    function performLeave() {\n        // the delayed leave may have already been cancelled\n        // @ts-expect-error\n        if (cb.cancelled) {\n            return;\n        }\n        // record leaving element\n        if (!vnode.data.show && el.parentNode) {\n            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                vnode;\n        }\n        beforeLeave && beforeLeave(el);\n        if (expectsCSS) {\n            addTransitionClass(el, leaveClass);\n            addTransitionClass(el, leaveActiveClass);\n            nextFrame(() => {\n                removeTransitionClass(el, leaveClass);\n                // @ts-expect-error\n                if (!cb.cancelled) {\n                    addTransitionClass(el, leaveToClass);\n                    if (!userWantsControl) {\n                        if (isValidDuration(explicitLeaveDuration)) {\n                            setTimeout(cb, explicitLeaveDuration);\n                        }\n                        else {\n                            whenTransitionEnds(el, type, cb);\n                        }\n                    }\n                }\n            });\n        }\n        leave && leave(el, cb);\n        if (!expectsCSS && !userWantsControl) {\n            cb();\n        }\n    }\n}\n// only used in dev mode\nfunction checkDuration(val, name, vnode) {\n    if (typeof val !== 'number') {\n        warn$2(`<transition> explicit ${name} duration is not a valid number - ` +\n            `got ${JSON.stringify(val)}.`, vnode.context);\n    }\n    else if (isNaN(val)) {\n        warn$2(`<transition> explicit ${name} duration is NaN - ` +\n            'the duration expression might be incorrect.', vnode.context);\n    }\n}\nfunction isValidDuration(val) {\n    return typeof val === 'number' && !isNaN(val);\n}\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength(fn) {\n    if (isUndef(fn)) {\n        return false;\n    }\n    // @ts-expect-error\n    const invokerFns = fn.fns;\n    if (isDef(invokerFns)) {\n        // invoker\n        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n    }\n    else {\n        // @ts-expect-error\n        return (fn._length || fn.length) > 1;\n    }\n}\nfunction _enter(_, vnode) {\n    if (vnode.data.show !== true) {\n        enter(vnode);\n    }\n}\nvar transition = inBrowser\n    ? {\n        create: _enter,\n        activate: _enter,\n        remove(vnode, rm) {\n            /* istanbul ignore else */\n            if (vnode.data.show !== true) {\n                // @ts-expect-error\n                leave(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n    }\n    : {};\n\nvar platformModules = [attrs, klass$1, events, domProps, style$1, transition];\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nconst modules$1 = platformModules.concat(baseModules);\nconst patch = createPatchFunction({ nodeOps, modules: modules$1 });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n/* istanbul ignore if */\nif (isIE9) {\n    // http://www.matts411.com/post/internet-explorer-9-oninput/\n    document.addEventListener('selectionchange', () => {\n        const el = document.activeElement;\n        // @ts-expect-error\n        if (el && el.vmodel) {\n            trigger(el, 'input');\n        }\n    });\n}\nconst directive = {\n    inserted(el, binding, vnode, oldVnode) {\n        if (vnode.tag === 'select') {\n            // #6903\n            if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                mergeVNodeHook(vnode, 'postpatch', () => {\n                    directive.componentUpdated(el, binding, vnode);\n                });\n            }\n            else {\n                setSelected(el, binding, vnode.context);\n            }\n            el._vOptions = [].map.call(el.options, getValue);\n        }\n        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n            el._vModifiers = binding.modifiers;\n            if (!binding.modifiers.lazy) {\n                el.addEventListener('compositionstart', onCompositionStart);\n                el.addEventListener('compositionend', onCompositionEnd);\n                // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                // switching focus before confirming composition choice\n                // this also fixes the issue where some browsers e.g. iOS Chrome\n                // fires \"change\" instead of \"input\" on autocomplete.\n                el.addEventListener('change', onCompositionEnd);\n                /* istanbul ignore if */\n                if (isIE9) {\n                    el.vmodel = true;\n                }\n            }\n        }\n    },\n    componentUpdated(el, binding, vnode) {\n        if (vnode.tag === 'select') {\n            setSelected(el, binding, vnode.context);\n            // in case the options rendered by v-for have changed,\n            // it's possible that the value is out-of-sync with the rendered options.\n            // detect such cases and filter out values that no longer has a matching\n            // option in the DOM.\n            const prevOptions = el._vOptions;\n            const curOptions = (el._vOptions = [].map.call(el.options, getValue));\n            if (curOptions.some((o, i) => !looseEqual(o, prevOptions[i]))) {\n                // trigger change event if\n                // no matching option found for at least one value\n                const needReset = el.multiple\n                    ? binding.value.some(v => hasNoMatchingOption(v, curOptions))\n                    : binding.value !== binding.oldValue &&\n                        hasNoMatchingOption(binding.value, curOptions);\n                if (needReset) {\n                    trigger(el, 'change');\n                }\n            }\n        }\n    }\n};\nfunction setSelected(el, binding, vm) {\n    actuallySetSelected(el, binding, vm);\n    /* istanbul ignore if */\n    if (isIE || isEdge) {\n        setTimeout(() => {\n            actuallySetSelected(el, binding, vm);\n        }, 0);\n    }\n}\nfunction actuallySetSelected(el, binding, vm) {\n    const value = binding.value;\n    const isMultiple = el.multiple;\n    if (isMultiple && !Array.isArray(value)) {\n        warn$2(`<select multiple v-model=\"${binding.expression}\"> ` +\n                `expects an Array value for its binding, but got ${Object.prototype.toString\n                    .call(value)\n                    .slice(8, -1)}`, vm);\n        return;\n    }\n    let selected, option;\n    for (let i = 0, l = el.options.length; i < l; i++) {\n        option = el.options[i];\n        if (isMultiple) {\n            selected = looseIndexOf(value, getValue(option)) > -1;\n            if (option.selected !== selected) {\n                option.selected = selected;\n            }\n        }\n        else {\n            if (looseEqual(getValue(option), value)) {\n                if (el.selectedIndex !== i) {\n                    el.selectedIndex = i;\n                }\n                return;\n            }\n        }\n    }\n    if (!isMultiple) {\n        el.selectedIndex = -1;\n    }\n}\nfunction hasNoMatchingOption(value, options) {\n    return options.every(o => !looseEqual(o, value));\n}\nfunction getValue(option) {\n    return '_value' in option ? option._value : option.value;\n}\nfunction onCompositionStart(e) {\n    e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n    // prevent triggering an input event for no reason\n    if (!e.target.composing)\n        return;\n    e.target.composing = false;\n    trigger(e.target, 'input');\n}\nfunction trigger(el, type) {\n    const e = document.createEvent('HTMLEvents');\n    e.initEvent(type, true, true);\n    el.dispatchEvent(e);\n}\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode(vnode) {\n    // @ts-expect-error\n    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n        ? locateNode(vnode.componentInstance._vnode)\n        : vnode;\n}\nvar show = {\n    bind(el, { value }, vnode) {\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        const originalDisplay = (el.__vOriginalDisplay =\n            el.style.display === 'none' ? '' : el.style.display);\n        if (value && transition) {\n            vnode.data.show = true;\n            enter(vnode, () => {\n                el.style.display = originalDisplay;\n            });\n        }\n        else {\n            el.style.display = value ? originalDisplay : 'none';\n        }\n    },\n    update(el, { value, oldValue }, vnode) {\n        /* istanbul ignore if */\n        if (!value === !oldValue)\n            return;\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        if (transition) {\n            vnode.data.show = true;\n            if (value) {\n                enter(vnode, () => {\n                    el.style.display = el.__vOriginalDisplay;\n                });\n            }\n            else {\n                leave(vnode, () => {\n                    el.style.display = 'none';\n                });\n            }\n        }\n        else {\n            el.style.display = value ? el.__vOriginalDisplay : 'none';\n        }\n    },\n    unbind(el, binding, vnode, oldVnode, isDestroy) {\n        if (!isDestroy) {\n            el.style.display = el.__vOriginalDisplay;\n        }\n    }\n};\n\nvar platformDirectives = {\n    model: directive,\n    show\n};\n\n// Provides transition support for a single element/component.\nconst transitionProps = {\n    name: String,\n    appear: Boolean,\n    css: Boolean,\n    mode: String,\n    type: String,\n    enterClass: String,\n    leaveClass: String,\n    enterToClass: String,\n    leaveToClass: String,\n    enterActiveClass: String,\n    leaveActiveClass: String,\n    appearClass: String,\n    appearActiveClass: String,\n    appearToClass: String,\n    duration: [Number, String, Object]\n};\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild(vnode) {\n    const compOptions = vnode && vnode.componentOptions;\n    if (compOptions && compOptions.Ctor.options.abstract) {\n        return getRealChild(getFirstComponentChild(compOptions.children));\n    }\n    else {\n        return vnode;\n    }\n}\nfunction extractTransitionData(comp) {\n    const data = {};\n    const options = comp.$options;\n    // props\n    for (const key in options.propsData) {\n        data[key] = comp[key];\n    }\n    // events.\n    // extract listeners and pass them directly to the transition methods\n    const listeners = options._parentListeners;\n    for (const key in listeners) {\n        data[camelize(key)] = listeners[key];\n    }\n    return data;\n}\nfunction placeholder(h, rawChild) {\n    // @ts-expect-error\n    if (/\\d-keep-alive$/.test(rawChild.tag)) {\n        return h('keep-alive', {\n            props: rawChild.componentOptions.propsData\n        });\n    }\n}\nfunction hasParentTransition(vnode) {\n    while ((vnode = vnode.parent)) {\n        if (vnode.data.transition) {\n            return true;\n        }\n    }\n}\nfunction isSameChild(child, oldChild) {\n    return oldChild.key === child.key && oldChild.tag === child.tag;\n}\nconst isNotTextNode = (c) => c.tag || isAsyncPlaceholder(c);\nconst isVShowDirective = d => d.name === 'show';\nvar Transition = {\n    name: 'transition',\n    props: transitionProps,\n    abstract: true,\n    render(h) {\n        let children = this.$slots.default;\n        if (!children) {\n            return;\n        }\n        // filter out text nodes (possible whitespaces)\n        children = children.filter(isNotTextNode);\n        /* istanbul ignore if */\n        if (!children.length) {\n            return;\n        }\n        // warn multiple elements\n        if (children.length > 1) {\n            warn$2('<transition> can only be used on a single element. Use ' +\n                '<transition-group> for lists.', this.$parent);\n        }\n        const mode = this.mode;\n        // warn invalid mode\n        if (mode && mode !== 'in-out' && mode !== 'out-in') {\n            warn$2('invalid <transition> mode: ' + mode, this.$parent);\n        }\n        const rawChild = children[0];\n        // if this is a component root node and the component's\n        // parent container node also has transition, skip.\n        if (hasParentTransition(this.$vnode)) {\n            return rawChild;\n        }\n        // apply transition data to child\n        // use getRealChild() to ignore abstract components e.g. keep-alive\n        const child = getRealChild(rawChild);\n        /* istanbul ignore if */\n        if (!child) {\n            return rawChild;\n        }\n        if (this._leaving) {\n            return placeholder(h, rawChild);\n        }\n        // ensure a key that is unique to the vnode type and to this transition\n        // component instance. This key will be used to remove pending leaving nodes\n        // during entering.\n        const id = `__transition-${this._uid}-`;\n        child.key =\n            child.key == null\n                ? child.isComment\n                    ? id + 'comment'\n                    : id + child.tag\n                : isPrimitive(child.key)\n                    ? String(child.key).indexOf(id) === 0\n                        ? child.key\n                        : id + child.key\n                    : child.key;\n        const data = ((child.data || (child.data = {})).transition =\n            extractTransitionData(this));\n        const oldRawChild = this._vnode;\n        const oldChild = getRealChild(oldRawChild);\n        // mark v-show\n        // so that the transition module can hand over the control to the directive\n        if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n            child.data.show = true;\n        }\n        if (oldChild &&\n            oldChild.data &&\n            !isSameChild(child, oldChild) &&\n            !isAsyncPlaceholder(oldChild) &&\n            // #6687 component root is a comment node\n            !(oldChild.componentInstance &&\n                oldChild.componentInstance._vnode.isComment)) {\n            // replace old child transition data with fresh one\n            // important for dynamic transitions!\n            const oldData = (oldChild.data.transition = extend({}, data));\n            // handle transition mode\n            if (mode === 'out-in') {\n                // return placeholder node and queue update when leave finishes\n                this._leaving = true;\n                mergeVNodeHook(oldData, 'afterLeave', () => {\n                    this._leaving = false;\n                    this.$forceUpdate();\n                });\n                return placeholder(h, rawChild);\n            }\n            else if (mode === 'in-out') {\n                if (isAsyncPlaceholder(child)) {\n                    return oldRawChild;\n                }\n                let delayedLeave;\n                const performLeave = () => {\n                    delayedLeave();\n                };\n                mergeVNodeHook(data, 'afterEnter', performLeave);\n                mergeVNodeHook(data, 'enterCancelled', performLeave);\n                mergeVNodeHook(oldData, 'delayLeave', leave => {\n                    delayedLeave = leave;\n                });\n            }\n        }\n        return rawChild;\n    }\n};\n\n// Provides transition support for list items.\nconst props = extend({\n    tag: String,\n    moveClass: String\n}, transitionProps);\ndelete props.mode;\nvar TransitionGroup = {\n    props,\n    beforeMount() {\n        const update = this._update;\n        this._update = (vnode, hydrating) => {\n            const restoreActiveInstance = setActiveInstance(this);\n            // force removing pass\n            this.__patch__(this._vnode, this.kept, false, // hydrating\n            true // removeOnly (!important, avoids unnecessary moves)\n            );\n            this._vnode = this.kept;\n            restoreActiveInstance();\n            update.call(this, vnode, hydrating);\n        };\n    },\n    render(h) {\n        const tag = this.tag || this.$vnode.data.tag || 'span';\n        const map = Object.create(null);\n        const prevChildren = (this.prevChildren = this.children);\n        const rawChildren = this.$slots.default || [];\n        const children = (this.children = []);\n        const transitionData = extractTransitionData(this);\n        for (let i = 0; i < rawChildren.length; i++) {\n            const c = rawChildren[i];\n            if (c.tag) {\n                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                    children.push(c);\n                    map[c.key] = c;\n                    (c.data || (c.data = {})).transition = transitionData;\n                }\n                else {\n                    const opts = c.componentOptions;\n                    const name = opts\n                        ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                        : c.tag;\n                    warn$2(`<transition-group> children must be keyed: <${name}>`);\n                }\n            }\n        }\n        if (prevChildren) {\n            const kept = [];\n            const removed = [];\n            for (let i = 0; i < prevChildren.length; i++) {\n                const c = prevChildren[i];\n                c.data.transition = transitionData;\n                // @ts-expect-error .getBoundingClientRect is not typed in Node\n                c.data.pos = c.elm.getBoundingClientRect();\n                if (map[c.key]) {\n                    kept.push(c);\n                }\n                else {\n                    removed.push(c);\n                }\n            }\n            this.kept = h(tag, null, kept);\n            this.removed = removed;\n        }\n        return h(tag, null, children);\n    },\n    updated() {\n        const children = this.prevChildren;\n        const moveClass = this.moveClass || (this.name || 'v') + '-move';\n        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n            return;\n        }\n        // we divide the work into three loops to avoid mixing DOM reads and writes\n        // in each iteration - which helps prevent layout thrashing.\n        children.forEach(callPendingCbs);\n        children.forEach(recordPosition);\n        children.forEach(applyTranslation);\n        // force reflow to put everything in position\n        // assign to this to avoid being removed in tree-shaking\n        // $flow-disable-line\n        this._reflow = document.body.offsetHeight;\n        children.forEach((c) => {\n            if (c.data.moved) {\n                const el = c.elm;\n                const s = el.style;\n                addTransitionClass(el, moveClass);\n                s.transform = s.WebkitTransform = s.transitionDuration = '';\n                el.addEventListener(transitionEndEvent, (el._moveCb = function cb(e) {\n                    if (e && e.target !== el) {\n                        return;\n                    }\n                    if (!e || /transform$/.test(e.propertyName)) {\n                        el.removeEventListener(transitionEndEvent, cb);\n                        el._moveCb = null;\n                        removeTransitionClass(el, moveClass);\n                    }\n                }));\n            }\n        });\n    },\n    methods: {\n        hasMove(el, moveClass) {\n            /* istanbul ignore if */\n            if (!hasTransition) {\n                return false;\n            }\n            /* istanbul ignore if */\n            if (this._hasMove) {\n                return this._hasMove;\n            }\n            // Detect whether an element with the move class applied has\n            // CSS transitions. Since the element may be inside an entering\n            // transition at this very moment, we make a clone of it and remove\n            // all other transition classes applied to ensure only the move class\n            // is applied.\n            const clone = el.cloneNode();\n            if (el._transitionClasses) {\n                el._transitionClasses.forEach((cls) => {\n                    removeClass(clone, cls);\n                });\n            }\n            addClass(clone, moveClass);\n            clone.style.display = 'none';\n            this.$el.appendChild(clone);\n            const info = getTransitionInfo(clone);\n            this.$el.removeChild(clone);\n            return (this._hasMove = info.hasTransform);\n        }\n    }\n};\nfunction callPendingCbs(c) {\n    /* istanbul ignore if */\n    if (c.elm._moveCb) {\n        c.elm._moveCb();\n    }\n    /* istanbul ignore if */\n    if (c.elm._enterCb) {\n        c.elm._enterCb();\n    }\n}\nfunction recordPosition(c) {\n    c.data.newPos = c.elm.getBoundingClientRect();\n}\nfunction applyTranslation(c) {\n    const oldPos = c.data.pos;\n    const newPos = c.data.newPos;\n    const dx = oldPos.left - newPos.left;\n    const dy = oldPos.top - newPos.top;\n    if (dx || dy) {\n        c.data.moved = true;\n        const s = c.elm.style;\n        s.transform = s.WebkitTransform = `translate(${dx}px,${dy}px)`;\n        s.transitionDuration = '0s';\n    }\n}\n\nvar platformComponents = {\n    Transition,\n    TransitionGroup\n};\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n// public mount method\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && inBrowser ? query(el) : undefined;\n    return mountComponent(this, el, hydrating);\n};\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n    setTimeout(() => {\n        if (config.devtools) {\n            if (devtools) {\n                devtools.emit('init', Vue);\n            }\n            else {\n                // @ts-expect-error\n                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                    'https://github.com/vuejs/vue-devtools');\n            }\n        }\n        if (config.productionTip !== false &&\n            typeof console !== 'undefined') {\n            // @ts-expect-error\n            console[console.info ? 'info' : 'log'](`You are running Vue in development mode.\\n` +\n                `Make sure to turn on production mode when deploying for production.\\n` +\n                `See more tips at https://vuejs.org/guide/deployment.html`);\n        }\n    }, 0);\n}\n\nconst defaultTagRE = /\\{\\{((?:.|\\r?\\n)+?)\\}\\}/g;\nconst regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\nconst buildRegex = cached(delimiters => {\n    const open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n    const close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n    return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g');\n});\nfunction parseText(text, delimiters) {\n    //@ts-expect-error\n    const tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n    if (!tagRE.test(text)) {\n        return;\n    }\n    const tokens = [];\n    const rawTokens = [];\n    let lastIndex = (tagRE.lastIndex = 0);\n    let match, index, tokenValue;\n    while ((match = tagRE.exec(text))) {\n        index = match.index;\n        // push text token\n        if (index > lastIndex) {\n            rawTokens.push((tokenValue = text.slice(lastIndex, index)));\n            tokens.push(JSON.stringify(tokenValue));\n        }\n        // tag token\n        const exp = parseFilters(match[1].trim());\n        tokens.push(`_s(${exp})`);\n        rawTokens.push({ '@binding': exp });\n        lastIndex = index + match[0].length;\n    }\n    if (lastIndex < text.length) {\n        rawTokens.push((tokenValue = text.slice(lastIndex)));\n        tokens.push(JSON.stringify(tokenValue));\n    }\n    return {\n        expression: tokens.join('+'),\n        tokens: rawTokens\n    };\n}\n\nfunction transformNode$1(el, options) {\n    const warn = options.warn || baseWarn;\n    const staticClass = getAndRemoveAttr(el, 'class');\n    if (staticClass) {\n        const res = parseText(staticClass, options.delimiters);\n        if (res) {\n            warn(`class=\"${staticClass}\": ` +\n                'Interpolation inside attributes has been removed. ' +\n                'Use v-bind or the colon shorthand instead. For example, ' +\n                'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.', el.rawAttrsMap['class']);\n        }\n    }\n    if (staticClass) {\n        el.staticClass = JSON.stringify(staticClass.replace(/\\s+/g, ' ').trim());\n    }\n    const classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n    if (classBinding) {\n        el.classBinding = classBinding;\n    }\n}\nfunction genData$2(el) {\n    let data = '';\n    if (el.staticClass) {\n        data += `staticClass:${el.staticClass},`;\n    }\n    if (el.classBinding) {\n        data += `class:${el.classBinding},`;\n    }\n    return data;\n}\nvar klass = {\n    staticKeys: ['staticClass'],\n    transformNode: transformNode$1,\n    genData: genData$2\n};\n\nfunction transformNode(el, options) {\n    const warn = options.warn || baseWarn;\n    const staticStyle = getAndRemoveAttr(el, 'style');\n    if (staticStyle) {\n        /* istanbul ignore if */\n        {\n            const res = parseText(staticStyle, options.delimiters);\n            if (res) {\n                warn(`style=\"${staticStyle}\": ` +\n                    'Interpolation inside attributes has been removed. ' +\n                    'Use v-bind or the colon shorthand instead. For example, ' +\n                    'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.', el.rawAttrsMap['style']);\n            }\n        }\n        el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n    }\n    const styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n    if (styleBinding) {\n        el.styleBinding = styleBinding;\n    }\n}\nfunction genData$1(el) {\n    let data = '';\n    if (el.staticStyle) {\n        data += `staticStyle:${el.staticStyle},`;\n    }\n    if (el.styleBinding) {\n        data += `style:(${el.styleBinding}),`;\n    }\n    return data;\n}\nvar style = {\n    staticKeys: ['staticStyle'],\n    transformNode,\n    genData: genData$1\n};\n\nlet decoder;\nvar he = {\n    decode(html) {\n        decoder = decoder || document.createElement('div');\n        decoder.innerHTML = html;\n        return decoder.textContent;\n    }\n};\n\nconst isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n    'link,meta,param,source,track,wbr');\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nconst canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nconst isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n    'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n    'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n    'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n    'title,tr,track');\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n// Regular Expressions for parsing tags and attributes\nconst attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nconst dynamicArgAttribute = /^\\s*((?:v-[\\w-]+:|@|:|#)\\[[^=]+?\\][^\\s\"'<>\\/=]*)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nconst ncname = `[a-zA-Z_][\\\\-\\\\.0-9_a-zA-Z${unicodeRegExp.source}]*`;\nconst qnameCapture = `((?:${ncname}\\\\:)?${ncname})`;\nconst startTagOpen = new RegExp(`^<${qnameCapture}`);\nconst startTagClose = /^\\s*(\\/?)>/;\nconst endTag = new RegExp(`^<\\\\/${qnameCapture}[^>]*>`);\nconst doctype = /^<!DOCTYPE [^>]+>/i;\n// #7298: escape - to avoid being passed as HTML comment when inlined in page\nconst comment = /^<!\\--/;\nconst conditionalComment = /^<!\\[/;\n// Special Elements (can contain anything)\nconst isPlainTextElement = makeMap('script,style,textarea', true);\nconst reCache = {};\nconst decodingMap = {\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&amp;': '&',\n    '&#10;': '\\n',\n    '&#9;': '\\t',\n    '&#39;': \"'\"\n};\nconst encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;\nconst encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;\n// #5992\nconst isIgnoreNewlineTag = makeMap('pre,textarea', true);\nconst shouldIgnoreFirstNewline = (tag, html) => tag && isIgnoreNewlineTag(tag) && html[0] === '\\n';\nfunction decodeAttr(value, shouldDecodeNewlines) {\n    const re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n    return value.replace(re, match => decodingMap[match]);\n}\nfunction parseHTML(html, options) {\n    const stack = [];\n    const expectHTML = options.expectHTML;\n    const isUnaryTag = options.isUnaryTag || no;\n    const canBeLeftOpenTag = options.canBeLeftOpenTag || no;\n    let index = 0;\n    let last, lastTag;\n    while (html) {\n        last = html;\n        // Make sure we're not in a plaintext content element like script/style\n        if (!lastTag || !isPlainTextElement(lastTag)) {\n            let textEnd = html.indexOf('<');\n            if (textEnd === 0) {\n                // Comment:\n                if (comment.test(html)) {\n                    const commentEnd = html.indexOf('-->');\n                    if (commentEnd >= 0) {\n                        if (options.shouldKeepComment && options.comment) {\n                            options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);\n                        }\n                        advance(commentEnd + 3);\n                        continue;\n                    }\n                }\n                // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n                if (conditionalComment.test(html)) {\n                    const conditionalEnd = html.indexOf(']>');\n                    if (conditionalEnd >= 0) {\n                        advance(conditionalEnd + 2);\n                        continue;\n                    }\n                }\n                // Doctype:\n                const doctypeMatch = html.match(doctype);\n                if (doctypeMatch) {\n                    advance(doctypeMatch[0].length);\n                    continue;\n                }\n                // End tag:\n                const endTagMatch = html.match(endTag);\n                if (endTagMatch) {\n                    const curIndex = index;\n                    advance(endTagMatch[0].length);\n                    parseEndTag(endTagMatch[1], curIndex, index);\n                    continue;\n                }\n                // Start tag:\n                const startTagMatch = parseStartTag();\n                if (startTagMatch) {\n                    handleStartTag(startTagMatch);\n                    if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {\n                        advance(1);\n                    }\n                    continue;\n                }\n            }\n            let text, rest, next;\n            if (textEnd >= 0) {\n                rest = html.slice(textEnd);\n                while (!endTag.test(rest) &&\n                    !startTagOpen.test(rest) &&\n                    !comment.test(rest) &&\n                    !conditionalComment.test(rest)) {\n                    // < in plain text, be forgiving and treat it as text\n                    next = rest.indexOf('<', 1);\n                    if (next < 0)\n                        break;\n                    textEnd += next;\n                    rest = html.slice(textEnd);\n                }\n                text = html.substring(0, textEnd);\n            }\n            if (textEnd < 0) {\n                text = html;\n            }\n            if (text) {\n                advance(text.length);\n            }\n            if (options.chars && text) {\n                options.chars(text, index - text.length, index);\n            }\n        }\n        else {\n            let endTagLength = 0;\n            const stackedTag = lastTag.toLowerCase();\n            const reStackedTag = reCache[stackedTag] ||\n                (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n            const rest = html.replace(reStackedTag, function (all, text, endTag) {\n                endTagLength = endTag.length;\n                if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n                    text = text\n                        .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n                        .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n                }\n                if (shouldIgnoreFirstNewline(stackedTag, text)) {\n                    text = text.slice(1);\n                }\n                if (options.chars) {\n                    options.chars(text);\n                }\n                return '';\n            });\n            index += html.length - rest.length;\n            html = rest;\n            parseEndTag(stackedTag, index - endTagLength, index);\n        }\n        if (html === last) {\n            options.chars && options.chars(html);\n            if (!stack.length && options.warn) {\n                options.warn(`Mal-formatted tag at end of template: \"${html}\"`, {\n                    start: index + html.length\n                });\n            }\n            break;\n        }\n    }\n    // Clean up any remaining tags\n    parseEndTag();\n    function advance(n) {\n        index += n;\n        html = html.substring(n);\n    }\n    function parseStartTag() {\n        const start = html.match(startTagOpen);\n        if (start) {\n            const match = {\n                tagName: start[1],\n                attrs: [],\n                start: index\n            };\n            advance(start[0].length);\n            let end, attr;\n            while (!(end = html.match(startTagClose)) &&\n                (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {\n                attr.start = index;\n                advance(attr[0].length);\n                attr.end = index;\n                match.attrs.push(attr);\n            }\n            if (end) {\n                match.unarySlash = end[1];\n                advance(end[0].length);\n                match.end = index;\n                return match;\n            }\n        }\n    }\n    function handleStartTag(match) {\n        const tagName = match.tagName;\n        const unarySlash = match.unarySlash;\n        if (expectHTML) {\n            if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n                parseEndTag(lastTag);\n            }\n            if (canBeLeftOpenTag(tagName) && lastTag === tagName) {\n                parseEndTag(tagName);\n            }\n        }\n        const unary = isUnaryTag(tagName) || !!unarySlash;\n        const l = match.attrs.length;\n        const attrs = new Array(l);\n        for (let i = 0; i < l; i++) {\n            const args = match.attrs[i];\n            const value = args[3] || args[4] || args[5] || '';\n            const shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n                ? options.shouldDecodeNewlinesForHref\n                : options.shouldDecodeNewlines;\n            attrs[i] = {\n                name: args[1],\n                value: decodeAttr(value, shouldDecodeNewlines)\n            };\n            if (options.outputSourceRange) {\n                attrs[i].start = args.start + args[0].match(/^\\s*/).length;\n                attrs[i].end = args.end;\n            }\n        }\n        if (!unary) {\n            stack.push({\n                tag: tagName,\n                lowerCasedTag: tagName.toLowerCase(),\n                attrs: attrs,\n                start: match.start,\n                end: match.end\n            });\n            lastTag = tagName;\n        }\n        if (options.start) {\n            options.start(tagName, attrs, unary, match.start, match.end);\n        }\n    }\n    function parseEndTag(tagName, start, end) {\n        let pos, lowerCasedTagName;\n        if (start == null)\n            start = index;\n        if (end == null)\n            end = index;\n        // Find the closest opened tag of the same type\n        if (tagName) {\n            lowerCasedTagName = tagName.toLowerCase();\n            for (pos = stack.length - 1; pos >= 0; pos--) {\n                if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n                    break;\n                }\n            }\n        }\n        else {\n            // If no tag name is provided, clean shop\n            pos = 0;\n        }\n        if (pos >= 0) {\n            // Close all the open elements, up the stack\n            for (let i = stack.length - 1; i >= pos; i--) {\n                if ((i > pos || !tagName) && options.warn) {\n                    options.warn(`tag <${stack[i].tag}> has no matching end tag.`, {\n                        start: stack[i].start,\n                        end: stack[i].end\n                    });\n                }\n                if (options.end) {\n                    options.end(stack[i].tag, start, end);\n                }\n            }\n            // Remove the open elements from the stack\n            stack.length = pos;\n            lastTag = pos && stack[pos - 1].tag;\n        }\n        else if (lowerCasedTagName === 'br') {\n            if (options.start) {\n                options.start(tagName, [], true, start, end);\n            }\n        }\n        else if (lowerCasedTagName === 'p') {\n            if (options.start) {\n                options.start(tagName, [], false, start, end);\n            }\n            if (options.end) {\n                options.end(tagName, start, end);\n            }\n        }\n    }\n}\n\nconst onRE = /^@|^v-on:/;\nconst dirRE = /^v-|^@|^:|^#/;\nconst forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\nconst forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\nconst stripParensRE = /^\\(|\\)$/g;\nconst dynamicArgRE = /^\\[.*\\]$/;\nconst argRE = /:(.*)$/;\nconst bindRE = /^:|^\\.|^v-bind:/;\nconst modifierRE = /\\.[^.\\]]+(?=[^\\]]*$)/g;\nconst slotRE = /^v-slot(:|$)|^#/;\nconst lineBreakRE = /[\\r\\n]/;\nconst whitespaceRE = /[ \\f\\t\\r\\n]+/g;\nconst invalidAttributeRE = /[\\s\"'<>\\/=]/;\nconst decodeHTMLCached = cached(he.decode);\nconst emptySlotScopeToken = `_empty_`;\n// configurable state\nlet warn;\nlet delimiters;\nlet transforms;\nlet preTransforms;\nlet postTransforms;\nlet platformIsPreTag;\nlet platformMustUseProp;\nlet platformGetTagNamespace;\nlet maybeComponent;\nfunction createASTElement(tag, attrs, parent) {\n    return {\n        type: 1,\n        tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        rawAttrsMap: {},\n        parent,\n        children: []\n    };\n}\n/**\n * Convert HTML string to AST.\n */\nfunction parse(template, options) {\n    warn = options.warn || baseWarn;\n    platformIsPreTag = options.isPreTag || no;\n    platformMustUseProp = options.mustUseProp || no;\n    platformGetTagNamespace = options.getTagNamespace || no;\n    const isReservedTag = options.isReservedTag || no;\n    maybeComponent = (el) => !!(el.component ||\n        el.attrsMap[':is'] ||\n        el.attrsMap['v-bind:is'] ||\n        !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));\n    transforms = pluckModuleFunction(options.modules, 'transformNode');\n    preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n    postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n    delimiters = options.delimiters;\n    const stack = [];\n    const preserveWhitespace = options.preserveWhitespace !== false;\n    const whitespaceOption = options.whitespace;\n    let root;\n    let currentParent;\n    let inVPre = false;\n    let inPre = false;\n    let warned = false;\n    function warnOnce(msg, range) {\n        if (!warned) {\n            warned = true;\n            warn(msg, range);\n        }\n    }\n    function closeElement(element) {\n        trimEndingWhitespace(element);\n        if (!inVPre && !element.processed) {\n            element = processElement(element, options);\n        }\n        // tree management\n        if (!stack.length && element !== root) {\n            // allow root elements with v-if, v-else-if and v-else\n            if (root.if && (element.elseif || element.else)) {\n                {\n                    checkRootConstraints(element);\n                }\n                addIfCondition(root, {\n                    exp: element.elseif,\n                    block: element\n                });\n            }\n            else {\n                warnOnce(`Component template should contain exactly one root element. ` +\n                    `If you are using v-if on multiple elements, ` +\n                    `use v-else-if to chain them instead.`, { start: element.start });\n            }\n        }\n        if (currentParent && !element.forbidden) {\n            if (element.elseif || element.else) {\n                processIfConditions(element, currentParent);\n            }\n            else {\n                if (element.slotScope) {\n                    // scoped slot\n                    // keep it in the children list so that v-else(-if) conditions can\n                    // find it as the prev node.\n                    const name = element.slotTarget || '\"default\"';\n                    (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n                }\n                currentParent.children.push(element);\n                element.parent = currentParent;\n            }\n        }\n        // final children cleanup\n        // filter out scoped slots\n        element.children = element.children.filter(c => !c.slotScope);\n        // remove trailing whitespace node again\n        trimEndingWhitespace(element);\n        // check pre state\n        if (element.pre) {\n            inVPre = false;\n        }\n        if (platformIsPreTag(element.tag)) {\n            inPre = false;\n        }\n        // apply post-transforms\n        for (let i = 0; i < postTransforms.length; i++) {\n            postTransforms[i](element, options);\n        }\n    }\n    function trimEndingWhitespace(el) {\n        // remove trailing whitespace node\n        if (!inPre) {\n            let lastNode;\n            while ((lastNode = el.children[el.children.length - 1]) &&\n                lastNode.type === 3 &&\n                lastNode.text === ' ') {\n                el.children.pop();\n            }\n        }\n    }\n    function checkRootConstraints(el) {\n        if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(`Cannot use <${el.tag}> as component root element because it may ` +\n                'contain multiple nodes.', { start: el.start });\n        }\n        if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce('Cannot use v-for on stateful component root element because ' +\n                'it renders multiple elements.', el.rawAttrsMap['v-for']);\n        }\n    }\n    parseHTML(template, {\n        warn,\n        expectHTML: options.expectHTML,\n        isUnaryTag: options.isUnaryTag,\n        canBeLeftOpenTag: options.canBeLeftOpenTag,\n        shouldDecodeNewlines: options.shouldDecodeNewlines,\n        shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,\n        shouldKeepComment: options.comments,\n        outputSourceRange: options.outputSourceRange,\n        start(tag, attrs, unary, start, end) {\n            // check namespace.\n            // inherit parent ns if there is one\n            const ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n            // handle IE svg bug\n            /* istanbul ignore if */\n            if (isIE && ns === 'svg') {\n                attrs = guardIESVGBug(attrs);\n            }\n            let element = createASTElement(tag, attrs, currentParent);\n            if (ns) {\n                element.ns = ns;\n            }\n            {\n                if (options.outputSourceRange) {\n                    element.start = start;\n                    element.end = end;\n                    element.rawAttrsMap = element.attrsList.reduce((cumulated, attr) => {\n                        cumulated[attr.name] = attr;\n                        return cumulated;\n                    }, {});\n                }\n                attrs.forEach(attr => {\n                    if (invalidAttributeRE.test(attr.name)) {\n                        warn(`Invalid dynamic argument expression: attribute names cannot contain ` +\n                            `spaces, quotes, <, >, / or =.`, options.outputSourceRange\n                            ? {\n                                start: attr.start + attr.name.indexOf(`[`),\n                                end: attr.start + attr.name.length\n                            }\n                            : undefined);\n                    }\n                });\n            }\n            if (isForbiddenTag(element) && !isServerRendering()) {\n                element.forbidden = true;\n                warn('Templates should only be responsible for mapping the state to the ' +\n                        'UI. Avoid placing tags with side-effects in your templates, such as ' +\n                        `<${tag}>` +\n                        ', as they will not be parsed.', { start: element.start });\n            }\n            // apply pre-transforms\n            for (let i = 0; i < preTransforms.length; i++) {\n                element = preTransforms[i](element, options) || element;\n            }\n            if (!inVPre) {\n                processPre(element);\n                if (element.pre) {\n                    inVPre = true;\n                }\n            }\n            if (platformIsPreTag(element.tag)) {\n                inPre = true;\n            }\n            if (inVPre) {\n                processRawAttrs(element);\n            }\n            else if (!element.processed) {\n                // structural directives\n                processFor(element);\n                processIf(element);\n                processOnce(element);\n            }\n            if (!root) {\n                root = element;\n                {\n                    checkRootConstraints(root);\n                }\n            }\n            if (!unary) {\n                currentParent = element;\n                stack.push(element);\n            }\n            else {\n                closeElement(element);\n            }\n        },\n        end(tag, start, end) {\n            const element = stack[stack.length - 1];\n            // pop stack\n            stack.length -= 1;\n            currentParent = stack[stack.length - 1];\n            if (options.outputSourceRange) {\n                element.end = end;\n            }\n            closeElement(element);\n        },\n        chars(text, start, end) {\n            if (!currentParent) {\n                {\n                    if (text === template) {\n                        warnOnce('Component template requires a root element, rather than just text.', { start });\n                    }\n                    else if ((text = text.trim())) {\n                        warnOnce(`text \"${text}\" outside root element will be ignored.`, {\n                            start\n                        });\n                    }\n                }\n                return;\n            }\n            // IE textarea placeholder bug\n            /* istanbul ignore if */\n            if (isIE &&\n                currentParent.tag === 'textarea' &&\n                currentParent.attrsMap.placeholder === text) {\n                return;\n            }\n            const children = currentParent.children;\n            if (inPre || text.trim()) {\n                text = isTextTag(currentParent)\n                    ? text\n                    : decodeHTMLCached(text);\n            }\n            else if (!children.length) {\n                // remove the whitespace-only node right after an opening tag\n                text = '';\n            }\n            else if (whitespaceOption) {\n                if (whitespaceOption === 'condense') {\n                    // in condense mode, remove the whitespace node if it contains\n                    // line break, otherwise condense to a single space\n                    text = lineBreakRE.test(text) ? '' : ' ';\n                }\n                else {\n                    text = ' ';\n                }\n            }\n            else {\n                text = preserveWhitespace ? ' ' : '';\n            }\n            if (text) {\n                if (!inPre && whitespaceOption === 'condense') {\n                    // condense consecutive whitespaces into single space\n                    text = text.replace(whitespaceRE, ' ');\n                }\n                let res;\n                let child;\n                if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {\n                    child = {\n                        type: 2,\n                        expression: res.expression,\n                        tokens: res.tokens,\n                        text\n                    };\n                }\n                else if (text !== ' ' ||\n                    !children.length ||\n                    children[children.length - 1].text !== ' ') {\n                    child = {\n                        type: 3,\n                        text\n                    };\n                }\n                if (child) {\n                    if (options.outputSourceRange) {\n                        child.start = start;\n                        child.end = end;\n                    }\n                    children.push(child);\n                }\n            }\n        },\n        comment(text, start, end) {\n            // adding anything as a sibling to the root node is forbidden\n            // comments should still be allowed, but ignored\n            if (currentParent) {\n                const child = {\n                    type: 3,\n                    text,\n                    isComment: true\n                };\n                if (options.outputSourceRange) {\n                    child.start = start;\n                    child.end = end;\n                }\n                currentParent.children.push(child);\n            }\n        }\n    });\n    return root;\n}\nfunction processPre(el) {\n    if (getAndRemoveAttr(el, 'v-pre') != null) {\n        el.pre = true;\n    }\n}\nfunction processRawAttrs(el) {\n    const list = el.attrsList;\n    const len = list.length;\n    if (len) {\n        const attrs = (el.attrs = new Array(len));\n        for (let i = 0; i < len; i++) {\n            attrs[i] = {\n                name: list[i].name,\n                value: JSON.stringify(list[i].value)\n            };\n            if (list[i].start != null) {\n                attrs[i].start = list[i].start;\n                attrs[i].end = list[i].end;\n            }\n        }\n    }\n    else if (!el.pre) {\n        // non root node in pre blocks with no attributes\n        el.plain = true;\n    }\n}\nfunction processElement(element, options) {\n    processKey(element);\n    // determine whether this is a plain element after\n    // removing structural attributes\n    element.plain =\n        !element.key && !element.scopedSlots && !element.attrsList.length;\n    processRef(element);\n    processSlotContent(element);\n    processSlotOutlet(element);\n    processComponent(element);\n    for (let i = 0; i < transforms.length; i++) {\n        element = transforms[i](element, options) || element;\n    }\n    processAttrs(element);\n    return element;\n}\nfunction processKey(el) {\n    const exp = getBindingAttr(el, 'key');\n    if (exp) {\n        {\n            if (el.tag === 'template') {\n                warn(`<template> cannot be keyed. Place the key on real elements instead.`, getRawBindingAttr(el, 'key'));\n            }\n            if (el.for) {\n                const iterator = el.iterator2 || el.iterator1;\n                const parent = el.parent;\n                if (iterator &&\n                    iterator === exp &&\n                    parent &&\n                    parent.tag === 'transition-group') {\n                    warn(`Do not use v-for index as key on <transition-group> children, ` +\n                        `this is the same as not using keys.`, getRawBindingAttr(el, 'key'), true /* tip */);\n                }\n            }\n        }\n        el.key = exp;\n    }\n}\nfunction processRef(el) {\n    const ref = getBindingAttr(el, 'ref');\n    if (ref) {\n        el.ref = ref;\n        el.refInFor = checkInFor(el);\n    }\n}\nfunction processFor(el) {\n    let exp;\n    if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n        const res = parseFor(exp);\n        if (res) {\n            extend(el, res);\n        }\n        else {\n            warn(`Invalid v-for expression: ${exp}`, el.rawAttrsMap['v-for']);\n        }\n    }\n}\nfunction parseFor(exp) {\n    const inMatch = exp.match(forAliasRE);\n    if (!inMatch)\n        return;\n    const res = {};\n    res.for = inMatch[2].trim();\n    const alias = inMatch[1].trim().replace(stripParensRE, '');\n    const iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n        res.alias = alias.replace(forIteratorRE, '').trim();\n        res.iterator1 = iteratorMatch[1].trim();\n        if (iteratorMatch[2]) {\n            res.iterator2 = iteratorMatch[2].trim();\n        }\n    }\n    else {\n        res.alias = alias;\n    }\n    return res;\n}\nfunction processIf(el) {\n    const exp = getAndRemoveAttr(el, 'v-if');\n    if (exp) {\n        el.if = exp;\n        addIfCondition(el, {\n            exp: exp,\n            block: el\n        });\n    }\n    else {\n        if (getAndRemoveAttr(el, 'v-else') != null) {\n            el.else = true;\n        }\n        const elseif = getAndRemoveAttr(el, 'v-else-if');\n        if (elseif) {\n            el.elseif = elseif;\n        }\n    }\n}\nfunction processIfConditions(el, parent) {\n    const prev = findPrevElement(parent.children);\n    if (prev && prev.if) {\n        addIfCondition(prev, {\n            exp: el.elseif,\n            block: el\n        });\n    }\n    else {\n        warn(`v-${el.elseif ? 'else-if=\"' + el.elseif + '\"' : 'else'} ` +\n            `used on element <${el.tag}> without corresponding v-if.`, el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);\n    }\n}\nfunction findPrevElement(children) {\n    let i = children.length;\n    while (i--) {\n        if (children[i].type === 1) {\n            return children[i];\n        }\n        else {\n            if (children[i].text !== ' ') {\n                warn(`text \"${children[i].text.trim()}\" between v-if and v-else(-if) ` +\n                    `will be ignored.`, children[i]);\n            }\n            children.pop();\n        }\n    }\n}\nfunction addIfCondition(el, condition) {\n    if (!el.ifConditions) {\n        el.ifConditions = [];\n    }\n    el.ifConditions.push(condition);\n}\nfunction processOnce(el) {\n    const once = getAndRemoveAttr(el, 'v-once');\n    if (once != null) {\n        el.once = true;\n    }\n}\n// handle content being passed to a component as slot,\n// e.g. <template slot=\"xxx\">, <div slot-scope=\"xxx\">\nfunction processSlotContent(el) {\n    let slotScope;\n    if (el.tag === 'template') {\n        slotScope = getAndRemoveAttr(el, 'scope');\n        /* istanbul ignore if */\n        if (slotScope) {\n            warn(`the \"scope\" attribute for scoped slots have been deprecated and ` +\n                `replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute ` +\n                `can also be used on plain elements in addition to <template> to ` +\n                `denote scoped slots.`, el.rawAttrsMap['scope'], true);\n        }\n        el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');\n    }\n    else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {\n        /* istanbul ignore if */\n        if (el.attrsMap['v-for']) {\n            warn(`Ambiguous combined usage of slot-scope and v-for on <${el.tag}> ` +\n                `(v-for takes higher priority). Use a wrapper <template> for the ` +\n                `scoped slot to make it clearer.`, el.rawAttrsMap['slot-scope'], true);\n        }\n        el.slotScope = slotScope;\n    }\n    // slot=\"xxx\"\n    const slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n        el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n        el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);\n        // preserve slot as an attribute for native shadow DOM compat\n        // only for non-scoped slots.\n        if (el.tag !== 'template' && !el.slotScope) {\n            addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));\n        }\n    }\n    // 2.6 v-slot syntax\n    {\n        if (el.tag === 'template') {\n            // v-slot on <template>\n            const slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                {\n                    if (el.slotTarget || el.slotScope) {\n                        warn(`Unexpected mixed usage of different slot syntaxes.`, el);\n                    }\n                    if (el.parent && !maybeComponent(el.parent)) {\n                        warn(`<template v-slot> can only appear at the root level inside ` +\n                            `the receiving component`, el);\n                    }\n                }\n                const { name, dynamic } = getSlotName(slotBinding);\n                el.slotTarget = name;\n                el.slotTargetDynamic = dynamic;\n                el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf\n            }\n        }\n        else {\n            // v-slot on component, denotes default slot\n            const slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                {\n                    if (!maybeComponent(el)) {\n                        warn(`v-slot can only be used on components or <template>.`, slotBinding);\n                    }\n                    if (el.slotScope || el.slotTarget) {\n                        warn(`Unexpected mixed usage of different slot syntaxes.`, el);\n                    }\n                    if (el.scopedSlots) {\n                        warn(`To avoid scope ambiguity, the default slot should also use ` +\n                            `<template> syntax when there are other named slots.`, slotBinding);\n                    }\n                }\n                // add the component's children to its default slot\n                const slots = el.scopedSlots || (el.scopedSlots = {});\n                const { name, dynamic } = getSlotName(slotBinding);\n                const slotContainer = (slots[name] = createASTElement('template', [], el));\n                slotContainer.slotTarget = name;\n                slotContainer.slotTargetDynamic = dynamic;\n                slotContainer.children = el.children.filter((c) => {\n                    if (!c.slotScope) {\n                        c.parent = slotContainer;\n                        return true;\n                    }\n                });\n                slotContainer.slotScope = slotBinding.value || emptySlotScopeToken;\n                // remove children as they are returned from scopedSlots now\n                el.children = [];\n                // mark el non-plain so data gets generated\n                el.plain = false;\n            }\n        }\n    }\n}\nfunction getSlotName(binding) {\n    let name = binding.name.replace(slotRE, '');\n    if (!name) {\n        if (binding.name[0] !== '#') {\n            name = 'default';\n        }\n        else {\n            warn(`v-slot shorthand syntax requires a slot name.`, binding);\n        }\n    }\n    return dynamicArgRE.test(name)\n        ? // dynamic [name]\n            { name: name.slice(1, -1), dynamic: true }\n        : // static name\n            { name: `\"${name}\"`, dynamic: false };\n}\n// handle <slot/> outlets\nfunction processSlotOutlet(el) {\n    if (el.tag === 'slot') {\n        el.slotName = getBindingAttr(el, 'name');\n        if (el.key) {\n            warn(`\\`key\\` does not work on <slot> because slots are abstract outlets ` +\n                `and can possibly expand into multiple elements. ` +\n                `Use the key on a wrapping element instead.`, getRawBindingAttr(el, 'key'));\n        }\n    }\n}\nfunction processComponent(el) {\n    let binding;\n    if ((binding = getBindingAttr(el, 'is'))) {\n        el.component = binding;\n    }\n    if (getAndRemoveAttr(el, 'inline-template') != null) {\n        el.inlineTemplate = true;\n    }\n}\nfunction processAttrs(el) {\n    const list = el.attrsList;\n    let i, l, name, rawName, value, modifiers, syncGen, isDynamic;\n    for (i = 0, l = list.length; i < l; i++) {\n        name = rawName = list[i].name;\n        value = list[i].value;\n        if (dirRE.test(name)) {\n            // mark element as dynamic\n            el.hasBindings = true;\n            // modifiers\n            modifiers = parseModifiers(name.replace(dirRE, ''));\n            // support .foo shorthand syntax for the .prop modifier\n            if (modifiers) {\n                name = name.replace(modifierRE, '');\n            }\n            if (bindRE.test(name)) {\n                // v-bind\n                name = name.replace(bindRE, '');\n                value = parseFilters(value);\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                if (value.trim().length === 0) {\n                    warn(`The value for a v-bind expression cannot be empty. Found in \"v-bind:${name}\"`);\n                }\n                if (modifiers) {\n                    if (modifiers.prop && !isDynamic) {\n                        name = camelize(name);\n                        if (name === 'innerHtml')\n                            name = 'innerHTML';\n                    }\n                    if (modifiers.camel && !isDynamic) {\n                        name = camelize(name);\n                    }\n                    if (modifiers.sync) {\n                        syncGen = genAssignmentCode(value, `$event`);\n                        if (!isDynamic) {\n                            addHandler(el, `update:${camelize(name)}`, syncGen, null, false, warn, list[i]);\n                            if (hyphenate(name) !== camelize(name)) {\n                                addHandler(el, `update:${hyphenate(name)}`, syncGen, null, false, warn, list[i]);\n                            }\n                        }\n                        else {\n                            // handler w/ dynamic event name\n                            addHandler(el, `\"update:\"+(${name})`, syncGen, null, false, warn, list[i], true // dynamic\n                            );\n                        }\n                    }\n                }\n                if ((modifiers && modifiers.prop) ||\n                    (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {\n                    addProp(el, name, value, list[i], isDynamic);\n                }\n                else {\n                    addAttr(el, name, value, list[i], isDynamic);\n                }\n            }\n            else if (onRE.test(name)) {\n                // v-on\n                name = name.replace(onRE, '');\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);\n            }\n            else {\n                // normal directives\n                name = name.replace(dirRE, '');\n                // parse arg\n                const argMatch = name.match(argRE);\n                let arg = argMatch && argMatch[1];\n                isDynamic = false;\n                if (arg) {\n                    name = name.slice(0, -(arg.length + 1));\n                    if (dynamicArgRE.test(arg)) {\n                        arg = arg.slice(1, -1);\n                        isDynamic = true;\n                    }\n                }\n                addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);\n                if (name === 'model') {\n                    checkForAliasModel(el, value);\n                }\n            }\n        }\n        else {\n            // literal attribute\n            {\n                const res = parseText(value, delimiters);\n                if (res) {\n                    warn(`${name}=\"${value}\": ` +\n                        'Interpolation inside attributes has been removed. ' +\n                        'Use v-bind or the colon shorthand instead. For example, ' +\n                        'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.', list[i]);\n                }\n            }\n            addAttr(el, name, JSON.stringify(value), list[i]);\n            // #6887 firefox doesn't update muted state if set via attribute\n            // even immediately after element creation\n            if (!el.component &&\n                name === 'muted' &&\n                platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n                addProp(el, name, 'true', list[i]);\n            }\n        }\n    }\n}\nfunction checkInFor(el) {\n    let parent = el;\n    while (parent) {\n        if (parent.for !== undefined) {\n            return true;\n        }\n        parent = parent.parent;\n    }\n    return false;\n}\nfunction parseModifiers(name) {\n    const match = name.match(modifierRE);\n    if (match) {\n        const ret = {};\n        match.forEach(m => {\n            ret[m.slice(1)] = true;\n        });\n        return ret;\n    }\n}\nfunction makeAttrsMap(attrs) {\n    const map = {};\n    for (let i = 0, l = attrs.length; i < l; i++) {\n        if (map[attrs[i].name] && !isIE && !isEdge) {\n            warn('duplicate attribute: ' + attrs[i].name, attrs[i]);\n        }\n        map[attrs[i].name] = attrs[i].value;\n    }\n    return map;\n}\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag(el) {\n    return el.tag === 'script' || el.tag === 'style';\n}\nfunction isForbiddenTag(el) {\n    return (el.tag === 'style' ||\n        (el.tag === 'script' &&\n            (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));\n}\nconst ieNSBug = /^xmlns:NS\\d+/;\nconst ieNSPrefix = /^NS\\d+:/;\n/* istanbul ignore next */\nfunction guardIESVGBug(attrs) {\n    const res = [];\n    for (let i = 0; i < attrs.length; i++) {\n        const attr = attrs[i];\n        if (!ieNSBug.test(attr.name)) {\n            attr.name = attr.name.replace(ieNSPrefix, '');\n            res.push(attr);\n        }\n    }\n    return res;\n}\nfunction checkForAliasModel(el, value) {\n    let _el = el;\n    while (_el) {\n        if (_el.for && _el.alias === value) {\n            warn(`<${el.tag} v-model=\"${value}\">: ` +\n                `You are binding v-model directly to a v-for iteration alias. ` +\n                `This will not be able to modify the v-for source array because ` +\n                `writing to the alias is like modifying a function local variable. ` +\n                `Consider using an array of objects and use v-model on an object property instead.`, el.rawAttrsMap['v-model']);\n        }\n        _el = _el.parent;\n    }\n}\n\n/**\n * Expand input[v-model] with dynamic type bindings into v-if-else chains\n * Turn this:\n *   <input v-model=\"data[type]\" :type=\"type\">\n * into this:\n *   <input v-if=\"type === 'checkbox'\" type=\"checkbox\" v-model=\"data[type]\">\n *   <input v-else-if=\"type === 'radio'\" type=\"radio\" v-model=\"data[type]\">\n *   <input v-else :type=\"type\" v-model=\"data[type]\">\n */\nfunction preTransformNode(el, options) {\n    if (el.tag === 'input') {\n        const map = el.attrsMap;\n        if (!map['v-model']) {\n            return;\n        }\n        let typeBinding;\n        if (map[':type'] || map['v-bind:type']) {\n            typeBinding = getBindingAttr(el, 'type');\n        }\n        if (!map.type && !typeBinding && map['v-bind']) {\n            typeBinding = `(${map['v-bind']}).type`;\n        }\n        if (typeBinding) {\n            const ifCondition = getAndRemoveAttr(el, 'v-if', true);\n            const ifConditionExtra = ifCondition ? `&&(${ifCondition})` : ``;\n            const hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n            const elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n            // 1. checkbox\n            const branch0 = cloneASTElement(el);\n            // process for on the main node\n            processFor(branch0);\n            addRawAttr(branch0, 'type', 'checkbox');\n            processElement(branch0, options);\n            branch0.processed = true; // prevent it from double-processed\n            branch0.if = `(${typeBinding})==='checkbox'` + ifConditionExtra;\n            addIfCondition(branch0, {\n                exp: branch0.if,\n                block: branch0\n            });\n            // 2. add radio else-if condition\n            const branch1 = cloneASTElement(el);\n            getAndRemoveAttr(branch1, 'v-for', true);\n            addRawAttr(branch1, 'type', 'radio');\n            processElement(branch1, options);\n            addIfCondition(branch0, {\n                exp: `(${typeBinding})==='radio'` + ifConditionExtra,\n                block: branch1\n            });\n            // 3. other\n            const branch2 = cloneASTElement(el);\n            getAndRemoveAttr(branch2, 'v-for', true);\n            addRawAttr(branch2, ':type', typeBinding);\n            processElement(branch2, options);\n            addIfCondition(branch0, {\n                exp: ifCondition,\n                block: branch2\n            });\n            if (hasElse) {\n                branch0.else = true;\n            }\n            else if (elseIfCondition) {\n                branch0.elseif = elseIfCondition;\n            }\n            return branch0;\n        }\n    }\n}\nfunction cloneASTElement(el) {\n    return createASTElement(el.tag, el.attrsList.slice(), el.parent);\n}\nvar model = {\n    preTransformNode\n};\n\nvar modules = [klass, style, model];\n\nfunction text(el, dir) {\n    if (dir.value) {\n        addProp(el, 'textContent', `_s(${dir.value})`, dir);\n    }\n}\n\nfunction html(el, dir) {\n    if (dir.value) {\n        addProp(el, 'innerHTML', `_s(${dir.value})`, dir);\n    }\n}\n\nvar directives = {\n    model: model$1,\n    text,\n    html\n};\n\nconst baseOptions = {\n    expectHTML: true,\n    modules,\n    directives,\n    isPreTag,\n    isUnaryTag,\n    mustUseProp,\n    canBeLeftOpenTag,\n    isReservedTag,\n    getTagNamespace,\n    staticKeys: genStaticKeys$1(modules)\n};\n\nlet isStaticKey;\nlet isPlatformReservedTag;\nconst genStaticKeysCached = cached(genStaticKeys);\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize(root, options) {\n    if (!root)\n        return;\n    isStaticKey = genStaticKeysCached(options.staticKeys || '');\n    isPlatformReservedTag = options.isReservedTag || no;\n    // first pass: mark all non-static nodes.\n    markStatic(root);\n    // second pass: mark static roots.\n    markStaticRoots(root, false);\n}\nfunction genStaticKeys(keys) {\n    return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +\n        (keys ? ',' + keys : ''));\n}\nfunction markStatic(node) {\n    node.static = isStatic(node);\n    if (node.type === 1) {\n        // do not make component slot content static. this avoids\n        // 1. components not able to mutate slot nodes\n        // 2. static slot content fails for hot-reloading\n        if (!isPlatformReservedTag(node.tag) &&\n            node.tag !== 'slot' &&\n            node.attrsMap['inline-template'] == null) {\n            return;\n        }\n        for (let i = 0, l = node.children.length; i < l; i++) {\n            const child = node.children[i];\n            markStatic(child);\n            if (!child.static) {\n                node.static = false;\n            }\n        }\n        if (node.ifConditions) {\n            for (let i = 1, l = node.ifConditions.length; i < l; i++) {\n                const block = node.ifConditions[i].block;\n                markStatic(block);\n                if (!block.static) {\n                    node.static = false;\n                }\n            }\n        }\n    }\n}\nfunction markStaticRoots(node, isInFor) {\n    if (node.type === 1) {\n        if (node.static || node.once) {\n            node.staticInFor = isInFor;\n        }\n        // For a node to qualify as a static root, it should have children that\n        // are not just static text. Otherwise the cost of hoisting out will\n        // outweigh the benefits and it's better off to just always render it fresh.\n        if (node.static &&\n            node.children.length &&\n            !(node.children.length === 1 && node.children[0].type === 3)) {\n            node.staticRoot = true;\n            return;\n        }\n        else {\n            node.staticRoot = false;\n        }\n        if (node.children) {\n            for (let i = 0, l = node.children.length; i < l; i++) {\n                markStaticRoots(node.children[i], isInFor || !!node.for);\n            }\n        }\n        if (node.ifConditions) {\n            for (let i = 1, l = node.ifConditions.length; i < l; i++) {\n                markStaticRoots(node.ifConditions[i].block, isInFor);\n            }\n        }\n    }\n}\nfunction isStatic(node) {\n    if (node.type === 2) {\n        // expression\n        return false;\n    }\n    if (node.type === 3) {\n        // text\n        return true;\n    }\n    return !!(node.pre ||\n        (!node.hasBindings && // no dynamic bindings\n            !node.if &&\n            !node.for && // not v-if or v-for or v-else\n            !isBuiltInTag(node.tag) && // not a built-in\n            isPlatformReservedTag(node.tag) && // not a component\n            !isDirectChildOfTemplateFor(node) &&\n            Object.keys(node).every(isStaticKey)));\n}\nfunction isDirectChildOfTemplateFor(node) {\n    while (node.parent) {\n        node = node.parent;\n        if (node.tag !== 'template') {\n            return false;\n        }\n        if (node.for) {\n            return true;\n        }\n    }\n    return false;\n}\n\nconst fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/;\nconst fnInvokeRE = /\\([^)]*?\\);*$/;\nconst simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n// KeyboardEvent.keyCode aliases\nconst keyCodes = {\n    esc: 27,\n    tab: 9,\n    enter: 13,\n    space: 32,\n    up: 38,\n    left: 37,\n    right: 39,\n    down: 40,\n    delete: [8, 46]\n};\n// KeyboardEvent.key aliases\nconst keyNames = {\n    // #7880: IE11 and Edge use `Esc` for Escape key name.\n    esc: ['Esc', 'Escape'],\n    tab: 'Tab',\n    enter: 'Enter',\n    // #9112: IE11 uses `Spacebar` for Space key name.\n    space: [' ', 'Spacebar'],\n    // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n    up: ['Up', 'ArrowUp'],\n    left: ['Left', 'ArrowLeft'],\n    right: ['Right', 'ArrowRight'],\n    down: ['Down', 'ArrowDown'],\n    // #9112: IE11 uses `Del` for Delete key name.\n    delete: ['Backspace', 'Delete', 'Del']\n};\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nconst genGuard = condition => `if(${condition})return null;`;\nconst modifierCode = {\n    stop: '$event.stopPropagation();',\n    prevent: '$event.preventDefault();',\n    self: genGuard(`$event.target !== $event.currentTarget`),\n    ctrl: genGuard(`!$event.ctrlKey`),\n    shift: genGuard(`!$event.shiftKey`),\n    alt: genGuard(`!$event.altKey`),\n    meta: genGuard(`!$event.metaKey`),\n    left: genGuard(`'button' in $event && $event.button !== 0`),\n    middle: genGuard(`'button' in $event && $event.button !== 1`),\n    right: genGuard(`'button' in $event && $event.button !== 2`)\n};\nfunction genHandlers(events, isNative) {\n    const prefix = isNative ? 'nativeOn:' : 'on:';\n    let staticHandlers = ``;\n    let dynamicHandlers = ``;\n    for (const name in events) {\n        const handlerCode = genHandler(events[name]);\n        //@ts-expect-error\n        if (events[name] && events[name].dynamic) {\n            dynamicHandlers += `${name},${handlerCode},`;\n        }\n        else {\n            staticHandlers += `\"${name}\":${handlerCode},`;\n        }\n    }\n    staticHandlers = `{${staticHandlers.slice(0, -1)}}`;\n    if (dynamicHandlers) {\n        return prefix + `_d(${staticHandlers},[${dynamicHandlers.slice(0, -1)}])`;\n    }\n    else {\n        return prefix + staticHandlers;\n    }\n}\nfunction genHandler(handler) {\n    if (!handler) {\n        return 'function(){}';\n    }\n    if (Array.isArray(handler)) {\n        return `[${handler.map(handler => genHandler(handler)).join(',')}]`;\n    }\n    const isMethodPath = simplePathRE.test(handler.value);\n    const isFunctionExpression = fnExpRE.test(handler.value);\n    const isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));\n    if (!handler.modifiers) {\n        if (isMethodPath || isFunctionExpression) {\n            return handler.value;\n        }\n        return `function($event){${isFunctionInvocation ? `return ${handler.value}` : handler.value}}`; // inline statement\n    }\n    else {\n        let code = '';\n        let genModifierCode = '';\n        const keys = [];\n        for (const key in handler.modifiers) {\n            if (modifierCode[key]) {\n                genModifierCode += modifierCode[key];\n                // left/right\n                if (keyCodes[key]) {\n                    keys.push(key);\n                }\n            }\n            else if (key === 'exact') {\n                const modifiers = handler.modifiers;\n                genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']\n                    .filter(keyModifier => !modifiers[keyModifier])\n                    .map(keyModifier => `$event.${keyModifier}Key`)\n                    .join('||'));\n            }\n            else {\n                keys.push(key);\n            }\n        }\n        if (keys.length) {\n            code += genKeyFilter(keys);\n        }\n        // Make sure modifiers like prevent and stop get executed after key filtering\n        if (genModifierCode) {\n            code += genModifierCode;\n        }\n        const handlerCode = isMethodPath\n            ? `return ${handler.value}.apply(null, arguments)`\n            : isFunctionExpression\n                ? `return (${handler.value}).apply(null, arguments)`\n                : isFunctionInvocation\n                    ? `return ${handler.value}`\n                    : handler.value;\n        return `function($event){${code}${handlerCode}}`;\n    }\n}\nfunction genKeyFilter(keys) {\n    return (\n    // make sure the key filters only apply to KeyboardEvents\n    // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake\n    // key events that do not have keyCode property...\n    `if(!$event.type.indexOf('key')&&` +\n        `${keys.map(genFilterCode).join('&&')})return null;`);\n}\nfunction genFilterCode(key) {\n    const keyVal = parseInt(key, 10);\n    if (keyVal) {\n        return `$event.keyCode!==${keyVal}`;\n    }\n    const keyCode = keyCodes[key];\n    const keyName = keyNames[key];\n    return (`_k($event.keyCode,` +\n        `${JSON.stringify(key)},` +\n        `${JSON.stringify(keyCode)},` +\n        `$event.key,` +\n        `${JSON.stringify(keyName)}` +\n        `)`);\n}\n\nfunction on(el, dir) {\n    if (dir.modifiers) {\n        warn$2(`v-on without argument does not support modifiers.`);\n    }\n    el.wrapListeners = (code) => `_g(${code},${dir.value})`;\n}\n\nfunction bind(el, dir) {\n    el.wrapData = (code) => {\n        return `_b(${code},'${el.tag}',${dir.value},${dir.modifiers && dir.modifiers.prop ? 'true' : 'false'}${dir.modifiers && dir.modifiers.sync ? ',true' : ''})`;\n    };\n}\n\nvar baseDirectives = {\n    on,\n    bind,\n    cloak: noop\n};\n\nclass CodegenState {\n    constructor(options) {\n        this.options = options;\n        this.warn = options.warn || baseWarn;\n        this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n        this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n        this.directives = extend(extend({}, baseDirectives), options.directives);\n        const isReservedTag = options.isReservedTag || no;\n        this.maybeComponent = (el) => !!el.component || !isReservedTag(el.tag);\n        this.onceId = 0;\n        this.staticRenderFns = [];\n        this.pre = false;\n    }\n}\nfunction generate(ast, options) {\n    const state = new CodegenState(options);\n    // fix #11483, Root level <script> tags should not be rendered.\n    const code = ast\n        ? ast.tag === 'script'\n            ? 'null'\n            : genElement(ast, state)\n        : '_c(\"div\")';\n    return {\n        render: `with(this){return ${code}}`,\n        staticRenderFns: state.staticRenderFns\n    };\n}\nfunction genElement(el, state) {\n    if (el.parent) {\n        el.pre = el.pre || el.parent.pre;\n    }\n    if (el.staticRoot && !el.staticProcessed) {\n        return genStatic(el, state);\n    }\n    else if (el.once && !el.onceProcessed) {\n        return genOnce(el, state);\n    }\n    else if (el.for && !el.forProcessed) {\n        return genFor(el, state);\n    }\n    else if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.tag === 'template' && !el.slotTarget && !state.pre) {\n        return genChildren(el, state) || 'void 0';\n    }\n    else if (el.tag === 'slot') {\n        return genSlot(el, state);\n    }\n    else {\n        // component or element\n        let code;\n        if (el.component) {\n            code = genComponent(el.component, el, state);\n        }\n        else {\n            let data;\n            const maybeComponent = state.maybeComponent(el);\n            if (!el.plain || (el.pre && maybeComponent)) {\n                data = genData(el, state);\n            }\n            let tag;\n            // check if this is a component in <script setup>\n            const bindings = state.options.bindings;\n            if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {\n                tag = checkBindingType(bindings, el.tag);\n            }\n            if (!tag)\n                tag = `'${el.tag}'`;\n            const children = el.inlineTemplate ? null : genChildren(el, state, true);\n            code = `_c(${tag}${data ? `,${data}` : '' // data\n            }${children ? `,${children}` : '' // children\n            })`;\n        }\n        // module transforms\n        for (let i = 0; i < state.transforms.length; i++) {\n            code = state.transforms[i](el, code);\n        }\n        return code;\n    }\n}\nfunction checkBindingType(bindings, key) {\n    const camelName = camelize(key);\n    const PascalName = capitalize(camelName);\n    const checkType = (type) => {\n        if (bindings[key] === type) {\n            return key;\n        }\n        if (bindings[camelName] === type) {\n            return camelName;\n        }\n        if (bindings[PascalName] === type) {\n            return PascalName;\n        }\n    };\n    const fromConst = checkType(\"setup-const\" /* BindingTypes.SETUP_CONST */) ||\n        checkType(\"setup-reactive-const\" /* BindingTypes.SETUP_REACTIVE_CONST */);\n    if (fromConst) {\n        return fromConst;\n    }\n    const fromMaybeRef = checkType(\"setup-let\" /* BindingTypes.SETUP_LET */) ||\n        checkType(\"setup-ref\" /* BindingTypes.SETUP_REF */) ||\n        checkType(\"setup-maybe-ref\" /* BindingTypes.SETUP_MAYBE_REF */);\n    if (fromMaybeRef) {\n        return fromMaybeRef;\n    }\n}\n// hoist static sub-trees out\nfunction genStatic(el, state) {\n    el.staticProcessed = true;\n    // Some elements (templates) need to behave differently inside of a v-pre\n    // node.  All pre nodes are static roots, so we can use this as a location to\n    // wrap a state change and reset it upon exiting the pre node.\n    const originalPreState = state.pre;\n    if (el.pre) {\n        state.pre = el.pre;\n    }\n    state.staticRenderFns.push(`with(this){return ${genElement(el, state)}}`);\n    state.pre = originalPreState;\n    return `_m(${state.staticRenderFns.length - 1}${el.staticInFor ? ',true' : ''})`;\n}\n// v-once\nfunction genOnce(el, state) {\n    el.onceProcessed = true;\n    if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.staticInFor) {\n        let key = '';\n        let parent = el.parent;\n        while (parent) {\n            if (parent.for) {\n                key = parent.key;\n                break;\n            }\n            parent = parent.parent;\n        }\n        if (!key) {\n            state.warn(`v-once can only be used inside v-for that is keyed. `, el.rawAttrsMap['v-once']);\n            return genElement(el, state);\n        }\n        return `_o(${genElement(el, state)},${state.onceId++},${key})`;\n    }\n    else {\n        return genStatic(el, state);\n    }\n}\nfunction genIf(el, state, altGen, altEmpty) {\n    el.ifProcessed = true; // avoid recursion\n    return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);\n}\nfunction genIfConditions(conditions, state, altGen, altEmpty) {\n    if (!conditions.length) {\n        return altEmpty || '_e()';\n    }\n    const condition = conditions.shift();\n    if (condition.exp) {\n        return `(${condition.exp})?${genTernaryExp(condition.block)}:${genIfConditions(conditions, state, altGen, altEmpty)}`;\n    }\n    else {\n        return `${genTernaryExp(condition.block)}`;\n    }\n    // v-if with v-once should generate code like (a)?_m(0):_m(1)\n    function genTernaryExp(el) {\n        return altGen\n            ? altGen(el, state)\n            : el.once\n                ? genOnce(el, state)\n                : genElement(el, state);\n    }\n}\nfunction genFor(el, state, altGen, altHelper) {\n    const exp = el.for;\n    const alias = el.alias;\n    const iterator1 = el.iterator1 ? `,${el.iterator1}` : '';\n    const iterator2 = el.iterator2 ? `,${el.iterator2}` : '';\n    if (state.maybeComponent(el) &&\n        el.tag !== 'slot' &&\n        el.tag !== 'template' &&\n        !el.key) {\n        state.warn(`<${el.tag} v-for=\"${alias} in ${exp}\">: component lists rendered with ` +\n            `v-for should have explicit keys. ` +\n            `See https://v2.vuejs.org/v2/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);\n    }\n    el.forProcessed = true; // avoid recursion\n    return (`${altHelper || '_l'}((${exp}),` +\n        `function(${alias}${iterator1}${iterator2}){` +\n        `return ${(altGen || genElement)(el, state)}` +\n        '})');\n}\nfunction genData(el, state) {\n    let data = '{';\n    // directives first.\n    // directives may mutate the el's other properties before they are generated.\n    const dirs = genDirectives(el, state);\n    if (dirs)\n        data += dirs + ',';\n    // key\n    if (el.key) {\n        data += `key:${el.key},`;\n    }\n    // ref\n    if (el.ref) {\n        data += `ref:${el.ref},`;\n    }\n    if (el.refInFor) {\n        data += `refInFor:true,`;\n    }\n    // pre\n    if (el.pre) {\n        data += `pre:true,`;\n    }\n    // record original tag name for components using \"is\" attribute\n    if (el.component) {\n        data += `tag:\"${el.tag}\",`;\n    }\n    // module data generation functions\n    for (let i = 0; i < state.dataGenFns.length; i++) {\n        data += state.dataGenFns[i](el);\n    }\n    // attributes\n    if (el.attrs) {\n        data += `attrs:${genProps(el.attrs)},`;\n    }\n    // DOM props\n    if (el.props) {\n        data += `domProps:${genProps(el.props)},`;\n    }\n    // event handlers\n    if (el.events) {\n        data += `${genHandlers(el.events, false)},`;\n    }\n    if (el.nativeEvents) {\n        data += `${genHandlers(el.nativeEvents, true)},`;\n    }\n    // slot target\n    // only for non-scoped slots\n    if (el.slotTarget && !el.slotScope) {\n        data += `slot:${el.slotTarget},`;\n    }\n    // scoped slots\n    if (el.scopedSlots) {\n        data += `${genScopedSlots(el, el.scopedSlots, state)},`;\n    }\n    // component v-model\n    if (el.model) {\n        data += `model:{value:${el.model.value},callback:${el.model.callback},expression:${el.model.expression}},`;\n    }\n    // inline-template\n    if (el.inlineTemplate) {\n        const inlineTemplate = genInlineTemplate(el, state);\n        if (inlineTemplate) {\n            data += `${inlineTemplate},`;\n        }\n    }\n    data = data.replace(/,$/, '') + '}';\n    // v-bind dynamic argument wrap\n    // v-bind with dynamic arguments must be applied using the same v-bind object\n    // merge helper so that class/style/mustUseProp attrs are handled correctly.\n    if (el.dynamicAttrs) {\n        data = `_b(${data},\"${el.tag}\",${genProps(el.dynamicAttrs)})`;\n    }\n    // v-bind data wrap\n    if (el.wrapData) {\n        data = el.wrapData(data);\n    }\n    // v-on data wrap\n    if (el.wrapListeners) {\n        data = el.wrapListeners(data);\n    }\n    return data;\n}\nfunction genDirectives(el, state) {\n    const dirs = el.directives;\n    if (!dirs)\n        return;\n    let res = 'directives:[';\n    let hasRuntime = false;\n    let i, l, dir, needRuntime;\n    for (i = 0, l = dirs.length; i < l; i++) {\n        dir = dirs[i];\n        needRuntime = true;\n        const gen = state.directives[dir.name];\n        if (gen) {\n            // compile-time directive that manipulates AST.\n            // returns true if it also needs a runtime counterpart.\n            needRuntime = !!gen(el, dir, state.warn);\n        }\n        if (needRuntime) {\n            hasRuntime = true;\n            res += `{name:\"${dir.name}\",rawName:\"${dir.rawName}\"${dir.value\n                ? `,value:(${dir.value}),expression:${JSON.stringify(dir.value)}`\n                : ''}${dir.arg ? `,arg:${dir.isDynamicArg ? dir.arg : `\"${dir.arg}\"`}` : ''}${dir.modifiers ? `,modifiers:${JSON.stringify(dir.modifiers)}` : ''}},`;\n        }\n    }\n    if (hasRuntime) {\n        return res.slice(0, -1) + ']';\n    }\n}\nfunction genInlineTemplate(el, state) {\n    const ast = el.children[0];\n    if ((el.children.length !== 1 || ast.type !== 1)) {\n        state.warn('Inline-template components must have exactly one child element.', { start: el.start });\n    }\n    if (ast && ast.type === 1) {\n        const inlineRenderFns = generate(ast, state.options);\n        return `inlineTemplate:{render:function(){${inlineRenderFns.render}},staticRenderFns:[${inlineRenderFns.staticRenderFns\n            .map(code => `function(){${code}}`)\n            .join(',')}]}`;\n    }\n}\nfunction genScopedSlots(el, slots, state) {\n    // by default scoped slots are considered \"stable\", this allows child\n    // components with only scoped slots to skip forced updates from parent.\n    // but in some cases we have to bail-out of this optimization\n    // for example if the slot contains dynamic names, has v-if or v-for on them...\n    let needsForceUpdate = el.for ||\n        Object.keys(slots).some(key => {\n            const slot = slots[key];\n            return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic\n            );\n        });\n    // #9534: if a component with scoped slots is inside a conditional branch,\n    // it's possible for the same component to be reused but with different\n    // compiled slot content. To avoid that, we generate a unique key based on\n    // the generated code of all the slot contents.\n    let needsKey = !!el.if;\n    // OR when it is inside another scoped slot or v-for (the reactivity may be\n    // disconnected due to the intermediate scope variable)\n    // #9438, #9506\n    // TODO: this can be further optimized by properly analyzing in-scope bindings\n    // and skip force updating ones that do not actually use scope variables.\n    if (!needsForceUpdate) {\n        let parent = el.parent;\n        while (parent) {\n            if ((parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||\n                parent.for) {\n                needsForceUpdate = true;\n                break;\n            }\n            if (parent.if) {\n                needsKey = true;\n            }\n            parent = parent.parent;\n        }\n    }\n    const generatedSlots = Object.keys(slots)\n        .map(key => genScopedSlot(slots[key], state))\n        .join(',');\n    return `scopedSlots:_u([${generatedSlots}]${needsForceUpdate ? `,null,true` : ``}${!needsForceUpdate && needsKey ? `,null,false,${hash(generatedSlots)}` : ``})`;\n}\nfunction hash(str) {\n    let hash = 5381;\n    let i = str.length;\n    while (i) {\n        hash = (hash * 33) ^ str.charCodeAt(--i);\n    }\n    return hash >>> 0;\n}\nfunction containsSlotChild(el) {\n    if (el.type === 1) {\n        if (el.tag === 'slot') {\n            return true;\n        }\n        return el.children.some(containsSlotChild);\n    }\n    return false;\n}\nfunction genScopedSlot(el, state) {\n    const isLegacySyntax = el.attrsMap['slot-scope'];\n    if (el.if && !el.ifProcessed && !isLegacySyntax) {\n        return genIf(el, state, genScopedSlot, `null`);\n    }\n    if (el.for && !el.forProcessed) {\n        return genFor(el, state, genScopedSlot);\n    }\n    const slotScope = el.slotScope === emptySlotScopeToken ? `` : String(el.slotScope);\n    const fn = `function(${slotScope}){` +\n        `return ${el.tag === 'template'\n            ? el.if && isLegacySyntax\n                ? `(${el.if})?${genChildren(el, state) || 'undefined'}:undefined`\n                : genChildren(el, state) || 'undefined'\n            : genElement(el, state)}}`;\n    // reverse proxy v-slot without scope on this.$slots\n    const reverseProxy = slotScope ? `` : `,proxy:true`;\n    return `{key:${el.slotTarget || `\"default\"`},fn:${fn}${reverseProxy}}`;\n}\nfunction genChildren(el, state, checkSkip, altGenElement, altGenNode) {\n    const children = el.children;\n    if (children.length) {\n        const el = children[0];\n        // optimize single v-for\n        if (children.length === 1 &&\n            el.for &&\n            el.tag !== 'template' &&\n            el.tag !== 'slot') {\n            const normalizationType = checkSkip\n                ? state.maybeComponent(el)\n                    ? `,1`\n                    : `,0`\n                : ``;\n            return `${(altGenElement || genElement)(el, state)}${normalizationType}`;\n        }\n        const normalizationType = checkSkip\n            ? getNormalizationType(children, state.maybeComponent)\n            : 0;\n        const gen = altGenNode || genNode;\n        return `[${children.map(c => gen(c, state)).join(',')}]${normalizationType ? `,${normalizationType}` : ''}`;\n    }\n}\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType(children, maybeComponent) {\n    let res = 0;\n    for (let i = 0; i < children.length; i++) {\n        const el = children[i];\n        if (el.type !== 1) {\n            continue;\n        }\n        if (needsNormalization(el) ||\n            (el.ifConditions &&\n                el.ifConditions.some(c => needsNormalization(c.block)))) {\n            res = 2;\n            break;\n        }\n        if (maybeComponent(el) ||\n            (el.ifConditions && el.ifConditions.some(c => maybeComponent(c.block)))) {\n            res = 1;\n        }\n    }\n    return res;\n}\nfunction needsNormalization(el) {\n    return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';\n}\nfunction genNode(node, state) {\n    if (node.type === 1) {\n        return genElement(node, state);\n    }\n    else if (node.type === 3 && node.isComment) {\n        return genComment(node);\n    }\n    else {\n        return genText(node);\n    }\n}\nfunction genText(text) {\n    return `_v(${text.type === 2\n        ? text.expression // no need for () because already wrapped in _s()\n        : transformSpecialNewlines(JSON.stringify(text.text))})`;\n}\nfunction genComment(comment) {\n    return `_e(${JSON.stringify(comment.text)})`;\n}\nfunction genSlot(el, state) {\n    const slotName = el.slotName || '\"default\"';\n    const children = genChildren(el, state);\n    let res = `_t(${slotName}${children ? `,function(){return ${children}}` : ''}`;\n    const attrs = el.attrs || el.dynamicAttrs\n        ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(attr => ({\n            // slot props are camelized\n            name: camelize(attr.name),\n            value: attr.value,\n            dynamic: attr.dynamic\n        })))\n        : null;\n    const bind = el.attrsMap['v-bind'];\n    if ((attrs || bind) && !children) {\n        res += `,null`;\n    }\n    if (attrs) {\n        res += `,${attrs}`;\n    }\n    if (bind) {\n        res += `${attrs ? '' : ',null'},${bind}`;\n    }\n    return res + ')';\n}\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent(componentName, el, state) {\n    const children = el.inlineTemplate ? null : genChildren(el, state, true);\n    return `_c(${componentName},${genData(el, state)}${children ? `,${children}` : ''})`;\n}\nfunction genProps(props) {\n    let staticProps = ``;\n    let dynamicProps = ``;\n    for (let i = 0; i < props.length; i++) {\n        const prop = props[i];\n        const value = transformSpecialNewlines(prop.value);\n        if (prop.dynamic) {\n            dynamicProps += `${prop.name},${value},`;\n        }\n        else {\n            staticProps += `\"${prop.name}\":${value},`;\n        }\n    }\n    staticProps = `{${staticProps.slice(0, -1)}}`;\n    if (dynamicProps) {\n        return `_d(${staticProps},[${dynamicProps.slice(0, -1)}])`;\n    }\n    else {\n        return staticProps;\n    }\n}\n// #3895, #4268\nfunction transformSpecialNewlines(text) {\n    return text.replace(/\\u2028/g, '\\\\u2028').replace(/\\u2029/g, '\\\\u2029');\n}\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nconst prohibitedKeywordRE = new RegExp('\\\\b' +\n    ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n        'super,throw,while,yield,delete,export,import,return,switch,default,' +\n        'extends,finally,continue,debugger,function,arguments')\n        .split(',')\n        .join('\\\\b|\\\\b') +\n    '\\\\b');\n// these unary operators should not be used as property/method names\nconst unaryOperatorsRE = new RegExp('\\\\b' +\n    'delete,typeof,void'.split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') +\n    '\\\\s*\\\\([^\\\\)]*\\\\)');\n// strip strings in expressions\nconst stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n// detect problematic expressions in a template\nfunction detectErrors(ast, warn) {\n    if (ast) {\n        checkNode(ast, warn);\n    }\n}\nfunction checkNode(node, warn) {\n    if (node.type === 1) {\n        for (const name in node.attrsMap) {\n            if (dirRE.test(name)) {\n                const value = node.attrsMap[name];\n                if (value) {\n                    const range = node.rawAttrsMap[name];\n                    if (name === 'v-for') {\n                        checkFor(node, `v-for=\"${value}\"`, warn, range);\n                    }\n                    else if (name === 'v-slot' || name[0] === '#') {\n                        checkFunctionParameterExpression(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                    else if (onRE.test(name)) {\n                        checkEvent(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                    else {\n                        checkExpression(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                }\n            }\n        }\n        if (node.children) {\n            for (let i = 0; i < node.children.length; i++) {\n                checkNode(node.children[i], warn);\n            }\n        }\n    }\n    else if (node.type === 2) {\n        checkExpression(node.expression, node.text, warn, node);\n    }\n}\nfunction checkEvent(exp, text, warn, range) {\n    const stripped = exp.replace(stripStringRE, '');\n    const keywordMatch = stripped.match(unaryOperatorsRE);\n    if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {\n        warn(`avoid using JavaScript unary operator as property name: ` +\n            `\"${keywordMatch[0]}\" in expression ${text.trim()}`, range);\n    }\n    checkExpression(exp, text, warn, range);\n}\nfunction checkFor(node, text, warn, range) {\n    checkExpression(node.for || '', text, warn, range);\n    checkIdentifier(node.alias, 'v-for alias', text, warn, range);\n    checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);\n    checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);\n}\nfunction checkIdentifier(ident, type, text, warn, range) {\n    if (typeof ident === 'string') {\n        try {\n            new Function(`var ${ident}=_`);\n        }\n        catch (e) {\n            warn(`invalid ${type} \"${ident}\" in expression: ${text.trim()}`, range);\n        }\n    }\n}\nfunction checkExpression(exp, text, warn, range) {\n    try {\n        new Function(`return ${exp}`);\n    }\n    catch (e) {\n        const keywordMatch = exp\n            .replace(stripStringRE, '')\n            .match(prohibitedKeywordRE);\n        if (keywordMatch) {\n            warn(`avoid using JavaScript keyword as property name: ` +\n                `\"${keywordMatch[0]}\"\\n  Raw expression: ${text.trim()}`, range);\n        }\n        else {\n            warn(`invalid expression: ${e.message} in\\n\\n` +\n                `    ${exp}\\n\\n` +\n                `  Raw expression: ${text.trim()}\\n`, range);\n        }\n    }\n}\nfunction checkFunctionParameterExpression(exp, text, warn, range) {\n    try {\n        new Function(exp, '');\n    }\n    catch (e) {\n        warn(`invalid function parameter expression: ${e.message} in\\n\\n` +\n            `    ${exp}\\n\\n` +\n            `  Raw expression: ${text.trim()}\\n`, range);\n    }\n}\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n    const lines = source.split(/\\r?\\n/);\n    let count = 0;\n    const res = [];\n    for (let i = 0; i < lines.length; i++) {\n        count += lines[i].length + 1;\n        if (count >= start) {\n            for (let j = i - range; j <= i + range || end > count; j++) {\n                if (j < 0 || j >= lines.length)\n                    continue;\n                res.push(`${j + 1}${repeat(` `, 3 - String(j + 1).length)}|  ${lines[j]}`);\n                const lineLength = lines[j].length;\n                if (j === i) {\n                    // push underline\n                    const pad = start - (count - lineLength) + 1;\n                    const length = end > count ? lineLength - pad : end - start;\n                    res.push(`   |  ` + repeat(` `, pad) + repeat(`^`, length));\n                }\n                else if (j > i) {\n                    if (end > count) {\n                        const length = Math.min(end - count, lineLength);\n                        res.push(`   |  ` + repeat(`^`, length));\n                    }\n                    count += lineLength + 1;\n                }\n            }\n            break;\n        }\n    }\n    return res.join('\\n');\n}\nfunction repeat(str, n) {\n    let result = '';\n    if (n > 0) {\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            // eslint-disable-line\n            if (n & 1)\n                result += str;\n            n >>>= 1;\n            if (n <= 0)\n                break;\n            str += str;\n        }\n    }\n    return result;\n}\n\nfunction createFunction(code, errors) {\n    try {\n        return new Function(code);\n    }\n    catch (err) {\n        errors.push({ err, code });\n        return noop;\n    }\n}\nfunction createCompileToFunctionFn(compile) {\n    const cache = Object.create(null);\n    return function compileToFunctions(template, options, vm) {\n        options = extend({}, options);\n        const warn = options.warn || warn$2;\n        delete options.warn;\n        /* istanbul ignore if */\n        {\n            // detect possible CSP restriction\n            try {\n                new Function('return 1');\n            }\n            catch (e) {\n                if (e.toString().match(/unsafe-eval|CSP/)) {\n                    warn('It seems you are using the standalone build of Vue.js in an ' +\n                        'environment with Content Security Policy that prohibits unsafe-eval. ' +\n                        'The template compiler cannot work in this environment. Consider ' +\n                        'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n                        'templates into render functions.');\n                }\n            }\n        }\n        // check cache\n        const key = options.delimiters\n            ? String(options.delimiters) + template\n            : template;\n        if (cache[key]) {\n            return cache[key];\n        }\n        // compile\n        const compiled = compile(template, options);\n        // check compilation errors/tips\n        {\n            if (compiled.errors && compiled.errors.length) {\n                if (options.outputSourceRange) {\n                    compiled.errors.forEach(e => {\n                        warn(`Error compiling template:\\n\\n${e.msg}\\n\\n` +\n                            generateCodeFrame(template, e.start, e.end), vm);\n                    });\n                }\n                else {\n                    warn(`Error compiling template:\\n\\n${template}\\n\\n` +\n                        compiled.errors.map(e => `- ${e}`).join('\\n') +\n                        '\\n', vm);\n                }\n            }\n            if (compiled.tips && compiled.tips.length) {\n                if (options.outputSourceRange) {\n                    compiled.tips.forEach(e => tip(e.msg, vm));\n                }\n                else {\n                    compiled.tips.forEach(msg => tip(msg, vm));\n                }\n            }\n        }\n        // turn code into functions\n        const res = {};\n        const fnGenErrors = [];\n        res.render = createFunction(compiled.render, fnGenErrors);\n        res.staticRenderFns = compiled.staticRenderFns.map(code => {\n            return createFunction(code, fnGenErrors);\n        });\n        // check function generation errors.\n        // this should only happen if there is a bug in the compiler itself.\n        // mostly for codegen development use\n        /* istanbul ignore if */\n        {\n            if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n                warn(`Failed to generate render function:\\n\\n` +\n                    fnGenErrors\n                        .map(({ err, code }) => `${err.toString()} in\\n\\n${code}\\n`)\n                        .join('\\n'), vm);\n            }\n        }\n        return (cache[key] = res);\n    };\n}\n\nfunction createCompilerCreator(baseCompile) {\n    return function createCompiler(baseOptions) {\n        function compile(template, options) {\n            const finalOptions = Object.create(baseOptions);\n            const errors = [];\n            const tips = [];\n            let warn = (msg, range, tip) => {\n                (tip ? tips : errors).push(msg);\n            };\n            if (options) {\n                if (options.outputSourceRange) {\n                    // $flow-disable-line\n                    const leadingSpaceLength = template.match(/^\\s*/)[0].length;\n                    warn = (msg, range, tip) => {\n                        const data = typeof msg === 'string' ? { msg } : msg;\n                        if (range) {\n                            if (range.start != null) {\n                                data.start = range.start + leadingSpaceLength;\n                            }\n                            if (range.end != null) {\n                                data.end = range.end + leadingSpaceLength;\n                            }\n                        }\n                        (tip ? tips : errors).push(data);\n                    };\n                }\n                // merge custom modules\n                if (options.modules) {\n                    finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n                }\n                // merge custom directives\n                if (options.directives) {\n                    finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);\n                }\n                // copy other options\n                for (const key in options) {\n                    if (key !== 'modules' && key !== 'directives') {\n                        finalOptions[key] = options[key];\n                    }\n                }\n            }\n            finalOptions.warn = warn;\n            const compiled = baseCompile(template.trim(), finalOptions);\n            {\n                detectErrors(compiled.ast, warn);\n            }\n            compiled.errors = errors;\n            compiled.tips = tips;\n            return compiled;\n        }\n        return {\n            compile,\n            compileToFunctions: createCompileToFunctionFn(compile)\n        };\n    };\n}\n\n// `createCompilerCreator` allows creating compilers that use alternative\n// parser/optimizer/codegen, e.g the SSR optimizing compiler.\n// Here we just export a default compiler using the default parts.\nconst createCompiler = createCompilerCreator(function baseCompile(template, options) {\n    const ast = parse(template.trim(), options);\n    if (options.optimize !== false) {\n        optimize(ast, options);\n    }\n    const code = generate(ast, options);\n    return {\n        ast,\n        render: code.render,\n        staticRenderFns: code.staticRenderFns\n    };\n});\n\nconst { compile, compileToFunctions } = createCompiler(baseOptions);\n\n// check whether current browser encodes a char inside attribute values\nlet div;\nfunction getShouldDecode(href) {\n    div = div || document.createElement('div');\n    div.innerHTML = href ? `<a href=\"\\n\"/>` : `<div a=\"\\n\"/>`;\n    return div.innerHTML.indexOf('&#10;') > 0;\n}\n// #3663: IE encodes newlines inside attribute values while other browsers don't\nconst shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n// #6828: chrome encodes content in a[href]\nconst shouldDecodeNewlinesForHref = inBrowser\n    ? getShouldDecode(true)\n    : false;\n\nconst idToTemplate = cached(id => {\n    const el = query(id);\n    return el && el.innerHTML;\n});\nconst mount = Vue.prototype.$mount;\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && query(el);\n    /* istanbul ignore if */\n    if (el === document.body || el === document.documentElement) {\n        warn$2(`Do not mount Vue to <html> or <body> - mount to normal elements instead.`);\n        return this;\n    }\n    const options = this.$options;\n    // resolve template/el and convert to render function\n    if (!options.render) {\n        let template = options.template;\n        if (template) {\n            if (typeof template === 'string') {\n                if (template.charAt(0) === '#') {\n                    template = idToTemplate(template);\n                    /* istanbul ignore if */\n                    if (!template) {\n                        warn$2(`Template element not found or is empty: ${options.template}`, this);\n                    }\n                }\n            }\n            else if (template.nodeType) {\n                template = template.innerHTML;\n            }\n            else {\n                {\n                    warn$2('invalid template option:' + template, this);\n                }\n                return this;\n            }\n        }\n        else if (el) {\n            // @ts-expect-error\n            template = getOuterHTML(el);\n        }\n        if (template) {\n            /* istanbul ignore if */\n            if (config.performance && mark) {\n                mark('compile');\n            }\n            const { render, staticRenderFns } = compileToFunctions(template, {\n                outputSourceRange: true,\n                shouldDecodeNewlines,\n                shouldDecodeNewlinesForHref,\n                delimiters: options.delimiters,\n                comments: options.comments\n            }, this);\n            options.render = render;\n            options.staticRenderFns = staticRenderFns;\n            /* istanbul ignore if */\n            if (config.performance && mark) {\n                mark('compile end');\n                measure(`vue ${this._name} compile`, 'compile', 'compile end');\n            }\n        }\n    }\n    return mount.call(this, el, hydrating);\n};\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML(el) {\n    if (el.outerHTML) {\n        return el.outerHTML;\n    }\n    else {\n        const container = document.createElement('div');\n        container.appendChild(el.cloneNode(true));\n        return container.innerHTML;\n    }\n}\nVue.compile = compileToFunctions;\n\n// export type EffectScheduler = (...args: any[]) => any\n/**\n * @internal since we are not exposing this in Vue 2, it's used only for\n * internal testing.\n */\nfunction effect(fn, scheduler) {\n    const watcher = new Watcher(currentInstance, fn, noop, {\n        sync: true\n    });\n    if (scheduler) {\n        watcher.update = () => {\n            scheduler(() => watcher.run());\n        };\n    }\n}\n\nextend(Vue, vca);\nVue.effect = effect;\n\nmodule.exports = Vue;\n"
  },
  {
    "path": "web/assets/vue/vue.common.js",
    "content": "if (process.env.NODE_ENV === 'production') {\n  module.exports = require('./vue.common.prod.js')\n} else {\n  module.exports = require('./vue.common.dev.js')\n}\n"
  },
  {
    "path": "web/assets/vue/vue.common.prod.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n\"use strict\";const t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function o(t){return null!=t}function r(t){return!0===t}function s(t){return\"string\"==typeof t||\"number\"==typeof t||\"symbol\"==typeof t||\"boolean\"==typeof t}function i(t){return\"function\"==typeof t}function c(t){return null!==t&&\"object\"==typeof t}const a=Object.prototype.toString;function l(t){return\"[object Object]\"===a.call(t)}function u(t){const e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&\"function\"==typeof t.then&&\"function\"==typeof t.catch}function d(t){return null==t?\"\":Array.isArray(t)||l(t)&&t.toString===a?JSON.stringify(t,p,2):String(t)}function p(t,e){return e&&e.__v_isRef?e.value:e}function h(t){const e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){const n=Object.create(null),o=t.split(\",\");for(let t=0;t<o.length;t++)n[o[t]]=!0;return e?t=>n[t.toLowerCase()]:t=>n[t]}const g=m(\"slot,component\",!0),v=m(\"key,ref,slot,slot-scope,is\");function y(t,e){const n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);const o=t.indexOf(e);if(o>-1)return t.splice(o,1)}}const _=Object.prototype.hasOwnProperty;function $(t,e){return _.call(t,e)}function b(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const w=/-(\\w)/g,x=b((t=>t.replace(w,((t,e)=>e?e.toUpperCase():\"\")))),C=b((t=>t.charAt(0).toUpperCase()+t.slice(1))),k=/\\B([A-Z])/g,S=b((t=>t.replace(k,\"-$1\").toLowerCase()));const O=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){const o=arguments.length;return o?o>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;let n=t.length-e;const o=new Array(n);for(;n--;)o[n]=t[n+e];return o}function A(t,e){for(const n in e)t[n]=e[n];return t}function j(t){const e={};for(let n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function E(t,e,n){}const N=(t,e,n)=>!1,P=t=>t;function D(t,e){if(t===e)return!0;const n=c(t),o=c(e);if(!n||!o)return!n&&!o&&String(t)===String(e);try{const n=Array.isArray(t),o=Array.isArray(e);if(n&&o)return t.length===e.length&&t.every(((t,n)=>D(t,e[n])));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(n||o)return!1;{const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&n.every((n=>D(t[n],e[n])))}}catch(t){return!1}}function M(t,e){for(let n=0;n<t.length;n++)if(D(t[n],e))return n;return-1}function I(t){let e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function L(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}const R=\"data-server-rendered\",F=[\"component\",\"directive\",\"filter\"],H=[\"beforeCreate\",\"created\",\"beforeMount\",\"mounted\",\"beforeUpdate\",\"updated\",\"beforeDestroy\",\"destroyed\",\"activated\",\"deactivated\",\"errorCaptured\",\"serverPrefetch\",\"renderTracked\",\"renderTriggered\"];var B={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:N,isReservedAttr:N,isUnknownElement:N,getTagNamespace:E,parsePlatformTagName:P,mustUseProp:N,async:!0,_lifecycleHooks:H};const U=/a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;function z(t){const e=(t+\"\").charCodeAt(0);return 36===e||95===e}function V(t,e,n,o){Object.defineProperty(t,e,{value:n,enumerable:!!o,writable:!0,configurable:!0})}const K=new RegExp(`[^${U.source}.$_\\\\d]`);const J=\"__proto__\"in{},q=\"undefined\"!=typeof window,W=q&&window.navigator.userAgent.toLowerCase(),Z=W&&/msie|trident/.test(W),G=W&&W.indexOf(\"msie 9.0\")>0,X=W&&W.indexOf(\"edge/\")>0;W&&W.indexOf(\"android\");const Y=W&&/iphone|ipad|ipod|ios/.test(W);W&&/chrome\\/\\d+/.test(W),W&&/phantomjs/.test(W);const Q=W&&W.match(/firefox\\/(\\d+)/),tt={}.watch;let et,nt=!1;if(q)try{const t={};Object.defineProperty(t,\"passive\",{get(){nt=!0}}),window.addEventListener(\"test-passive\",null,t)}catch(t){}const ot=()=>(void 0===et&&(et=!q&&\"undefined\"!=typeof global&&(global.process&&\"server\"===global.process.env.VUE_ENV)),et),rt=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return\"function\"==typeof t&&/native code/.test(t.toString())}const it=\"undefined\"!=typeof Symbol&&st(Symbol)&&\"undefined\"!=typeof Reflect&&st(Reflect.ownKeys);let ct;ct=\"undefined\"!=typeof Set&&st(Set)?Set:class{constructor(){this.set=Object.create(null)}has(t){return!0===this.set[t]}add(t){this.set[t]=!0}clear(){this.set=Object.create(null)}};let at=null;function lt(t=null){t||at&&at._scope.off(),at=t,t&&t._scope.on()}class ut{constructor(t,e,n,o,r,s,i,c){this.tag=t,this.data=e,this.children=n,this.text=o,this.elm=r,this.ns=void 0,this.context=s,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=i,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=c,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}get child(){return this.componentInstance}}const ft=(t=\"\")=>{const e=new ut;return e.text=t,e.isComment=!0,e};function dt(t){return new ut(void 0,void 0,void 0,String(t))}function pt(t){const e=new ut(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}let ht=0;const mt=[],gt=()=>{for(let t=0;t<mt.length;t++){const e=mt[t];e.subs=e.subs.filter((t=>t)),e._pending=!1}mt.length=0};class vt{constructor(){this._pending=!1,this.id=ht++,this.subs=[]}addSub(t){this.subs.push(t)}removeSub(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))}depend(t){vt.target&&vt.target.addDep(this)}notify(t){const e=this.subs.filter((t=>t));for(let t=0,n=e.length;t<n;t++){e[t].update()}}}vt.target=null;const yt=[];function _t(t){yt.push(t),vt.target=t}function $t(){yt.pop(),vt.target=yt[yt.length-1]}const bt=Array.prototype,wt=Object.create(bt);[\"push\",\"pop\",\"shift\",\"unshift\",\"splice\",\"sort\",\"reverse\"].forEach((function(t){const e=bt[t];V(wt,t,(function(...n){const o=e.apply(this,n),r=this.__ob__;let s;switch(t){case\"push\":case\"unshift\":s=n;break;case\"splice\":s=n.slice(2)}return s&&r.observeArray(s),r.dep.notify(),o}))}));const xt=Object.getOwnPropertyNames(wt),Ct={};let kt=!0;function St(t){kt=t}const Ot={notify:E,depend:E,addSub:E,removeSub:E};class Tt{constructor(t,n=!1,o=!1){if(this.value=t,this.shallow=n,this.mock=o,this.dep=o?Ot:new vt,this.vmCount=0,V(t,\"__ob__\",this),e(t)){if(!o)if(J)t.__proto__=wt;else for(let e=0,n=xt.length;e<n;e++){const n=xt[e];V(t,n,wt[n])}n||this.observeArray(t)}else{const e=Object.keys(t);for(let r=0;r<e.length;r++){jt(t,e[r],Ct,void 0,n,o)}}}observeArray(t){for(let e=0,n=t.length;e<n;e++)At(t[e],!1,this.mock)}}function At(t,n,o){return t&&$(t,\"__ob__\")&&t.__ob__ instanceof Tt?t.__ob__:!kt||!o&&ot()||!e(t)&&!l(t)||!Object.isExtensible(t)||t.__v_skip||Ht(t)||t instanceof ut?void 0:new Tt(t,n,o)}function jt(t,n,o,r,s,i,c=!1){const a=new vt,l=Object.getOwnPropertyDescriptor(t,n);if(l&&!1===l.configurable)return;const u=l&&l.get,f=l&&l.set;u&&!f||o!==Ct&&2!==arguments.length||(o=t[n]);let d=s?o&&o.__ob__:At(o,!1,i);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){const n=u?u.call(t):o;return vt.target&&(a.depend(),d&&(d.dep.depend(),e(n)&&Pt(n))),Ht(n)&&!s?n.value:n},set:function(e){const n=u?u.call(t):o;if(L(n,e)){if(f)f.call(t,e);else{if(u)return;if(!s&&Ht(n)&&!Ht(e))return void(n.value=e);o=e}d=s?e&&e.__ob__:At(e,!1,i),a.notify()}}}),a}function Et(t,n,o){if(Rt(t))return;const r=t.__ob__;return e(t)&&u(n)?(t.length=Math.max(t.length,n),t.splice(n,1,o),r&&!r.shallow&&r.mock&&At(o,!1,!0),o):n in t&&!(n in Object.prototype)?(t[n]=o,o):t._isVue||r&&r.vmCount?o:r?(jt(r.value,n,o,void 0,r.shallow,r.mock),r.dep.notify(),o):(t[n]=o,o)}function Nt(t,n){if(e(t)&&u(n))return void t.splice(n,1);const o=t.__ob__;t._isVue||o&&o.vmCount||Rt(t)||$(t,n)&&(delete t[n],o&&o.dep.notify())}function Pt(t){for(let n,o=0,r=t.length;o<r;o++)n=t[o],n&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Pt(n)}function Dt(t){return Mt(t,!0),V(t,\"__v_isShallow\",!0),t}function Mt(t,e){Rt(t)||At(t,e,ot())}function It(t){return Rt(t)?It(t.__v_raw):!(!t||!t.__ob__)}function Lt(t){return!(!t||!t.__v_isShallow)}function Rt(t){return!(!t||!t.__v_isReadonly)}const Ft=\"__v_isRef\";function Ht(t){return!(!t||!0!==t.__v_isRef)}function Bt(t,e){if(Ht(t))return t;const n={};return V(n,Ft,!0),V(n,\"__v_isShallow\",e),V(n,\"dep\",jt(n,\"value\",t,null,e,ot())),n}function Ut(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>{const t=e[n];if(Ht(t))return t.value;{const e=t&&t.__ob__;return e&&e.dep.depend(),t}},set:t=>{const o=e[n];Ht(o)&&!Ht(t)?o.value=t:e[n]=t}})}function zt(t,e,n){const o=t[e];if(Ht(o))return o;const r={get value(){const o=t[e];return void 0===o?n:o},set value(n){t[e]=n}};return V(r,Ft,!0),r}const Vt=\"__v_rawToReadonly\",Kt=\"__v_rawToShallowReadonly\";function Jt(t){return qt(t,!1)}function qt(t,e){if(!l(t))return t;if(Rt(t))return t;const n=e?Kt:Vt,o=t[n];if(o)return o;const r=Object.create(Object.getPrototypeOf(t));V(t,n,r),V(r,\"__v_isReadonly\",!0),V(r,\"__v_raw\",t),Ht(t)&&V(r,Ft,!0),(e||Lt(t))&&V(r,\"__v_isShallow\",!0);const s=Object.keys(t);for(let n=0;n<s.length;n++)Wt(r,t,s[n],e);return r}function Wt(t,e,n,o){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){const t=e[n];return o||!l(t)?t:Jt(t)},set(){}})}const Zt=b((t=>{const e=\"&\"===t.charAt(0),n=\"~\"===(t=e?t.slice(1):t).charAt(0),o=\"!\"===(t=n?t.slice(1):t).charAt(0);return{name:t=o?t.slice(1):t,once:n,capture:o,passive:e}}));function Gt(t,n){function o(){const t=o.fns;if(!e(t))return vn(t,null,arguments,n,\"v-on handler\");{const e=t.slice();for(let t=0;t<e.length;t++)vn(e[t],null,arguments,n,\"v-on handler\")}}return o.fns=t,o}function Xt(t,e,o,s,i,c){let a,l,u,f;for(a in t)l=t[a],u=e[a],f=Zt(a),n(l)||(n(u)?(n(l.fns)&&(l=t[a]=Gt(l,c)),r(f.once)&&(l=t[a]=i(f.name,l,f.capture)),o(f.name,l,f.capture,f.passive,f.params)):l!==u&&(u.fns=l,t[a]=u));for(a in e)n(t[a])&&(f=Zt(a),s(f.name,e[a],f.capture))}function Yt(t,e,s){let i;t instanceof ut&&(t=t.data.hook||(t.data.hook={}));const c=t[e];function a(){s.apply(this,arguments),y(i.fns,a)}n(c)?i=Gt([a]):o(c.fns)&&r(c.merged)?(i=c,i.fns.push(a)):i=Gt([c,a]),i.merged=!0,t[e]=i}function Qt(t,e,n,r,s){if(o(e)){if($(e,n))return t[n]=e[n],s||delete e[n],!0;if($(e,r))return t[n]=e[r],s||delete e[r],!0}return!1}function te(t){return s(t)?[dt(t)]:e(t)?ne(t):void 0}function ee(t){return o(t)&&o(t.text)&&!1===t.isComment}function ne(t,i){const c=[];let a,l,u,f;for(a=0;a<t.length;a++)l=t[a],n(l)||\"boolean\"==typeof l||(u=c.length-1,f=c[u],e(l)?l.length>0&&(l=ne(l,`${i||\"\"}_${a}`),ee(l[0])&&ee(f)&&(c[u]=dt(f.text+l[0].text),l.shift()),c.push.apply(c,l)):s(l)?ee(f)?c[u]=dt(f.text+l):\"\"!==l&&c.push(dt(l)):ee(l)&&ee(f)?c[u]=dt(f.text+l.text):(r(t._isVList)&&o(l.tag)&&n(l.key)&&o(i)&&(l.key=`__vlist${i}_${a}__`),c.push(l)));return c}const oe=1,re=2;function se(t,n,a,l,u,f){return(e(a)||s(a))&&(u=l,l=a,a=void 0),r(f)&&(u=re),function(t,n,r,s,a){if(o(r)&&o(r.__ob__))return ft();o(r)&&o(r.is)&&(n=r.is);if(!n)return ft();e(s)&&i(s[0])&&((r=r||{}).scopedSlots={default:s[0]},s.length=0);a===re?s=te(s):a===oe&&(s=function(t){for(let n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(s));let l,u;if(\"string\"==typeof n){let e;u=t.$vnode&&t.$vnode.ns||B.getTagNamespace(n),l=B.isReservedTag(n)?new ut(B.parsePlatformTagName(n),r,s,void 0,void 0,t):r&&r.pre||!o(e=$o(t.$options,\"components\",n))?new ut(n,r,s,void 0,void 0,t):lo(e,r,t,s,n)}else l=lo(n,r,t,s);return e(l)?l:o(l)?(o(u)&&ie(l,u),o(r)&&function(t){c(t.style)&&Un(t.style);c(t.class)&&Un(t.class)}(r),l):ft()}(t,n,a,l,u)}function ie(t,e,s){if(t.ns=e,\"foreignObject\"===t.tag&&(e=void 0,s=!0),o(t.children))for(let i=0,c=t.children.length;i<c;i++){const c=t.children[i];o(c.tag)&&(n(c.ns)||r(s)&&\"svg\"!==c.tag)&&ie(c,e,s)}}function ce(t,n){let r,s,i,a,l=null;if(e(t)||\"string\"==typeof t)for(l=new Array(t.length),r=0,s=t.length;r<s;r++)l[r]=n(t[r],r);else if(\"number\"==typeof t)for(l=new Array(t),r=0;r<t;r++)l[r]=n(r+1,r);else if(c(t))if(it&&t[Symbol.iterator]){l=[];const e=t[Symbol.iterator]();let o=e.next();for(;!o.done;)l.push(n(o.value,l.length)),o=e.next()}else for(i=Object.keys(t),l=new Array(i.length),r=0,s=i.length;r<s;r++)a=i[r],l[r]=n(t[a],a,r);return o(l)||(l=[]),l._isVList=!0,l}function ae(t,e,n,o){const r=this.$scopedSlots[t];let s;r?(n=n||{},o&&(n=A(A({},o),n)),s=r(n)||(i(e)?e():e)):s=this.$slots[t]||(i(e)?e():e);const c=n&&n.slot;return c?this.$createElement(\"template\",{slot:c},s):s}function le(t){return $o(this.$options,\"filters\",t)||P}function ue(t,n){return e(t)?-1===t.indexOf(n):t!==n}function fe(t,e,n,o,r){const s=B.keyCodes[e]||n;return r&&o&&!B.keyCodes[e]?ue(r,o):s?ue(s,t):o?S(o)!==e:void 0===t}function de(t,n,o,r,s){if(o)if(c(o)){let i;e(o)&&(o=j(o));for(const e in o){if(\"class\"===e||\"style\"===e||v(e))i=t;else{const o=t.attrs&&t.attrs.type;i=r||B.mustUseProp(n,o,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}const c=x(e),a=S(e);if(!(c in i)&&!(a in i)&&(i[e]=o[e],s)){(t.on||(t.on={}))[`update:${e}`]=function(t){o[e]=t}}}}else;return t}function pe(t,e){const n=this._staticTrees||(this._staticTrees=[]);let o=n[t];return o&&!e||(o=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),me(o,`__static__${t}`,!1)),o}function he(t,e,n){return me(t,`__once__${e}${n?`_${n}`:\"\"}`,!0),t}function me(t,n,o){if(e(t))for(let e=0;e<t.length;e++)t[e]&&\"string\"!=typeof t[e]&&ge(t[e],`${n}_${e}`,o);else ge(t,n,o)}function ge(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function ve(t,e){if(e)if(l(e)){const n=t.on=t.on?A({},t.on):{};for(const t in e){const o=n[t],r=e[t];n[t]=o?[].concat(o,r):r}}else;return t}function ye(t,n,o,r){n=n||{$stable:!o};for(let r=0;r<t.length;r++){const s=t[r];e(s)?ye(s,n,o):s&&(s.proxy&&(s.fn.proxy=!0),n[s.key]=s.fn)}return r&&(n.$key=r),n}function _e(t,e){for(let n=0;n<e.length;n+=2){const o=e[n];\"string\"==typeof o&&o&&(t[e[n]]=e[n+1])}return t}function $e(t,e){return\"string\"==typeof t?e+t:t}function be(t){t._o=he,t._n=h,t._s=d,t._l=ce,t._t=ae,t._q=D,t._i=M,t._m=pe,t._f=le,t._k=fe,t._b=de,t._v=dt,t._e=ft,t._u=ye,t._g=ve,t._d=_e,t._p=$e}function we(t,e){if(!t||!t.length)return{};const n={};for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,r.context!==e&&r.fnContext!==e||!s||null==s.slot)(n.default||(n.default=[])).push(r);else{const t=s.slot,e=n[t]||(n[t]=[]);\"template\"===r.tag?e.push.apply(e,r.children||[]):e.push(r)}}for(const t in n)n[t].every(xe)&&delete n[t];return n}function xe(t){return t.isComment&&!t.asyncFactory||\" \"===t.text}function Ce(t){return t.isComment&&t.asyncFactory}function ke(e,n,o,r){let s;const i=Object.keys(o).length>0,c=n?!!n.$stable:!i,a=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(c&&r&&r!==t&&a===r.$key&&!i&&!r.$hasNormal)return r;s={};for(const t in n)n[t]&&\"$\"!==t[0]&&(s[t]=Se(e,o,t,n[t]))}else s={};for(const t in o)t in s||(s[t]=Oe(o,t));return n&&Object.isExtensible(n)&&(n._normalized=s),V(s,\"$stable\",c),V(s,\"$key\",a),V(s,\"$hasNormal\",i),s}function Se(t,n,o,r){const s=function(){const n=at;lt(t);let o=arguments.length?r.apply(null,arguments):r({});o=o&&\"object\"==typeof o&&!e(o)?[o]:te(o);const s=o&&o[0];return lt(n),o&&(!s||1===o.length&&s.isComment&&!Ce(s))?void 0:o};return r.proxy&&Object.defineProperty(n,o,{get:s,enumerable:!0,configurable:!0}),s}function Oe(t,e){return()=>t[e]}function Te(e){return{get attrs(){if(!e._attrsProxy){const n=e._attrsProxy={};V(n,\"_v_attr_proxy\",!0),Ae(n,e.$attrs,t,e,\"$attrs\")}return e._attrsProxy},get listeners(){if(!e._listenersProxy){Ae(e._listenersProxy={},e.$listeners,t,e,\"$listeners\")}return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Ee(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:O(e.$emit,e),expose(t){t&&Object.keys(t).forEach((n=>Ut(e,t,n)))}}}function Ae(t,e,n,o,r){let s=!1;for(const i in e)i in t?e[i]!==n[i]&&(s=!0):(s=!0,je(t,i,o,r));for(const n in t)n in e||(s=!0,delete t[n]);return s}function je(t,e,n,o){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:()=>n[o][e]})}function Ee(t,e){for(const n in e)t[n]=e[n];for(const n in t)n in e||delete t[n]}function Ne(){const t=at;return t._setupContext||(t._setupContext=Te(t))}let Pe,De,Me=null;function Ie(t,e){return(t.__esModule||it&&\"Module\"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function Le(t){if(e(t))for(let e=0;e<t.length;e++){const n=t[e];if(o(n)&&(o(n.componentOptions)||Ce(n)))return n}}function Re(t,e){Pe.$on(t,e)}function Fe(t,e){Pe.$off(t,e)}function He(t,e){const n=Pe;return function o(){null!==e.apply(null,arguments)&&n.$off(t,o)}}function Be(t,e,n){Pe=t,Xt(e,n||{},Re,Fe,He,t),Pe=void 0}class Ue{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=De,!t&&De&&(this.index=(De.scopes||(De.scopes=[])).push(this)-1)}run(t){if(this.active){const e=De;try{return De=this,t()}finally{De=e}}}on(){De=this}off(){De=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function ze(){return De}let Ve=null;function Ke(t){const e=Ve;return Ve=t,()=>{Ve=e}}function Je(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function qe(t,e){if(e){if(t._directInactive=!1,Je(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(let e=0;e<t.$children.length;e++)qe(t.$children[e]);Ze(t,\"activated\")}}function We(t,e){if(!(e&&(t._directInactive=!0,Je(t))||t._inactive)){t._inactive=!0;for(let e=0;e<t.$children.length;e++)We(t.$children[e]);Ze(t,\"deactivated\")}}function Ze(t,e,n,o=!0){_t();const r=at,s=ze();o&&lt(t);const i=t.$options[e],c=`${e} hook`;if(i)for(let e=0,o=i.length;e<o;e++)vn(i[e],t,n||null,t,c);t._hasHookEvent&&t.$emit(\"hook:\"+e),o&&(lt(r),s&&s.on()),$t()}const Ge=[],Xe=[];let Ye={},Qe=!1,tn=!1,en=0;let nn=0,on=Date.now;if(q&&!Z){const t=window.performance;t&&\"function\"==typeof t.now&&on()>document.createEvent(\"Event\").timeStamp&&(on=()=>t.now())}const rn=(t,e)=>{if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function sn(){let t,e;for(nn=on(),tn=!0,Ge.sort(rn),en=0;en<Ge.length;en++)t=Ge[en],t.before&&t.before(),e=t.id,Ye[e]=null,t.run();const n=Xe.slice(),o=Ge.slice();en=Ge.length=Xe.length=0,Ye={},Qe=tn=!1,function(t){for(let e=0;e<t.length;e++)t[e]._inactive=!0,qe(t[e],!0)}(n),function(t){let e=t.length;for(;e--;){const n=t[e],o=n.vm;o&&o._watcher===n&&o._isMounted&&!o._isDestroyed&&Ze(o,\"updated\")}}(o),gt(),rt&&B.devtools&&rt.emit(\"flush\")}function cn(t){const e=t.id;if(null==Ye[e]&&(t!==vt.target||!t.noRecurse)){if(Ye[e]=!0,tn){let e=Ge.length-1;for(;e>en&&Ge[e].id>t.id;)e--;Ge.splice(e+1,0,t)}else Ge.push(t);Qe||(Qe=!0,kn(sn))}}const an=\"watcher\",ln=`${an} callback`,un=`${an} getter`,fn=`${an} cleanup`;function dn(t,e){return hn(t,null,{flush:\"post\"})}const pn={};function hn(n,o,{immediate:r,deep:s,flush:c=\"pre\",onTrack:a,onTrigger:l}=t){const u=at,f=(t,e,n=null)=>{const o=vn(t,null,n,u,e);return s&&o&&o.__ob__&&o.__ob__.dep.depend(),o};let d,p,h=!1,m=!1;if(Ht(n)?(d=()=>n.value,h=Lt(n)):It(n)?(d=()=>(n.__ob__.dep.depend(),n),s=!0):e(n)?(m=!0,h=n.some((t=>It(t)||Lt(t))),d=()=>n.map((t=>Ht(t)?t.value:It(t)?(t.__ob__.dep.depend(),Un(t)):i(t)?f(t,un):void 0))):d=i(n)?o?()=>f(n,un):()=>{if(!u||!u._isDestroyed)return p&&p(),f(n,an,[g])}:E,o&&s){const t=d;d=()=>Un(t())}let g=t=>{p=v.onStop=()=>{f(t,fn)}};if(ot())return g=E,o?r&&f(o,ln,[d(),m?[]:void 0,g]):d(),E;const v=new Kn(at,d,E,{lazy:!0});v.noRecurse=!o;let y=m?[]:pn;return v.run=()=>{if(v.active)if(o){const t=v.get();(s||h||(m?t.some(((t,e)=>L(t,y[e]))):L(t,y)))&&(p&&p(),f(o,ln,[t,y===pn?void 0:y,g]),y=t)}else v.get()},\"sync\"===c?v.update=v.run:\"post\"===c?(v.post=!0,v.update=()=>cn(v)):v.update=()=>{if(u&&u===at&&!u._isMounted){const t=u._preWatchers||(u._preWatchers=[]);t.indexOf(v)<0&&t.push(v)}else cn(v)},o?r?v.run():y=v.get():\"post\"===c&&u?u.$once(\"hook:mounted\",(()=>v.get())):v.get(),()=>{v.teardown()}}function mn(t){const e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function gn(t,e,n){_t();try{if(e){let o=e;for(;o=o.$parent;){const r=o.$options.errorCaptured;if(r)for(let s=0;s<r.length;s++)try{if(!1===r[s].call(o,t,e,n))return}catch(t){yn(t,o,\"errorCaptured hook\")}}}yn(t,e,n)}finally{$t()}}function vn(t,e,n,o,r){let s;try{s=n?t.apply(e,n):t.call(e),s&&!s._isVue&&f(s)&&!s._handled&&(s.catch((t=>gn(t,o,r+\" (Promise/async)\"))),s._handled=!0)}catch(t){gn(t,o,r)}return s}function yn(t,e,n){if(B.errorHandler)try{return B.errorHandler.call(null,t,e,n)}catch(e){e!==t&&_n(e)}_n(t)}function _n(t,e,n){if(!q||\"undefined\"==typeof console)throw t;console.error(t)}let $n=!1;const bn=[];let wn,xn=!1;function Cn(){xn=!1;const t=bn.slice(0);bn.length=0;for(let e=0;e<t.length;e++)t[e]()}if(\"undefined\"!=typeof Promise&&st(Promise)){const t=Promise.resolve();wn=()=>{t.then(Cn),Y&&setTimeout(E)},$n=!0}else if(Z||\"undefined\"==typeof MutationObserver||!st(MutationObserver)&&\"[object MutationObserverConstructor]\"!==MutationObserver.toString())wn=\"undefined\"!=typeof setImmediate&&st(setImmediate)?()=>{setImmediate(Cn)}:()=>{setTimeout(Cn,0)};else{let t=1;const e=new MutationObserver(Cn),n=document.createTextNode(String(t));e.observe(n,{characterData:!0}),wn=()=>{t=(t+1)%2,n.data=String(t)},$n=!0}function kn(t,e){let n;if(bn.push((()=>{if(t)try{t.call(e)}catch(t){gn(t,e,\"nextTick\")}else n&&n(e)})),xn||(xn=!0,wn()),!t&&\"undefined\"!=typeof Promise)return new Promise((t=>{n=t}))}function Sn(t){return(e,n=at)=>{if(n)return function(t,e,n){const o=t.$options;o[e]=go(o[e],n)}(n,t,e)}}const On=Sn(\"beforeMount\"),Tn=Sn(\"mounted\"),An=Sn(\"beforeUpdate\"),jn=Sn(\"updated\"),En=Sn(\"beforeDestroy\"),Nn=Sn(\"destroyed\"),Pn=Sn(\"activated\"),Dn=Sn(\"deactivated\"),Mn=Sn(\"serverPrefetch\"),In=Sn(\"renderTracked\"),Ln=Sn(\"renderTriggered\"),Rn=Sn(\"errorCaptured\");const Fn=\"2.7.16\";var Hn=Object.freeze({__proto__:null,version:Fn,defineComponent:function(t){return t},ref:function(t){return Bt(t,!1)},shallowRef:function(t){return Bt(t,!0)},isRef:Ht,toRef:zt,toRefs:function(t){const n=e(t)?new Array(t.length):{};for(const e in t)n[e]=zt(t,e);return n},unref:function(t){return Ht(t)?t.value:t},proxyRefs:function(t){if(It(t))return t;const e={},n=Object.keys(t);for(let o=0;o<n.length;o++)Ut(e,t,n[o]);return e},customRef:function(t){const e=new vt,{get:n,set:o}=t((()=>{e.depend()}),(()=>{e.notify()})),r={get value(){return n()},set value(t){o(t)}};return V(r,Ft,!0),r},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return Mt(t,!1),t},isReactive:It,isReadonly:Rt,isShallow:Lt,isProxy:function(t){return It(t)||Rt(t)},shallowReactive:Dt,markRaw:function(t){return Object.isExtensible(t)&&V(t,\"__v_skip\",!0),t},toRaw:function t(e){const n=e&&e.__v_raw;return n?t(n):e},readonly:Jt,shallowReadonly:function(t){return qt(t,!0)},computed:function(t,e){let n,o;const r=i(t);r?(n=t,o=E):(n=t.get,o=t.set);const s=ot()?null:new Kn(at,n,E,{lazy:!0}),c={effect:s,get value(){return s?(s.dirty&&s.evaluate(),vt.target&&s.depend(),s.value):n()},set value(t){o(t)}};return V(c,Ft,!0),V(c,\"__v_isReadonly\",r),c},watch:function(t,e,n){return hn(t,e,n)},watchEffect:function(t,e){return hn(t,null,e)},watchPostEffect:dn,watchSyncEffect:function(t,e){return hn(t,null,{flush:\"sync\"})},EffectScope:Ue,effectScope:function(t){return new Ue(t)},onScopeDispose:function(t){De&&De.cleanups.push(t)},getCurrentScope:ze,provide:function(t,e){at&&(mn(at)[t]=e)},inject:function(t,e,n=!1){const o=at;if(o){const r=o.$parent&&o.$parent._provided;if(r&&t in r)return r[t];if(arguments.length>1)return n&&i(e)?e.call(o):e}},h:function(t,e,n){return se(at,t,e,n,2,!0)},getCurrentInstance:function(){return at&&{proxy:at}},useSlots:function(){return Ne().slots},useAttrs:function(){return Ne().attrs},useListeners:function(){return Ne().listeners},mergeDefaults:function(t,n){const o=e(t)?t.reduce(((t,e)=>(t[e]={},t)),{}):t;for(const t in n){const r=o[t];r?e(r)||i(r)?o[t]={type:r,default:n[t]}:r.default=n[t]:null===r&&(o[t]={default:n[t]})}return o},nextTick:kn,set:Et,del:Nt,useCssModule:function(e=\"$style\"){{if(!at)return t;const n=at[e];return n||t}},useCssVars:function(t){if(!q)return;const e=at;e&&dn((()=>{const n=e.$el,o=t(e,e._setupProxy);if(n&&1===n.nodeType){const t=n.style;for(const e in o)t.setProperty(`--${e}`,o[e])}}))},defineAsyncComponent:function(t){i(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:c=!1,onError:a}=t;let l=null,u=0;const f=()=>{let t;return l||(t=l=e().catch((t=>{if(t=t instanceof Error?t:new Error(String(t)),a)return new Promise(((e,n)=>{a(t,(()=>e((u++,l=null,f()))),(()=>n(t)),u+1)}));throw t})).then((e=>t!==l&&l?l:(e&&(e.__esModule||\"Module\"===e[Symbol.toStringTag])&&(e=e.default),e))))};return()=>({component:f(),delay:r,timeout:s,error:o,loading:n})},onBeforeMount:On,onMounted:Tn,onBeforeUpdate:An,onUpdated:jn,onBeforeUnmount:En,onUnmounted:Nn,onActivated:Pn,onDeactivated:Dn,onServerPrefetch:Mn,onRenderTracked:In,onRenderTriggered:Ln,onErrorCaptured:function(t,e=at){Rn(t,e)}});const Bn=new ct;function Un(t){return zn(t,Bn),Bn.clear(),t}function zn(t,n){let o,r;const s=e(t);if(!(!s&&!c(t)||t.__v_skip||Object.isFrozen(t)||t instanceof ut)){if(t.__ob__){const e=t.__ob__.dep.id;if(n.has(e))return;n.add(e)}if(s)for(o=t.length;o--;)zn(t[o],n);else if(Ht(t))zn(t.value,n);else for(r=Object.keys(t),o=r.length;o--;)zn(t[r[o]],n)}}let Vn=0;class Kn{constructor(t,e,n,o,r){!function(t,e=De){e&&e.active&&e.effects.push(t)}(this,De&&!De._vm?De:t?t._scope:void 0),(this.vm=t)&&r&&(t._watcher=this),o?(this.deep=!!o.deep,this.user=!!o.user,this.lazy=!!o.lazy,this.sync=!!o.sync,this.before=o.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Vn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ct,this.newDepIds=new ct,this.expression=\"\",i(e)?this.getter=e:(this.getter=function(t){if(K.test(t))return;const e=t.split(\".\");return function(t){for(let n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}(e),this.getter||(this.getter=E)),this.value=this.lazy?void 0:this.get()}get(){let t;_t(this);const e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;gn(t,e,`getter for watcher \"${this.expression}\"`)}finally{this.deep&&Un(t),$t(),this.cleanupDeps()}return t}addDep(t){const e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))}cleanupDeps(){let t=this.deps.length;for(;t--;){const e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}let e=this.depIds;this.depIds=this.newDepIds,this.newDepIds=e,this.newDepIds.clear(),e=this.deps,this.deps=this.newDeps,this.newDeps=e,this.newDeps.length=0}update(){this.lazy?this.dirty=!0:this.sync?this.run():cn(this)}run(){if(this.active){const t=this.get();if(t!==this.value||c(t)||this.deep){const e=this.value;if(this.value=t,this.user){const n=`callback for watcher \"${this.expression}\"`;vn(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}}evaluate(){this.value=this.get(),this.dirty=!1}depend(){let t=this.deps.length;for(;t--;)this.deps[t].depend()}teardown(){if(this.vm&&!this.vm._isBeingDestroyed&&y(this.vm._scope.effects,this),this.active){let t=this.deps.length;for(;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}}}const Jn={enumerable:!0,configurable:!0,get:E,set:E};function qn(t,e,n){Jn.get=function(){return this[e][n]},Jn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Jn)}function Wn(t){const n=t.$options;if(n.props&&function(t,e){const n=t.$options.propsData||{},o=t._props=Dt({}),r=t.$options._propKeys=[],s=!t.$parent;s||St(!1);for(const s in e){r.push(s);jt(o,s,bo(s,e,n,t),void 0,!0),s in t||qn(t,\"_props\",s)}St(!0)}(t,n.props),function(t){const e=t.$options,n=e.setup;if(n){const o=t._setupContext=Te(t);lt(t),_t();const r=vn(n,null,[t._props||Dt({}),o],t,\"setup\");if($t(),lt(),i(r))e.render=r;else if(c(r))if(t._setupState=r,r.__sfc){const e=t._setupProxy={};for(const t in r)\"__sfc\"!==t&&Ut(e,r,t)}else for(const e in r)z(e)||Ut(t,r,e)}}(t),n.methods&&function(t,e){t.$options.props;for(const n in e)t[n]=\"function\"!=typeof e[n]?E:O(e[n],t)}(t,n.methods),n.data)!function(t){let e=t.$options.data;e=t._data=i(e)?function(t,e){_t();try{return t.call(e,e)}catch(t){return gn(t,e,\"data()\"),{}}finally{$t()}}(e,t):e||{},l(e)||(e={});const n=Object.keys(e),o=t.$options.props;t.$options.methods;let r=n.length;for(;r--;){const e=n[r];o&&$(o,e)||z(e)||qn(t,\"_data\",e)}const s=At(e);s&&s.vmCount++}(t);else{const e=At(t._data={});e&&e.vmCount++}n.computed&&function(t,e){const n=t._computedWatchers=Object.create(null),o=ot();for(const r in e){const s=e[r],c=i(s)?s:s.get;o||(n[r]=new Kn(t,c||E,E,Zn)),r in t||Gn(t,r,s)}}(t,n.computed),n.watch&&n.watch!==tt&&function(t,n){for(const o in n){const r=n[o];if(e(r))for(let e=0;e<r.length;e++)Qn(t,o,r[e]);else Qn(t,o,r)}}(t,n.watch)}const Zn={lazy:!0};function Gn(t,e,n){const o=!ot();i(n)?(Jn.get=o?Xn(e):Yn(n),Jn.set=E):(Jn.get=n.get?o&&!1!==n.cache?Xn(e):Yn(n.get):E,Jn.set=n.set||E),Object.defineProperty(t,e,Jn)}function Xn(t){return function(){const e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),vt.target&&e.depend(),e.value}}function Yn(t){return function(){return t.call(this,this)}}function Qn(t,e,n,o){return l(n)&&(o=n,n=n.handler),\"string\"==typeof n&&(n=t[n]),t.$watch(e,n,o)}function to(t,e){if(t){const n=Object.create(null),o=it?Reflect.ownKeys(t):Object.keys(t);for(let r=0;r<o.length;r++){const s=o[r];if(\"__ob__\"===s)continue;const c=t[s].from;if(c in e._provided)n[s]=e._provided[c];else if(\"default\"in t[s]){const o=t[s].default;n[s]=i(o)?o.call(e):o}}return n}}let eo=0;function no(t){let e=t.options;if(t.super){const n=no(t.super);if(n!==t.superOptions){t.superOptions=n;const o=function(t){let e;const n=t.options,o=t.sealedOptions;for(const t in n)n[t]!==o[t]&&(e||(e={}),e[t]=n[t]);return e}(t);o&&A(t.extendOptions,o),e=t.options=_o(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function oo(n,o,s,i,c){const a=c.options;let l;$(i,\"_uid\")?(l=Object.create(i),l._original=i):(l=i,i=i._original);const u=r(a._compiled),f=!u;this.data=n,this.props=o,this.children=s,this.parent=i,this.listeners=n.on||t,this.injections=to(a.inject,i),this.slots=()=>(this.$slots||ke(i,n.scopedSlots,this.$slots=we(s,i)),this.$slots),Object.defineProperty(this,\"scopedSlots\",{enumerable:!0,get(){return ke(i,n.scopedSlots,this.slots())}}),u&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=ke(i,n.scopedSlots,this.$slots)),a._scopeId?this._c=(t,n,o,r)=>{const s=se(l,t,n,o,r,f);return s&&!e(s)&&(s.fnScopeId=a._scopeId,s.fnContext=i),s}:this._c=(t,e,n,o)=>se(l,t,e,n,o,f)}function ro(t,e,n,o,r){const s=pt(t);return s.fnContext=n,s.fnOptions=o,e.slot&&((s.data||(s.data={})).slot=e.slot),s}function so(t,e){for(const n in e)t[x(n)]=e[n]}function io(t){return t.name||t.__name||t._componentTag}be(oo.prototype);const co={init(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){const e=t;co.prepatch(e,e)}else{(t.componentInstance=function(t,e){const n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ve)).$mount(e?t.elm:void 0,e)}},prepatch(e,n){const o=n.componentOptions;!function(e,n,o,r,s){const i=r.data.scopedSlots,c=e.$scopedSlots,a=!!(i&&!i.$stable||c!==t&&!c.$stable||i&&e.$scopedSlots.$key!==i.$key||!i&&e.$scopedSlots.$key);let l=!!(s||e.$options._renderChildren||a);const u=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=s;const f=r.data.attrs||t;e._attrsProxy&&Ae(e._attrsProxy,f,u.data&&u.data.attrs||t,e,\"$attrs\")&&(l=!0),e.$attrs=f,o=o||t;const d=e.$options._parentListeners;if(e._listenersProxy&&Ae(e._listenersProxy,o,d||t,e,\"$listeners\"),e.$listeners=e.$options._parentListeners=o,Be(e,o,d),n&&e.$options.props){St(!1);const t=e._props,o=e.$options._propKeys||[];for(let r=0;r<o.length;r++){const s=o[r],i=e.$options.props;t[s]=bo(s,i,n,e)}St(!0),e.$options.propsData=n}l&&(e.$slots=we(s,r.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,o.propsData,o.listeners,n,o.children)},insert(t){const{context:e,componentInstance:n}=t;var o;n._isMounted||(n._isMounted=!0,Ze(n,\"mounted\")),t.data.keepAlive&&(e._isMounted?((o=n)._inactive=!1,Xe.push(o)):qe(n,!0))},destroy(t){const{componentInstance:e}=t;e._isDestroyed||(t.data.keepAlive?We(e,!0):e.$destroy())}},ao=Object.keys(co);function lo(s,i,a,l,u){if(n(s))return;const d=a.$options._base;if(c(s)&&(s=d.extend(s)),\"function\"!=typeof s)return;let p;if(n(s.cid)&&(p=s,s=function(t,e){if(r(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;const s=Me;if(s&&o(t.owners)&&-1===t.owners.indexOf(s)&&t.owners.push(s),r(t.loading)&&o(t.loadingComp))return t.loadingComp;if(s&&!o(t.owners)){const r=t.owners=[s];let i=!0,a=null,l=null;s.$on(\"hook:destroyed\",(()=>y(r,s)));const u=t=>{for(let t=0,e=r.length;t<e;t++)r[t].$forceUpdate();t&&(r.length=0,null!==a&&(clearTimeout(a),a=null),null!==l&&(clearTimeout(l),l=null))},d=I((n=>{t.resolved=Ie(n,e),i?r.length=0:u(!0)})),p=I((e=>{o(t.errorComp)&&(t.error=!0,u(!0))})),h=t(d,p);return c(h)&&(f(h)?n(t.resolved)&&h.then(d,p):f(h.component)&&(h.component.then(d,p),o(h.error)&&(t.errorComp=Ie(h.error,e)),o(h.loading)&&(t.loadingComp=Ie(h.loading,e),0===h.delay?t.loading=!0:a=setTimeout((()=>{a=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,u(!1))}),h.delay||200)),o(h.timeout)&&(l=setTimeout((()=>{l=null,n(t.resolved)&&p(null)}),h.timeout)))),i=!1,t.loading?t.loadingComp:t.resolved}}(p,d),void 0===s))return function(t,e,n,o,r){const s=ft();return s.asyncFactory=t,s.asyncMeta={data:e,context:n,children:o,tag:r},s}(p,i,a,l,u);i=i||{},no(s),o(i.model)&&function(t,n){const r=t.model&&t.model.prop||\"value\",s=t.model&&t.model.event||\"input\";(n.attrs||(n.attrs={}))[r]=n.model.value;const i=n.on||(n.on={}),c=i[s],a=n.model.callback;o(c)?(e(c)?-1===c.indexOf(a):c!==a)&&(i[s]=[a].concat(c)):i[s]=a}(s.options,i);const h=function(t,e,r){const s=e.options.props;if(n(s))return;const i={},{attrs:c,props:a}=t;if(o(c)||o(a))for(const t in s){const e=S(t);Qt(i,a,t,e,!0)||Qt(i,c,t,e,!1)}return i}(i,s);if(r(s.options.functional))return function(n,r,s,i,c){const a=n.options,l={},u=a.props;if(o(u))for(const e in u)l[e]=bo(e,u,r||t);else o(s.attrs)&&so(l,s.attrs),o(s.props)&&so(l,s.props);const f=new oo(s,l,c,i,n),d=a.render.call(null,f._c,f);if(d instanceof ut)return ro(d,s,f.parent,a);if(e(d)){const t=te(d)||[],e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=ro(t[n],s,f.parent,a);return e}}(s,h,i,a,l);const m=i.on;if(i.on=i.nativeOn,r(s.options.abstract)){const t=i.slot;i={},t&&(i.slot=t)}!function(t){const e=t.hook||(t.hook={});for(let t=0;t<ao.length;t++){const n=ao[t],o=e[n],r=co[n];o===r||o&&o._merged||(e[n]=o?uo(r,o):r)}}(i);const g=io(s.options)||u;return new ut(`vue-component-${s.cid}${g?`-${g}`:\"\"}`,i,void 0,void 0,void 0,a,{Ctor:s,propsData:h,listeners:m,tag:u,children:l},p)}function uo(t,e){const n=(n,o)=>{t(n,o),e(n,o)};return n._merged=!0,n}let fo=E;const po=B.optionMergeStrategies;function ho(t,e,n=!0){if(!e)return t;let o,r,s;const i=it?Reflect.ownKeys(e):Object.keys(e);for(let c=0;c<i.length;c++)o=i[c],\"__ob__\"!==o&&(r=t[o],s=e[o],n&&$(t,o)?r!==s&&l(r)&&l(s)&&ho(r,s):Et(t,o,s));return t}function mo(t,e,n){return n?function(){const o=i(e)?e.call(n,n):e,r=i(t)?t.call(n,n):t;return o?ho(o,r):r}:e?t?function(){return ho(i(e)?e.call(this,this):e,i(t)?t.call(this,this):t)}:e:t}function go(t,n){const o=n?t?t.concat(n):e(n)?n:[n]:t;return o?function(t){const e=[];for(let n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(o):o}function vo(t,e,n,o){const r=Object.create(t||null);return e?A(r,e):r}po.data=function(t,e,n){return n?mo(t,e,n):e&&\"function\"!=typeof e?t:mo(t,e)},H.forEach((t=>{po[t]=go})),F.forEach((function(t){po[t+\"s\"]=vo})),po.watch=function(t,n,o,r){if(t===tt&&(t=void 0),n===tt&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;const s={};A(s,t);for(const t in n){let o=s[t];const r=n[t];o&&!e(o)&&(o=[o]),s[t]=o?o.concat(r):e(r)?r:[r]}return s},po.props=po.methods=po.inject=po.computed=function(t,e,n,o){if(!t)return e;const r=Object.create(null);return A(r,t),e&&A(r,e),r},po.provide=function(t,e){return t?function(){const n=Object.create(null);return ho(n,i(t)?t.call(this):t),e&&ho(n,i(e)?e.call(this):e,!1),n}:e};const yo=function(t,e){return void 0===e?t:e};function _o(t,n,o){if(i(n)&&(n=n.options),function(t,n){const o=t.props;if(!o)return;const r={};let s,i,c;if(e(o))for(s=o.length;s--;)i=o[s],\"string\"==typeof i&&(c=x(i),r[c]={type:null});else if(l(o))for(const t in o)i=o[t],c=x(t),r[c]=l(i)?i:{type:i};t.props=r}(n),function(t,n){const o=t.inject;if(!o)return;const r=t.inject={};if(e(o))for(let t=0;t<o.length;t++)r[o[t]]={from:o[t]};else if(l(o))for(const t in o){const e=o[t];r[t]=l(e)?A({from:t},e):{from:e}}}(n),function(t){const e=t.directives;if(e)for(const t in e){const n=e[t];i(n)&&(e[t]={bind:n,update:n})}}(n),!n._base&&(n.extends&&(t=_o(t,n.extends,o)),n.mixins))for(let e=0,r=n.mixins.length;e<r;e++)t=_o(t,n.mixins[e],o);const r={};let s;for(s in t)c(s);for(s in n)$(t,s)||c(s);function c(e){const s=po[e]||yo;r[e]=s(t[e],n[e],o,e)}return r}function $o(t,e,n,o){if(\"string\"!=typeof n)return;const r=t[e];if($(r,n))return r[n];const s=x(n);if($(r,s))return r[s];const i=C(s);if($(r,i))return r[i];return r[n]||r[s]||r[i]}function bo(t,e,n,o){const r=e[t],s=!$(n,t);let c=n[t];const a=ko(Boolean,r.type);if(a>-1)if(s&&!$(r,\"default\"))c=!1;else if(\"\"===c||c===S(t)){const t=ko(String,r.type);(t<0||a<t)&&(c=!0)}if(void 0===c){c=function(t,e,n){if(!$(e,\"default\"))return;const o=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return i(o)&&\"Function\"!==xo(e.type)?o.call(t):o}(o,r,t);const e=kt;St(!0),At(c),St(e)}return c}const wo=/^\\s*function (\\w+)/;function xo(t){const e=t&&t.toString().match(wo);return e?e[1]:\"\"}function Co(t,e){return xo(t)===xo(e)}function ko(t,n){if(!e(n))return Co(n,t)?0:-1;for(let e=0,o=n.length;e<o;e++)if(Co(n[e],t))return e;return-1}function So(t){this._init(t)}function Oo(t){t.cid=0;let e=1;t.extend=function(t){t=t||{};const n=this,o=n.cid,r=t._Ctor||(t._Ctor={});if(r[o])return r[o];const s=io(t)||io(n.options),i=function(t){this._init(t)};return(i.prototype=Object.create(n.prototype)).constructor=i,i.cid=e++,i.options=_o(n.options,t),i.super=n,i.options.props&&function(t){const e=t.options.props;for(const n in e)qn(t.prototype,\"_props\",n)}(i),i.options.computed&&function(t){const e=t.options.computed;for(const n in e)Gn(t.prototype,n,e[n])}(i),i.extend=n.extend,i.mixin=n.mixin,i.use=n.use,F.forEach((function(t){i[t]=n[t]})),s&&(i.options.components[s]=i),i.superOptions=n.options,i.extendOptions=t,i.sealedOptions=A({},i.options),r[o]=i,i}}function To(t){return t&&(io(t.Ctor.options)||t.tag)}function Ao(t,n){return e(t)?t.indexOf(n)>-1:\"string\"==typeof t?t.split(\",\").indexOf(n)>-1:(o=t,\"[object RegExp]\"===a.call(o)&&t.test(n));var o}function jo(t,e){const{cache:n,keys:o,_vnode:r,$vnode:s}=t;for(const t in n){const s=n[t];if(s){const i=s.name;i&&!e(i)&&Eo(n,t,o,r)}}s.componentOptions.children=void 0}function Eo(t,e,n,o){const r=t[e];!r||o&&r.tag===o.tag||r.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(e){e.prototype._init=function(e){const n=this;n._uid=eo++,n._isVue=!0,n.__v_skip=!0,n._scope=new Ue(!0),n._scope.parent=void 0,n._scope._vm=!0,e&&e._isComponent?function(t,e){const n=t.$options=Object.create(t.constructor.options),o=e._parentVnode;n.parent=e.parent,n._parentVnode=o;const r=o.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=_o(no(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){const e=t.$options;let n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;const e=t.$options._parentListeners;e&&Be(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;const n=e.$options,o=e.$vnode=n._parentVnode,r=o&&o.context;e.$slots=we(n._renderChildren,r),e.$scopedSlots=o?ke(e.$parent,o.data.scopedSlots,e.$slots):t,e._c=(t,n,o,r)=>se(e,t,n,o,r,!1),e.$createElement=(t,n,o,r)=>se(e,t,n,o,r,!0);const s=o&&o.data;jt(e,\"$attrs\",s&&s.attrs||t,null,!0),jt(e,\"$listeners\",n._parentListeners||t,null,!0)}(n),Ze(n,\"beforeCreate\",void 0,!1),function(t){const e=to(t.$options.inject,t);e&&(St(!1),Object.keys(e).forEach((n=>{jt(t,n,e[n])})),St(!0))}(n),Wn(n),function(t){const e=t.$options.provide;if(e){const n=i(e)?e.call(t):e;if(!c(n))return;const o=mn(t),r=it?Reflect.ownKeys(n):Object.keys(n);for(let t=0;t<r.length;t++){const e=r[t];Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(n,e))}}}(n),Ze(n,\"created\"),n.$options.el&&n.$mount(n.$options.el)}}(So),function(t){const e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,\"$data\",e),Object.defineProperty(t.prototype,\"$props\",n),t.prototype.$set=Et,t.prototype.$delete=Nt,t.prototype.$watch=function(t,e,n){const o=this;if(l(e))return Qn(o,t,e,n);(n=n||{}).user=!0;const r=new Kn(o,t,e,n);if(n.immediate){const t=`callback for immediate watcher \"${r.expression}\"`;_t(),vn(e,o,[r.value],o,t),$t()}return function(){r.teardown()}}}(So),function(t){const n=/^hook:/;t.prototype.$on=function(t,o){const r=this;if(e(t))for(let e=0,n=t.length;e<n;e++)r.$on(t[e],o);else(r._events[t]||(r._events[t]=[])).push(o),n.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){const n=this;function o(){n.$off(t,o),e.apply(n,arguments)}return o.fn=e,n.$on(t,o),n},t.prototype.$off=function(t,n){const o=this;if(!arguments.length)return o._events=Object.create(null),o;if(e(t)){for(let e=0,r=t.length;e<r;e++)o.$off(t[e],n);return o}const r=o._events[t];if(!r)return o;if(!n)return o._events[t]=null,o;let s,i=r.length;for(;i--;)if(s=r[i],s===n||s.fn===n){r.splice(i,1);break}return o},t.prototype.$emit=function(t){const e=this;let n=e._events[t];if(n){n=n.length>1?T(n):n;const o=T(arguments,1),r=`event handler for \"${t}\"`;for(let t=0,s=n.length;t<s;t++)vn(n[t],e,o,e,r)}return e}}(So),function(t){t.prototype._update=function(t,e){const n=this,o=n.$el,r=n._vnode,s=Ke(n);n._vnode=t,n.$el=r?n.__patch__(r,t):n.__patch__(n.$el,t,e,!1),s(),o&&(o.__vue__=null),n.$el&&(n.$el.__vue__=n);let i=n;for(;i&&i.$vnode&&i.$parent&&i.$vnode===i.$parent._vnode;)i.$parent.$el=i.$el,i=i.$parent},t.prototype.$forceUpdate=function(){const t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){const t=this;if(t._isBeingDestroyed)return;Ze(t,\"beforeDestroy\"),t._isBeingDestroyed=!0;const e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Ze(t,\"destroyed\"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}(So),function(t){be(t.prototype),t.prototype.$nextTick=function(t){return kn(t,this)},t.prototype._render=function(){const t=this,{render:n,_parentVnode:o}=t.$options;o&&t._isMounted&&(t.$scopedSlots=ke(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Ee(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;const r=at,s=Me;let i;try{lt(t),Me=t,i=n.call(t._renderProxy,t.$createElement)}catch(e){gn(e,t,\"render\"),i=t._vnode}finally{Me=s,lt(r)}return e(i)&&1===i.length&&(i=i[0]),i instanceof ut||(i=ft()),i.parent=o,i}}(So);const No=[String,RegExp,Array];var Po={KeepAlive:{name:\"keep-alive\",abstract:!0,props:{include:No,exclude:No,max:[String,Number]},methods:{cacheVNode(){const{cache:t,keys:e,vnodeToCache:n,keyToCache:o}=this;if(n){const{tag:r,componentInstance:s,componentOptions:i}=n;t[o]={name:To(i),tag:r,componentInstance:s},e.push(o),this.max&&e.length>parseInt(this.max)&&Eo(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const t in this.cache)Eo(this.cache,t,this.keys)},mounted(){this.cacheVNode(),this.$watch(\"include\",(t=>{jo(this,(e=>Ao(t,e)))})),this.$watch(\"exclude\",(t=>{jo(this,(e=>!Ao(t,e)))}))},updated(){this.cacheVNode()},render(){const t=this.$slots.default,e=Le(t),n=e&&e.componentOptions;if(n){const t=To(n),{include:o,exclude:r}=this;if(o&&(!t||!Ao(o,t))||r&&t&&Ao(r,t))return e;const{cache:s,keys:i}=this,c=null==e.key?n.Ctor.cid+(n.tag?`::${n.tag}`:\"\"):e.key;s[c]?(e.componentInstance=s[c].componentInstance,y(i,c),i.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){const e={get:()=>B};Object.defineProperty(t,\"config\",e),t.util={warn:fo,extend:A,mergeOptions:_o,defineReactive:jt},t.set=Et,t.delete=Nt,t.nextTick=kn,t.observable=t=>(At(t),t),t.options=Object.create(null),F.forEach((e=>{t.options[e+\"s\"]=Object.create(null)})),t.options._base=t,A(t.options.components,Po),function(t){t.use=function(t){const e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;const n=T(arguments,1);return n.unshift(this),i(t.install)?t.install.apply(t,n):i(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=_o(this.options,t),this}}(t),Oo(t),function(t){F.forEach((e=>{t[e]=function(t,n){return n?(\"component\"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),\"directive\"===e&&i(n)&&(n={bind:n,update:n}),this.options[e+\"s\"][t]=n,n):this.options[e+\"s\"][t]}}))}(t)}(So),Object.defineProperty(So.prototype,\"$isServer\",{get:ot}),Object.defineProperty(So.prototype,\"$ssrContext\",{get(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(So,\"FunctionalRenderContext\",{value:oo}),So.version=Fn;const Do=m(\"style,class\"),Mo=m(\"input,textarea,option,select,progress\"),Io=(t,e,n)=>\"value\"===n&&Mo(t)&&\"button\"!==e||\"selected\"===n&&\"option\"===t||\"checked\"===n&&\"input\"===t||\"muted\"===n&&\"video\"===t,Lo=m(\"contenteditable,draggable,spellcheck\"),Ro=m(\"events,caret,typing,plaintext-only\"),Fo=(t,e)=>Vo(e)||\"false\"===e?\"false\":\"contenteditable\"===t&&Ro(e)?e:\"true\",Ho=m(\"allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible\"),Bo=\"http://www.w3.org/1999/xlink\",Uo=t=>\":\"===t.charAt(5)&&\"xlink\"===t.slice(0,5),zo=t=>Uo(t)?t.slice(6,t.length):\"\",Vo=t=>null==t||!1===t;function Ko(t){let e=t.data,n=t,r=t;for(;o(r.componentInstance);)r=r.componentInstance._vnode,r&&r.data&&(e=Jo(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Jo(e,n.data));return function(t,e){if(o(t)||o(e))return qo(t,Wo(e));return\"\"}(e.staticClass,e.class)}function Jo(t,e){return{staticClass:qo(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function qo(t,e){return t?e?t+\" \"+e:t:e||\"\"}function Wo(t){return Array.isArray(t)?function(t){let e,n=\"\";for(let r=0,s=t.length;r<s;r++)o(e=Wo(t[r]))&&\"\"!==e&&(n&&(n+=\" \"),n+=e);return n}(t):c(t)?function(t){let e=\"\";for(const n in t)t[n]&&(e&&(e+=\" \"),e+=n);return e}(t):\"string\"==typeof t?t:\"\"}const Zo={svg:\"http://www.w3.org/2000/svg\",math:\"http://www.w3.org/1998/Math/MathML\"},Go=m(\"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot\"),Xo=m(\"svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view\",!0),Yo=t=>Go(t)||Xo(t);function Qo(t){return Xo(t)?\"svg\":\"math\"===t?\"math\":void 0}const tr=Object.create(null);const er=m(\"text,number,password,search,email,tel,url\");function nr(t){if(\"string\"==typeof t){const e=document.querySelector(t);return e||document.createElement(\"div\")}return t}var or=Object.freeze({__proto__:null,createElement:function(t,e){const n=document.createElement(t);return\"select\"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute(\"multiple\",\"multiple\"),n},createElementNS:function(t,e){return document.createElementNS(Zo[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,\"\")}}),rr={create(t,e){sr(e)},update(t,e){t.data.ref!==e.data.ref&&(sr(t,!0),sr(e))},destroy(t){sr(t,!0)}};function sr(t,n){const r=t.data.ref;if(!o(r))return;const s=t.context,c=t.componentInstance||t.elm,a=n?null:c,l=n?void 0:c;if(i(r))return void vn(r,s,[a],s,\"template ref function\");const u=t.data.refInFor,f=\"string\"==typeof r||\"number\"==typeof r,d=Ht(r),p=s.$refs;if(f||d)if(u){const t=f?p[r]:r.value;n?e(t)&&y(t,c):e(t)?t.includes(c)||t.push(c):f?(p[r]=[c],ir(s,r,p[r])):r.value=[c]}else if(f){if(n&&p[r]!==c)return;p[r]=l,ir(s,r,a)}else if(d){if(n&&r.value!==c)return;r.value=a}}function ir({_setupState:t},e,n){t&&$(t,e)&&(Ht(t[e])?t[e].value=n:t[e]=n)}const cr=new ut(\"\",{},[]),ar=[\"create\",\"activate\",\"update\",\"remove\",\"destroy\"];function lr(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if(\"input\"!==t.tag)return!0;let n;const r=o(n=t.data)&&o(n=n.attrs)&&n.type,s=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===s||er(r)&&er(s)}(t,e)||r(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function ur(t,e,n){let r,s;const i={};for(r=e;r<=n;++r)s=t[r].key,o(s)&&(i[s]=r);return i}var fr={create:dr,update:dr,destroy:function(t){dr(t,cr)}};function dr(t,e){(t.data.directives||e.data.directives)&&function(t,e){const n=t===cr,o=e===cr,r=hr(t.data.directives,t.context),s=hr(e.data.directives,e.context),i=[],c=[];let a,l,u;for(a in s)l=r[a],u=s[a],l?(u.oldValue=l.value,u.oldArg=l.arg,gr(u,\"update\",e,t),u.def&&u.def.componentUpdated&&c.push(u)):(gr(u,\"bind\",e,t),u.def&&u.def.inserted&&i.push(u));if(i.length){const o=()=>{for(let n=0;n<i.length;n++)gr(i[n],\"inserted\",e,t)};n?Yt(e,\"insert\",o):o()}c.length&&Yt(e,\"postpatch\",(()=>{for(let n=0;n<c.length;n++)gr(c[n],\"componentUpdated\",e,t)}));if(!n)for(a in r)s[a]||gr(r[a],\"unbind\",t,t,o)}(t,e)}const pr=Object.create(null);function hr(t,e){const n=Object.create(null);if(!t)return n;let o,r;for(o=0;o<t.length;o++){if(r=t[o],r.modifiers||(r.modifiers=pr),n[mr(r)]=r,e._setupState&&e._setupState.__sfc){const t=r.def||$o(e,\"_setupState\",\"v-\"+r.name);r.def=\"function\"==typeof t?{bind:t,update:t}:t}r.def=r.def||$o(e.$options,\"directives\",r.name)}return n}function mr(t){return t.rawName||`${t.name}.${Object.keys(t.modifiers||{}).join(\".\")}`}function gr(t,e,n,o,r){const s=t.def&&t.def[e];if(s)try{s(n.elm,t,n,o,r)}catch(o){gn(o,n.context,`directive ${t.name} ${e} hook`)}}var vr=[rr,fr];function yr(t,e){const s=e.componentOptions;if(o(s)&&!1===s.Ctor.options.inheritAttrs)return;if(n(t.data.attrs)&&n(e.data.attrs))return;let i,c,a;const l=e.elm,u=t.data.attrs||{};let f=e.data.attrs||{};for(i in(o(f.__ob__)||r(f._v_attr_proxy))&&(f=e.data.attrs=A({},f)),f)c=f[i],a=u[i],a!==c&&_r(l,i,c,e.data.pre);for(i in(Z||X)&&f.value!==u.value&&_r(l,\"value\",f.value),u)n(f[i])&&(Uo(i)?l.removeAttributeNS(Bo,zo(i)):Lo(i)||l.removeAttribute(i))}function _r(t,e,n,o){o||t.tagName.indexOf(\"-\")>-1?$r(t,e,n):Ho(e)?Vo(n)?t.removeAttribute(e):(n=\"allowfullscreen\"===e&&\"EMBED\"===t.tagName?\"true\":e,t.setAttribute(e,n)):Lo(e)?t.setAttribute(e,Fo(e,n)):Uo(e)?Vo(n)?t.removeAttributeNS(Bo,zo(e)):t.setAttributeNS(Bo,e,n):$r(t,e,n)}function $r(t,e,n){if(Vo(n))t.removeAttribute(e);else{if(Z&&!G&&\"TEXTAREA\"===t.tagName&&\"placeholder\"===e&&\"\"!==n&&!t.__ieph){const e=n=>{n.stopImmediatePropagation(),t.removeEventListener(\"input\",e)};t.addEventListener(\"input\",e),t.__ieph=!0}t.setAttribute(e,n)}}var br={create:yr,update:yr};function wr(t,e){const r=e.elm,s=e.data,i=t.data;if(n(s.staticClass)&&n(s.class)&&(n(i)||n(i.staticClass)&&n(i.class)))return;let c=Ko(e);const a=r._transitionClasses;o(a)&&(c=qo(c,Wo(a))),c!==r._prevClass&&(r.setAttribute(\"class\",c),r._prevClass=c)}var xr={create:wr,update:wr};const Cr=/[\\w).+\\-_$\\]]/;function kr(t){let e,n,o,r,s,i=!1,c=!1,a=!1,l=!1,u=0,f=0,d=0,p=0;for(o=0;o<t.length;o++)if(n=e,e=t.charCodeAt(o),i)39===e&&92!==n&&(i=!1);else if(c)34===e&&92!==n&&(c=!1);else if(a)96===e&&92!==n&&(a=!1);else if(l)47===e&&92!==n&&(l=!1);else if(124!==e||124===t.charCodeAt(o+1)||124===t.charCodeAt(o-1)||u||f||d){switch(e){case 34:c=!0;break;case 39:i=!0;break;case 96:a=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===e){let e,n=o-1;for(;n>=0&&(e=t.charAt(n),\" \"===e);n--);e&&Cr.test(e)||(l=!0)}}else void 0===r?(p=o+1,r=t.slice(0,o).trim()):h();function h(){(s||(s=[])).push(t.slice(p,o).trim()),p=o+1}if(void 0===r?r=t.slice(0,o).trim():0!==p&&h(),s)for(o=0;o<s.length;o++)r=Sr(r,s[o]);return r}function Sr(t,e){const n=e.indexOf(\"(\");if(n<0)return`_f(\"${e}\")(${t})`;{const o=e.slice(0,n),r=e.slice(n+1);return`_f(\"${o}\")(${t}${\")\"!==r?\",\"+r:r}`}}function Or(t,e){console.error(`[Vue compiler]: ${t}`)}function Tr(t,e){return t?t.map((t=>t[e])).filter((t=>t)):[]}function Ar(t,e,n,o,r){(t.props||(t.props=[])).push(Rr({name:e,value:n,dynamic:r},o)),t.plain=!1}function jr(t,e,n,o,r){(r?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Rr({name:e,value:n,dynamic:r},o)),t.plain=!1}function Er(t,e,n,o){t.attrsMap[e]=n,t.attrsList.push(Rr({name:e,value:n},o))}function Nr(t,e,n,o,r,s,i,c){(t.directives||(t.directives=[])).push(Rr({name:e,rawName:n,value:o,arg:r,isDynamicArg:s,modifiers:i},c)),t.plain=!1}function Pr(t,e,n){return n?`_p(${e},\"${t}\")`:t+e}function Dr(e,n,o,r,s,i,c,a){let l;(r=r||t).right?a?n=`(${n})==='click'?'contextmenu':(${n})`:\"click\"===n&&(n=\"contextmenu\",delete r.right):r.middle&&(a?n=`(${n})==='click'?'mouseup':(${n})`:\"click\"===n&&(n=\"mouseup\")),r.capture&&(delete r.capture,n=Pr(\"!\",n,a)),r.once&&(delete r.once,n=Pr(\"~\",n,a)),r.passive&&(delete r.passive,n=Pr(\"&\",n,a)),r.native?(delete r.native,l=e.nativeEvents||(e.nativeEvents={})):l=e.events||(e.events={});const u=Rr({value:o.trim(),dynamic:a},c);r!==t&&(u.modifiers=r);const f=l[n];Array.isArray(f)?s?f.unshift(u):f.push(u):l[n]=f?s?[u,f]:[f,u]:u,e.plain=!1}function Mr(t,e,n){const o=Ir(t,\":\"+e)||Ir(t,\"v-bind:\"+e);if(null!=o)return kr(o);if(!1!==n){const n=Ir(t,e);if(null!=n)return JSON.stringify(n)}}function Ir(t,e,n){let o;if(null!=(o=t.attrsMap[e])){const n=t.attrsList;for(let t=0,o=n.length;t<o;t++)if(n[t].name===e){n.splice(t,1);break}}return n&&delete t.attrsMap[e],o}function Lr(t,e){const n=t.attrsList;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(e.test(o.name))return n.splice(t,1),o}}function Rr(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Fr(t,e,n){const{number:o,trim:r}=n||{},s=\"$$v\";let i=s;r&&(i=`(typeof ${s} === 'string'? ${s}.trim(): ${s})`),o&&(i=`_n(${i})`);const c=Hr(e,i);t.model={value:`(${e})`,expression:JSON.stringify(e),callback:`function (${s}) {${c}}`}}function Hr(t,e){const n=function(t){if(t=t.trim(),Br=t.length,t.indexOf(\"[\")<0||t.lastIndexOf(\"]\")<Br-1)return Vr=t.lastIndexOf(\".\"),Vr>-1?{exp:t.slice(0,Vr),key:'\"'+t.slice(Vr+1)+'\"'}:{exp:t,key:null};Ur=t,Vr=Kr=Jr=0;for(;!Wr();)zr=qr(),Zr(zr)?Xr(zr):91===zr&&Gr(zr);return{exp:t.slice(0,Kr),key:t.slice(Kr+1,Jr)}}(t);return null===n.key?`${t}=${e}`:`$set(${n.exp}, ${n.key}, ${e})`}let Br,Ur,zr,Vr,Kr,Jr;function qr(){return Ur.charCodeAt(++Vr)}function Wr(){return Vr>=Br}function Zr(t){return 34===t||39===t}function Gr(t){let e=1;for(Kr=Vr;!Wr();)if(Zr(t=qr()))Xr(t);else if(91===t&&e++,93===t&&e--,0===e){Jr=Vr;break}}function Xr(t){const e=t;for(;!Wr()&&(t=qr())!==e;);}const Yr=\"__r\",Qr=\"__c\";let ts;function es(t,e,n){const o=ts;return function r(){null!==e.apply(null,arguments)&&rs(t,r,n,o)}}const ns=$n&&!(Q&&Number(Q[1])<=53);function os(t,e,n,o){if(ns){const t=nn,n=e;e=n._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=t||e.timeStamp<=0||e.target.ownerDocument!==document)return n.apply(this,arguments)}}ts.addEventListener(t,e,nt?{capture:n,passive:o}:n)}function rs(t,e,n,o){(o||ts).removeEventListener(t,e._wrapper||e,n)}function ss(t,e){if(n(t.data.on)&&n(e.data.on))return;const r=e.data.on||{},s=t.data.on||{};ts=e.elm||t.elm,function(t){if(o(t[Yr])){const e=Z?\"change\":\"input\";t[e]=[].concat(t[Yr],t[e]||[]),delete t[Yr]}o(t[Qr])&&(t.change=[].concat(t[Qr],t.change||[]),delete t[Qr])}(r),Xt(r,s,os,rs,es,e.context),ts=void 0}var is={create:ss,update:ss,destroy:t=>ss(t,cr)};let cs;function as(t,e){if(n(t.data.domProps)&&n(e.data.domProps))return;let s,i;const c=e.elm,a=t.data.domProps||{};let l=e.data.domProps||{};for(s in(o(l.__ob__)||r(l._v_attr_proxy))&&(l=e.data.domProps=A({},l)),a)s in l||(c[s]=\"\");for(s in l){if(i=l[s],\"textContent\"===s||\"innerHTML\"===s){if(e.children&&(e.children.length=0),i===a[s])continue;1===c.childNodes.length&&c.removeChild(c.childNodes[0])}if(\"value\"===s&&\"PROGRESS\"!==c.tagName){c._value=i;const t=n(i)?\"\":String(i);ls(c,t)&&(c.value=t)}else if(\"innerHTML\"===s&&Xo(c.tagName)&&n(c.innerHTML)){cs=cs||document.createElement(\"div\"),cs.innerHTML=`<svg>${i}</svg>`;const t=cs.firstChild;for(;c.firstChild;)c.removeChild(c.firstChild);for(;t.firstChild;)c.appendChild(t.firstChild)}else if(i!==a[s])try{c[s]=i}catch(t){}}}function ls(t,e){return!t.composing&&(\"OPTION\"===t.tagName||function(t,e){let n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){const n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return h(n)!==h(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var us={create:as,update:as};const fs=b((function(t){const e={},n=/:(.+)/;return t.split(/;(?![^(]*\\))/g).forEach((function(t){if(t){const o=t.split(n);o.length>1&&(e[o[0].trim()]=o[1].trim())}})),e}));function ds(t){const e=ps(t.style);return t.staticStyle?A(t.staticStyle,e):e}function ps(t){return Array.isArray(t)?j(t):\"string\"==typeof t?fs(t):t}const hs=/^--/,ms=/\\s*!important$/,gs=(t,e,n)=>{if(hs.test(e))t.style.setProperty(e,n);else if(ms.test(n))t.style.setProperty(S(e),n.replace(ms,\"\"),\"important\");else{const o=_s(e);if(Array.isArray(n))for(let e=0,r=n.length;e<r;e++)t.style[o]=n[e];else t.style[o]=n}},vs=[\"Webkit\",\"Moz\",\"ms\"];let ys;const _s=b((function(t){if(ys=ys||document.createElement(\"div\").style,\"filter\"!==(t=x(t))&&t in ys)return t;const e=t.charAt(0).toUpperCase()+t.slice(1);for(let t=0;t<vs.length;t++){const n=vs[t]+e;if(n in ys)return n}}));function $s(t,e){const r=e.data,s=t.data;if(n(r.staticStyle)&&n(r.style)&&n(s.staticStyle)&&n(s.style))return;let i,c;const a=e.elm,l=s.staticStyle,u=s.normalizedStyle||s.style||{},f=l||u,d=ps(e.data.style)||{};e.data.normalizedStyle=o(d.__ob__)?A({},d):d;const p=function(t,e){const n={};let o;if(e){let e=t;for(;e.componentInstance;)e=e.componentInstance._vnode,e&&e.data&&(o=ds(e.data))&&A(n,o)}(o=ds(t.data))&&A(n,o);let r=t;for(;r=r.parent;)r.data&&(o=ds(r.data))&&A(n,o);return n}(e,!0);for(c in f)n(p[c])&&gs(a,c,\"\");for(c in p)i=p[c],gs(a,c,null==i?\"\":i)}var bs={create:$s,update:$s};const ws=/\\s+/;function xs(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(\" \")>-1?e.split(ws).forEach((e=>t.classList.add(e))):t.classList.add(e);else{const n=` ${t.getAttribute(\"class\")||\"\"} `;n.indexOf(\" \"+e+\" \")<0&&t.setAttribute(\"class\",(n+e).trim())}}function Cs(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(\" \")>-1?e.split(ws).forEach((e=>t.classList.remove(e))):t.classList.remove(e),t.classList.length||t.removeAttribute(\"class\");else{let n=` ${t.getAttribute(\"class\")||\"\"} `;const o=\" \"+e+\" \";for(;n.indexOf(o)>=0;)n=n.replace(o,\" \");n=n.trim(),n?t.setAttribute(\"class\",n):t.removeAttribute(\"class\")}}function ks(t){if(t){if(\"object\"==typeof t){const e={};return!1!==t.css&&A(e,Ss(t.name||\"v\")),A(e,t),e}return\"string\"==typeof t?Ss(t):void 0}}const Ss=b((t=>({enterClass:`${t}-enter`,enterToClass:`${t}-enter-to`,enterActiveClass:`${t}-enter-active`,leaveClass:`${t}-leave`,leaveToClass:`${t}-leave-to`,leaveActiveClass:`${t}-leave-active`}))),Os=q&&!G,Ts=\"transition\",As=\"animation\";let js=\"transition\",Es=\"transitionend\",Ns=\"animation\",Ps=\"animationend\";Os&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(js=\"WebkitTransition\",Es=\"webkitTransitionEnd\"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ns=\"WebkitAnimation\",Ps=\"webkitAnimationEnd\"));const Ds=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:t=>t();function Ms(t){Ds((()=>{Ds(t)}))}function Is(t,e){const n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xs(t,e))}function Ls(t,e){t._transitionClasses&&y(t._transitionClasses,e),Cs(t,e)}function Rs(t,e,n){const{type:o,timeout:r,propCount:s}=Hs(t,e);if(!o)return n();const i=o===Ts?Es:Ps;let c=0;const a=()=>{t.removeEventListener(i,l),n()},l=e=>{e.target===t&&++c>=s&&a()};setTimeout((()=>{c<s&&a()}),r+1),t.addEventListener(i,l)}const Fs=/\\b(transform|all)(,|$)/;function Hs(t,e){const n=window.getComputedStyle(t),o=(n[js+\"Delay\"]||\"\").split(\", \"),r=(n[js+\"Duration\"]||\"\").split(\", \"),s=Bs(o,r),i=(n[Ns+\"Delay\"]||\"\").split(\", \"),c=(n[Ns+\"Duration\"]||\"\").split(\", \"),a=Bs(i,c);let l,u=0,f=0;e===Ts?s>0&&(l=Ts,u=s,f=r.length):e===As?a>0&&(l=As,u=a,f=c.length):(u=Math.max(s,a),l=u>0?s>a?Ts:As:null,f=l?l===Ts?r.length:c.length:0);return{type:l,timeout:u,propCount:f,hasTransform:l===Ts&&Fs.test(n[js+\"Property\"])}}function Bs(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(((e,n)=>Us(e)+Us(t[n]))))}function Us(t){return 1e3*Number(t.slice(0,-1).replace(\",\",\".\"))}function zs(t,e){const r=t.elm;o(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());const s=ks(t.data.transition);if(n(s))return;if(o(r._enterCb)||1!==r.nodeType)return;const{css:a,type:l,enterClass:u,enterToClass:f,enterActiveClass:d,appearClass:p,appearToClass:m,appearActiveClass:g,beforeEnter:v,enter:y,afterEnter:_,enterCancelled:$,beforeAppear:b,appear:w,afterAppear:x,appearCancelled:C,duration:k}=s;let S=Ve,O=Ve.$vnode;for(;O&&O.parent;)S=O.context,O=O.parent;const T=!S._isMounted||!t.isRootInsert;if(T&&!w&&\"\"!==w)return;const A=T&&p?p:u,j=T&&g?g:d,E=T&&m?m:f,N=T&&b||v,P=T&&i(w)?w:y,D=T&&x||_,M=T&&C||$,L=h(c(k)?k.enter:k),R=!1!==a&&!G,F=Js(P),H=r._enterCb=I((()=>{R&&(Ls(r,E),Ls(r,j)),H.cancelled?(R&&Ls(r,A),M&&M(r)):D&&D(r),r._enterCb=null}));t.data.show||Yt(t,\"insert\",(()=>{const e=r.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(r,H)})),N&&N(r),R&&(Is(r,A),Is(r,j),Ms((()=>{Ls(r,A),H.cancelled||(Is(r,E),F||(Ks(L)?setTimeout(H,L):Rs(r,l,H)))}))),t.data.show&&(e&&e(),P&&P(r,H)),R||F||H()}function Vs(t,e){const r=t.elm;o(r._enterCb)&&(r._enterCb.cancelled=!0,r._enterCb());const s=ks(t.data.transition);if(n(s)||1!==r.nodeType)return e();if(o(r._leaveCb))return;const{css:i,type:a,leaveClass:l,leaveToClass:u,leaveActiveClass:f,beforeLeave:d,leave:p,afterLeave:m,leaveCancelled:g,delayLeave:v,duration:y}=s,_=!1!==i&&!G,$=Js(p),b=h(c(y)?y.leave:y),w=r._leaveCb=I((()=>{r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),_&&(Ls(r,u),Ls(r,f)),w.cancelled?(_&&Ls(r,l),g&&g(r)):(e(),m&&m(r)),r._leaveCb=null}));function x(){w.cancelled||(!t.data.show&&r.parentNode&&((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),d&&d(r),_&&(Is(r,l),Is(r,f),Ms((()=>{Ls(r,l),w.cancelled||(Is(r,u),$||(Ks(b)?setTimeout(w,b):Rs(r,a,w)))}))),p&&p(r,w),_||$||w())}v?v(x):x()}function Ks(t){return\"number\"==typeof t&&!isNaN(t)}function Js(t){if(n(t))return!1;const e=t.fns;return o(e)?Js(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function qs(t,e){!0!==e.data.show&&zs(e)}const Ws=function(t){let i,c;const a={},{modules:l,nodeOps:u}=t;for(i=0;i<ar.length;++i)for(a[ar[i]]=[],c=0;c<l.length;++c)o(l[c][ar[i]])&&a[ar[i]].push(l[c][ar[i]]);function f(t){const e=u.parentNode(t);o(e)&&u.removeChild(e,t)}function d(t,e,n,s,i,c,l){if(o(t.elm)&&o(c)&&(t=c[l]=pt(t)),t.isRootInsert=!i,function(t,e,n,s){let i=t.data;if(o(i)){const c=o(t.componentInstance)&&i.keepAlive;if(o(i=i.hook)&&o(i=i.init)&&i(t,!1),o(t.componentInstance))return p(t,e),h(n,t.elm,s),r(c)&&function(t,e,n,r){let s,i=t;for(;i.componentInstance;)if(i=i.componentInstance._vnode,o(s=i.data)&&o(s=s.transition)){for(s=0;s<a.activate.length;++s)a.activate[s](cr,i);e.push(i);break}h(n,t.elm,r)}(t,e,n,s),!0}}(t,e,n,s))return;const f=t.data,d=t.children,m=t.tag;o(m)?(t.elm=t.ns?u.createElementNS(t.ns,m):u.createElement(m,t),_(t),g(t,d,e),o(f)&&y(t,e),h(n,t.elm,s)):r(t.isComment)?(t.elm=u.createComment(t.text),h(n,t.elm,s)):(t.elm=u.createTextNode(t.text),h(n,t.elm,s))}function p(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),_(t)):(sr(t),e.push(t))}function h(t,e,n){o(t)&&(o(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function g(t,n,o){if(e(n))for(let e=0;e<n.length;++e)d(n[e],o,t.elm,null,!0,n,e);else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function y(t,e){for(let e=0;e<a.create.length;++e)a.create[e](cr,t);i=t.data.hook,o(i)&&(o(i.create)&&i.create(cr,t),o(i.insert)&&e.push(t))}function _(t){let e;if(o(e=t.fnScopeId))u.setStyleScope(t.elm,e);else{let n=t;for(;n;)o(e=n.context)&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent}o(e=Ve)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function $(t,e,n,o,r,s){for(;o<=r;++o)d(n[o],s,t,e,!1,n,o)}function b(t){let e,n;const r=t.data;if(o(r))for(o(e=r.hook)&&o(e=e.destroy)&&e(t),e=0;e<a.destroy.length;++e)a.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)b(t.children[n])}function w(t,e,n){for(;e<=n;++e){const n=t[e];o(n)&&(o(n.tag)?(x(n),b(n)):f(n.elm))}}function x(t,e){if(o(e)||o(t.data)){let n;const r=a.remove.length+1;for(o(e)?e.listeners+=r:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,r),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&x(n,e),n=0;n<a.remove.length;++n)a.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else f(t.elm)}function C(t,e,n,r){for(let s=n;s<r;s++){const n=e[s];if(o(n)&&lr(t,n))return s}}function k(t,e,s,i,c,l){if(t===e)return;o(e.elm)&&o(i)&&(e=i[c]=pt(e));const f=e.elm=t.elm;if(r(t.isAsyncPlaceholder))return void(o(e.asyncFactory.resolved)?T(t.elm,e,s):e.isAsyncPlaceholder=!0);if(r(e.isStatic)&&r(t.isStatic)&&e.key===t.key&&(r(e.isCloned)||r(e.isOnce)))return void(e.componentInstance=t.componentInstance);let p;const h=e.data;o(h)&&o(p=h.hook)&&o(p=p.prepatch)&&p(t,e);const m=t.children,g=e.children;if(o(h)&&v(e)){for(p=0;p<a.update.length;++p)a.update[p](t,e);o(p=h.hook)&&o(p=p.update)&&p(t,e)}n(e.text)?o(m)&&o(g)?m!==g&&function(t,e,r,s,i){let c,a,l,f,p=0,h=0,m=e.length-1,g=e[0],v=e[m],y=r.length-1,_=r[0],b=r[y];const x=!i;for(;p<=m&&h<=y;)n(g)?g=e[++p]:n(v)?v=e[--m]:lr(g,_)?(k(g,_,s,r,h),g=e[++p],_=r[++h]):lr(v,b)?(k(v,b,s,r,y),v=e[--m],b=r[--y]):lr(g,b)?(k(g,b,s,r,y),x&&u.insertBefore(t,g.elm,u.nextSibling(v.elm)),g=e[++p],b=r[--y]):lr(v,_)?(k(v,_,s,r,h),x&&u.insertBefore(t,v.elm,g.elm),v=e[--m],_=r[++h]):(n(c)&&(c=ur(e,p,m)),a=o(_.key)?c[_.key]:C(_,e,p,m),n(a)?d(_,s,t,g.elm,!1,r,h):(l=e[a],lr(l,_)?(k(l,_,s,r,h),e[a]=void 0,x&&u.insertBefore(t,l.elm,g.elm)):d(_,s,t,g.elm,!1,r,h)),_=r[++h]);p>m?(f=n(r[y+1])?null:r[y+1].elm,$(t,f,r,h,y,s)):h>y&&w(e,p,m)}(f,m,g,s,l):o(g)?(o(t.text)&&u.setTextContent(f,\"\"),$(f,null,g,0,g.length-1,s)):o(m)?w(m,0,m.length-1):o(t.text)&&u.setTextContent(f,\"\"):t.text!==e.text&&u.setTextContent(f,e.text),o(h)&&o(p=h.hook)&&o(p=p.postpatch)&&p(t,e)}function S(t,e,n){if(r(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(let t=0;t<e.length;++t)e[t].data.hook.insert(e[t])}const O=m(\"attrs,class,staticClass,staticStyle,key\");function T(t,e,n,s){let i;const{tag:c,data:a,children:l}=e;if(s=s||a&&a.pre,e.elm=t,r(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(a)&&(o(i=a.hook)&&o(i=i.init)&&i(e,!0),o(i=e.componentInstance)))return p(e,n),!0;if(o(c)){if(o(l))if(t.hasChildNodes())if(o(i=a)&&o(i=i.domProps)&&o(i=i.innerHTML)){if(i!==t.innerHTML)return!1}else{let e=!0,o=t.firstChild;for(let t=0;t<l.length;t++){if(!o||!T(o,l[t],n,s)){e=!1;break}o=o.nextSibling}if(!e||o)return!1}else g(e,l,n);if(o(a)){let t=!1;for(const o in a)if(!O(o)){t=!0,y(e,n);break}!t&&a.class&&Un(a.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,s,i){if(n(e))return void(o(t)&&b(t));let c=!1;const l=[];if(n(t))c=!0,d(e,l);else{const n=o(t.nodeType);if(!n&&lr(t,e))k(t,e,l,null,null,i);else{if(n){if(1===t.nodeType&&t.hasAttribute(R)&&(t.removeAttribute(R),s=!0),r(s)&&T(t,e,l))return S(e,l,!0),t;f=t,t=new ut(u.tagName(f).toLowerCase(),{},[],void 0,f)}const i=t.elm,c=u.parentNode(i);if(d(e,l,i._leaveCb?null:c,u.nextSibling(i)),o(e.parent)){let t=e.parent;const n=v(e);for(;t;){for(let e=0;e<a.destroy.length;++e)a.destroy[e](t);if(t.elm=e.elm,n){for(let e=0;e<a.create.length;++e)a.create[e](cr,t);const e=t.data.hook.insert;if(e.merged){const t=e.fns.slice(1);for(let e=0;e<t.length;e++)t[e]()}}else sr(t);t=t.parent}}o(c)?w([t],0,0):o(t.tag)&&b(t)}}var f;return S(e,l,c),e.elm}}({nodeOps:or,modules:[br,xr,is,us,bs,q?{create:qs,activate:qs,remove(t,e){!0!==t.data.show?Vs(t,e):e()}}:{}].concat(vr)});G&&document.addEventListener(\"selectionchange\",(()=>{const t=document.activeElement;t&&t.vmodel&&ni(t,\"input\")}));const Zs={inserted(t,e,n,o){\"select\"===n.tag?(o.elm&&!o.elm._vOptions?Yt(n,\"postpatch\",(()=>{Zs.componentUpdated(t,e,n)})):Gs(t,e,n.context),t._vOptions=[].map.call(t.options,Qs)):(\"textarea\"===n.tag||er(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener(\"compositionstart\",ti),t.addEventListener(\"compositionend\",ei),t.addEventListener(\"change\",ei),G&&(t.vmodel=!0)))},componentUpdated(t,e,n){if(\"select\"===n.tag){Gs(t,e,n.context);const o=t._vOptions,r=t._vOptions=[].map.call(t.options,Qs);if(r.some(((t,e)=>!D(t,o[e])))){(t.multiple?e.value.some((t=>Ys(t,r))):e.value!==e.oldValue&&Ys(e.value,r))&&ni(t,\"change\")}}}};function Gs(t,e,n){Xs(t,e),(Z||X)&&setTimeout((()=>{Xs(t,e)}),0)}function Xs(t,e,n){const o=e.value,r=t.multiple;if(r&&!Array.isArray(o))return;let s,i;for(let e=0,n=t.options.length;e<n;e++)if(i=t.options[e],r)s=M(o,Qs(i))>-1,i.selected!==s&&(i.selected=s);else if(D(Qs(i),o))return void(t.selectedIndex!==e&&(t.selectedIndex=e));r||(t.selectedIndex=-1)}function Ys(t,e){return e.every((e=>!D(e,t)))}function Qs(t){return\"_value\"in t?t._value:t.value}function ti(t){t.target.composing=!0}function ei(t){t.target.composing&&(t.target.composing=!1,ni(t.target,\"input\"))}function ni(t,e){const n=document.createEvent(\"HTMLEvents\");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function oi(t){return!t.componentInstance||t.data&&t.data.transition?t:oi(t.componentInstance._vnode)}var ri={bind(t,{value:e},n){const o=(n=oi(n)).data&&n.data.transition,r=t.__vOriginalDisplay=\"none\"===t.style.display?\"\":t.style.display;e&&o?(n.data.show=!0,zs(n,(()=>{t.style.display=r}))):t.style.display=e?r:\"none\"},update(t,{value:e,oldValue:n},o){if(!e==!n)return;(o=oi(o)).data&&o.data.transition?(o.data.show=!0,e?zs(o,(()=>{t.style.display=t.__vOriginalDisplay})):Vs(o,(()=>{t.style.display=\"none\"}))):t.style.display=e?t.__vOriginalDisplay:\"none\"},unbind(t,e,n,o,r){r||(t.style.display=t.__vOriginalDisplay)}},si={model:Zs,show:ri};const ii={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ci(t){const e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ci(Le(e.children)):t}function ai(t){const e={},n=t.$options;for(const o in n.propsData)e[o]=t[o];const o=n._parentListeners;for(const t in o)e[x(t)]=o[t];return e}function li(t,e){if(/\\d-keep-alive$/.test(e.tag))return t(\"keep-alive\",{props:e.componentOptions.propsData})}const ui=t=>t.tag||Ce(t),fi=t=>\"show\"===t.name;var di={name:\"transition\",props:ii,abstract:!0,render(t){let e=this.$slots.default;if(!e)return;if(e=e.filter(ui),!e.length)return;const n=this.mode,o=e[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;const r=ci(o);if(!r)return o;if(this._leaving)return li(t,o);const i=`__transition-${this._uid}-`;r.key=null==r.key?r.isComment?i+\"comment\":i+r.tag:s(r.key)?0===String(r.key).indexOf(i)?r.key:i+r.key:r.key;const c=(r.data||(r.data={})).transition=ai(this),a=this._vnode,l=ci(a);if(r.data.directives&&r.data.directives.some(fi)&&(r.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(r,l)&&!Ce(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){const e=l.data.transition=A({},c);if(\"out-in\"===n)return this._leaving=!0,Yt(e,\"afterLeave\",(()=>{this._leaving=!1,this.$forceUpdate()})),li(t,o);if(\"in-out\"===n){if(Ce(r))return a;let t;const n=()=>{t()};Yt(c,\"afterEnter\",n),Yt(c,\"enterCancelled\",n),Yt(e,\"delayLeave\",(e=>{t=e}))}}return o}};const pi=A({tag:String,moveClass:String},ii);delete pi.mode;var hi={props:pi,beforeMount(){const t=this._update;this._update=(e,n)=>{const o=Ke(this);this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept,o(),t.call(this,e,n)}},render(t){const e=this.tag||this.$vnode.data.tag||\"span\",n=Object.create(null),o=this.prevChildren=this.children,r=this.$slots.default||[],s=this.children=[],i=ai(this);for(let t=0;t<r.length;t++){const e=r[t];e.tag&&null!=e.key&&0!==String(e.key).indexOf(\"__vlist\")&&(s.push(e),n[e.key]=e,(e.data||(e.data={})).transition=i)}if(o){const r=[],s=[];for(let t=0;t<o.length;t++){const e=o[t];e.data.transition=i,e.data.pos=e.elm.getBoundingClientRect(),n[e.key]?r.push(e):s.push(e)}this.kept=t(e,null,r),this.removed=s}return t(e,null,s)},updated(){const t=this.prevChildren,e=this.moveClass||(this.name||\"v\")+\"-move\";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(mi),t.forEach(gi),t.forEach(vi),this._reflow=document.body.offsetHeight,t.forEach((t=>{if(t.data.moved){const n=t.elm,o=n.style;Is(n,e),o.transform=o.WebkitTransform=o.transitionDuration=\"\",n.addEventListener(Es,n._moveCb=function t(o){o&&o.target!==n||o&&!/transform$/.test(o.propertyName)||(n.removeEventListener(Es,t),n._moveCb=null,Ls(n,e))})}})))},methods:{hasMove(t,e){if(!Os)return!1;if(this._hasMove)return this._hasMove;const n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((t=>{Cs(n,t)})),xs(n,e),n.style.display=\"none\",this.$el.appendChild(n);const o=Hs(n);return this.$el.removeChild(n),this._hasMove=o.hasTransform}}};function mi(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function gi(t){t.data.newPos=t.elm.getBoundingClientRect()}function vi(t){const e=t.data.pos,n=t.data.newPos,o=e.left-n.left,r=e.top-n.top;if(o||r){t.data.moved=!0;const e=t.elm.style;e.transform=e.WebkitTransform=`translate(${o}px,${r}px)`,e.transitionDuration=\"0s\"}}var yi={Transition:di,TransitionGroup:hi};So.config.mustUseProp=Io,So.config.isReservedTag=Yo,So.config.isReservedAttr=Do,So.config.getTagNamespace=Qo,So.config.isUnknownElement=function(t){if(!q)return!0;if(Yo(t))return!1;if(t=t.toLowerCase(),null!=tr[t])return tr[t];const e=document.createElement(t);return t.indexOf(\"-\")>-1?tr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:tr[t]=/HTMLUnknownElement/.test(e.toString())},A(So.options.directives,si),A(So.options.components,yi),So.prototype.__patch__=q?Ws:E,So.prototype.$mount=function(t,e){return function(t,e,n){let o;t.$el=e,t.$options.render||(t.$options.render=ft),Ze(t,\"beforeMount\"),o=()=>{t._update(t._render(),n)},new Kn(t,o,E,{before(){t._isMounted&&!t._isDestroyed&&Ze(t,\"beforeUpdate\")}},!0),n=!1;const r=t._preWatchers;if(r)for(let t=0;t<r.length;t++)r[t].run();return null==t.$vnode&&(t._isMounted=!0,Ze(t,\"mounted\")),t}(this,t=t&&q?nr(t):void 0,e)},q&&setTimeout((()=>{B.devtools&&rt&&rt.emit(\"init\",So)}),0);const _i=/\\{\\{((?:.|\\r?\\n)+?)\\}\\}/g,$i=/[-.*+?^${}()|[\\]\\/\\\\]/g,bi=b((t=>{const e=t[0].replace($i,\"\\\\$&\"),n=t[1].replace($i,\"\\\\$&\");return new RegExp(e+\"((?:.|\\\\n)+?)\"+n,\"g\")}));var wi={staticKeys:[\"staticClass\"],transformNode:function(t,e){e.warn;const n=Ir(t,\"class\");n&&(t.staticClass=JSON.stringify(n.replace(/\\s+/g,\" \").trim()));const o=Mr(t,\"class\",!1);o&&(t.classBinding=o)},genData:function(t){let e=\"\";return t.staticClass&&(e+=`staticClass:${t.staticClass},`),t.classBinding&&(e+=`class:${t.classBinding},`),e}};var xi={staticKeys:[\"staticStyle\"],transformNode:function(t,e){e.warn;const n=Ir(t,\"style\");n&&(t.staticStyle=JSON.stringify(fs(n)));const o=Mr(t,\"style\",!1);o&&(t.styleBinding=o)},genData:function(t){let e=\"\";return t.staticStyle&&(e+=`staticStyle:${t.staticStyle},`),t.styleBinding&&(e+=`style:(${t.styleBinding}),`),e}};let Ci;var ki={decode:t=>(Ci=Ci||document.createElement(\"div\"),Ci.innerHTML=t,Ci.textContent)};const Si=m(\"area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr\"),Oi=m(\"colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source\"),Ti=m(\"address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track\"),Ai=/^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/,ji=/^\\s*((?:v-[\\w-]+:|@|:|#)\\[[^=]+?\\][^\\s\"'<>\\/=]*)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/,Ei=`[a-zA-Z_][\\\\-\\\\.0-9_a-zA-Z${U.source}]*`,Ni=`((?:${Ei}\\\\:)?${Ei})`,Pi=new RegExp(`^<${Ni}`),Di=/^\\s*(\\/?)>/,Mi=new RegExp(`^<\\\\/${Ni}[^>]*>`),Ii=/^<!DOCTYPE [^>]+>/i,Li=/^<!\\--/,Ri=/^<!\\[/,Fi=m(\"script,style,textarea\",!0),Hi={},Bi={\"&lt;\":\"<\",\"&gt;\":\">\",\"&quot;\":'\"',\"&amp;\":\"&\",\"&#10;\":\"\\n\",\"&#9;\":\"\\t\",\"&#39;\":\"'\"},Ui=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Vi=m(\"pre,textarea\",!0),Ki=(t,e)=>t&&Vi(t)&&\"\\n\"===e[0];function Ji(t,e){const n=e?zi:Ui;return t.replace(n,(t=>Bi[t]))}const qi=/^@|^v-on:/,Wi=/^v-|^@|^:|^#/,Zi=/([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/,Gi=/,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/,Xi=/^\\(|\\)$/g,Yi=/^\\[.*\\]$/,Qi=/:(.*)$/,tc=/^:|^\\.|^v-bind:/,ec=/\\.[^.\\]]+(?=[^\\]]*$)/g,nc=/^v-slot(:|$)|^#/,oc=/[\\r\\n]/,rc=/[ \\f\\t\\r\\n]+/g,sc=b(ki.decode),ic=\"_empty_\";let cc,ac,lc,uc,fc,dc,pc,hc;function mc(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:wc(e),rawAttrsMap:{},parent:n,children:[]}}function gc(t,e){cc=e.warn||Or,dc=e.isPreTag||N,pc=e.mustUseProp||N,hc=e.getTagNamespace||N,e.isReservedTag,lc=Tr(e.modules,\"transformNode\"),uc=Tr(e.modules,\"preTransformNode\"),fc=Tr(e.modules,\"postTransformNode\"),ac=e.delimiters;const n=[],o=!1!==e.preserveWhitespace,r=e.whitespace;let s,i,c=!1,a=!1;function l(t){if(u(t),c||t.processed||(t=vc(t,e)),n.length||t===s||s.if&&(t.elseif||t.else)&&_c(s,{exp:t.elseif,block:t}),i&&!t.forbidden)if(t.elseif||t.else)!function(t,e){const n=function(t){let e=t.length;for(;e--;){if(1===t[e].type)return t[e];t.pop()}}(e.children);n&&n.if&&_c(n,{exp:t.elseif,block:t})}(t,i);else{if(t.slotScope){const e=t.slotTarget||'\"default\"';(i.scopedSlots||(i.scopedSlots={}))[e]=t}i.children.push(t),t.parent=i}t.children=t.children.filter((t=>!t.slotScope)),u(t),t.pre&&(c=!1),dc(t.tag)&&(a=!1);for(let n=0;n<fc.length;n++)fc[n](t,e)}function u(t){if(!a){let e;for(;(e=t.children[t.children.length-1])&&3===e.type&&\" \"===e.text;)t.children.pop()}}return function(t,e){const n=[],o=e.expectHTML,r=e.isUnaryTag||N,s=e.canBeLeftOpenTag||N;let i,c,a=0;for(;t;){if(i=t,c&&Fi(c)){let n=0;const o=c.toLowerCase(),r=Hi[o]||(Hi[o]=new RegExp(\"([\\\\s\\\\S]*?)(</\"+o+\"[^>]*>)\",\"i\")),s=t.replace(r,(function(t,r,s){return n=s.length,Fi(o)||\"noscript\"===o||(r=r.replace(/<!\\--([\\s\\S]*?)-->/g,\"$1\").replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g,\"$1\")),Ki(o,r)&&(r=r.slice(1)),e.chars&&e.chars(r),\"\"}));a+=t.length-s.length,t=s,d(o,a-n,a)}else{let n,o,r,s=t.indexOf(\"<\");if(0===s){if(Li.test(t)){const n=t.indexOf(\"--\\x3e\");if(n>=0){e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,n),a,a+n+3),l(n+3);continue}}if(Ri.test(t)){const e=t.indexOf(\"]>\");if(e>=0){l(e+2);continue}}const n=t.match(Ii);if(n){l(n[0].length);continue}const o=t.match(Mi);if(o){const t=a;l(o[0].length),d(o[1],t,a);continue}const r=u();if(r){f(r),Ki(r.tagName,t)&&l(1);continue}}if(s>=0){for(o=t.slice(s);!(Mi.test(o)||Pi.test(o)||Li.test(o)||Ri.test(o)||(r=o.indexOf(\"<\",1),r<0));)s+=r,o=t.slice(s);n=t.substring(0,s)}s<0&&(n=t),n&&l(n.length),e.chars&&n&&e.chars(n,a-n.length,a)}if(t===i){e.chars&&e.chars(t);break}}function l(e){a+=e,t=t.substring(e)}function u(){const e=t.match(Pi);if(e){const n={tagName:e[1],attrs:[],start:a};let o,r;for(l(e[0].length);!(o=t.match(Di))&&(r=t.match(ji)||t.match(Ai));)r.start=a,l(r[0].length),r.end=a,n.attrs.push(r);if(o)return n.unarySlash=o[1],l(o[0].length),n.end=a,n}}function f(t){const i=t.tagName,a=t.unarySlash;o&&(\"p\"===c&&Ti(i)&&d(c),s(i)&&c===i&&d(i));const l=r(i)||!!a,u=t.attrs.length,f=new Array(u);for(let n=0;n<u;n++){const o=t.attrs[n],r=o[3]||o[4]||o[5]||\"\",s=\"a\"===i&&\"href\"===o[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;f[n]={name:o[1],value:Ji(r,s)}}l||(n.push({tag:i,lowerCasedTag:i.toLowerCase(),attrs:f,start:t.start,end:t.end}),c=i),e.start&&e.start(i,f,l,t.start,t.end)}function d(t,o,r){let s,i;if(null==o&&(o=a),null==r&&(r=a),t)for(i=t.toLowerCase(),s=n.length-1;s>=0&&n[s].lowerCasedTag!==i;s--);else s=0;if(s>=0){for(let t=n.length-1;t>=s;t--)e.end&&e.end(n[t].tag,o,r);n.length=s,c=s&&n[s-1].tag}else\"br\"===i?e.start&&e.start(t,[],!0,o,r):\"p\"===i&&(e.start&&e.start(t,[],!1,o,r),e.end&&e.end(t,o,r))}d()}(t,{warn:cc,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start(t,o,r,u,f){const d=i&&i.ns||hc(t);Z&&\"svg\"===d&&(o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];xc.test(o.name)||(o.name=o.name.replace(Cc,\"\"),e.push(o))}return e}(o));let p=mc(t,o,i);var h;d&&(p.ns=d),\"style\"!==(h=p).tag&&(\"script\"!==h.tag||h.attrsMap.type&&\"text/javascript\"!==h.attrsMap.type)||ot()||(p.forbidden=!0);for(let t=0;t<uc.length;t++)p=uc[t](p,e)||p;c||(!function(t){null!=Ir(t,\"v-pre\")&&(t.pre=!0)}(p),p.pre&&(c=!0)),dc(p.tag)&&(a=!0),c?function(t){const e=t.attrsList,n=e.length;if(n){const o=t.attrs=new Array(n);for(let t=0;t<n;t++)o[t]={name:e[t].name,value:JSON.stringify(e[t].value)},null!=e[t].start&&(o[t].start=e[t].start,o[t].end=e[t].end)}else t.pre||(t.plain=!0)}(p):p.processed||(yc(p),function(t){const e=Ir(t,\"v-if\");if(e)t.if=e,_c(t,{exp:e,block:t});else{null!=Ir(t,\"v-else\")&&(t.else=!0);const e=Ir(t,\"v-else-if\");e&&(t.elseif=e)}}(p),function(t){const e=Ir(t,\"v-once\");null!=e&&(t.once=!0)}(p)),s||(s=p),r?l(p):(i=p,n.push(p))},end(t,e,o){const r=n[n.length-1];n.length-=1,i=n[n.length-1],l(r)},chars(t,e,n){if(!i)return;if(Z&&\"textarea\"===i.tag&&i.attrsMap.placeholder===t)return;const s=i.children;var l;if(t=a||t.trim()?\"script\"===(l=i).tag||\"style\"===l.tag?t:sc(t):s.length?r?\"condense\"===r&&oc.test(t)?\"\":\" \":o?\" \":\"\":\"\"){let e,n;a||\"condense\"!==r||(t=t.replace(rc,\" \")),!c&&\" \"!==t&&(e=function(t,e){const n=e?bi(e):_i;if(!n.test(t))return;const o=[],r=[];let s,i,c,a=n.lastIndex=0;for(;s=n.exec(t);){i=s.index,i>a&&(r.push(c=t.slice(a,i)),o.push(JSON.stringify(c)));const e=kr(s[1].trim());o.push(`_s(${e})`),r.push({\"@binding\":e}),a=i+s[0].length}return a<t.length&&(r.push(c=t.slice(a)),o.push(JSON.stringify(c))),{expression:o.join(\"+\"),tokens:r}}(t,ac))?n={type:2,expression:e.expression,tokens:e.tokens,text:t}:\" \"===t&&s.length&&\" \"===s[s.length-1].text||(n={type:3,text:t}),n&&s.push(n)}},comment(t,e,n){if(i){const e={type:3,text:t,isComment:!0};i.children.push(e)}}}),s}function vc(t,e){var n;!function(t){const e=Mr(t,\"key\");e&&(t.key=e)}(t),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){const e=Mr(t,\"ref\");e&&(t.ref=e,t.refInFor=function(t){let e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){let e;\"template\"===t.tag?(e=Ir(t,\"scope\"),t.slotScope=e||Ir(t,\"slot-scope\")):(e=Ir(t,\"slot-scope\"))&&(t.slotScope=e);const n=Mr(t,\"slot\");n&&(t.slotTarget='\"\"'===n?'\"default\"':n,t.slotTargetDynamic=!(!t.attrsMap[\":slot\"]&&!t.attrsMap[\"v-bind:slot\"]),\"template\"===t.tag||t.slotScope||jr(t,\"slot\",n,function(t,e){return t.rawAttrsMap[\":\"+e]||t.rawAttrsMap[\"v-bind:\"+e]||t.rawAttrsMap[e]}(t,\"slot\")));if(\"template\"===t.tag){const e=Lr(t,nc);if(e){const{name:n,dynamic:o}=$c(e);t.slotTarget=n,t.slotTargetDynamic=o,t.slotScope=e.value||ic}}else{const e=Lr(t,nc);if(e){const n=t.scopedSlots||(t.scopedSlots={}),{name:o,dynamic:r}=$c(e),s=n[o]=mc(\"template\",[],t);s.slotTarget=o,s.slotTargetDynamic=r,s.children=t.children.filter((t=>{if(!t.slotScope)return t.parent=s,!0})),s.slotScope=e.value||ic,t.children=[],t.plain=!1}}}(t),\"slot\"===(n=t).tag&&(n.slotName=Mr(n,\"name\")),function(t){let e;(e=Mr(t,\"is\"))&&(t.component=e);null!=Ir(t,\"inline-template\")&&(t.inlineTemplate=!0)}(t);for(let n=0;n<lc.length;n++)t=lc[n](t,e)||t;return function(t){const e=t.attrsList;let n,o,r,s,i,c,a,l;for(n=0,o=e.length;n<o;n++)if(r=s=e[n].name,i=e[n].value,Wi.test(r))if(t.hasBindings=!0,c=bc(r.replace(Wi,\"\")),c&&(r=r.replace(ec,\"\")),tc.test(r))r=r.replace(tc,\"\"),i=kr(i),l=Yi.test(r),l&&(r=r.slice(1,-1)),c&&(c.prop&&!l&&(r=x(r),\"innerHtml\"===r&&(r=\"innerHTML\")),c.camel&&!l&&(r=x(r)),c.sync&&(a=Hr(i,\"$event\"),l?Dr(t,`\"update:\"+(${r})`,a,null,!1,0,e[n],!0):(Dr(t,`update:${x(r)}`,a,null,!1,0,e[n]),S(r)!==x(r)&&Dr(t,`update:${S(r)}`,a,null,!1,0,e[n])))),c&&c.prop||!t.component&&pc(t.tag,t.attrsMap.type,r)?Ar(t,r,i,e[n],l):jr(t,r,i,e[n],l);else if(qi.test(r))r=r.replace(qi,\"\"),l=Yi.test(r),l&&(r=r.slice(1,-1)),Dr(t,r,i,c,!1,0,e[n],l);else{r=r.replace(Wi,\"\");const o=r.match(Qi);let a=o&&o[1];l=!1,a&&(r=r.slice(0,-(a.length+1)),Yi.test(a)&&(a=a.slice(1,-1),l=!0)),Nr(t,r,s,i,a,l,c,e[n])}else jr(t,r,JSON.stringify(i),e[n]),!t.component&&\"muted\"===r&&pc(t.tag,t.attrsMap.type,r)&&Ar(t,r,\"true\",e[n])}(t),t}function yc(t){let e;if(e=Ir(t,\"v-for\")){const n=function(t){const e=t.match(Zi);if(!e)return;const n={};n.for=e[2].trim();const o=e[1].trim().replace(Xi,\"\"),r=o.match(Gi);r?(n.alias=o.replace(Gi,\"\").trim(),n.iterator1=r[1].trim(),r[2]&&(n.iterator2=r[2].trim())):n.alias=o;return n}(e);n&&A(t,n)}}function _c(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function $c(t){let e=t.name.replace(nc,\"\");return e||\"#\"!==t.name[0]&&(e=\"default\"),Yi.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:`\"${e}\"`,dynamic:!1}}function bc(t){const e=t.match(ec);if(e){const t={};return e.forEach((e=>{t[e.slice(1)]=!0})),t}}function wc(t){const e={};for(let n=0,o=t.length;n<o;n++)e[t[n].name]=t[n].value;return e}const xc=/^xmlns:NS\\d+/,Cc=/^NS\\d+:/;function kc(t){return mc(t.tag,t.attrsList.slice(),t.parent)}var Sc=[wi,xi,{preTransformNode:function(t,e){if(\"input\"===t.tag){const n=t.attrsMap;if(!n[\"v-model\"])return;let o;if((n[\":type\"]||n[\"v-bind:type\"])&&(o=Mr(t,\"type\")),n.type||o||!n[\"v-bind\"]||(o=`(${n[\"v-bind\"]}).type`),o){const n=Ir(t,\"v-if\",!0),r=n?`&&(${n})`:\"\",s=null!=Ir(t,\"v-else\",!0),i=Ir(t,\"v-else-if\",!0),c=kc(t);yc(c),Er(c,\"type\",\"checkbox\"),vc(c,e),c.processed=!0,c.if=`(${o})==='checkbox'`+r,_c(c,{exp:c.if,block:c});const a=kc(t);Ir(a,\"v-for\",!0),Er(a,\"type\",\"radio\"),vc(a,e),_c(c,{exp:`(${o})==='radio'`+r,block:a});const l=kc(t);return Ir(l,\"v-for\",!0),Er(l,\":type\",o),vc(l,e),_c(c,{exp:n,block:l}),s?c.else=!0:i&&(c.elseif=i),c}}}}];const Oc={expectHTML:!0,modules:Sc,directives:{model:function(t,e,n){const o=e.value,r=e.modifiers,s=t.tag,i=t.attrsMap.type;if(t.component)return Fr(t,o,r),!1;if(\"select\"===s)!function(t,e,n){const o=n&&n.number;let r=`var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return ${o?\"_n(val)\":\"val\"}});`;r=`${r} ${Hr(e,\"$event.target.multiple ? $$selectedVal : $$selectedVal[0]\")}`,Dr(t,\"change\",r,null,!0)}(t,o,r);else if(\"input\"===s&&\"checkbox\"===i)!function(t,e,n){const o=n&&n.number,r=Mr(t,\"value\")||\"null\",s=Mr(t,\"true-value\")||\"true\",i=Mr(t,\"false-value\")||\"false\";Ar(t,\"checked\",`Array.isArray(${e})?_i(${e},${r})>-1`+(\"true\"===s?`:(${e})`:`:_q(${e},${s})`)),Dr(t,\"change\",`var $$a=${e},$$el=$event.target,$$c=$$el.checked?(${s}):(${i});if(Array.isArray($$a)){var $$v=${o?\"_n(\"+r+\")\":r},$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(${Hr(e,\"$$a.concat([$$v])\")})}else{$$i>-1&&(${Hr(e,\"$$a.slice(0,$$i).concat($$a.slice($$i+1))\")})}}else{${Hr(e,\"$$c\")}}`,null,!0)}(t,o,r);else if(\"input\"===s&&\"radio\"===i)!function(t,e,n){const o=n&&n.number;let r=Mr(t,\"value\")||\"null\";r=o?`_n(${r})`:r,Ar(t,\"checked\",`_q(${e},${r})`),Dr(t,\"change\",Hr(e,r),null,!0)}(t,o,r);else if(\"input\"===s||\"textarea\"===s)!function(t,e,n){const o=t.attrsMap.type,{lazy:r,number:s,trim:i}=n||{},c=!r&&\"range\"!==o,a=r?\"change\":\"range\"===o?Yr:\"input\";let l=\"$event.target.value\";i&&(l=\"$event.target.value.trim()\");s&&(l=`_n(${l})`);let u=Hr(e,l);c&&(u=`if($event.target.composing)return;${u}`);Ar(t,\"value\",`(${e})`),Dr(t,a,u,null,!0),(i||s)&&Dr(t,\"blur\",\"$forceUpdate()\")}(t,o,r);else if(!B.isReservedTag(s))return Fr(t,o,r),!1;return!0},text:function(t,e){e.value&&Ar(t,\"textContent\",`_s(${e.value})`,e)},html:function(t,e){e.value&&Ar(t,\"innerHTML\",`_s(${e.value})`,e)}},isPreTag:t=>\"pre\"===t,isUnaryTag:Si,mustUseProp:Io,canBeLeftOpenTag:Oi,isReservedTag:Yo,getTagNamespace:Qo,staticKeys:function(t){return t.reduce(((t,e)=>t.concat(e.staticKeys||[])),[]).join(\",\")}(Sc)};let Tc,Ac;const jc=b((function(t){return m(\"type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap\"+(t?\",\"+t:\"\"))}));function Ec(t,e){t&&(Tc=jc(e.staticKeys||\"\"),Ac=e.isReservedTag||N,Nc(t),Pc(t,!1))}function Nc(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||g(t.tag)||!Ac(t.tag)||function(t){for(;t.parent;){if(\"template\"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Tc)))}(t),1===t.type){if(!Ac(t.tag)&&\"slot\"!==t.tag&&null==t.attrsMap[\"inline-template\"])return;for(let e=0,n=t.children.length;e<n;e++){const n=t.children[e];Nc(n),n.static||(t.static=!1)}if(t.ifConditions)for(let e=1,n=t.ifConditions.length;e<n;e++){const n=t.ifConditions[e].block;Nc(n),n.static||(t.static=!1)}}}function Pc(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(let n=0,o=t.children.length;n<o;n++)Pc(t.children[n],e||!!t.for);if(t.ifConditions)for(let n=1,o=t.ifConditions.length;n<o;n++)Pc(t.ifConditions[n].block,e)}}const Dc=/^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/,Mc=/\\([^)]*?\\);*$/,Ic=/^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/,Lc={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Rc={esc:[\"Esc\",\"Escape\"],tab:\"Tab\",enter:\"Enter\",space:[\" \",\"Spacebar\"],up:[\"Up\",\"ArrowUp\"],left:[\"Left\",\"ArrowLeft\"],right:[\"Right\",\"ArrowRight\"],down:[\"Down\",\"ArrowDown\"],delete:[\"Backspace\",\"Delete\",\"Del\"]},Fc=t=>`if(${t})return null;`,Hc={stop:\"$event.stopPropagation();\",prevent:\"$event.preventDefault();\",self:Fc(\"$event.target !== $event.currentTarget\"),ctrl:Fc(\"!$event.ctrlKey\"),shift:Fc(\"!$event.shiftKey\"),alt:Fc(\"!$event.altKey\"),meta:Fc(\"!$event.metaKey\"),left:Fc(\"'button' in $event && $event.button !== 0\"),middle:Fc(\"'button' in $event && $event.button !== 1\"),right:Fc(\"'button' in $event && $event.button !== 2\")};function Bc(t,e){const n=e?\"nativeOn:\":\"on:\";let o=\"\",r=\"\";for(const e in t){const n=Uc(t[e]);t[e]&&t[e].dynamic?r+=`${e},${n},`:o+=`\"${e}\":${n},`}return o=`{${o.slice(0,-1)}}`,r?n+`_d(${o},[${r.slice(0,-1)}])`:n+o}function Uc(t){if(!t)return\"function(){}\";if(Array.isArray(t))return`[${t.map((t=>Uc(t))).join(\",\")}]`;const e=Ic.test(t.value),n=Dc.test(t.value),o=Ic.test(t.value.replace(Mc,\"\"));if(t.modifiers){let r=\"\",s=\"\";const i=[];for(const e in t.modifiers)if(Hc[e])s+=Hc[e],Lc[e]&&i.push(e);else if(\"exact\"===e){const e=t.modifiers;s+=Fc([\"ctrl\",\"shift\",\"alt\",\"meta\"].filter((t=>!e[t])).map((t=>`$event.${t}Key`)).join(\"||\"))}else i.push(e);i.length&&(r+=function(t){return`if(!$event.type.indexOf('key')&&${t.map(zc).join(\"&&\")})return null;`}(i)),s&&(r+=s);return`function($event){${r}${e?`return ${t.value}.apply(null, arguments)`:n?`return (${t.value}).apply(null, arguments)`:o?`return ${t.value}`:t.value}}`}return e||n?t.value:`function($event){${o?`return ${t.value}`:t.value}}`}function zc(t){const e=parseInt(t,10);if(e)return`$event.keyCode!==${e}`;const n=Lc[t],o=Rc[t];return`_k($event.keyCode,${JSON.stringify(t)},${JSON.stringify(n)},$event.key,${JSON.stringify(o)})`}var Vc={on:function(t,e){t.wrapListeners=t=>`_g(${t},${e.value})`},bind:function(t,e){t.wrapData=n=>`_b(${n},'${t.tag}',${e.value},${e.modifiers&&e.modifiers.prop?\"true\":\"false\"}${e.modifiers&&e.modifiers.sync?\",true\":\"\"})`},cloak:E};class Kc{constructor(t){this.options=t,this.warn=t.warn||Or,this.transforms=Tr(t.modules,\"transformCode\"),this.dataGenFns=Tr(t.modules,\"genData\"),this.directives=A(A({},Vc),t.directives);const e=t.isReservedTag||N;this.maybeComponent=t=>!!t.component||!e(t.tag),this.onceId=0,this.staticRenderFns=[],this.pre=!1}}function Jc(t,e){const n=new Kc(e);return{render:`with(this){return ${t?\"script\"===t.tag?\"null\":qc(t,n):'_c(\"div\")'}}`,staticRenderFns:n.staticRenderFns}}function qc(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Wc(t,e);if(t.once&&!t.onceProcessed)return Zc(t,e);if(t.for&&!t.forProcessed)return Yc(t,e);if(t.if&&!t.ifProcessed)return Gc(t,e);if(\"template\"!==t.tag||t.slotTarget||e.pre){if(\"slot\"===t.tag)return function(t,e){const n=t.slotName||'\"default\"',o=na(t,e);let r=`_t(${n}${o?`,function(){return ${o}}`:\"\"}`;const s=t.attrs||t.dynamicAttrs?sa((t.attrs||[]).concat(t.dynamicAttrs||[]).map((t=>({name:x(t.name),value:t.value,dynamic:t.dynamic})))):null,i=t.attrsMap[\"v-bind\"];!s&&!i||o||(r+=\",null\");s&&(r+=`,${s}`);i&&(r+=`${s?\"\":\",null\"},${i}`);return r+\")\"}(t,e);{let n;if(t.component)n=function(t,e,n){const o=e.inlineTemplate?null:na(e,n,!0);return`_c(${t},${Qc(e,n)}${o?`,${o}`:\"\"})`}(t.component,t,e);else{let o;const r=e.maybeComponent(t);let s;(!t.plain||t.pre&&r)&&(o=Qc(t,e));const i=e.options.bindings;r&&i&&!1!==i.__isScriptSetup&&(s=function(t,e){const n=x(e),o=C(n),r=r=>t[e]===r?e:t[n]===r?n:t[o]===r?o:void 0,s=r(\"setup-const\")||r(\"setup-reactive-const\");if(s)return s;const i=r(\"setup-let\")||r(\"setup-ref\")||r(\"setup-maybe-ref\");if(i)return i}(i,t.tag)),s||(s=`'${t.tag}'`);const c=t.inlineTemplate?null:na(t,e,!0);n=`_c(${s}${o?`,${o}`:\"\"}${c?`,${c}`:\"\"})`}for(let o=0;o<e.transforms.length;o++)n=e.transforms[o](t,n);return n}}return na(t,e)||\"void 0\"}function Wc(t,e){t.staticProcessed=!0;const n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push(`with(this){return ${qc(t,e)}}`),e.pre=n,`_m(${e.staticRenderFns.length-1}${t.staticInFor?\",true\":\"\"})`}function Zc(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Gc(t,e);if(t.staticInFor){let n=\"\",o=t.parent;for(;o;){if(o.for){n=o.key;break}o=o.parent}return n?`_o(${qc(t,e)},${e.onceId++},${n})`:qc(t,e)}return Wc(t,e)}function Gc(t,e,n,o){return t.ifProcessed=!0,Xc(t.ifConditions.slice(),e,n,o)}function Xc(t,e,n,o){if(!t.length)return o||\"_e()\";const r=t.shift();return r.exp?`(${r.exp})?${s(r.block)}:${Xc(t,e,n,o)}`:`${s(r.block)}`;function s(t){return n?n(t,e):t.once?Zc(t,e):qc(t,e)}}function Yc(t,e,n,o){const r=t.for,s=t.alias,i=t.iterator1?`,${t.iterator1}`:\"\",c=t.iterator2?`,${t.iterator2}`:\"\";return t.forProcessed=!0,`${o||\"_l\"}((${r}),function(${s}${i}${c}){return ${(n||qc)(t,e)}})`}function Qc(t,e){let n=\"{\";const o=function(t,e){const n=t.directives;if(!n)return;let o,r,s,i,c=\"directives:[\",a=!1;for(o=0,r=n.length;o<r;o++){s=n[o],i=!0;const r=e.directives[s.name];r&&(i=!!r(t,s,e.warn)),i&&(a=!0,c+=`{name:\"${s.name}\",rawName:\"${s.rawName}\"${s.value?`,value:(${s.value}),expression:${JSON.stringify(s.value)}`:\"\"}${s.arg?`,arg:${s.isDynamicArg?s.arg:`\"${s.arg}\"`}`:\"\"}${s.modifiers?`,modifiers:${JSON.stringify(s.modifiers)}`:\"\"}},`)}if(a)return c.slice(0,-1)+\"]\"}(t,e);o&&(n+=o+\",\"),t.key&&(n+=`key:${t.key},`),t.ref&&(n+=`ref:${t.ref},`),t.refInFor&&(n+=\"refInFor:true,\"),t.pre&&(n+=\"pre:true,\"),t.component&&(n+=`tag:\"${t.tag}\",`);for(let o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+=`attrs:${sa(t.attrs)},`),t.props&&(n+=`domProps:${sa(t.props)},`),t.events&&(n+=`${Bc(t.events,!1)},`),t.nativeEvents&&(n+=`${Bc(t.nativeEvents,!0)},`),t.slotTarget&&!t.slotScope&&(n+=`slot:${t.slotTarget},`),t.scopedSlots&&(n+=`${function(t,e,n){let o=t.for||Object.keys(e).some((t=>{const n=e[t];return n.slotTargetDynamic||n.if||n.for||ta(n)})),r=!!t.if;if(!o){let e=t.parent;for(;e;){if(e.slotScope&&e.slotScope!==ic||e.for){o=!0;break}e.if&&(r=!0),e=e.parent}}const s=Object.keys(e).map((t=>ea(e[t],n))).join(\",\");return`scopedSlots:_u([${s}]${o?\",null,true\":\"\"}${!o&&r?`,null,false,${function(t){let e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(s)}`:\"\"})`}(t,t.scopedSlots,e)},`),t.model&&(n+=`model:{value:${t.model.value},callback:${t.model.callback},expression:${t.model.expression}},`),t.inlineTemplate){const o=function(t,e){const n=t.children[0];if(n&&1===n.type){const t=Jc(n,e.options);return`inlineTemplate:{render:function(){${t.render}},staticRenderFns:[${t.staticRenderFns.map((t=>`function(){${t}}`)).join(\",\")}]}`}}(t,e);o&&(n+=`${o},`)}return n=n.replace(/,$/,\"\")+\"}\",t.dynamicAttrs&&(n=`_b(${n},\"${t.tag}\",${sa(t.dynamicAttrs)})`),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function ta(t){return 1===t.type&&(\"slot\"===t.tag||t.children.some(ta))}function ea(t,e){const n=t.attrsMap[\"slot-scope\"];if(t.if&&!t.ifProcessed&&!n)return Gc(t,e,ea,\"null\");if(t.for&&!t.forProcessed)return Yc(t,e,ea);const o=t.slotScope===ic?\"\":String(t.slotScope),r=`function(${o}){return ${\"template\"===t.tag?t.if&&n?`(${t.if})?${na(t,e)||\"undefined\"}:undefined`:na(t,e)||\"undefined\":qc(t,e)}}`,s=o?\"\":\",proxy:true\";return`{key:${t.slotTarget||'\"default\"'},fn:${r}${s}}`}function na(t,e,n,o,r){const s=t.children;if(s.length){const t=s[0];if(1===s.length&&t.for&&\"template\"!==t.tag&&\"slot\"!==t.tag){const r=n?e.maybeComponent(t)?\",1\":\",0\":\"\";return`${(o||qc)(t,e)}${r}`}const i=n?function(t,e){let n=0;for(let o=0;o<t.length;o++){const r=t[o];if(1===r.type){if(oa(r)||r.ifConditions&&r.ifConditions.some((t=>oa(t.block)))){n=2;break}(e(r)||r.ifConditions&&r.ifConditions.some((t=>e(t.block))))&&(n=1)}}return n}(s,e.maybeComponent):0,c=r||ra;return`[${s.map((t=>c(t,e))).join(\",\")}]${i?`,${i}`:\"\"}`}}function oa(t){return void 0!==t.for||\"template\"===t.tag||\"slot\"===t.tag}function ra(t,e){return 1===t.type?qc(t,e):3===t.type&&t.isComment?function(t){return`_e(${JSON.stringify(t.text)})`}(t):function(t){return`_v(${2===t.type?t.expression:ia(JSON.stringify(t.text))})`}(t)}function sa(t){let e=\"\",n=\"\";for(let o=0;o<t.length;o++){const r=t[o],s=ia(r.value);r.dynamic?n+=`${r.name},${s},`:e+=`\"${r.name}\":${s},`}return e=`{${e.slice(0,-1)}}`,n?`_d(${e},[${n.slice(0,-1)}])`:e}function ia(t){return t.replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\")}function ca(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),E}}function aa(t){const e=Object.create(null);return function(n,o,r){(o=A({},o)).warn,delete o.warn;const s=o.delimiters?String(o.delimiters)+n:n;if(e[s])return e[s];const i=t(n,o),c={},a=[];return c.render=ca(i.render,a),c.staticRenderFns=i.staticRenderFns.map((t=>ca(t,a))),e[s]=c}}new RegExp(\"\\\\b\"+\"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments\".split(\",\").join(\"\\\\b|\\\\b\")+\"\\\\b\"),new RegExp(\"\\\\b\"+\"delete,typeof,void\".split(\",\").join(\"\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b\")+\"\\\\s*\\\\([^\\\\)]*\\\\)\");const la=(ua=function(t,e){const n=gc(t.trim(),e);!1!==e.optimize&&Ec(n,e);const o=Jc(n,e);return{ast:n,render:o.render,staticRenderFns:o.staticRenderFns}},function(t){function e(e,n){const o=Object.create(t),r=[],s=[];if(n){n.modules&&(o.modules=(t.modules||[]).concat(n.modules)),n.directives&&(o.directives=A(Object.create(t.directives||null),n.directives));for(const t in n)\"modules\"!==t&&\"directives\"!==t&&(o[t]=n[t])}o.warn=(t,e,n)=>{(n?s:r).push(t)};const i=ua(e.trim(),o);return i.errors=r,i.tips=s,i}return{compile:e,compileToFunctions:aa(e)}});var ua;const{compile:fa,compileToFunctions:da}=la(Oc);let pa;function ha(t){return pa=pa||document.createElement(\"div\"),pa.innerHTML=t?'<a href=\"\\n\"/>':'<div a=\"\\n\"/>',pa.innerHTML.indexOf(\"&#10;\")>0}const ma=!!q&&ha(!1),ga=!!q&&ha(!0),va=b((t=>{const e=nr(t);return e&&e.innerHTML})),ya=So.prototype.$mount;So.prototype.$mount=function(t,e){if((t=t&&nr(t))===document.body||t===document.documentElement)return this;const n=this.$options;if(!n.render){let e=n.template;if(e)if(\"string\"==typeof e)\"#\"===e.charAt(0)&&(e=va(e));else{if(!e.nodeType)return this;e=e.innerHTML}else t&&(e=function(t){if(t.outerHTML)return t.outerHTML;{const e=document.createElement(\"div\");return e.appendChild(t.cloneNode(!0)),e.innerHTML}}(t));if(e){const{render:t,staticRenderFns:o}=da(e,{outputSourceRange:!1,shouldDecodeNewlines:ma,shouldDecodeNewlinesForHref:ga,delimiters:n.delimiters,comments:n.comments},this);n.render=t,n.staticRenderFns=o}}return ya.call(this,t,e)},So.compile=da,A(So,Hn),So.effect=function(t,e){const n=new Kn(at,t,E,{sync:!0});e&&(n.update=()=>{e((()=>n.run()))})},module.exports=So;"
  },
  {
    "path": "web/assets/vue/vue.esm.browser.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\nconst emptyObject = Object.freeze({});\nconst isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n    return v === undefined || v === null;\n}\nfunction isDef(v) {\n    return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n    return v === true;\n}\nfunction isFalse(v) {\n    return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n    return (typeof value === 'string' ||\n        typeof value === 'number' ||\n        // $flow-disable-line\n        typeof value === 'symbol' ||\n        typeof value === 'boolean');\n}\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n    return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nconst _toString = Object.prototype.toString;\nfunction toRawType(value) {\n    return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n    return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n    return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n    const n = parseFloat(String(val));\n    return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n    return (isDef(val) &&\n        typeof val.then === 'function' &&\n        typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n    return val == null\n        ? ''\n        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n            ? JSON.stringify(val, replacer, 2)\n            : String(val);\n}\nfunction replacer(_key, val) {\n    // avoid circular deps from v3\n    if (val && val.__v_isRef) {\n        return val.value;\n    }\n    return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n    const n = parseFloat(val);\n    return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n    const map = Object.create(null);\n    const list = str.split(',');\n    for (let i = 0; i < list.length; i++) {\n        map[list[i]] = true;\n    }\n    return expectsLowerCase ? val => map[val.toLowerCase()] : val => map[val];\n}\n/**\n * Check if a tag is a built-in tag.\n */\nconst isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nconst isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n    const len = arr.length;\n    if (len) {\n        // fast path for the only / last item\n        if (item === arr[len - 1]) {\n            arr.length = len - 1;\n            return;\n        }\n        const index = arr.indexOf(item);\n        if (index > -1) {\n            return arr.splice(index, 1);\n        }\n    }\n}\n/**\n * Check whether an object has the property.\n */\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n    const cache = Object.create(null);\n    return function cachedFn(str) {\n        const hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cached((str) => {\n    return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));\n});\n/**\n * Capitalize a string.\n */\nconst capitalize = cached((str) => {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cached((str) => {\n    return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n    function boundFn(a) {\n        const l = arguments.length;\n        return l\n            ? l > 1\n                ? fn.apply(ctx, arguments)\n                : fn.call(ctx, a)\n            : fn.call(ctx);\n    }\n    boundFn._length = fn.length;\n    return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n    return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nconst bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n    start = start || 0;\n    let i = list.length - start;\n    const ret = new Array(i);\n    while (i--) {\n        ret[i] = list[i + start];\n    }\n    return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n    for (const key in _from) {\n        to[key] = _from[key];\n    }\n    return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n    const res = {};\n    for (let i = 0; i < arr.length; i++) {\n        if (arr[i]) {\n            extend(res, arr[i]);\n        }\n    }\n    return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nconst no = (a, b, c) => false;\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nconst identity = (_) => _;\n/**\n * Generate a string containing static keys from compiler modules.\n */\nfunction genStaticKeys$1(modules) {\n    return modules\n        .reduce((keys, m) => keys.concat(m.staticKeys || []), [])\n        .join(',');\n}\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n    if (a === b)\n        return true;\n    const isObjectA = isObject(a);\n    const isObjectB = isObject(b);\n    if (isObjectA && isObjectB) {\n        try {\n            const isArrayA = Array.isArray(a);\n            const isArrayB = Array.isArray(b);\n            if (isArrayA && isArrayB) {\n                return (a.length === b.length &&\n                    a.every((e, i) => {\n                        return looseEqual(e, b[i]);\n                    }));\n            }\n            else if (a instanceof Date && b instanceof Date) {\n                return a.getTime() === b.getTime();\n            }\n            else if (!isArrayA && !isArrayB) {\n                const keysA = Object.keys(a);\n                const keysB = Object.keys(b);\n                return (keysA.length === keysB.length &&\n                    keysA.every(key => {\n                        return looseEqual(a[key], b[key]);\n                    }));\n            }\n            else {\n                /* istanbul ignore next */\n                return false;\n            }\n        }\n        catch (e) {\n            /* istanbul ignore next */\n            return false;\n        }\n    }\n    else if (!isObjectA && !isObjectB) {\n        return String(a) === String(b);\n    }\n    else {\n        return false;\n    }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n    for (let i = 0; i < arr.length; i++) {\n        if (looseEqual(arr[i], val))\n            return i;\n    }\n    return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n    let called = false;\n    return function () {\n        if (!called) {\n            called = true;\n            fn.apply(this, arguments);\n        }\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n    if (x === y) {\n        return x === 0 && 1 / x !== 1 / y;\n    }\n    else {\n        return x === x || y === y;\n    }\n}\n\nconst SSR_ATTR = 'data-server-rendered';\nconst ASSET_TYPES = ['component', 'directive', 'filter'];\nconst LIFECYCLE_HOOKS = [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated',\n    'errorCaptured',\n    'serverPrefetch',\n    'renderTracked',\n    'renderTriggered'\n];\n\nvar config = {\n    /**\n     * Option merge strategies (used in core/util/options)\n     */\n    // $flow-disable-line\n    optionMergeStrategies: Object.create(null),\n    /**\n     * Whether to suppress warnings.\n     */\n    silent: false,\n    /**\n     * Show production mode tip message on boot?\n     */\n    productionTip: true,\n    /**\n     * Whether to enable devtools\n     */\n    devtools: true,\n    /**\n     * Whether to record perf\n     */\n    performance: false,\n    /**\n     * Error handler for watcher errors\n     */\n    errorHandler: null,\n    /**\n     * Warn handler for watcher warns\n     */\n    warnHandler: null,\n    /**\n     * Ignore certain custom elements\n     */\n    ignoredElements: [],\n    /**\n     * Custom user key aliases for v-on\n     */\n    // $flow-disable-line\n    keyCodes: Object.create(null),\n    /**\n     * Check if a tag is reserved so that it cannot be registered as a\n     * component. This is platform-dependent and may be overwritten.\n     */\n    isReservedTag: no,\n    /**\n     * Check if an attribute is reserved so that it cannot be used as a component\n     * prop. This is platform-dependent and may be overwritten.\n     */\n    isReservedAttr: no,\n    /**\n     * Check if a tag is an unknown element.\n     * Platform-dependent.\n     */\n    isUnknownElement: no,\n    /**\n     * Get the namespace of an element\n     */\n    getTagNamespace: noop,\n    /**\n     * Parse the real tag name for the specific platform.\n     */\n    parsePlatformTagName: identity,\n    /**\n     * Check if an attribute must be bound using property, e.g. value\n     * Platform-dependent.\n     */\n    mustUseProp: no,\n    /**\n     * Perform updates asynchronously. Intended to be used by Vue Test Utils\n     * This will significantly reduce performance if set to false.\n     */\n    async: true,\n    /**\n     * Exposed for legacy reasons\n     */\n    _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nconst unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n    const c = (str + '').charCodeAt(0);\n    return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n    Object.defineProperty(obj, key, {\n        value: val,\n        enumerable: !!enumerable,\n        writable: true,\n        configurable: true\n    });\n}\n/**\n * Parse simple path.\n */\nconst bailRE = new RegExp(`[^${unicodeRegExp.source}.$_\\\\d]`);\nfunction parsePath(path) {\n    if (bailRE.test(path)) {\n        return;\n    }\n    const segments = path.split('.');\n    return function (obj) {\n        for (let i = 0; i < segments.length; i++) {\n            if (!obj)\n                return;\n            obj = obj[segments[i]];\n        }\n        return obj;\n    };\n}\n\n// can we use __proto__?\nconst hasProto = '__proto__' in {};\n// Browser environment sniffing\nconst inBrowser = typeof window !== 'undefined';\nconst UA = inBrowser && window.navigator.userAgent.toLowerCase();\nconst isIE = UA && /msie|trident/.test(UA);\nconst isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nconst isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nconst isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nconst isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nconst nativeWatch = {}.watch;\nlet supportsPassive = false;\nif (inBrowser) {\n    try {\n        const opts = {};\n        Object.defineProperty(opts, 'passive', {\n            get() {\n                /* istanbul ignore next */\n                supportsPassive = true;\n            }\n        }); // https://github.com/facebook/flow/issues/285\n        window.addEventListener('test-passive', null, opts);\n    }\n    catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nlet _isServer;\nconst isServerRendering = () => {\n    if (_isServer === undefined) {\n        /* istanbul ignore if */\n        if (!inBrowser && typeof global !== 'undefined') {\n            // detect presence of vue-server-renderer and avoid\n            // Webpack shimming the process\n            _isServer =\n                global['process'] && global['process'].env.VUE_ENV === 'server';\n        }\n        else {\n            _isServer = false;\n        }\n    }\n    return _isServer;\n};\n// detect devtools\nconst devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nconst hasSymbol = typeof Symbol !== 'undefined' &&\n    isNative(Symbol) &&\n    typeof Reflect !== 'undefined' &&\n    isNative(Reflect.ownKeys);\nlet _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n    // use native Set when available.\n    _Set = Set;\n}\nelse {\n    // a non-standard Set polyfill that only works with primitive keys.\n    _Set = class Set {\n        constructor() {\n            this.set = Object.create(null);\n        }\n        has(key) {\n            return this.set[key] === true;\n        }\n        add(key) {\n            this.set[key] = true;\n        }\n        clear() {\n            this.set = Object.create(null);\n        }\n    };\n}\n\nlet currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n    return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm = null) {\n    if (!vm)\n        currentInstance && currentInstance._scope.off();\n    currentInstance = vm;\n    vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nclass VNode {\n    constructor(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n        this.tag = tag;\n        this.data = data;\n        this.children = children;\n        this.text = text;\n        this.elm = elm;\n        this.ns = undefined;\n        this.context = context;\n        this.fnContext = undefined;\n        this.fnOptions = undefined;\n        this.fnScopeId = undefined;\n        this.key = data && data.key;\n        this.componentOptions = componentOptions;\n        this.componentInstance = undefined;\n        this.parent = undefined;\n        this.raw = false;\n        this.isStatic = false;\n        this.isRootInsert = true;\n        this.isComment = false;\n        this.isCloned = false;\n        this.isOnce = false;\n        this.asyncFactory = asyncFactory;\n        this.asyncMeta = undefined;\n        this.isAsyncPlaceholder = false;\n    }\n    // DEPRECATED: alias for componentInstance for backwards compat.\n    /* istanbul ignore next */\n    get child() {\n        return this.componentInstance;\n    }\n}\nconst createEmptyVNode = (text = '') => {\n    const node = new VNode();\n    node.text = text;\n    node.isComment = true;\n    return node;\n};\nfunction createTextVNode(val) {\n    return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n    const cloned = new VNode(vnode.tag, vnode.data, \n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n    cloned.ns = vnode.ns;\n    cloned.isStatic = vnode.isStatic;\n    cloned.key = vnode.key;\n    cloned.isComment = vnode.isComment;\n    cloned.fnContext = vnode.fnContext;\n    cloned.fnOptions = vnode.fnOptions;\n    cloned.fnScopeId = vnode.fnScopeId;\n    cloned.asyncMeta = vnode.asyncMeta;\n    cloned.isCloned = true;\n    return cloned;\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\nlet initProxy;\n{\n    const allowedGlobals = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n        'require' // for Webpack/Browserify\n    );\n    const warnNonPresent = (target, key) => {\n        warn$2(`Property or method \"${key}\" is not defined on the instance but ` +\n            'referenced during render. Make sure that this property is reactive, ' +\n            'either in the data option, or for class-based components, by ' +\n            'initializing the property. ' +\n            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n    };\n    const warnReservedPrefix = (target, key) => {\n        warn$2(`Property \"${key}\" must be accessed with \"$data.${key}\" because ` +\n            'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n            'prevent conflicts with Vue internals. ' +\n            'See: https://v2.vuejs.org/v2/api/#data', target);\n    };\n    const hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);\n    if (hasProxy) {\n        const isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n        config.keyCodes = new Proxy(config.keyCodes, {\n            set(target, key, value) {\n                if (isBuiltInModifier(key)) {\n                    warn$2(`Avoid overwriting built-in modifier in config.keyCodes: .${key}`);\n                    return false;\n                }\n                else {\n                    target[key] = value;\n                    return true;\n                }\n            }\n        });\n    }\n    const hasHandler = {\n        has(target, key) {\n            const has = key in target;\n            const isAllowed = allowedGlobals(key) ||\n                (typeof key === 'string' &&\n                    key.charAt(0) === '_' &&\n                    !(key in target.$data));\n            if (!has && !isAllowed) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return has || !isAllowed;\n        }\n    };\n    const getHandler = {\n        get(target, key) {\n            if (typeof key === 'string' && !(key in target)) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return target[key];\n        }\n    };\n    initProxy = function initProxy(vm) {\n        if (hasProxy) {\n            // determine which proxy handler to use\n            const options = vm.$options;\n            const handlers = options.render && options.render._withStripped ? getHandler : hasHandler;\n            vm._renderProxy = new Proxy(vm, handlers);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n    };\n}\n\nlet uid$2 = 0;\nconst pendingCleanupDeps = [];\nconst cleanupDeps = () => {\n    for (let i = 0; i < pendingCleanupDeps.length; i++) {\n        const dep = pendingCleanupDeps[i];\n        dep.subs = dep.subs.filter(s => s);\n        dep._pending = false;\n    }\n    pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nclass Dep {\n    constructor() {\n        // pending subs cleanup\n        this._pending = false;\n        this.id = uid$2++;\n        this.subs = [];\n    }\n    addSub(sub) {\n        this.subs.push(sub);\n    }\n    removeSub(sub) {\n        // #12696 deps with massive amount of subscribers are extremely slow to\n        // clean up in Chromium\n        // to workaround this, we unset the sub for now, and clear them on\n        // next scheduler flush.\n        this.subs[this.subs.indexOf(sub)] = null;\n        if (!this._pending) {\n            this._pending = true;\n            pendingCleanupDeps.push(this);\n        }\n    }\n    depend(info) {\n        if (Dep.target) {\n            Dep.target.addDep(this);\n            if (info && Dep.target.onTrack) {\n                Dep.target.onTrack(Object.assign({ effect: Dep.target }, info));\n            }\n        }\n    }\n    notify(info) {\n        // stabilize the subscriber list first\n        const subs = this.subs.filter(s => s);\n        if (!config.async) {\n            // subs aren't sorted in scheduler if not running async\n            // we need to sort them now to make sure they fire in correct\n            // order\n            subs.sort((a, b) => a.id - b.id);\n        }\n        for (let i = 0, l = subs.length; i < l; i++) {\n            const sub = subs[i];\n            if (info) {\n                sub.onTrigger &&\n                    sub.onTrigger(Object.assign({ effect: subs[i] }, info));\n            }\n            sub.update();\n        }\n    }\n}\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nconst targetStack = [];\nfunction pushTarget(target) {\n    targetStack.push(target);\n    Dep.target = target;\n}\nfunction popTarget() {\n    targetStack.pop();\n    Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nconst arrayProto = Array.prototype;\nconst arrayMethods = Object.create(arrayProto);\nconst methodsToPatch = [\n    'push',\n    'pop',\n    'shift',\n    'unshift',\n    'splice',\n    'sort',\n    'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n    // cache original method\n    const original = arrayProto[method];\n    def(arrayMethods, method, function mutator(...args) {\n        const result = original.apply(this, args);\n        const ob = this.__ob__;\n        let inserted;\n        switch (method) {\n            case 'push':\n            case 'unshift':\n                inserted = args;\n                break;\n            case 'splice':\n                inserted = args.slice(2);\n                break;\n        }\n        if (inserted)\n            ob.observeArray(inserted);\n        // notify change\n        {\n            ob.dep.notify({\n                type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                target: this,\n                key: method\n            });\n        }\n        return result;\n    });\n});\n\nconst arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nconst NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nlet shouldObserve = true;\nfunction toggleObserving(value) {\n    shouldObserve = value;\n}\n// ssr mock dep\nconst mockDep = {\n    notify: noop,\n    depend: noop,\n    addSub: noop,\n    removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nclass Observer {\n    constructor(value, shallow = false, mock = false) {\n        this.value = value;\n        this.shallow = shallow;\n        this.mock = mock;\n        // this.value = value\n        this.dep = mock ? mockDep : new Dep();\n        this.vmCount = 0;\n        def(value, '__ob__', this);\n        if (isArray(value)) {\n            if (!mock) {\n                if (hasProto) {\n                    value.__proto__ = arrayMethods;\n                    /* eslint-enable no-proto */\n                }\n                else {\n                    for (let i = 0, l = arrayKeys.length; i < l; i++) {\n                        const key = arrayKeys[i];\n                        def(value, key, arrayMethods[key]);\n                    }\n                }\n            }\n            if (!shallow) {\n                this.observeArray(value);\n            }\n        }\n        else {\n            /**\n             * Walk through all properties and convert them into\n             * getter/setters. This method should only be called when\n             * value type is Object.\n             */\n            const keys = Object.keys(value);\n            for (let i = 0; i < keys.length; i++) {\n                const key = keys[i];\n                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n            }\n        }\n    }\n    /**\n     * Observe a list of Array items.\n     */\n    observeArray(value) {\n        for (let i = 0, l = value.length; i < l; i++) {\n            observe(value[i], false, this.mock);\n        }\n    }\n}\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n        return value.__ob__;\n    }\n    if (shouldObserve &&\n        (ssrMockReactivity || !isServerRendering()) &&\n        (isArray(value) || isPlainObject(value)) &&\n        Object.isExtensible(value) &&\n        !value.__v_skip /* ReactiveFlags.SKIP */ &&\n        !isRef(value) &&\n        !(value instanceof VNode)) {\n        return new Observer(value, shallow, ssrMockReactivity);\n    }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow = false) {\n    const dep = new Dep();\n    const property = Object.getOwnPropertyDescriptor(obj, key);\n    if (property && property.configurable === false) {\n        return;\n    }\n    // cater for pre-defined getter/setters\n    const getter = property && property.get;\n    const setter = property && property.set;\n    if ((!getter || setter) &&\n        (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n        val = obj[key];\n    }\n    let childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n    Object.defineProperty(obj, key, {\n        enumerable: true,\n        configurable: true,\n        get: function reactiveGetter() {\n            const value = getter ? getter.call(obj) : val;\n            if (Dep.target) {\n                {\n                    dep.depend({\n                        target: obj,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                if (childOb) {\n                    childOb.dep.depend();\n                    if (isArray(value)) {\n                        dependArray(value);\n                    }\n                }\n            }\n            return isRef(value) && !shallow ? value.value : value;\n        },\n        set: function reactiveSetter(newVal) {\n            const value = getter ? getter.call(obj) : val;\n            if (!hasChanged(value, newVal)) {\n                return;\n            }\n            if (customSetter) {\n                customSetter();\n            }\n            if (setter) {\n                setter.call(obj, newVal);\n            }\n            else if (getter) {\n                // #7981: for accessor properties without setter\n                return;\n            }\n            else if (!shallow && isRef(value) && !isRef(newVal)) {\n                value.value = newVal;\n                return;\n            }\n            else {\n                val = newVal;\n            }\n            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n            {\n                dep.notify({\n                    type: \"set\" /* TriggerOpTypes.SET */,\n                    target: obj,\n                    key,\n                    newValue: newVal,\n                    oldValue: value\n                });\n            }\n        }\n    });\n    return dep;\n}\nfunction set(target, key, val) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn$2(`Cannot set reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isReadonly(target)) {\n        warn$2(`Set operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    const ob = target.__ob__;\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.length = Math.max(target.length, key);\n        target.splice(key, 1, val);\n        // when mocking for SSR, array methods are not hijacked\n        if (ob && !ob.shallow && ob.mock) {\n            observe(val, false, true);\n        }\n        return val;\n    }\n    if (key in target && !(key in Object.prototype)) {\n        target[key] = val;\n        return val;\n    }\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                'at runtime - declare it upfront in the data option.');\n        return val;\n    }\n    if (!ob) {\n        target[key] = val;\n        return val;\n    }\n    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n    {\n        ob.dep.notify({\n            type: \"add\" /* TriggerOpTypes.ADD */,\n            target: target,\n            key,\n            newValue: val,\n            oldValue: undefined\n        });\n    }\n    return val;\n}\nfunction del(target, key) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn$2(`Cannot delete reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.splice(key, 1);\n        return;\n    }\n    const ob = target.__ob__;\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn$2('Avoid deleting properties on a Vue instance or its root $data ' +\n                '- just set it to null.');\n        return;\n    }\n    if (isReadonly(target)) {\n        warn$2(`Delete operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    if (!hasOwn(target, key)) {\n        return;\n    }\n    delete target[key];\n    if (!ob) {\n        return;\n    }\n    {\n        ob.dep.notify({\n            type: \"delete\" /* TriggerOpTypes.DELETE */,\n            target: target,\n            key\n        });\n    }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n    for (let e, i = 0, l = value.length; i < l; i++) {\n        e = value[i];\n        if (e && e.__ob__) {\n            e.__ob__.dep.depend();\n        }\n        if (isArray(e)) {\n            dependArray(e);\n        }\n    }\n}\n\nfunction reactive(target) {\n    makeReactive(target, false);\n    return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n    makeReactive(target, true);\n    def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    return target;\n}\nfunction makeReactive(target, shallow) {\n    // if trying to observe a readonly proxy, return the readonly version.\n    if (!isReadonly(target)) {\n        {\n            if (isArray(target)) {\n                warn$2(`Avoid using Array as root value for ${shallow ? `shallowReactive()` : `reactive()`} as it cannot be tracked in watch() or watchEffect(). Use ${shallow ? `shallowRef()` : `ref()`} instead. This is a Vue-2-only limitation.`);\n            }\n            const existingOb = target && target.__ob__;\n            if (existingOb && existingOb.shallow !== shallow) {\n                warn$2(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);\n            }\n        }\n        const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n        if (!ob) {\n            if (target == null || isPrimitive(target)) {\n                warn$2(`value cannot be made reactive: ${String(target)}`);\n            }\n            if (isCollectionType(target)) {\n                warn$2(`Vue 2 does not support reactive collection types such as Map or Set.`);\n            }\n        }\n    }\n}\nfunction isReactive(value) {\n    if (isReadonly(value)) {\n        return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n    }\n    return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n    return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n    return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n    return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n    const raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n    return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n    // non-extensible objects won't be observed anyway\n    if (Object.isExtensible(value)) {\n        def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n    }\n    return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n    const type = toRawType(value);\n    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nconst RefFlag = `__v_isRef`;\nfunction isRef(r) {\n    return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n    return createRef(value, false);\n}\nfunction shallowRef(value) {\n    return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n    if (isRef(rawValue)) {\n        return rawValue;\n    }\n    const ref = {};\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n    return ref;\n}\nfunction triggerRef(ref) {\n    if (!ref.dep) {\n        warn$2(`received object is not a triggerable ref.`);\n    }\n    {\n        ref.dep &&\n            ref.dep.notify({\n                type: \"set\" /* TriggerOpTypes.SET */,\n                target: ref,\n                key: 'value'\n            });\n    }\n}\nfunction unref(ref) {\n    return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n    if (isReactive(objectWithRefs)) {\n        return objectWithRefs;\n    }\n    const proxy = {};\n    const keys = Object.keys(objectWithRefs);\n    for (let i = 0; i < keys.length; i++) {\n        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n    }\n    return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n    Object.defineProperty(target, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => {\n            const val = source[key];\n            if (isRef(val)) {\n                return val.value;\n            }\n            else {\n                const ob = val && val.__ob__;\n                if (ob)\n                    ob.dep.depend();\n                return val;\n            }\n        },\n        set: value => {\n            const oldValue = source[key];\n            if (isRef(oldValue) && !isRef(value)) {\n                oldValue.value = value;\n            }\n            else {\n                source[key] = value;\n            }\n        }\n    });\n}\nfunction customRef(factory) {\n    const dep = new Dep();\n    const { get, set } = factory(() => {\n        {\n            dep.depend({\n                target: ref,\n                type: \"get\" /* TrackOpTypes.GET */,\n                key: 'value'\n            });\n        }\n    }, () => {\n        {\n            dep.notify({\n                target: ref,\n                type: \"set\" /* TriggerOpTypes.SET */,\n                key: 'value'\n            });\n        }\n    });\n    const ref = {\n        get value() {\n            return get();\n        },\n        set value(newVal) {\n            set(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\nfunction toRefs(object) {\n    if (!isReactive(object)) {\n        warn$2(`toRefs() expects a reactive object but received a plain one.`);\n    }\n    const ret = isArray(object) ? new Array(object.length) : {};\n    for (const key in object) {\n        ret[key] = toRef(object, key);\n    }\n    return ret;\n}\nfunction toRef(object, key, defaultValue) {\n    const val = object[key];\n    if (isRef(val)) {\n        return val;\n    }\n    const ref = {\n        get value() {\n            const val = object[key];\n            return val === undefined ? defaultValue : val;\n        },\n        set value(newVal) {\n            object[key] = newVal;\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\n\nconst rawToReadonlyFlag = `__v_rawToReadonly`;\nconst rawToShallowReadonlyFlag = `__v_rawToShallowReadonly`;\nfunction readonly(target) {\n    return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n    if (!isPlainObject(target)) {\n        {\n            if (isArray(target)) {\n                warn$2(`Vue 2 does not support readonly arrays.`);\n            }\n            else if (isCollectionType(target)) {\n                warn$2(`Vue 2 does not support readonly collection types such as Map or Set.`);\n            }\n            else {\n                warn$2(`value cannot be made readonly: ${typeof target}`);\n            }\n        }\n        return target;\n    }\n    if (!Object.isExtensible(target)) {\n        warn$2(`Vue 2 does not support creating readonly proxy for non-extensible object.`);\n    }\n    // already a readonly object\n    if (isReadonly(target)) {\n        return target;\n    }\n    // already has a readonly proxy\n    const existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n    const existingProxy = target[existingFlag];\n    if (existingProxy) {\n        return existingProxy;\n    }\n    const proxy = Object.create(Object.getPrototypeOf(target));\n    def(target, existingFlag, proxy);\n    def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n    def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n    if (isRef(target)) {\n        def(proxy, RefFlag, true);\n    }\n    if (shallow || isShallow(target)) {\n        def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    }\n    const keys = Object.keys(target);\n    for (let i = 0; i < keys.length; i++) {\n        defineReadonlyProperty(proxy, target, keys[i], shallow);\n    }\n    return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            const val = target[key];\n            return shallow || !isPlainObject(val) ? val : readonly(val);\n        },\n        set() {\n            warn$2(`Set operation on key \"${key}\" failed: target is readonly.`);\n        }\n    });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n    return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n    let getter;\n    let setter;\n    const onlyGetter = isFunction(getterOrOptions);\n    if (onlyGetter) {\n        getter = getterOrOptions;\n        setter = () => {\n                warn$2('Write operation failed: computed value is readonly');\n            }\n            ;\n    }\n    else {\n        getter = getterOrOptions.get;\n        setter = getterOrOptions.set;\n    }\n    const watcher = isServerRendering()\n        ? null\n        : new Watcher(currentInstance, getter, noop, { lazy: true });\n    if (watcher && debugOptions) {\n        watcher.onTrack = debugOptions.onTrack;\n        watcher.onTrigger = debugOptions.onTrigger;\n    }\n    const ref = {\n        // some libs rely on the presence effect for checking computed refs\n        // from normal refs, but the implementation doesn't matter\n        effect: watcher,\n        get value() {\n            if (watcher) {\n                if (watcher.dirty) {\n                    watcher.evaluate();\n                }\n                if (Dep.target) {\n                    if (Dep.target.onTrack) {\n                        Dep.target.onTrack({\n                            effect: Dep.target,\n                            target: ref,\n                            type: \"get\" /* TrackOpTypes.GET */,\n                            key: 'value'\n                        });\n                    }\n                    watcher.depend();\n                }\n                return watcher.value;\n            }\n            else {\n                return getter();\n            }\n        },\n        set value(newVal) {\n            setter(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n    return ref;\n}\n\nlet mark;\nlet measure;\n{\n    const perf = inBrowser && window.performance;\n    /* istanbul ignore if */\n    if (perf &&\n        // @ts-ignore\n        perf.mark &&\n        // @ts-ignore\n        perf.measure &&\n        // @ts-ignore\n        perf.clearMarks &&\n        // @ts-ignore\n        perf.clearMeasures) {\n        mark = tag => perf.mark(tag);\n        measure = (name, startTag, endTag) => {\n            perf.measure(name, startTag, endTag);\n            perf.clearMarks(startTag);\n            perf.clearMarks(endTag);\n            // perf.clearMeasures(name)\n        };\n    }\n}\n\nconst normalizeEvent = cached((name) => {\n    const passive = name.charAt(0) === '&';\n    name = passive ? name.slice(1) : name;\n    const once = name.charAt(0) === '~'; // Prefixed last, checked first\n    name = once ? name.slice(1) : name;\n    const capture = name.charAt(0) === '!';\n    name = capture ? name.slice(1) : name;\n    return {\n        name,\n        once,\n        capture,\n        passive\n    };\n});\nfunction createFnInvoker(fns, vm) {\n    function invoker() {\n        const fns = invoker.fns;\n        if (isArray(fns)) {\n            const cloned = fns.slice();\n            for (let i = 0; i < cloned.length; i++) {\n                invokeWithErrorHandling(cloned[i], null, arguments, vm, `v-on handler`);\n            }\n        }\n        else {\n            // return handler return value for single handlers\n            return invokeWithErrorHandling(fns, null, arguments, vm, `v-on handler`);\n        }\n    }\n    invoker.fns = fns;\n    return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n    let name, cur, old, event;\n    for (name in on) {\n        cur = on[name];\n        old = oldOn[name];\n        event = normalizeEvent(name);\n        if (isUndef(cur)) {\n            warn$2(`Invalid handler for event \"${event.name}\": got ` + String(cur), vm);\n        }\n        else if (isUndef(old)) {\n            if (isUndef(cur.fns)) {\n                cur = on[name] = createFnInvoker(cur, vm);\n            }\n            if (isTrue(event.once)) {\n                cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n            }\n            add(event.name, cur, event.capture, event.passive, event.params);\n        }\n        else if (cur !== old) {\n            old.fns = cur;\n            on[name] = old;\n        }\n    }\n    for (name in oldOn) {\n        if (isUndef(on[name])) {\n            event = normalizeEvent(name);\n            remove(event.name, oldOn[name], event.capture);\n        }\n    }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n    if (def instanceof VNode) {\n        def = def.data.hook || (def.data.hook = {});\n    }\n    let invoker;\n    const oldHook = def[hookKey];\n    function wrappedHook() {\n        hook.apply(this, arguments);\n        // important: remove merged hook to ensure it's called only once\n        // and prevent memory leak\n        remove$2(invoker.fns, wrappedHook);\n    }\n    if (isUndef(oldHook)) {\n        // no existing hook\n        invoker = createFnInvoker([wrappedHook]);\n    }\n    else {\n        /* istanbul ignore if */\n        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n            // already a merged invoker\n            invoker = oldHook;\n            invoker.fns.push(wrappedHook);\n        }\n        else {\n            // existing plain hook\n            invoker = createFnInvoker([oldHook, wrappedHook]);\n        }\n    }\n    invoker.merged = true;\n    def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n    // we are only extracting raw values here.\n    // validation and default values are handled in the child\n    // component itself.\n    const propOptions = Ctor.options.props;\n    if (isUndef(propOptions)) {\n        return;\n    }\n    const res = {};\n    const { attrs, props } = data;\n    if (isDef(attrs) || isDef(props)) {\n        for (const key in propOptions) {\n            const altKey = hyphenate(key);\n            {\n                const keyInLowerCase = key.toLowerCase();\n                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                    tip(`Prop \"${keyInLowerCase}\" is passed to component ` +\n                        `${formatComponentName(\n                        // @ts-expect-error tag is string\n                        tag || Ctor)}, but the declared prop name is` +\n                        ` \"${key}\". ` +\n                        `Note that HTML attributes are case-insensitive and camelCased ` +\n                        `props need to use their kebab-case equivalents when using in-DOM ` +\n                        `templates. You should probably use \"${altKey}\" instead of \"${key}\".`);\n                }\n            }\n            checkProp(res, props, key, altKey, true) ||\n                checkProp(res, attrs, key, altKey, false);\n        }\n    }\n    return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n    if (isDef(hash)) {\n        if (hasOwn(hash, key)) {\n            res[key] = hash[key];\n            if (!preserve) {\n                delete hash[key];\n            }\n            return true;\n        }\n        else if (hasOwn(hash, altKey)) {\n            res[key] = hash[altKey];\n            if (!preserve) {\n                delete hash[altKey];\n            }\n            return true;\n        }\n    }\n    return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n    for (let i = 0; i < children.length; i++) {\n        if (isArray(children[i])) {\n            return Array.prototype.concat.apply([], children);\n        }\n    }\n    return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren(children) {\n    return isPrimitive(children)\n        ? [createTextVNode(children)]\n        : isArray(children)\n            ? normalizeArrayChildren(children)\n            : undefined;\n}\nfunction isTextNode(node) {\n    return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n}\nfunction normalizeArrayChildren(children, nestedIndex) {\n    const res = [];\n    let i, c, lastIndex, last;\n    for (i = 0; i < children.length; i++) {\n        c = children[i];\n        if (isUndef(c) || typeof c === 'boolean')\n            continue;\n        lastIndex = res.length - 1;\n        last = res[lastIndex];\n        //  nested\n        if (isArray(c)) {\n            if (c.length > 0) {\n                c = normalizeArrayChildren(c, `${nestedIndex || ''}_${i}`);\n                // merge adjacent text nodes\n                if (isTextNode(c[0]) && isTextNode(last)) {\n                    res[lastIndex] = createTextVNode(last.text + c[0].text);\n                    c.shift();\n                }\n                res.push.apply(res, c);\n            }\n        }\n        else if (isPrimitive(c)) {\n            if (isTextNode(last)) {\n                // merge adjacent text nodes\n                // this is necessary for SSR hydration because text nodes are\n                // essentially merged when rendered to HTML strings\n                res[lastIndex] = createTextVNode(last.text + c);\n            }\n            else if (c !== '') {\n                // convert primitive to vnode\n                res.push(createTextVNode(c));\n            }\n        }\n        else {\n            if (isTextNode(c) && isTextNode(last)) {\n                // merge adjacent text nodes\n                res[lastIndex] = createTextVNode(last.text + c.text);\n            }\n            else {\n                // default key for nested array children (likely generated by v-for)\n                if (isTrue(children._isVList) &&\n                    isDef(c.tag) &&\n                    isUndef(c.key) &&\n                    isDef(nestedIndex)) {\n                    c.key = `__vlist${nestedIndex}_${i}__`;\n                }\n                res.push(c);\n            }\n        }\n    }\n    return res;\n}\n\nconst SIMPLE_NORMALIZE = 1;\nconst ALWAYS_NORMALIZE = 2;\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n    if (isArray(data) || isPrimitive(data)) {\n        normalizationType = children;\n        children = data;\n        data = undefined;\n    }\n    if (isTrue(alwaysNormalize)) {\n        normalizationType = ALWAYS_NORMALIZE;\n    }\n    return _createElement(context, tag, data, children, normalizationType);\n}\nfunction _createElement(context, tag, data, children, normalizationType) {\n    if (isDef(data) && isDef(data.__ob__)) {\n        warn$2(`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\\n` + 'Always create fresh vnode data objects in each render!', context);\n        return createEmptyVNode();\n    }\n    // object syntax in v-bind\n    if (isDef(data) && isDef(data.is)) {\n        tag = data.is;\n    }\n    if (!tag) {\n        // in case of component :is set to falsy value\n        return createEmptyVNode();\n    }\n    // warn against non-primitive key\n    if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n        warn$2('Avoid using non-primitive value as key, ' +\n            'use string/number value instead.', context);\n    }\n    // support single function children as default scoped slot\n    if (isArray(children) && isFunction(children[0])) {\n        data = data || {};\n        data.scopedSlots = { default: children[0] };\n        children.length = 0;\n    }\n    if (normalizationType === ALWAYS_NORMALIZE) {\n        children = normalizeChildren(children);\n    }\n    else if (normalizationType === SIMPLE_NORMALIZE) {\n        children = simpleNormalizeChildren(children);\n    }\n    let vnode, ns;\n    if (typeof tag === 'string') {\n        let Ctor;\n        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n        if (config.isReservedTag(tag)) {\n            // platform built-in elements\n            if (isDef(data) &&\n                isDef(data.nativeOn) &&\n                data.tag !== 'component') {\n                warn$2(`The .native modifier for v-on is only valid on components but it was used on <${tag}>.`, context);\n            }\n            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n        }\n        else if ((!data || !data.pre) &&\n            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n            // component\n            vnode = createComponent(Ctor, data, context, children, tag);\n        }\n        else {\n            // unknown or unlisted namespaced elements\n            // check at runtime because it may get assigned a namespace when its\n            // parent normalizes children\n            vnode = new VNode(tag, data, children, undefined, undefined, context);\n        }\n    }\n    else {\n        // direct component options / constructor\n        vnode = createComponent(tag, data, context, children);\n    }\n    if (isArray(vnode)) {\n        return vnode;\n    }\n    else if (isDef(vnode)) {\n        if (isDef(ns))\n            applyNS(vnode, ns);\n        if (isDef(data))\n            registerDeepBindings(data);\n        return vnode;\n    }\n    else {\n        return createEmptyVNode();\n    }\n}\nfunction applyNS(vnode, ns, force) {\n    vnode.ns = ns;\n    if (vnode.tag === 'foreignObject') {\n        // use default namespace inside foreignObject\n        ns = undefined;\n        force = true;\n    }\n    if (isDef(vnode.children)) {\n        for (let i = 0, l = vnode.children.length; i < l; i++) {\n            const child = vnode.children[i];\n            if (isDef(child.tag) &&\n                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                applyNS(child, ns, force);\n            }\n        }\n    }\n}\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings(data) {\n    if (isObject(data.style)) {\n        traverse(data.style);\n    }\n    if (isObject(data.class)) {\n        traverse(data.class);\n    }\n}\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList(val, render) {\n    let ret = null, i, l, keys, key;\n    if (isArray(val) || typeof val === 'string') {\n        ret = new Array(val.length);\n        for (i = 0, l = val.length; i < l; i++) {\n            ret[i] = render(val[i], i);\n        }\n    }\n    else if (typeof val === 'number') {\n        ret = new Array(val);\n        for (i = 0; i < val; i++) {\n            ret[i] = render(i + 1, i);\n        }\n    }\n    else if (isObject(val)) {\n        if (hasSymbol && val[Symbol.iterator]) {\n            ret = [];\n            const iterator = val[Symbol.iterator]();\n            let result = iterator.next();\n            while (!result.done) {\n                ret.push(render(result.value, ret.length));\n                result = iterator.next();\n            }\n        }\n        else {\n            keys = Object.keys(val);\n            ret = new Array(keys.length);\n            for (i = 0, l = keys.length; i < l; i++) {\n                key = keys[i];\n                ret[i] = render(val[key], key, i);\n            }\n        }\n    }\n    if (!isDef(ret)) {\n        ret = [];\n    }\n    ret._isVList = true;\n    return ret;\n}\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot(name, fallbackRender, props, bindObject) {\n    const scopedSlotFn = this.$scopedSlots[name];\n    let nodes;\n    if (scopedSlotFn) {\n        // scoped slot\n        props = props || {};\n        if (bindObject) {\n            if (!isObject(bindObject)) {\n                warn$2('slot v-bind without argument expects an Object', this);\n            }\n            props = extend(extend({}, bindObject), props);\n        }\n        nodes =\n            scopedSlotFn(props) ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    else {\n        nodes =\n            this.$slots[name] ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    const target = props && props.slot;\n    if (target) {\n        return this.$createElement('template', { slot: target }, nodes);\n    }\n    else {\n        return nodes;\n    }\n}\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter(id) {\n    return resolveAsset(this.$options, 'filters', id, true) || identity;\n}\n\nfunction isKeyNotMatch(expect, actual) {\n    if (isArray(expect)) {\n        return expect.indexOf(actual) === -1;\n    }\n    else {\n        return expect !== actual;\n    }\n}\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n    const mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n        return isKeyNotMatch(builtInKeyName, eventKeyName);\n    }\n    else if (mappedKeyCode) {\n        return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n    }\n    else if (eventKeyName) {\n        return hyphenate(eventKeyName) !== key;\n    }\n    return eventKeyCode === undefined;\n}\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps(data, tag, value, asProp, isSync) {\n    if (value) {\n        if (!isObject(value)) {\n            warn$2('v-bind without argument expects an Object or Array value', this);\n        }\n        else {\n            if (isArray(value)) {\n                value = toObject(value);\n            }\n            let hash;\n            for (const key in value) {\n                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                    hash = data;\n                }\n                else {\n                    const type = data.attrs && data.attrs.type;\n                    hash =\n                        asProp || config.mustUseProp(tag, type, key)\n                            ? data.domProps || (data.domProps = {})\n                            : data.attrs || (data.attrs = {});\n                }\n                const camelizedKey = camelize(key);\n                const hyphenatedKey = hyphenate(key);\n                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                    hash[key] = value[key];\n                    if (isSync) {\n                        const on = data.on || (data.on = {});\n                        on[`update:${key}`] = function ($event) {\n                            value[key] = $event;\n                        };\n                    }\n                }\n            }\n        }\n    }\n    return data;\n}\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic(index, isInFor) {\n    const cached = this._staticTrees || (this._staticTrees = []);\n    let tree = cached[index];\n    // if has already-rendered static tree and not inside v-for,\n    // we can reuse the same tree.\n    if (tree && !isInFor) {\n        return tree;\n    }\n    // otherwise, render a fresh tree.\n    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n    );\n    markStatic$1(tree, `__static__${index}`, false);\n    return tree;\n}\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce(tree, index, key) {\n    markStatic$1(tree, `__once__${index}${key ? `_${key}` : ``}`, true);\n    return tree;\n}\nfunction markStatic$1(tree, key, isOnce) {\n    if (isArray(tree)) {\n        for (let i = 0; i < tree.length; i++) {\n            if (tree[i] && typeof tree[i] !== 'string') {\n                markStaticNode(tree[i], `${key}_${i}`, isOnce);\n            }\n        }\n    }\n    else {\n        markStaticNode(tree, key, isOnce);\n    }\n}\nfunction markStaticNode(node, key, isOnce) {\n    node.isStatic = true;\n    node.key = key;\n    node.isOnce = isOnce;\n}\n\nfunction bindObjectListeners(data, value) {\n    if (value) {\n        if (!isPlainObject(value)) {\n            warn$2('v-on without argument expects an Object value', this);\n        }\n        else {\n            const on = (data.on = data.on ? extend({}, data.on) : {});\n            for (const key in value) {\n                const existing = on[key];\n                const ours = value[key];\n                on[key] = existing ? [].concat(existing, ours) : ours;\n            }\n        }\n    }\n    return data;\n}\n\nfunction resolveScopedSlots(fns, res, \n// the following are added in 2.6\nhasDynamicKeys, contentHashKey) {\n    res = res || { $stable: !hasDynamicKeys };\n    for (let i = 0; i < fns.length; i++) {\n        const slot = fns[i];\n        if (isArray(slot)) {\n            resolveScopedSlots(slot, res, hasDynamicKeys);\n        }\n        else if (slot) {\n            // marker for reverse proxying v-slot without scope on this.$slots\n            // @ts-expect-error\n            if (slot.proxy) {\n                // @ts-expect-error\n                slot.fn.proxy = true;\n            }\n            res[slot.key] = slot.fn;\n        }\n    }\n    if (contentHashKey) {\n        res.$key = contentHashKey;\n    }\n    return res;\n}\n\n// helper to process dynamic keys for dynamic arguments in v-bind and v-on.\nfunction bindDynamicKeys(baseObj, values) {\n    for (let i = 0; i < values.length; i += 2) {\n        const key = values[i];\n        if (typeof key === 'string' && key) {\n            baseObj[values[i]] = values[i + 1];\n        }\n        else if (key !== '' && key !== null) {\n            // null is a special value for explicitly removing a binding\n            warn$2(`Invalid value for dynamic directive argument (expected string or null): ${key}`, this);\n        }\n    }\n    return baseObj;\n}\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier(value, symbol) {\n    return typeof value === 'string' ? symbol + value : value;\n}\n\nfunction installRenderHelpers(target) {\n    target._o = markOnce;\n    target._n = toNumber;\n    target._s = toString;\n    target._l = renderList;\n    target._t = renderSlot;\n    target._q = looseEqual;\n    target._i = looseIndexOf;\n    target._m = renderStatic;\n    target._f = resolveFilter;\n    target._k = checkKeyCodes;\n    target._b = bindObjectProps;\n    target._v = createTextVNode;\n    target._e = createEmptyVNode;\n    target._u = resolveScopedSlots;\n    target._g = bindObjectListeners;\n    target._d = bindDynamicKeys;\n    target._p = prependModifier;\n}\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots(children, context) {\n    if (!children || !children.length) {\n        return {};\n    }\n    const slots = {};\n    for (let i = 0, l = children.length; i < l; i++) {\n        const child = children[i];\n        const data = child.data;\n        // remove slot attribute if the node is resolved as a Vue slot node\n        if (data && data.attrs && data.attrs.slot) {\n            delete data.attrs.slot;\n        }\n        // named slots should only be respected if the vnode was rendered in the\n        // same context.\n        if ((child.context === context || child.fnContext === context) &&\n            data &&\n            data.slot != null) {\n            const name = data.slot;\n            const slot = slots[name] || (slots[name] = []);\n            if (child.tag === 'template') {\n                slot.push.apply(slot, child.children || []);\n            }\n            else {\n                slot.push(child);\n            }\n        }\n        else {\n            (slots.default || (slots.default = [])).push(child);\n        }\n    }\n    // ignore slots that contains only whitespace\n    for (const name in slots) {\n        if (slots[name].every(isWhitespace)) {\n            delete slots[name];\n        }\n    }\n    return slots;\n}\nfunction isWhitespace(node) {\n    return (node.isComment && !node.asyncFactory) || node.text === ' ';\n}\n\nfunction isAsyncPlaceholder(node) {\n    // @ts-expect-error not really boolean type\n    return node.isComment && node.asyncFactory;\n}\n\nfunction normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n    let res;\n    const hasNormalSlots = Object.keys(normalSlots).length > 0;\n    const isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n    const key = scopedSlots && scopedSlots.$key;\n    if (!scopedSlots) {\n        res = {};\n    }\n    else if (scopedSlots._normalized) {\n        // fast path 1: child component re-render only, parent did not change\n        return scopedSlots._normalized;\n    }\n    else if (isStable &&\n        prevScopedSlots &&\n        prevScopedSlots !== emptyObject &&\n        key === prevScopedSlots.$key &&\n        !hasNormalSlots &&\n        !prevScopedSlots.$hasNormal) {\n        // fast path 2: stable scoped slots w/ no normal slots to proxy,\n        // only need to normalize once\n        return prevScopedSlots;\n    }\n    else {\n        res = {};\n        for (const key in scopedSlots) {\n            if (scopedSlots[key] && key[0] !== '$') {\n                res[key] = normalizeScopedSlot(ownerVm, normalSlots, key, scopedSlots[key]);\n            }\n        }\n    }\n    // expose normal slots on scopedSlots\n    for (const key in normalSlots) {\n        if (!(key in res)) {\n            res[key] = proxyNormalSlot(normalSlots, key);\n        }\n    }\n    // avoriaz seems to mock a non-extensible $scopedSlots object\n    // and when that is passed down this would cause an error\n    if (scopedSlots && Object.isExtensible(scopedSlots)) {\n        scopedSlots._normalized = res;\n    }\n    def(res, '$stable', isStable);\n    def(res, '$key', key);\n    def(res, '$hasNormal', hasNormalSlots);\n    return res;\n}\nfunction normalizeScopedSlot(vm, normalSlots, key, fn) {\n    const normalized = function () {\n        const cur = currentInstance;\n        setCurrentInstance(vm);\n        let res = arguments.length ? fn.apply(null, arguments) : fn({});\n        res =\n            res && typeof res === 'object' && !isArray(res)\n                ? [res] // single vnode\n                : normalizeChildren(res);\n        const vnode = res && res[0];\n        setCurrentInstance(cur);\n        return res &&\n            (!vnode ||\n                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n            ? undefined\n            : res;\n    };\n    // this is a slot using the new v-slot syntax without scope. although it is\n    // compiled as a scoped slot, render fn users would expect it to be present\n    // on this.$slots because the usage is semantically a normal slot.\n    if (fn.proxy) {\n        Object.defineProperty(normalSlots, key, {\n            get: normalized,\n            enumerable: true,\n            configurable: true\n        });\n    }\n    return normalized;\n}\nfunction proxyNormalSlot(slots, key) {\n    return () => slots[key];\n}\n\nfunction initSetup(vm) {\n    const options = vm.$options;\n    const setup = options.setup;\n    if (setup) {\n        const ctx = (vm._setupContext = createSetupContext(vm));\n        setCurrentInstance(vm);\n        pushTarget();\n        const setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, `setup`);\n        popTarget();\n        setCurrentInstance();\n        if (isFunction(setupResult)) {\n            // render function\n            // @ts-ignore\n            options.render = setupResult;\n        }\n        else if (isObject(setupResult)) {\n            // bindings\n            if (setupResult instanceof VNode) {\n                warn$2(`setup() should not return VNodes directly - ` +\n                    `return a render function instead.`);\n            }\n            vm._setupState = setupResult;\n            // __sfc indicates compiled bindings from <script setup>\n            if (!setupResult.__sfc) {\n                for (const key in setupResult) {\n                    if (!isReserved(key)) {\n                        proxyWithRefUnwrap(vm, setupResult, key);\n                    }\n                    else {\n                        warn$2(`Avoid using variables that start with _ or $ in setup().`);\n                    }\n                }\n            }\n            else {\n                // exposed for compiled render fn\n                const proxy = (vm._setupProxy = {});\n                for (const key in setupResult) {\n                    if (key !== '__sfc') {\n                        proxyWithRefUnwrap(proxy, setupResult, key);\n                    }\n                }\n            }\n        }\n        else if (setupResult !== undefined) {\n            warn$2(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);\n        }\n    }\n}\nfunction createSetupContext(vm) {\n    let exposeCalled = false;\n    return {\n        get attrs() {\n            if (!vm._attrsProxy) {\n                const proxy = (vm._attrsProxy = {});\n                def(proxy, '_v_attr_proxy', true);\n                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n            }\n            return vm._attrsProxy;\n        },\n        get listeners() {\n            if (!vm._listenersProxy) {\n                const proxy = (vm._listenersProxy = {});\n                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n            }\n            return vm._listenersProxy;\n        },\n        get slots() {\n            return initSlotsProxy(vm);\n        },\n        emit: bind$1(vm.$emit, vm),\n        expose(exposed) {\n            {\n                if (exposeCalled) {\n                    warn$2(`expose() should be called only once per setup().`, vm);\n                }\n                exposeCalled = true;\n            }\n            if (exposed) {\n                Object.keys(exposed).forEach(key => proxyWithRefUnwrap(vm, exposed, key));\n            }\n        }\n    };\n}\nfunction syncSetupProxy(to, from, prev, instance, type) {\n    let changed = false;\n    for (const key in from) {\n        if (!(key in to)) {\n            changed = true;\n            defineProxyAttr(to, key, instance, type);\n        }\n        else if (from[key] !== prev[key]) {\n            changed = true;\n        }\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            changed = true;\n            delete to[key];\n        }\n    }\n    return changed;\n}\nfunction defineProxyAttr(proxy, key, instance, type) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            return instance[type][key];\n        }\n    });\n}\nfunction initSlotsProxy(vm) {\n    if (!vm._slotsProxy) {\n        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n    }\n    return vm._slotsProxy;\n}\nfunction syncSetupSlots(to, from) {\n    for (const key in from) {\n        to[key] = from[key];\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            delete to[key];\n        }\n    }\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useSlots() {\n    return getContext().slots;\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useAttrs() {\n    return getContext().attrs;\n}\n/**\n * Vue 2 only\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useListeners() {\n    return getContext().listeners;\n}\nfunction getContext() {\n    if (!currentInstance) {\n        warn$2(`useContext() called without active instance.`);\n    }\n    const vm = currentInstance;\n    return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n}\n/**\n * Runtime helper for merging default declarations. Imported by compiled code\n * only.\n * @internal\n */\nfunction mergeDefaults(raw, defaults) {\n    const props = isArray(raw)\n        ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})\n        : raw;\n    for (const key in defaults) {\n        const opt = props[key];\n        if (opt) {\n            if (isArray(opt) || isFunction(opt)) {\n                props[key] = { type: opt, default: defaults[key] };\n            }\n            else {\n                opt.default = defaults[key];\n            }\n        }\n        else if (opt === null) {\n            props[key] = { default: defaults[key] };\n        }\n        else {\n            warn$2(`props default key \"${key}\" has no corresponding declaration.`);\n        }\n    }\n    return props;\n}\n\nfunction initRender(vm) {\n    vm._vnode = null; // the root of the child tree\n    vm._staticTrees = null; // v-once cached trees\n    const options = vm.$options;\n    const parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n    const renderContext = parentVnode && parentVnode.context;\n    vm.$slots = resolveSlots(options._renderChildren, renderContext);\n    vm.$scopedSlots = parentVnode\n        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n        : emptyObject;\n    // bind the createElement fn to this instance\n    // so that we get proper render context inside it.\n    // args order: tag, data, children, normalizationType, alwaysNormalize\n    // internal version is used by render functions compiled from templates\n    // @ts-expect-error\n    vm._c = (a, b, c, d) => createElement$1(vm, a, b, c, d, false);\n    // normalization is always applied for the public version, used in\n    // user-written render functions.\n    // @ts-expect-error\n    vm.$createElement = (a, b, c, d) => createElement$1(vm, a, b, c, d, true);\n    // $attrs & $listeners are exposed for easier HOC creation.\n    // they need to be reactive so that HOCs using them are always updated\n    const parentData = parentVnode && parentVnode.data;\n    /* istanbul ignore else */\n    {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, () => {\n            !isUpdatingChildComponent && warn$2(`$attrs is readonly.`, vm);\n        }, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, () => {\n            !isUpdatingChildComponent && warn$2(`$listeners is readonly.`, vm);\n        }, true);\n    }\n}\nlet currentRenderingInstance = null;\nfunction renderMixin(Vue) {\n    // install runtime convenience helpers\n    installRenderHelpers(Vue.prototype);\n    Vue.prototype.$nextTick = function (fn) {\n        return nextTick(fn, this);\n    };\n    Vue.prototype._render = function () {\n        const vm = this;\n        const { render, _parentVnode } = vm.$options;\n        if (_parentVnode && vm._isMounted) {\n            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n            if (vm._slotsProxy) {\n                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n            }\n        }\n        // set parent vnode. this allows render functions to have access\n        // to the data on the placeholder node.\n        vm.$vnode = _parentVnode;\n        // render self\n        const prevInst = currentInstance;\n        const prevRenderInst = currentRenderingInstance;\n        let vnode;\n        try {\n            setCurrentInstance(vm);\n            currentRenderingInstance = vm;\n            vnode = render.call(vm._renderProxy, vm.$createElement);\n        }\n        catch (e) {\n            handleError(e, vm, `render`);\n            // return error render result,\n            // or previous vnode to prevent render error causing blank component\n            /* istanbul ignore else */\n            if (vm.$options.renderError) {\n                try {\n                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                }\n                catch (e) {\n                    handleError(e, vm, `renderError`);\n                    vnode = vm._vnode;\n                }\n            }\n            else {\n                vnode = vm._vnode;\n            }\n        }\n        finally {\n            currentRenderingInstance = prevRenderInst;\n            setCurrentInstance(prevInst);\n        }\n        // if the returned array contains only a single node, allow it\n        if (isArray(vnode) && vnode.length === 1) {\n            vnode = vnode[0];\n        }\n        // return empty vnode in case the render function errored out\n        if (!(vnode instanceof VNode)) {\n            if (isArray(vnode)) {\n                warn$2('Multiple root nodes returned from render function. Render function ' +\n                    'should return a single root node.', vm);\n            }\n            vnode = createEmptyVNode();\n        }\n        // set parent\n        vnode.parent = _parentVnode;\n        return vnode;\n    };\n}\n\nfunction ensureCtor(comp, base) {\n    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n        comp = comp.default;\n    }\n    return isObject(comp) ? base.extend(comp) : comp;\n}\nfunction createAsyncPlaceholder(factory, data, context, children, tag) {\n    const node = createEmptyVNode();\n    node.asyncFactory = factory;\n    node.asyncMeta = { data, context, children, tag };\n    return node;\n}\nfunction resolveAsyncComponent(factory, baseCtor) {\n    if (isTrue(factory.error) && isDef(factory.errorComp)) {\n        return factory.errorComp;\n    }\n    if (isDef(factory.resolved)) {\n        return factory.resolved;\n    }\n    const owner = currentRenderingInstance;\n    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n        // already pending\n        factory.owners.push(owner);\n    }\n    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n        return factory.loadingComp;\n    }\n    if (owner && !isDef(factory.owners)) {\n        const owners = (factory.owners = [owner]);\n        let sync = true;\n        let timerLoading = null;\n        let timerTimeout = null;\n        owner.$on('hook:destroyed', () => remove$2(owners, owner));\n        const forceRender = (renderCompleted) => {\n            for (let i = 0, l = owners.length; i < l; i++) {\n                owners[i].$forceUpdate();\n            }\n            if (renderCompleted) {\n                owners.length = 0;\n                if (timerLoading !== null) {\n                    clearTimeout(timerLoading);\n                    timerLoading = null;\n                }\n                if (timerTimeout !== null) {\n                    clearTimeout(timerTimeout);\n                    timerTimeout = null;\n                }\n            }\n        };\n        const resolve = once((res) => {\n            // cache resolved\n            factory.resolved = ensureCtor(res, baseCtor);\n            // invoke callbacks only if this is not a synchronous resolve\n            // (async resolves are shimmed as synchronous during SSR)\n            if (!sync) {\n                forceRender(true);\n            }\n            else {\n                owners.length = 0;\n            }\n        });\n        const reject = once(reason => {\n            warn$2(`Failed to resolve async component: ${String(factory)}` +\n                    (reason ? `\\nReason: ${reason}` : ''));\n            if (isDef(factory.errorComp)) {\n                factory.error = true;\n                forceRender(true);\n            }\n        });\n        const res = factory(resolve, reject);\n        if (isObject(res)) {\n            if (isPromise(res)) {\n                // () => Promise\n                if (isUndef(factory.resolved)) {\n                    res.then(resolve, reject);\n                }\n            }\n            else if (isPromise(res.component)) {\n                res.component.then(resolve, reject);\n                if (isDef(res.error)) {\n                    factory.errorComp = ensureCtor(res.error, baseCtor);\n                }\n                if (isDef(res.loading)) {\n                    factory.loadingComp = ensureCtor(res.loading, baseCtor);\n                    if (res.delay === 0) {\n                        factory.loading = true;\n                    }\n                    else {\n                        // @ts-expect-error NodeJS timeout type\n                        timerLoading = setTimeout(() => {\n                            timerLoading = null;\n                            if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                factory.loading = true;\n                                forceRender(false);\n                            }\n                        }, res.delay || 200);\n                    }\n                }\n                if (isDef(res.timeout)) {\n                    // @ts-expect-error NodeJS timeout type\n                    timerTimeout = setTimeout(() => {\n                        timerTimeout = null;\n                        if (isUndef(factory.resolved)) {\n                            reject(`timeout (${res.timeout}ms)` );\n                        }\n                    }, res.timeout);\n                }\n            }\n        }\n        sync = false;\n        // return in case resolved synchronously\n        return factory.loading ? factory.loadingComp : factory.resolved;\n    }\n}\n\nfunction getFirstComponentChild(children) {\n    if (isArray(children)) {\n        for (let i = 0; i < children.length; i++) {\n            const c = children[i];\n            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                return c;\n            }\n        }\n    }\n}\n\nfunction initEvents(vm) {\n    vm._events = Object.create(null);\n    vm._hasHookEvent = false;\n    // init parent attached events\n    const listeners = vm.$options._parentListeners;\n    if (listeners) {\n        updateComponentListeners(vm, listeners);\n    }\n}\nlet target$1;\nfunction add$1(event, fn) {\n    target$1.$on(event, fn);\n}\nfunction remove$1(event, fn) {\n    target$1.$off(event, fn);\n}\nfunction createOnceHandler$1(event, fn) {\n    const _target = target$1;\n    return function onceHandler() {\n        const res = fn.apply(null, arguments);\n        if (res !== null) {\n            _target.$off(event, onceHandler);\n        }\n    };\n}\nfunction updateComponentListeners(vm, listeners, oldListeners) {\n    target$1 = vm;\n    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n    target$1 = undefined;\n}\nfunction eventsMixin(Vue) {\n    const hookRE = /^hook:/;\n    Vue.prototype.$on = function (event, fn) {\n        const vm = this;\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$on(event[i], fn);\n            }\n        }\n        else {\n            (vm._events[event] || (vm._events[event] = [])).push(fn);\n            // optimize hook:event cost by using a boolean flag marked at registration\n            // instead of a hash lookup\n            if (hookRE.test(event)) {\n                vm._hasHookEvent = true;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$once = function (event, fn) {\n        const vm = this;\n        function on() {\n            vm.$off(event, on);\n            fn.apply(vm, arguments);\n        }\n        on.fn = fn;\n        vm.$on(event, on);\n        return vm;\n    };\n    Vue.prototype.$off = function (event, fn) {\n        const vm = this;\n        // all\n        if (!arguments.length) {\n            vm._events = Object.create(null);\n            return vm;\n        }\n        // array of events\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$off(event[i], fn);\n            }\n            return vm;\n        }\n        // specific event\n        const cbs = vm._events[event];\n        if (!cbs) {\n            return vm;\n        }\n        if (!fn) {\n            vm._events[event] = null;\n            return vm;\n        }\n        // specific handler\n        let cb;\n        let i = cbs.length;\n        while (i--) {\n            cb = cbs[i];\n            if (cb === fn || cb.fn === fn) {\n                cbs.splice(i, 1);\n                break;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$emit = function (event) {\n        const vm = this;\n        {\n            const lowerCaseEvent = event.toLowerCase();\n            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                tip(`Event \"${lowerCaseEvent}\" is emitted in component ` +\n                    `${formatComponentName(vm)} but the handler is registered for \"${event}\". ` +\n                    `Note that HTML attributes are case-insensitive and you cannot use ` +\n                    `v-on to listen to camelCase events when using in-DOM templates. ` +\n                    `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\n            }\n        }\n        let cbs = vm._events[event];\n        if (cbs) {\n            cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n            const args = toArray(arguments, 1);\n            const info = `event handler for \"${event}\"`;\n            for (let i = 0, l = cbs.length; i < l; i++) {\n                invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n            }\n        }\n        return vm;\n    };\n}\n\nlet activeEffectScope;\nclass EffectScope {\n    constructor(detached = false) {\n        this.detached = detached;\n        /**\n         * @internal\n         */\n        this.active = true;\n        /**\n         * @internal\n         */\n        this.effects = [];\n        /**\n         * @internal\n         */\n        this.cleanups = [];\n        this.parent = activeEffectScope;\n        if (!detached && activeEffectScope) {\n            this.index =\n                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n        }\n    }\n    run(fn) {\n        if (this.active) {\n            const currentEffectScope = activeEffectScope;\n            try {\n                activeEffectScope = this;\n                return fn();\n            }\n            finally {\n                activeEffectScope = currentEffectScope;\n            }\n        }\n        else {\n            warn$2(`cannot run an inactive effect scope.`);\n        }\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    on() {\n        activeEffectScope = this;\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    off() {\n        activeEffectScope = this.parent;\n    }\n    stop(fromParent) {\n        if (this.active) {\n            let i, l;\n            for (i = 0, l = this.effects.length; i < l; i++) {\n                this.effects[i].teardown();\n            }\n            for (i = 0, l = this.cleanups.length; i < l; i++) {\n                this.cleanups[i]();\n            }\n            if (this.scopes) {\n                for (i = 0, l = this.scopes.length; i < l; i++) {\n                    this.scopes[i].stop(true);\n                }\n            }\n            // nested scope, dereference from parent to avoid memory leaks\n            if (!this.detached && this.parent && !fromParent) {\n                // optimized O(1) removal\n                const last = this.parent.scopes.pop();\n                if (last && last !== this) {\n                    this.parent.scopes[this.index] = last;\n                    last.index = this.index;\n                }\n            }\n            this.parent = undefined;\n            this.active = false;\n        }\n    }\n}\nfunction effectScope(detached) {\n    return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n    if (scope && scope.active) {\n        scope.effects.push(effect);\n    }\n}\nfunction getCurrentScope() {\n    return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n    if (activeEffectScope) {\n        activeEffectScope.cleanups.push(fn);\n    }\n    else {\n        warn$2(`onScopeDispose() is called when there is no active effect scope` +\n            ` to be associated with.`);\n    }\n}\n\nlet activeInstance = null;\nlet isUpdatingChildComponent = false;\nfunction setActiveInstance(vm) {\n    const prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    return () => {\n        activeInstance = prevActiveInstance;\n    };\n}\nfunction initLifecycle(vm) {\n    const options = vm.$options;\n    // locate first non-abstract parent\n    let parent = options.parent;\n    if (parent && !options.abstract) {\n        while (parent.$options.abstract && parent.$parent) {\n            parent = parent.$parent;\n        }\n        parent.$children.push(vm);\n    }\n    vm.$parent = parent;\n    vm.$root = parent ? parent.$root : vm;\n    vm.$children = [];\n    vm.$refs = {};\n    vm._provided = parent ? parent._provided : Object.create(null);\n    vm._watcher = null;\n    vm._inactive = null;\n    vm._directInactive = false;\n    vm._isMounted = false;\n    vm._isDestroyed = false;\n    vm._isBeingDestroyed = false;\n}\nfunction lifecycleMixin(Vue) {\n    Vue.prototype._update = function (vnode, hydrating) {\n        const vm = this;\n        const prevEl = vm.$el;\n        const prevVnode = vm._vnode;\n        const restoreActiveInstance = setActiveInstance(vm);\n        vm._vnode = vnode;\n        // Vue.prototype.__patch__ is injected in entry points\n        // based on the rendering backend used.\n        if (!prevVnode) {\n            // initial render\n            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n        }\n        else {\n            // updates\n            vm.$el = vm.__patch__(prevVnode, vnode);\n        }\n        restoreActiveInstance();\n        // update __vue__ reference\n        if (prevEl) {\n            prevEl.__vue__ = null;\n        }\n        if (vm.$el) {\n            vm.$el.__vue__ = vm;\n        }\n        // if parent is an HOC, update its $el as well\n        let wrapper = vm;\n        while (wrapper &&\n            wrapper.$vnode &&\n            wrapper.$parent &&\n            wrapper.$vnode === wrapper.$parent._vnode) {\n            wrapper.$parent.$el = wrapper.$el;\n            wrapper = wrapper.$parent;\n        }\n        // updated hook is called by the scheduler to ensure that children are\n        // updated in a parent's updated hook.\n    };\n    Vue.prototype.$forceUpdate = function () {\n        const vm = this;\n        if (vm._watcher) {\n            vm._watcher.update();\n        }\n    };\n    Vue.prototype.$destroy = function () {\n        const vm = this;\n        if (vm._isBeingDestroyed) {\n            return;\n        }\n        callHook$1(vm, 'beforeDestroy');\n        vm._isBeingDestroyed = true;\n        // remove self from parent\n        const parent = vm.$parent;\n        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n            remove$2(parent.$children, vm);\n        }\n        // teardown scope. this includes both the render watcher and other\n        // watchers created\n        vm._scope.stop();\n        // remove reference from data ob\n        // frozen object may not have observer.\n        if (vm._data.__ob__) {\n            vm._data.__ob__.vmCount--;\n        }\n        // call the last hook...\n        vm._isDestroyed = true;\n        // invoke destroy hooks on current rendered tree\n        vm.__patch__(vm._vnode, null);\n        // fire destroyed hook\n        callHook$1(vm, 'destroyed');\n        // turn off all instance listeners.\n        vm.$off();\n        // remove __vue__ reference\n        if (vm.$el) {\n            vm.$el.__vue__ = null;\n        }\n        // release circular reference (#6759)\n        if (vm.$vnode) {\n            vm.$vnode.parent = null;\n        }\n    };\n}\nfunction mountComponent(vm, el, hydrating) {\n    vm.$el = el;\n    if (!vm.$options.render) {\n        // @ts-expect-error invalid type\n        vm.$options.render = createEmptyVNode;\n        {\n            /* istanbul ignore if */\n            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                vm.$options.el ||\n                el) {\n                warn$2('You are using the runtime-only build of Vue where the template ' +\n                    'compiler is not available. Either pre-compile the templates into ' +\n                    'render functions, or use the compiler-included build.', vm);\n            }\n            else {\n                warn$2('Failed to mount component: template or render function not defined.', vm);\n            }\n        }\n    }\n    callHook$1(vm, 'beforeMount');\n    let updateComponent;\n    /* istanbul ignore if */\n    if (config.performance && mark) {\n        updateComponent = () => {\n            const name = vm._name;\n            const id = vm._uid;\n            const startTag = `vue-perf-start:${id}`;\n            const endTag = `vue-perf-end:${id}`;\n            mark(startTag);\n            const vnode = vm._render();\n            mark(endTag);\n            measure(`vue ${name} render`, startTag, endTag);\n            mark(startTag);\n            vm._update(vnode, hydrating);\n            mark(endTag);\n            measure(`vue ${name} patch`, startTag, endTag);\n        };\n    }\n    else {\n        updateComponent = () => {\n            vm._update(vm._render(), hydrating);\n        };\n    }\n    const watcherOptions = {\n        before() {\n            if (vm._isMounted && !vm._isDestroyed) {\n                callHook$1(vm, 'beforeUpdate');\n            }\n        }\n    };\n    {\n        watcherOptions.onTrack = e => callHook$1(vm, 'renderTracked', [e]);\n        watcherOptions.onTrigger = e => callHook$1(vm, 'renderTriggered', [e]);\n    }\n    // we set this to vm._watcher inside the watcher's constructor\n    // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n    // component's mounted hook), which relies on vm._watcher being already defined\n    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n    hydrating = false;\n    // flush buffer for flush: \"pre\" watchers queued in setup()\n    const preWatchers = vm._preWatchers;\n    if (preWatchers) {\n        for (let i = 0; i < preWatchers.length; i++) {\n            preWatchers[i].run();\n        }\n    }\n    // manually mounted instance, call mounted on self\n    // mounted is called for render-created child components in its inserted hook\n    if (vm.$vnode == null) {\n        vm._isMounted = true;\n        callHook$1(vm, 'mounted');\n    }\n    return vm;\n}\nfunction updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n    {\n        isUpdatingChildComponent = true;\n    }\n    // determine whether component has slot children\n    // we need to do this before overwriting $options._renderChildren.\n    // check if there are dynamic scopedSlots (hand-written or compiled but with\n    // dynamic slot names). Static scoped slots compiled from template has the\n    // \"$stable\" marker.\n    const newScopedSlots = parentVnode.data.scopedSlots;\n    const oldScopedSlots = vm.$scopedSlots;\n    const hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n        (!newScopedSlots && vm.$scopedSlots.$key));\n    // Any static slot children from the parent may have changed during parent's\n    // update. Dynamic scoped slots may also have changed. In such cases, a forced\n    // update is necessary to ensure correctness.\n    let needsForceUpdate = !!(renderChildren || // has new static slots\n        vm.$options._renderChildren || // has old static slots\n        hasDynamicScopedSlot);\n    const prevVNode = vm.$vnode;\n    vm.$options._parentVnode = parentVnode;\n    vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n    if (vm._vnode) {\n        // update child tree's parent\n        vm._vnode.parent = parentVnode;\n    }\n    vm.$options._renderChildren = renderChildren;\n    // update $attrs and $listeners hash\n    // these are also reactive so they may trigger child update if the child\n    // used them during render\n    const attrs = parentVnode.data.attrs || emptyObject;\n    if (vm._attrsProxy) {\n        // force update if attrs are accessed and has changed since it may be\n        // passed to a child component.\n        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n            needsForceUpdate = true;\n        }\n    }\n    vm.$attrs = attrs;\n    // update listeners\n    listeners = listeners || emptyObject;\n    const prevListeners = vm.$options._parentListeners;\n    if (vm._listenersProxy) {\n        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n    }\n    vm.$listeners = vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, prevListeners);\n    // update props\n    if (propsData && vm.$options.props) {\n        toggleObserving(false);\n        const props = vm._props;\n        const propKeys = vm.$options._propKeys || [];\n        for (let i = 0; i < propKeys.length; i++) {\n            const key = propKeys[i];\n            const propOptions = vm.$options.props; // wtf flow?\n            props[key] = validateProp(key, propOptions, propsData, vm);\n        }\n        toggleObserving(true);\n        // keep a copy of raw propsData\n        vm.$options.propsData = propsData;\n    }\n    // resolve slots + force update if has children\n    if (needsForceUpdate) {\n        vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n        vm.$forceUpdate();\n    }\n    {\n        isUpdatingChildComponent = false;\n    }\n}\nfunction isInInactiveTree(vm) {\n    while (vm && (vm = vm.$parent)) {\n        if (vm._inactive)\n            return true;\n    }\n    return false;\n}\nfunction activateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = false;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    else if (vm._directInactive) {\n        return;\n    }\n    if (vm._inactive || vm._inactive === null) {\n        vm._inactive = false;\n        for (let i = 0; i < vm.$children.length; i++) {\n            activateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'activated');\n    }\n}\nfunction deactivateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = true;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    if (!vm._inactive) {\n        vm._inactive = true;\n        for (let i = 0; i < vm.$children.length; i++) {\n            deactivateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'deactivated');\n    }\n}\nfunction callHook$1(vm, hook, args, setContext = true) {\n    // #7573 disable dep collection when invoking lifecycle hooks\n    pushTarget();\n    const prevInst = currentInstance;\n    const prevScope = getCurrentScope();\n    setContext && setCurrentInstance(vm);\n    const handlers = vm.$options[hook];\n    const info = `${hook} hook`;\n    if (handlers) {\n        for (let i = 0, j = handlers.length; i < j; i++) {\n            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n        }\n    }\n    if (vm._hasHookEvent) {\n        vm.$emit('hook:' + hook);\n    }\n    if (setContext) {\n        setCurrentInstance(prevInst);\n        prevScope && prevScope.on();\n    }\n    popTarget();\n}\n\nconst MAX_UPDATE_COUNT = 100;\nconst queue = [];\nconst activatedChildren = [];\nlet has = {};\nlet circular = {};\nlet waiting = false;\nlet flushing = false;\nlet index$1 = 0;\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState() {\n    index$1 = queue.length = activatedChildren.length = 0;\n    has = {};\n    {\n        circular = {};\n    }\n    waiting = flushing = false;\n}\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nlet currentFlushTimestamp = 0;\n// Async edge case fix requires storing an event listener's attach timestamp.\nlet getNow = Date.now;\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n    const performance = window.performance;\n    if (performance &&\n        typeof performance.now === 'function' &&\n        getNow() > document.createEvent('Event').timeStamp) {\n        // if the event timestamp, although evaluated AFTER the Date.now(), is\n        // smaller than it, it means the event is using a hi-res timestamp,\n        // and we need to use the hi-res version for event listener timestamps as\n        // well.\n        getNow = () => performance.now();\n    }\n}\nconst sortCompareFn = (a, b) => {\n    if (a.post) {\n        if (!b.post)\n            return 1;\n    }\n    else if (b.post) {\n        return -1;\n    }\n    return a.id - b.id;\n};\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue() {\n    currentFlushTimestamp = getNow();\n    flushing = true;\n    let watcher, id;\n    // Sort queue before flush.\n    // This ensures that:\n    // 1. Components are updated from parent to child. (because parent is always\n    //    created before the child)\n    // 2. A component's user watchers are run before its render watcher (because\n    //    user watchers are created before the render watcher)\n    // 3. If a component is destroyed during a parent component's watcher run,\n    //    its watchers can be skipped.\n    queue.sort(sortCompareFn);\n    // do not cache length because more watchers might be pushed\n    // as we run existing watchers\n    for (index$1 = 0; index$1 < queue.length; index$1++) {\n        watcher = queue[index$1];\n        if (watcher.before) {\n            watcher.before();\n        }\n        id = watcher.id;\n        has[id] = null;\n        watcher.run();\n        // in dev build, check and stop circular updates.\n        if (has[id] != null) {\n            circular[id] = (circular[id] || 0) + 1;\n            if (circular[id] > MAX_UPDATE_COUNT) {\n                warn$2('You may have an infinite update loop ' +\n                    (watcher.user\n                        ? `in watcher with expression \"${watcher.expression}\"`\n                        : `in a component render function.`), watcher.vm);\n                break;\n            }\n        }\n    }\n    // keep copies of post queues before resetting state\n    const activatedQueue = activatedChildren.slice();\n    const updatedQueue = queue.slice();\n    resetSchedulerState();\n    // call component updated and activated hooks\n    callActivatedHooks(activatedQueue);\n    callUpdatedHooks(updatedQueue);\n    cleanupDeps();\n    // devtool hook\n    /* istanbul ignore if */\n    if (devtools && config.devtools) {\n        devtools.emit('flush');\n    }\n}\nfunction callUpdatedHooks(queue) {\n    let i = queue.length;\n    while (i--) {\n        const watcher = queue[i];\n        const vm = watcher.vm;\n        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n            callHook$1(vm, 'updated');\n        }\n    }\n}\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent(vm) {\n    // setting _inactive to false here so that a render function can\n    // rely on checking whether it's in an inactive tree (e.g. router-view)\n    vm._inactive = false;\n    activatedChildren.push(vm);\n}\nfunction callActivatedHooks(queue) {\n    for (let i = 0; i < queue.length; i++) {\n        queue[i]._inactive = true;\n        activateChildComponent(queue[i], true /* true */);\n    }\n}\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher(watcher) {\n    const id = watcher.id;\n    if (has[id] != null) {\n        return;\n    }\n    if (watcher === Dep.target && watcher.noRecurse) {\n        return;\n    }\n    has[id] = true;\n    if (!flushing) {\n        queue.push(watcher);\n    }\n    else {\n        // if already flushing, splice the watcher based on its id\n        // if already past its id, it will be run next immediately.\n        let i = queue.length - 1;\n        while (i > index$1 && queue[i].id > watcher.id) {\n            i--;\n        }\n        queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n        waiting = true;\n        if (!config.async) {\n            flushSchedulerQueue();\n            return;\n        }\n        nextTick(flushSchedulerQueue);\n    }\n}\n\nconst WATCHER = `watcher`;\nconst WATCHER_CB = `${WATCHER} callback`;\nconst WATCHER_GETTER = `${WATCHER} getter`;\nconst WATCHER_CLEANUP = `${WATCHER} cleanup`;\n// Simple effect.\nfunction watchEffect(effect, options) {\n    return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));\n}\nfunction watchSyncEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));\n}\n// initial value for watchers to trigger on undefined initial values\nconst INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n    if (typeof cb !== 'function') {\n        warn$2(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\n            `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\n            `supports \\`watch(source, cb, options?) signature.`);\n    }\n    return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigger } = emptyObject) {\n    if (!cb) {\n        if (immediate !== undefined) {\n            warn$2(`watch() \"immediate\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n        if (deep !== undefined) {\n            warn$2(`watch() \"deep\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n    }\n    const warnInvalidSource = (s) => {\n        warn$2(`Invalid watch source: ${s}. A watch source can only be a getter/effect ` +\n            `function, a ref, a reactive object, or an array of these types.`);\n    };\n    const instance = currentInstance;\n    const call = (fn, type, args = null) => {\n        const res = invokeWithErrorHandling(fn, null, args, instance, type);\n        if (deep && res && res.__ob__)\n            res.__ob__.dep.depend();\n        return res;\n    };\n    let getter;\n    let forceTrigger = false;\n    let isMultiSource = false;\n    if (isRef(source)) {\n        getter = () => source.value;\n        forceTrigger = isShallow(source);\n    }\n    else if (isReactive(source)) {\n        getter = () => {\n            source.__ob__.dep.depend();\n            return source;\n        };\n        deep = true;\n    }\n    else if (isArray(source)) {\n        isMultiSource = true;\n        forceTrigger = source.some(s => isReactive(s) || isShallow(s));\n        getter = () => source.map(s => {\n            if (isRef(s)) {\n                return s.value;\n            }\n            else if (isReactive(s)) {\n                s.__ob__.dep.depend();\n                return traverse(s);\n            }\n            else if (isFunction(s)) {\n                return call(s, WATCHER_GETTER);\n            }\n            else {\n                warnInvalidSource(s);\n            }\n        });\n    }\n    else if (isFunction(source)) {\n        if (cb) {\n            // getter with cb\n            getter = () => call(source, WATCHER_GETTER);\n        }\n        else {\n            // no cb -> simple effect\n            getter = () => {\n                if (instance && instance._isDestroyed) {\n                    return;\n                }\n                if (cleanup) {\n                    cleanup();\n                }\n                return call(source, WATCHER, [onCleanup]);\n            };\n        }\n    }\n    else {\n        getter = noop;\n        warnInvalidSource(source);\n    }\n    if (cb && deep) {\n        const baseGetter = getter;\n        getter = () => traverse(baseGetter());\n    }\n    let cleanup;\n    let onCleanup = (fn) => {\n        cleanup = watcher.onStop = () => {\n            call(fn, WATCHER_CLEANUP);\n        };\n    };\n    // in SSR there is no need to setup an actual effect, and it should be noop\n    // unless it's eager\n    if (isServerRendering()) {\n        // we will also not call the invalidate callback (+ runner is not set up)\n        onCleanup = noop;\n        if (!cb) {\n            getter();\n        }\n        else if (immediate) {\n            call(cb, WATCHER_CB, [\n                getter(),\n                isMultiSource ? [] : undefined,\n                onCleanup\n            ]);\n        }\n        return noop;\n    }\n    const watcher = new Watcher(currentInstance, getter, noop, {\n        lazy: true\n    });\n    watcher.noRecurse = !cb;\n    let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n    // overwrite default run\n    watcher.run = () => {\n        if (!watcher.active) {\n            return;\n        }\n        if (cb) {\n            // watch(source, cb)\n            const newValue = watcher.get();\n            if (deep ||\n                forceTrigger ||\n                (isMultiSource\n                    ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\n                    : hasChanged(newValue, oldValue))) {\n                // cleanup before running cb again\n                if (cleanup) {\n                    cleanup();\n                }\n                call(cb, WATCHER_CB, [\n                    newValue,\n                    // pass undefined as the old value when it's changed for the first time\n                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                    onCleanup\n                ]);\n                oldValue = newValue;\n            }\n        }\n        else {\n            // watchEffect\n            watcher.get();\n        }\n    };\n    if (flush === 'sync') {\n        watcher.update = watcher.run;\n    }\n    else if (flush === 'post') {\n        watcher.post = true;\n        watcher.update = () => queueWatcher(watcher);\n    }\n    else {\n        // pre\n        watcher.update = () => {\n            if (instance && instance === currentInstance && !instance._isMounted) {\n                // pre-watcher triggered before\n                const buffer = instance._preWatchers || (instance._preWatchers = []);\n                if (buffer.indexOf(watcher) < 0)\n                    buffer.push(watcher);\n            }\n            else {\n                queueWatcher(watcher);\n            }\n        };\n    }\n    {\n        watcher.onTrack = onTrack;\n        watcher.onTrigger = onTrigger;\n    }\n    // initial run\n    if (cb) {\n        if (immediate) {\n            watcher.run();\n        }\n        else {\n            oldValue = watcher.get();\n        }\n    }\n    else if (flush === 'post' && instance) {\n        instance.$once('hook:mounted', () => watcher.get());\n    }\n    else {\n        watcher.get();\n    }\n    return () => {\n        watcher.teardown();\n    };\n}\n\nfunction provide(key, value) {\n    if (!currentInstance) {\n        {\n            warn$2(`provide() can only be used inside setup().`);\n        }\n    }\n    else {\n        // TS doesn't allow symbol as index type\n        resolveProvided(currentInstance)[key] = value;\n    }\n}\nfunction resolveProvided(vm) {\n    // by default an instance inherits its parent's provides object\n    // but when it needs to provide values of its own, it creates its\n    // own provides object using parent provides object as prototype.\n    // this way in `inject` we can simply look up injections from direct\n    // parent and let the prototype chain do the work.\n    const existing = vm._provided;\n    const parentProvides = vm.$parent && vm.$parent._provided;\n    if (parentProvides === existing) {\n        return (vm._provided = Object.create(parentProvides));\n    }\n    else {\n        return existing;\n    }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n    // fallback to `currentRenderingInstance` so that this can be called in\n    // a functional component\n    const instance = currentInstance;\n    if (instance) {\n        // #2400\n        // to support `app.use` plugins,\n        // fallback to appContext's `provides` if the instance is at root\n        const provides = instance.$parent && instance.$parent._provided;\n        if (provides && key in provides) {\n            // TS doesn't allow symbol as index type\n            return provides[key];\n        }\n        else if (arguments.length > 1) {\n            return treatDefaultAsFactory && isFunction(defaultValue)\n                ? defaultValue.call(instance)\n                : defaultValue;\n        }\n        else {\n            warn$2(`injection \"${String(key)}\" not found.`);\n        }\n    }\n    else {\n        warn$2(`inject() can only be used inside setup() or functional components.`);\n    }\n}\n\n/**\n * @internal this function needs manual public type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction h(type, props, children) {\n    if (!currentInstance) {\n        warn$2(`globally imported h() can only be invoked when there is an active ` +\n                `component instance, e.g. synchronously in a component's render or setup function.`);\n    }\n    return createElement$1(currentInstance, type, props, children, 2, true);\n}\n\nfunction handleError(err, vm, info) {\n    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n    // See: https://github.com/vuejs/vuex/issues/1505\n    pushTarget();\n    try {\n        if (vm) {\n            let cur = vm;\n            while ((cur = cur.$parent)) {\n                const hooks = cur.$options.errorCaptured;\n                if (hooks) {\n                    for (let i = 0; i < hooks.length; i++) {\n                        try {\n                            const capture = hooks[i].call(cur, err, vm, info) === false;\n                            if (capture)\n                                return;\n                        }\n                        catch (e) {\n                            globalHandleError(e, cur, 'errorCaptured hook');\n                        }\n                    }\n                }\n            }\n        }\n        globalHandleError(err, vm, info);\n    }\n    finally {\n        popTarget();\n    }\n}\nfunction invokeWithErrorHandling(handler, context, args, vm, info) {\n    let res;\n    try {\n        res = args ? handler.apply(context, args) : handler.call(context);\n        if (res && !res._isVue && isPromise(res) && !res._handled) {\n            res.catch(e => handleError(e, vm, info + ` (Promise/async)`));\n            res._handled = true;\n        }\n    }\n    catch (e) {\n        handleError(e, vm, info);\n    }\n    return res;\n}\nfunction globalHandleError(err, vm, info) {\n    if (config.errorHandler) {\n        try {\n            return config.errorHandler.call(null, err, vm, info);\n        }\n        catch (e) {\n            // if the user intentionally throws the original error in the handler,\n            // do not log it twice\n            if (e !== err) {\n                logError(e, null, 'config.errorHandler');\n            }\n        }\n    }\n    logError(err, vm, info);\n}\nfunction logError(err, vm, info) {\n    {\n        warn$2(`Error in ${info}: \"${err.toString()}\"`, vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n        console.error(err);\n    }\n    else {\n        throw err;\n    }\n}\n\n/* globals MutationObserver */\nlet isUsingMicroTask = false;\nconst callbacks = [];\nlet pending = false;\nfunction flushCallbacks() {\n    pending = false;\n    const copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (let i = 0; i < copies.length; i++) {\n        copies[i]();\n    }\n}\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nlet timerFunc;\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n    const p = Promise.resolve();\n    timerFunc = () => {\n        p.then(flushCallbacks);\n        // In problematic UIWebViews, Promise.then doesn't completely break, but\n        // it can get stuck in a weird state where callbacks are pushed into the\n        // microtask queue but the queue isn't being flushed, until the browser\n        // needs to do some other work, e.g. handle a timer. Therefore we can\n        // \"force\" the microtask queue to be flushed by adding an empty timer.\n        if (isIOS)\n            setTimeout(noop);\n    };\n    isUsingMicroTask = true;\n}\nelse if (!isIE &&\n    typeof MutationObserver !== 'undefined' &&\n    (isNative(MutationObserver) ||\n        // PhantomJS and iOS 7.x\n        MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n    // Use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS, iOS7, Android 4.4\n    // (#6466 MutationObserver is unreliable in IE11)\n    let counter = 1;\n    const observer = new MutationObserver(flushCallbacks);\n    const textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n        characterData: true\n    });\n    timerFunc = () => {\n        counter = (counter + 1) % 2;\n        textNode.data = String(counter);\n    };\n    isUsingMicroTask = true;\n}\nelse if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n    // Fallback to setImmediate.\n    // Technically it leverages the (macro) task queue,\n    // but it is still a better choice than setTimeout.\n    timerFunc = () => {\n        setImmediate(flushCallbacks);\n    };\n}\nelse {\n    // Fallback to setTimeout.\n    timerFunc = () => {\n        setTimeout(flushCallbacks, 0);\n    };\n}\n/**\n * @internal\n */\nfunction nextTick(cb, ctx) {\n    let _resolve;\n    callbacks.push(() => {\n        if (cb) {\n            try {\n                cb.call(ctx);\n            }\n            catch (e) {\n                handleError(e, ctx, 'nextTick');\n            }\n        }\n        else if (_resolve) {\n            _resolve(ctx);\n        }\n    });\n    if (!pending) {\n        pending = true;\n        timerFunc();\n    }\n    // $flow-disable-line\n    if (!cb && typeof Promise !== 'undefined') {\n        return new Promise(resolve => {\n            _resolve = resolve;\n        });\n    }\n}\n\nfunction useCssModule(name = '$style') {\n    /* istanbul ignore else */\n    {\n        {\n            warn$2(`useCssModule() is not supported in the global build.`);\n        }\n        return emptyObject;\n    }\n}\n\n/**\n * Runtime helper for SFC's CSS variable injection feature.\n * @private\n */\nfunction useCssVars(getter) {\n    if (!inBrowser && !false)\n        return;\n    const instance = currentInstance;\n    if (!instance) {\n        warn$2(`useCssVars is called without current active component instance.`);\n        return;\n    }\n    watchPostEffect(() => {\n        const el = instance.$el;\n        const vars = getter(instance, instance._setupProxy);\n        if (el && el.nodeType === 1) {\n            const style = el.style;\n            for (const key in vars) {\n                style.setProperty(`--${key}`, vars[key]);\n            }\n        }\n    });\n}\n\n/**\n * v3-compatible async component API.\n * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n * because it relies on existing manual types\n */\nfunction defineAsyncComponent(source) {\n    if (isFunction(source)) {\n        source = { loader: source };\n    }\n    const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\n    suspensible = false, // in Vue 3 default is true\n    onError: userOnError } = source;\n    if (suspensible) {\n        warn$2(`The suspensible option for async components is not supported in Vue2. It is ignored.`);\n    }\n    let pendingRequest = null;\n    let retries = 0;\n    const retry = () => {\n        retries++;\n        pendingRequest = null;\n        return load();\n    };\n    const load = () => {\n        let thisRequest;\n        return (pendingRequest ||\n            (thisRequest = pendingRequest =\n                loader()\n                    .catch(err => {\n                    err = err instanceof Error ? err : new Error(String(err));\n                    if (userOnError) {\n                        return new Promise((resolve, reject) => {\n                            const userRetry = () => resolve(retry());\n                            const userFail = () => reject(err);\n                            userOnError(err, userRetry, userFail, retries + 1);\n                        });\n                    }\n                    else {\n                        throw err;\n                    }\n                })\n                    .then((comp) => {\n                    if (thisRequest !== pendingRequest && pendingRequest) {\n                        return pendingRequest;\n                    }\n                    if (!comp) {\n                        warn$2(`Async component loader resolved to undefined. ` +\n                            `If you are using retry(), make sure to return its return value.`);\n                    }\n                    // interop module default\n                    if (comp &&\n                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                        comp = comp.default;\n                    }\n                    if (comp && !isObject(comp) && !isFunction(comp)) {\n                        throw new Error(`Invalid async component load result: ${comp}`);\n                    }\n                    return comp;\n                })));\n    };\n    return () => {\n        const component = load();\n        return {\n            component,\n            delay,\n            timeout,\n            error: errorComponent,\n            loading: loadingComponent\n        };\n    };\n}\n\nfunction createLifeCycle(hookName) {\n    return (fn, target = currentInstance) => {\n        if (!target) {\n            warn$2(`${formatName(hookName)} is called when there is no active component instance to be ` +\n                    `associated with. ` +\n                    `Lifecycle injection APIs can only be used during execution of setup().`);\n            return;\n        }\n        return injectHook(target, hookName, fn);\n    };\n}\nfunction formatName(name) {\n    if (name === 'beforeDestroy') {\n        name = 'beforeUnmount';\n    }\n    else if (name === 'destroyed') {\n        name = 'unmounted';\n    }\n    return `on${name[0].toUpperCase() + name.slice(1)}`;\n}\nfunction injectHook(instance, hookName, fn) {\n    const options = instance.$options;\n    options[hookName] = mergeLifecycleHook(options[hookName], fn);\n}\nconst onBeforeMount = createLifeCycle('beforeMount');\nconst onMounted = createLifeCycle('mounted');\nconst onBeforeUpdate = createLifeCycle('beforeUpdate');\nconst onUpdated = createLifeCycle('updated');\nconst onBeforeUnmount = createLifeCycle('beforeDestroy');\nconst onUnmounted = createLifeCycle('destroyed');\nconst onActivated = createLifeCycle('activated');\nconst onDeactivated = createLifeCycle('deactivated');\nconst onServerPrefetch = createLifeCycle('serverPrefetch');\nconst onRenderTracked = createLifeCycle('renderTracked');\nconst onRenderTriggered = createLifeCycle('renderTriggered');\nconst injectErrorCapturedHook = createLifeCycle('errorCaptured');\nfunction onErrorCaptured(hook, target = currentInstance) {\n    injectErrorCapturedHook(hook, target);\n}\n\n/**\n * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n */\nconst version = '2.7.16';\n/**\n * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n */\nfunction defineComponent(options) {\n    return options;\n}\n\nconst seenObjects = new _Set();\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse(val) {\n    _traverse(val, seenObjects);\n    seenObjects.clear();\n    return val;\n}\nfunction _traverse(val, seen) {\n    let i, keys;\n    const isA = isArray(val);\n    if ((!isA && !isObject(val)) ||\n        val.__v_skip /* ReactiveFlags.SKIP */ ||\n        Object.isFrozen(val) ||\n        val instanceof VNode) {\n        return;\n    }\n    if (val.__ob__) {\n        const depId = val.__ob__.dep.id;\n        if (seen.has(depId)) {\n            return;\n        }\n        seen.add(depId);\n    }\n    if (isA) {\n        i = val.length;\n        while (i--)\n            _traverse(val[i], seen);\n    }\n    else if (isRef(val)) {\n        _traverse(val.value, seen);\n    }\n    else {\n        keys = Object.keys(val);\n        i = keys.length;\n        while (i--)\n            _traverse(val[keys[i]], seen);\n    }\n}\n\nlet uid$1 = 0;\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n * @internal\n */\nclass Watcher {\n    constructor(vm, expOrFn, cb, options, isRenderWatcher) {\n        recordEffectScope(this, \n        // if the active effect scope is manually created (not a component scope),\n        // prioritize it\n        activeEffectScope && !activeEffectScope._vm\n            ? activeEffectScope\n            : vm\n                ? vm._scope\n                : undefined);\n        if ((this.vm = vm) && isRenderWatcher) {\n            vm._watcher = this;\n        }\n        // options\n        if (options) {\n            this.deep = !!options.deep;\n            this.user = !!options.user;\n            this.lazy = !!options.lazy;\n            this.sync = !!options.sync;\n            this.before = options.before;\n            {\n                this.onTrack = options.onTrack;\n                this.onTrigger = options.onTrigger;\n            }\n        }\n        else {\n            this.deep = this.user = this.lazy = this.sync = false;\n        }\n        this.cb = cb;\n        this.id = ++uid$1; // uid for batching\n        this.active = true;\n        this.post = false;\n        this.dirty = this.lazy; // for lazy watchers\n        this.deps = [];\n        this.newDeps = [];\n        this.depIds = new _Set();\n        this.newDepIds = new _Set();\n        this.expression = expOrFn.toString() ;\n        // parse expression for getter\n        if (isFunction(expOrFn)) {\n            this.getter = expOrFn;\n        }\n        else {\n            this.getter = parsePath(expOrFn);\n            if (!this.getter) {\n                this.getter = noop;\n                warn$2(`Failed watching path: \"${expOrFn}\" ` +\n                        'Watcher only accepts simple dot-delimited paths. ' +\n                        'For full control, use a function instead.', vm);\n            }\n        }\n        this.value = this.lazy ? undefined : this.get();\n    }\n    /**\n     * Evaluate the getter, and re-collect dependencies.\n     */\n    get() {\n        pushTarget(this);\n        let value;\n        const vm = this.vm;\n        try {\n            value = this.getter.call(vm, vm);\n        }\n        catch (e) {\n            if (this.user) {\n                handleError(e, vm, `getter for watcher \"${this.expression}\"`);\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // \"touch\" every property so they are all tracked as\n            // dependencies for deep watching\n            if (this.deep) {\n                traverse(value);\n            }\n            popTarget();\n            this.cleanupDeps();\n        }\n        return value;\n    }\n    /**\n     * Add a dependency to this directive.\n     */\n    addDep(dep) {\n        const id = dep.id;\n        if (!this.newDepIds.has(id)) {\n            this.newDepIds.add(id);\n            this.newDeps.push(dep);\n            if (!this.depIds.has(id)) {\n                dep.addSub(this);\n            }\n        }\n    }\n    /**\n     * Clean up for dependency collection.\n     */\n    cleanupDeps() {\n        let i = this.deps.length;\n        while (i--) {\n            const dep = this.deps[i];\n            if (!this.newDepIds.has(dep.id)) {\n                dep.removeSub(this);\n            }\n        }\n        let tmp = this.depIds;\n        this.depIds = this.newDepIds;\n        this.newDepIds = tmp;\n        this.newDepIds.clear();\n        tmp = this.deps;\n        this.deps = this.newDeps;\n        this.newDeps = tmp;\n        this.newDeps.length = 0;\n    }\n    /**\n     * Subscriber interface.\n     * Will be called when a dependency changes.\n     */\n    update() {\n        /* istanbul ignore else */\n        if (this.lazy) {\n            this.dirty = true;\n        }\n        else if (this.sync) {\n            this.run();\n        }\n        else {\n            queueWatcher(this);\n        }\n    }\n    /**\n     * Scheduler job interface.\n     * Will be called by the scheduler.\n     */\n    run() {\n        if (this.active) {\n            const value = this.get();\n            if (value !== this.value ||\n                // Deep watchers and watchers on Object/Arrays should fire even\n                // when the value is the same, because the value may\n                // have mutated.\n                isObject(value) ||\n                this.deep) {\n                // set new value\n                const oldValue = this.value;\n                this.value = value;\n                if (this.user) {\n                    const info = `callback for watcher \"${this.expression}\"`;\n                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                }\n                else {\n                    this.cb.call(this.vm, value, oldValue);\n                }\n            }\n        }\n    }\n    /**\n     * Evaluate the value of the watcher.\n     * This only gets called for lazy watchers.\n     */\n    evaluate() {\n        this.value = this.get();\n        this.dirty = false;\n    }\n    /**\n     * Depend on all deps collected by this watcher.\n     */\n    depend() {\n        let i = this.deps.length;\n        while (i--) {\n            this.deps[i].depend();\n        }\n    }\n    /**\n     * Remove self from all dependencies' subscriber list.\n     */\n    teardown() {\n        if (this.vm && !this.vm._isBeingDestroyed) {\n            remove$2(this.vm._scope.effects, this);\n        }\n        if (this.active) {\n            let i = this.deps.length;\n            while (i--) {\n                this.deps[i].removeSub(this);\n            }\n            this.active = false;\n            if (this.onStop) {\n                this.onStop();\n            }\n        }\n    }\n}\n\nconst sharedPropertyDefinition = {\n    enumerable: true,\n    configurable: true,\n    get: noop,\n    set: noop\n};\nfunction proxy(target, sourceKey, key) {\n    sharedPropertyDefinition.get = function proxyGetter() {\n        return this[sourceKey][key];\n    };\n    sharedPropertyDefinition.set = function proxySetter(val) {\n        this[sourceKey][key] = val;\n    };\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction initState(vm) {\n    const opts = vm.$options;\n    if (opts.props)\n        initProps$1(vm, opts.props);\n    // Composition API\n    initSetup(vm);\n    if (opts.methods)\n        initMethods(vm, opts.methods);\n    if (opts.data) {\n        initData(vm);\n    }\n    else {\n        const ob = observe((vm._data = {}));\n        ob && ob.vmCount++;\n    }\n    if (opts.computed)\n        initComputed$1(vm, opts.computed);\n    if (opts.watch && opts.watch !== nativeWatch) {\n        initWatch(vm, opts.watch);\n    }\n}\nfunction initProps$1(vm, propsOptions) {\n    const propsData = vm.$options.propsData || {};\n    const props = (vm._props = shallowReactive({}));\n    // cache prop keys so that future props updates can iterate using Array\n    // instead of dynamic object key enumeration.\n    const keys = (vm.$options._propKeys = []);\n    const isRoot = !vm.$parent;\n    // root instance props should be converted\n    if (!isRoot) {\n        toggleObserving(false);\n    }\n    for (const key in propsOptions) {\n        keys.push(key);\n        const value = validateProp(key, propsOptions, propsData, vm);\n        /* istanbul ignore else */\n        {\n            const hyphenatedKey = hyphenate(key);\n            if (isReservedAttribute(hyphenatedKey) ||\n                config.isReservedAttr(hyphenatedKey)) {\n                warn$2(`\"${hyphenatedKey}\" is a reserved attribute and cannot be used as component prop.`, vm);\n            }\n            defineReactive(props, key, value, () => {\n                if (!isRoot && !isUpdatingChildComponent) {\n                    warn$2(`Avoid mutating a prop directly since the value will be ` +\n                        `overwritten whenever the parent component re-renders. ` +\n                        `Instead, use a data or computed property based on the prop's ` +\n                        `value. Prop being mutated: \"${key}\"`, vm);\n                }\n            }, true /* shallow */);\n        }\n        // static props are already proxied on the component's prototype\n        // during Vue.extend(). We only need to proxy props defined at\n        // instantiation here.\n        if (!(key in vm)) {\n            proxy(vm, `_props`, key);\n        }\n    }\n    toggleObserving(true);\n}\nfunction initData(vm) {\n    let data = vm.$options.data;\n    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n    if (!isPlainObject(data)) {\n        data = {};\n        warn$2('data functions should return an object:\\n' +\n                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n    }\n    // proxy data on instance\n    const keys = Object.keys(data);\n    const props = vm.$options.props;\n    const methods = vm.$options.methods;\n    let i = keys.length;\n    while (i--) {\n        const key = keys[i];\n        {\n            if (methods && hasOwn(methods, key)) {\n                warn$2(`Method \"${key}\" has already been defined as a data property.`, vm);\n            }\n        }\n        if (props && hasOwn(props, key)) {\n            warn$2(`The data property \"${key}\" is already declared as a prop. ` +\n                    `Use prop default value instead.`, vm);\n        }\n        else if (!isReserved(key)) {\n            proxy(vm, `_data`, key);\n        }\n    }\n    // observe data\n    const ob = observe(data);\n    ob && ob.vmCount++;\n}\nfunction getData(data, vm) {\n    // #7573 disable dep collection when invoking data getters\n    pushTarget();\n    try {\n        return data.call(vm, vm);\n    }\n    catch (e) {\n        handleError(e, vm, `data()`);\n        return {};\n    }\n    finally {\n        popTarget();\n    }\n}\nconst computedWatcherOptions = { lazy: true };\nfunction initComputed$1(vm, computed) {\n    // $flow-disable-line\n    const watchers = (vm._computedWatchers = Object.create(null));\n    // computed properties are just getters during SSR\n    const isSSR = isServerRendering();\n    for (const key in computed) {\n        const userDef = computed[key];\n        const getter = isFunction(userDef) ? userDef : userDef.get;\n        if (getter == null) {\n            warn$2(`Getter is missing for computed property \"${key}\".`, vm);\n        }\n        if (!isSSR) {\n            // create internal watcher for the computed property.\n            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n        }\n        // component-defined computed properties are already defined on the\n        // component prototype. We only need to define computed properties defined\n        // at instantiation here.\n        if (!(key in vm)) {\n            defineComputed(vm, key, userDef);\n        }\n        else {\n            if (key in vm.$data) {\n                warn$2(`The computed property \"${key}\" is already defined in data.`, vm);\n            }\n            else if (vm.$options.props && key in vm.$options.props) {\n                warn$2(`The computed property \"${key}\" is already defined as a prop.`, vm);\n            }\n            else if (vm.$options.methods && key in vm.$options.methods) {\n                warn$2(`The computed property \"${key}\" is already defined as a method.`, vm);\n            }\n        }\n    }\n}\nfunction defineComputed(target, key, userDef) {\n    const shouldCache = !isServerRendering();\n    if (isFunction(userDef)) {\n        sharedPropertyDefinition.get = shouldCache\n            ? createComputedGetter(key)\n            : createGetterInvoker(userDef);\n        sharedPropertyDefinition.set = noop;\n    }\n    else {\n        sharedPropertyDefinition.get = userDef.get\n            ? shouldCache && userDef.cache !== false\n                ? createComputedGetter(key)\n                : createGetterInvoker(userDef.get)\n            : noop;\n        sharedPropertyDefinition.set = userDef.set || noop;\n    }\n    if (sharedPropertyDefinition.set === noop) {\n        sharedPropertyDefinition.set = function () {\n            warn$2(`Computed property \"${key}\" was assigned to but it has no setter.`, this);\n        };\n    }\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction createComputedGetter(key) {\n    return function computedGetter() {\n        const watcher = this._computedWatchers && this._computedWatchers[key];\n        if (watcher) {\n            if (watcher.dirty) {\n                watcher.evaluate();\n            }\n            if (Dep.target) {\n                if (Dep.target.onTrack) {\n                    Dep.target.onTrack({\n                        effect: Dep.target,\n                        target: this,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                watcher.depend();\n            }\n            return watcher.value;\n        }\n    };\n}\nfunction createGetterInvoker(fn) {\n    return function computedGetter() {\n        return fn.call(this, this);\n    };\n}\nfunction initMethods(vm, methods) {\n    const props = vm.$options.props;\n    for (const key in methods) {\n        {\n            if (typeof methods[key] !== 'function') {\n                warn$2(`Method \"${key}\" has type \"${typeof methods[key]}\" in the component definition. ` +\n                    `Did you reference the function correctly?`, vm);\n            }\n            if (props && hasOwn(props, key)) {\n                warn$2(`Method \"${key}\" has already been defined as a prop.`, vm);\n            }\n            if (key in vm && isReserved(key)) {\n                warn$2(`Method \"${key}\" conflicts with an existing Vue instance method. ` +\n                    `Avoid defining component methods that start with _ or $.`);\n            }\n        }\n        vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);\n    }\n}\nfunction initWatch(vm, watch) {\n    for (const key in watch) {\n        const handler = watch[key];\n        if (isArray(handler)) {\n            for (let i = 0; i < handler.length; i++) {\n                createWatcher(vm, key, handler[i]);\n            }\n        }\n        else {\n            createWatcher(vm, key, handler);\n        }\n    }\n}\nfunction createWatcher(vm, expOrFn, handler, options) {\n    if (isPlainObject(handler)) {\n        options = handler;\n        handler = handler.handler;\n    }\n    if (typeof handler === 'string') {\n        handler = vm[handler];\n    }\n    return vm.$watch(expOrFn, handler, options);\n}\nfunction stateMixin(Vue) {\n    // flow somehow has problems with directly declared definition object\n    // when using Object.defineProperty, so we have to procedurally build up\n    // the object here.\n    const dataDef = {};\n    dataDef.get = function () {\n        return this._data;\n    };\n    const propsDef = {};\n    propsDef.get = function () {\n        return this._props;\n    };\n    {\n        dataDef.set = function () {\n            warn$2('Avoid replacing instance root $data. ' +\n                'Use nested data properties instead.', this);\n        };\n        propsDef.set = function () {\n            warn$2(`$props is readonly.`, this);\n        };\n    }\n    Object.defineProperty(Vue.prototype, '$data', dataDef);\n    Object.defineProperty(Vue.prototype, '$props', propsDef);\n    Vue.prototype.$set = set;\n    Vue.prototype.$delete = del;\n    Vue.prototype.$watch = function (expOrFn, cb, options) {\n        const vm = this;\n        if (isPlainObject(cb)) {\n            return createWatcher(vm, expOrFn, cb, options);\n        }\n        options = options || {};\n        options.user = true;\n        const watcher = new Watcher(vm, expOrFn, cb, options);\n        if (options.immediate) {\n            const info = `callback for immediate watcher \"${watcher.expression}\"`;\n            pushTarget();\n            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n            popTarget();\n        }\n        return function unwatchFn() {\n            watcher.teardown();\n        };\n    };\n}\n\nfunction initProvide(vm) {\n    const provideOption = vm.$options.provide;\n    if (provideOption) {\n        const provided = isFunction(provideOption)\n            ? provideOption.call(vm)\n            : provideOption;\n        if (!isObject(provided)) {\n            return;\n        }\n        const source = resolveProvided(vm);\n        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n        // iterate the keys ourselves.\n        const keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n        }\n    }\n}\nfunction initInjections(vm) {\n    const result = resolveInject(vm.$options.inject, vm);\n    if (result) {\n        toggleObserving(false);\n        Object.keys(result).forEach(key => {\n            /* istanbul ignore else */\n            {\n                defineReactive(vm, key, result[key], () => {\n                    warn$2(`Avoid mutating an injected value directly since the changes will be ` +\n                        `overwritten whenever the provided component re-renders. ` +\n                        `injection being mutated: \"${key}\"`, vm);\n                });\n            }\n        });\n        toggleObserving(true);\n    }\n}\nfunction resolveInject(inject, vm) {\n    if (inject) {\n        // inject is :any because flow is not smart enough to figure out cached\n        const result = Object.create(null);\n        const keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            // #6574 in case the inject object is observed...\n            if (key === '__ob__')\n                continue;\n            const provideKey = inject[key].from;\n            if (provideKey in vm._provided) {\n                result[key] = vm._provided[provideKey];\n            }\n            else if ('default' in inject[key]) {\n                const provideDefault = inject[key].default;\n                result[key] = isFunction(provideDefault)\n                    ? provideDefault.call(vm)\n                    : provideDefault;\n            }\n            else {\n                warn$2(`Injection \"${key}\" not found`, vm);\n            }\n        }\n        return result;\n    }\n}\n\nlet uid = 0;\nfunction initMixin$1(Vue) {\n    Vue.prototype._init = function (options) {\n        const vm = this;\n        // a uid\n        vm._uid = uid++;\n        let startTag, endTag;\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            startTag = `vue-perf-start:${vm._uid}`;\n            endTag = `vue-perf-end:${vm._uid}`;\n            mark(startTag);\n        }\n        // a flag to mark this as a Vue instance without having to do instanceof\n        // check\n        vm._isVue = true;\n        // avoid instances from being observed\n        vm.__v_skip = true;\n        // effect scope\n        vm._scope = new EffectScope(true /* detached */);\n        // #13134 edge case where a child component is manually created during the\n        // render of a parent component\n        vm._scope.parent = undefined;\n        vm._scope._vm = true;\n        // merge options\n        if (options && options._isComponent) {\n            // optimize internal component instantiation\n            // since dynamic options merging is pretty slow, and none of the\n            // internal component options needs special treatment.\n            initInternalComponent(vm, options);\n        }\n        else {\n            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n        }\n        /* istanbul ignore else */\n        {\n            initProxy(vm);\n        }\n        // expose real self\n        vm._self = vm;\n        initLifecycle(vm);\n        initEvents(vm);\n        initRender(vm);\n        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n        initInjections(vm); // resolve injections before data/props\n        initState(vm);\n        initProvide(vm); // resolve provide after data/props\n        callHook$1(vm, 'created');\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            vm._name = formatComponentName(vm, false);\n            mark(endTag);\n            measure(`vue ${vm._name} init`, startTag, endTag);\n        }\n        if (vm.$options.el) {\n            vm.$mount(vm.$options.el);\n        }\n    };\n}\nfunction initInternalComponent(vm, options) {\n    const opts = (vm.$options = Object.create(vm.constructor.options));\n    // doing this because it's faster than dynamic enumeration.\n    const parentVnode = options._parentVnode;\n    opts.parent = options.parent;\n    opts._parentVnode = parentVnode;\n    const vnodeComponentOptions = parentVnode.componentOptions;\n    opts.propsData = vnodeComponentOptions.propsData;\n    opts._parentListeners = vnodeComponentOptions.listeners;\n    opts._renderChildren = vnodeComponentOptions.children;\n    opts._componentTag = vnodeComponentOptions.tag;\n    if (options.render) {\n        opts.render = options.render;\n        opts.staticRenderFns = options.staticRenderFns;\n    }\n}\nfunction resolveConstructorOptions(Ctor) {\n    let options = Ctor.options;\n    if (Ctor.super) {\n        const superOptions = resolveConstructorOptions(Ctor.super);\n        const cachedSuperOptions = Ctor.superOptions;\n        if (superOptions !== cachedSuperOptions) {\n            // super option changed,\n            // need to resolve new options.\n            Ctor.superOptions = superOptions;\n            // check if there are any late-modified/attached options (#4976)\n            const modifiedOptions = resolveModifiedOptions(Ctor);\n            // update base extend options\n            if (modifiedOptions) {\n                extend(Ctor.extendOptions, modifiedOptions);\n            }\n            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n            if (options.name) {\n                options.components[options.name] = Ctor;\n            }\n        }\n    }\n    return options;\n}\nfunction resolveModifiedOptions(Ctor) {\n    let modified;\n    const latest = Ctor.options;\n    const sealed = Ctor.sealedOptions;\n    for (const key in latest) {\n        if (latest[key] !== sealed[key]) {\n            if (!modified)\n                modified = {};\n            modified[key] = latest[key];\n        }\n    }\n    return modified;\n}\n\nfunction FunctionalRenderContext(data, props, children, parent, Ctor) {\n    const options = Ctor.options;\n    // ensure the createElement function in functional components\n    // gets a unique context - this is necessary for correct named slot check\n    let contextVm;\n    if (hasOwn(parent, '_uid')) {\n        contextVm = Object.create(parent);\n        contextVm._original = parent;\n    }\n    else {\n        // the context vm passed in is a functional context as well.\n        // in this case we want to make sure we are able to get a hold to the\n        // real context instance.\n        contextVm = parent;\n        // @ts-ignore\n        parent = parent._original;\n    }\n    const isCompiled = isTrue(options._compiled);\n    const needNormalization = !isCompiled;\n    this.data = data;\n    this.props = props;\n    this.children = children;\n    this.parent = parent;\n    this.listeners = data.on || emptyObject;\n    this.injections = resolveInject(options.inject, parent);\n    this.slots = () => {\n        if (!this.$slots) {\n            normalizeScopedSlots(parent, data.scopedSlots, (this.$slots = resolveSlots(children, parent)));\n        }\n        return this.$slots;\n    };\n    Object.defineProperty(this, 'scopedSlots', {\n        enumerable: true,\n        get() {\n            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n        }\n    });\n    // support for compiled functional template\n    if (isCompiled) {\n        // exposing $options for renderStatic()\n        this.$options = options;\n        // pre-resolve slots for renderSlot()\n        this.$slots = this.slots();\n        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n    }\n    if (options._scopeId) {\n        this._c = (a, b, c, d) => {\n            const vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n            if (vnode && !isArray(vnode)) {\n                vnode.fnScopeId = options._scopeId;\n                vnode.fnContext = parent;\n            }\n            return vnode;\n        };\n    }\n    else {\n        this._c = (a, b, c, d) => createElement$1(contextVm, a, b, c, d, needNormalization);\n    }\n}\ninstallRenderHelpers(FunctionalRenderContext.prototype);\nfunction createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n    const options = Ctor.options;\n    const props = {};\n    const propOptions = options.props;\n    if (isDef(propOptions)) {\n        for (const key in propOptions) {\n            props[key] = validateProp(key, propOptions, propsData || emptyObject);\n        }\n    }\n    else {\n        if (isDef(data.attrs))\n            mergeProps(props, data.attrs);\n        if (isDef(data.props))\n            mergeProps(props, data.props);\n    }\n    const renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n    const vnode = options.render.call(null, renderContext._c, renderContext);\n    if (vnode instanceof VNode) {\n        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n    }\n    else if (isArray(vnode)) {\n        const vnodes = normalizeChildren(vnode) || [];\n        const res = new Array(vnodes.length);\n        for (let i = 0; i < vnodes.length; i++) {\n            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n        }\n        return res;\n    }\n}\nfunction cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n    // #7817 clone node before setting fnContext, otherwise if the node is reused\n    // (e.g. it was from a cached normal slot) the fnContext causes named slots\n    // that should not be matched to match.\n    const clone = cloneVNode(vnode);\n    clone.fnContext = contextVm;\n    clone.fnOptions = options;\n    {\n        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n            renderContext;\n    }\n    if (data.slot) {\n        (clone.data || (clone.data = {})).slot = data.slot;\n    }\n    return clone;\n}\nfunction mergeProps(to, from) {\n    for (const key in from) {\n        to[camelize(key)] = from[key];\n    }\n}\n\nfunction getComponentName(options) {\n    return options.name || options.__name || options._componentTag;\n}\n// inline hooks to be invoked on component VNodes during patch\nconst componentVNodeHooks = {\n    init(vnode, hydrating) {\n        if (vnode.componentInstance &&\n            !vnode.componentInstance._isDestroyed &&\n            vnode.data.keepAlive) {\n            // kept-alive components, treat as a patch\n            const mountedNode = vnode; // work around flow\n            componentVNodeHooks.prepatch(mountedNode, mountedNode);\n        }\n        else {\n            const child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n            child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n        }\n    },\n    prepatch(oldVnode, vnode) {\n        const options = vnode.componentOptions;\n        const child = (vnode.componentInstance = oldVnode.componentInstance);\n        updateChildComponent(child, options.propsData, // updated props\n        options.listeners, // updated listeners\n        vnode, // new parent vnode\n        options.children // new children\n        );\n    },\n    insert(vnode) {\n        const { context, componentInstance } = vnode;\n        if (!componentInstance._isMounted) {\n            componentInstance._isMounted = true;\n            callHook$1(componentInstance, 'mounted');\n        }\n        if (vnode.data.keepAlive) {\n            if (context._isMounted) {\n                // vue-router#1212\n                // During updates, a kept-alive component's child components may\n                // change, so directly walking the tree here may call activated hooks\n                // on incorrect children. Instead we push them into a queue which will\n                // be processed after the whole patch process ended.\n                queueActivatedComponent(componentInstance);\n            }\n            else {\n                activateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    },\n    destroy(vnode) {\n        const { componentInstance } = vnode;\n        if (!componentInstance._isDestroyed) {\n            if (!vnode.data.keepAlive) {\n                componentInstance.$destroy();\n            }\n            else {\n                deactivateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    }\n};\nconst hooksToMerge = Object.keys(componentVNodeHooks);\nfunction createComponent(Ctor, data, context, children, tag) {\n    if (isUndef(Ctor)) {\n        return;\n    }\n    const baseCtor = context.$options._base;\n    // plain options object: turn it into a constructor\n    if (isObject(Ctor)) {\n        Ctor = baseCtor.extend(Ctor);\n    }\n    // if at this stage it's not a constructor or an async component factory,\n    // reject.\n    if (typeof Ctor !== 'function') {\n        {\n            warn$2(`Invalid Component definition: ${String(Ctor)}`, context);\n        }\n        return;\n    }\n    // async component\n    let asyncFactory;\n    // @ts-expect-error\n    if (isUndef(Ctor.cid)) {\n        asyncFactory = Ctor;\n        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n        if (Ctor === undefined) {\n            // return a placeholder node for async component, which is rendered\n            // as a comment node but preserves all the raw information for the node.\n            // the information will be used for async server-rendering and hydration.\n            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n        }\n    }\n    data = data || {};\n    // resolve constructor options in case global mixins are applied after\n    // component constructor creation\n    resolveConstructorOptions(Ctor);\n    // transform component v-model data into props & events\n    if (isDef(data.model)) {\n        // @ts-expect-error\n        transformModel(Ctor.options, data);\n    }\n    // extract props\n    // @ts-expect-error\n    const propsData = extractPropsFromVNodeData(data, Ctor, tag);\n    // functional component\n    // @ts-expect-error\n    if (isTrue(Ctor.options.functional)) {\n        return createFunctionalComponent(Ctor, propsData, data, context, children);\n    }\n    // extract listeners, since these needs to be treated as\n    // child component listeners instead of DOM listeners\n    const listeners = data.on;\n    // replace with listeners with .native modifier\n    // so it gets processed during parent component patch.\n    data.on = data.nativeOn;\n    // @ts-expect-error\n    if (isTrue(Ctor.options.abstract)) {\n        // abstract components do not keep anything\n        // other than props & listeners & slot\n        // work around flow\n        const slot = data.slot;\n        data = {};\n        if (slot) {\n            data.slot = slot;\n        }\n    }\n    // install component management hooks onto the placeholder node\n    installComponentHooks(data);\n    // return a placeholder vnode\n    // @ts-expect-error\n    const name = getComponentName(Ctor.options) || tag;\n    const vnode = new VNode(\n    // @ts-expect-error\n    `vue-component-${Ctor.cid}${name ? `-${name}` : ''}`, data, undefined, undefined, undefined, context, \n    // @ts-expect-error\n    { Ctor, propsData, listeners, tag, children }, asyncFactory);\n    return vnode;\n}\nfunction createComponentInstanceForVnode(\n// we know it's MountedComponentVNode but flow doesn't\nvnode, \n// activeInstance in lifecycle state\nparent) {\n    const options = {\n        _isComponent: true,\n        _parentVnode: vnode,\n        parent\n    };\n    // check inline-template render functions\n    const inlineTemplate = vnode.data.inlineTemplate;\n    if (isDef(inlineTemplate)) {\n        options.render = inlineTemplate.render;\n        options.staticRenderFns = inlineTemplate.staticRenderFns;\n    }\n    return new vnode.componentOptions.Ctor(options);\n}\nfunction installComponentHooks(data) {\n    const hooks = data.hook || (data.hook = {});\n    for (let i = 0; i < hooksToMerge.length; i++) {\n        const key = hooksToMerge[i];\n        const existing = hooks[key];\n        const toMerge = componentVNodeHooks[key];\n        // @ts-expect-error\n        if (existing !== toMerge && !(existing && existing._merged)) {\n            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n        }\n    }\n}\nfunction mergeHook(f1, f2) {\n    const merged = (a, b) => {\n        // flow complains about extra args which is why we use any\n        f1(a, b);\n        f2(a, b);\n    };\n    merged._merged = true;\n    return merged;\n}\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel(options, data) {\n    const prop = (options.model && options.model.prop) || 'value';\n    const event = (options.model && options.model.event) || 'input';\n    (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n    const on = data.on || (data.on = {});\n    const existing = on[event];\n    const callback = data.model.callback;\n    if (isDef(existing)) {\n        if (isArray(existing)\n            ? existing.indexOf(callback) === -1\n            : existing !== callback) {\n            on[event] = [callback].concat(existing);\n        }\n    }\n    else {\n        on[event] = callback;\n    }\n}\n\nlet warn$2 = noop;\nlet tip = noop;\nlet generateComponentTrace; // work around flow check\nlet formatComponentName;\n{\n    const hasConsole = typeof console !== 'undefined';\n    const classifyRE = /(?:^|[-_])(\\w)/g;\n    const classify = str => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n    warn$2 = (msg, vm = currentInstance) => {\n        const trace = vm ? generateComponentTrace(vm) : '';\n        if (config.warnHandler) {\n            config.warnHandler.call(null, msg, vm, trace);\n        }\n        else if (hasConsole && !config.silent) {\n            console.error(`[Vue warn]: ${msg}${trace}`);\n        }\n    };\n    tip = (msg, vm) => {\n        if (hasConsole && !config.silent) {\n            console.warn(`[Vue tip]: ${msg}` + (vm ? generateComponentTrace(vm) : ''));\n        }\n    };\n    formatComponentName = (vm, includeFile) => {\n        if (vm.$root === vm) {\n            return '<Root>';\n        }\n        const options = isFunction(vm) && vm.cid != null\n            ? vm.options\n            : vm._isVue\n                ? vm.$options || vm.constructor.options\n                : vm;\n        let name = getComponentName(options);\n        const file = options.__file;\n        if (!name && file) {\n            const match = file.match(/([^/\\\\]+)\\.vue$/);\n            name = match && match[1];\n        }\n        return ((name ? `<${classify(name)}>` : `<Anonymous>`) +\n            (file && includeFile !== false ? ` at ${file}` : ''));\n    };\n    const repeat = (str, n) => {\n        let res = '';\n        while (n) {\n            if (n % 2 === 1)\n                res += str;\n            if (n > 1)\n                str += str;\n            n >>= 1;\n        }\n        return res;\n    };\n    generateComponentTrace = (vm) => {\n        if (vm._isVue && vm.$parent) {\n            const tree = [];\n            let currentRecursiveSequence = 0;\n            while (vm) {\n                if (tree.length > 0) {\n                    const last = tree[tree.length - 1];\n                    if (last.constructor === vm.constructor) {\n                        currentRecursiveSequence++;\n                        vm = vm.$parent;\n                        continue;\n                    }\n                    else if (currentRecursiveSequence > 0) {\n                        tree[tree.length - 1] = [last, currentRecursiveSequence];\n                        currentRecursiveSequence = 0;\n                    }\n                }\n                tree.push(vm);\n                vm = vm.$parent;\n            }\n            return ('\\n\\nfound in\\n\\n' +\n                tree\n                    .map((vm, i) => `${i === 0 ? '---> ' : repeat(' ', 5 + i * 2)}${isArray(vm)\n                    ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n                    : formatComponentName(vm)}`)\n                    .join('\\n'));\n        }\n        else {\n            return `\\n\\n(found in ${formatComponentName(vm)})`;\n        }\n    };\n}\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nconst strats = config.optionMergeStrategies;\n/**\n * Options with restrictions\n */\n{\n    strats.el = strats.propsData = function (parent, child, vm, key) {\n        if (!vm) {\n            warn$2(`option \"${key}\" can only be used during instance ` +\n                'creation with the `new` keyword.');\n        }\n        return defaultStrat(parent, child);\n    };\n}\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData(to, from, recursive = true) {\n    if (!from)\n        return to;\n    let key, toVal, fromVal;\n    const keys = hasSymbol\n        ? Reflect.ownKeys(from)\n        : Object.keys(from);\n    for (let i = 0; i < keys.length; i++) {\n        key = keys[i];\n        // in case the object is already observed...\n        if (key === '__ob__')\n            continue;\n        toVal = to[key];\n        fromVal = from[key];\n        if (!recursive || !hasOwn(to, key)) {\n            set(to, key, fromVal);\n        }\n        else if (toVal !== fromVal &&\n            isPlainObject(toVal) &&\n            isPlainObject(fromVal)) {\n            mergeData(toVal, fromVal);\n        }\n    }\n    return to;\n}\n/**\n * Data\n */\nfunction mergeDataOrFn(parentVal, childVal, vm) {\n    if (!vm) {\n        // in a Vue.extend merge, both should be functions\n        if (!childVal) {\n            return parentVal;\n        }\n        if (!parentVal) {\n            return childVal;\n        }\n        // when parentVal & childVal are both present,\n        // we need to return a function that returns the\n        // merged result of both functions... no need to\n        // check if parentVal is a function here because\n        // it has to be a function to pass previous merges.\n        return function mergedDataFn() {\n            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n        };\n    }\n    else {\n        return function mergedInstanceDataFn() {\n            // instance merge\n            const instanceData = isFunction(childVal)\n                ? childVal.call(vm, vm)\n                : childVal;\n            const defaultData = isFunction(parentVal)\n                ? parentVal.call(vm, vm)\n                : parentVal;\n            if (instanceData) {\n                return mergeData(instanceData, defaultData);\n            }\n            else {\n                return defaultData;\n            }\n        };\n    }\n}\nstrats.data = function (parentVal, childVal, vm) {\n    if (!vm) {\n        if (childVal && typeof childVal !== 'function') {\n            warn$2('The \"data\" option should be a function ' +\n                    'that returns a per-instance value in component ' +\n                    'definitions.', vm);\n            return parentVal;\n        }\n        return mergeDataOrFn(parentVal, childVal);\n    }\n    return mergeDataOrFn(parentVal, childVal, vm);\n};\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeLifecycleHook(parentVal, childVal) {\n    const res = childVal\n        ? parentVal\n            ? parentVal.concat(childVal)\n            : isArray(childVal)\n                ? childVal\n                : [childVal]\n        : parentVal;\n    return res ? dedupeHooks(res) : res;\n}\nfunction dedupeHooks(hooks) {\n    const res = [];\n    for (let i = 0; i < hooks.length; i++) {\n        if (res.indexOf(hooks[i]) === -1) {\n            res.push(hooks[i]);\n        }\n    }\n    return res;\n}\nLIFECYCLE_HOOKS.forEach(hook => {\n    strats[hook] = mergeLifecycleHook;\n});\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets(parentVal, childVal, vm, key) {\n    const res = Object.create(parentVal || null);\n    if (childVal) {\n        assertObjectType(key, childVal, vm);\n        return extend(res, childVal);\n    }\n    else {\n        return res;\n    }\n}\nASSET_TYPES.forEach(function (type) {\n    strats[type + 's'] = mergeAssets;\n});\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal, vm, key) {\n    // work around Firefox's Object.prototype.watch...\n    //@ts-expect-error work around\n    if (parentVal === nativeWatch)\n        parentVal = undefined;\n    //@ts-expect-error work around\n    if (childVal === nativeWatch)\n        childVal = undefined;\n    /* istanbul ignore if */\n    if (!childVal)\n        return Object.create(parentVal || null);\n    {\n        assertObjectType(key, childVal, vm);\n    }\n    if (!parentVal)\n        return childVal;\n    const ret = {};\n    extend(ret, parentVal);\n    for (const key in childVal) {\n        let parent = ret[key];\n        const child = childVal[key];\n        if (parent && !isArray(parent)) {\n            parent = [parent];\n        }\n        ret[key] = parent ? parent.concat(child) : isArray(child) ? child : [child];\n    }\n    return ret;\n};\n/**\n * Other object hashes.\n */\nstrats.props =\n    strats.methods =\n        strats.inject =\n            strats.computed =\n                function (parentVal, childVal, vm, key) {\n                    if (childVal && true) {\n                        assertObjectType(key, childVal, vm);\n                    }\n                    if (!parentVal)\n                        return childVal;\n                    const ret = Object.create(null);\n                    extend(ret, parentVal);\n                    if (childVal)\n                        extend(ret, childVal);\n                    return ret;\n                };\nstrats.provide = function (parentVal, childVal) {\n    if (!parentVal)\n        return childVal;\n    return function () {\n        const ret = Object.create(null);\n        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n        if (childVal) {\n            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n            );\n        }\n        return ret;\n    };\n};\n/**\n * Default strategy.\n */\nconst defaultStrat = function (parentVal, childVal) {\n    return childVal === undefined ? parentVal : childVal;\n};\n/**\n * Validate component names\n */\nfunction checkComponents(options) {\n    for (const key in options.components) {\n        validateComponentName(key);\n    }\n}\nfunction validateComponentName(name) {\n    if (!new RegExp(`^[a-zA-Z][\\\\-\\\\.0-9_${unicodeRegExp.source}]*$`).test(name)) {\n        warn$2('Invalid component name: \"' +\n            name +\n            '\". Component names ' +\n            'should conform to valid custom element name in html5 specification.');\n    }\n    if (isBuiltInTag(name) || config.isReservedTag(name)) {\n        warn$2('Do not use built-in or reserved HTML elements as component ' +\n            'id: ' +\n            name);\n    }\n}\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps(options, vm) {\n    const props = options.props;\n    if (!props)\n        return;\n    const res = {};\n    let i, val, name;\n    if (isArray(props)) {\n        i = props.length;\n        while (i--) {\n            val = props[i];\n            if (typeof val === 'string') {\n                name = camelize(val);\n                res[name] = { type: null };\n            }\n            else {\n                warn$2('props must be strings when using array syntax.');\n            }\n        }\n    }\n    else if (isPlainObject(props)) {\n        for (const key in props) {\n            val = props[key];\n            name = camelize(key);\n            res[name] = isPlainObject(val) ? val : { type: val };\n        }\n    }\n    else {\n        warn$2(`Invalid value for option \"props\": expected an Array or an Object, ` +\n            `but got ${toRawType(props)}.`, vm);\n    }\n    options.props = res;\n}\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject(options, vm) {\n    const inject = options.inject;\n    if (!inject)\n        return;\n    const normalized = (options.inject = {});\n    if (isArray(inject)) {\n        for (let i = 0; i < inject.length; i++) {\n            normalized[inject[i]] = { from: inject[i] };\n        }\n    }\n    else if (isPlainObject(inject)) {\n        for (const key in inject) {\n            const val = inject[key];\n            normalized[key] = isPlainObject(val)\n                ? extend({ from: key }, val)\n                : { from: val };\n        }\n    }\n    else {\n        warn$2(`Invalid value for option \"inject\": expected an Array or an Object, ` +\n            `but got ${toRawType(inject)}.`, vm);\n    }\n}\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives$1(options) {\n    const dirs = options.directives;\n    if (dirs) {\n        for (const key in dirs) {\n            const def = dirs[key];\n            if (isFunction(def)) {\n                dirs[key] = { bind: def, update: def };\n            }\n        }\n    }\n}\nfunction assertObjectType(name, value, vm) {\n    if (!isPlainObject(value)) {\n        warn$2(`Invalid value for option \"${name}\": expected an Object, ` +\n            `but got ${toRawType(value)}.`, vm);\n    }\n}\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions(parent, child, vm) {\n    {\n        checkComponents(child);\n    }\n    if (isFunction(child)) {\n        // @ts-expect-error\n        child = child.options;\n    }\n    normalizeProps(child, vm);\n    normalizeInject(child, vm);\n    normalizeDirectives$1(child);\n    // Apply extends and mixins on the child options,\n    // but only if it is a raw options object that isn't\n    // the result of another mergeOptions call.\n    // Only merged options has the _base property.\n    if (!child._base) {\n        if (child.extends) {\n            parent = mergeOptions(parent, child.extends, vm);\n        }\n        if (child.mixins) {\n            for (let i = 0, l = child.mixins.length; i < l; i++) {\n                parent = mergeOptions(parent, child.mixins[i], vm);\n            }\n        }\n    }\n    const options = {};\n    let key;\n    for (key in parent) {\n        mergeField(key);\n    }\n    for (key in child) {\n        if (!hasOwn(parent, key)) {\n            mergeField(key);\n        }\n    }\n    function mergeField(key) {\n        const strat = strats[key] || defaultStrat;\n        options[key] = strat(parent[key], child[key], vm, key);\n    }\n    return options;\n}\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset(options, type, id, warnMissing) {\n    /* istanbul ignore if */\n    if (typeof id !== 'string') {\n        return;\n    }\n    const assets = options[type];\n    // check local registration variations first\n    if (hasOwn(assets, id))\n        return assets[id];\n    const camelizedId = camelize(id);\n    if (hasOwn(assets, camelizedId))\n        return assets[camelizedId];\n    const PascalCaseId = capitalize(camelizedId);\n    if (hasOwn(assets, PascalCaseId))\n        return assets[PascalCaseId];\n    // fallback to prototype chain\n    const res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n    if (warnMissing && !res) {\n        warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n    }\n    return res;\n}\n\nfunction validateProp(key, propOptions, propsData, vm) {\n    const prop = propOptions[key];\n    const absent = !hasOwn(propsData, key);\n    let value = propsData[key];\n    // boolean casting\n    const booleanIndex = getTypeIndex(Boolean, prop.type);\n    if (booleanIndex > -1) {\n        if (absent && !hasOwn(prop, 'default')) {\n            value = false;\n        }\n        else if (value === '' || value === hyphenate(key)) {\n            // only cast empty string / same name to boolean if\n            // boolean has higher priority\n            const stringIndex = getTypeIndex(String, prop.type);\n            if (stringIndex < 0 || booleanIndex < stringIndex) {\n                value = true;\n            }\n        }\n    }\n    // check default value\n    if (value === undefined) {\n        value = getPropDefaultValue(vm, prop, key);\n        // since the default value is a fresh copy,\n        // make sure to observe it.\n        const prevShouldObserve = shouldObserve;\n        toggleObserving(true);\n        observe(value);\n        toggleObserving(prevShouldObserve);\n    }\n    {\n        assertProp(prop, key, value, vm, absent);\n    }\n    return value;\n}\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue(vm, prop, key) {\n    // no default, return undefined\n    if (!hasOwn(prop, 'default')) {\n        return undefined;\n    }\n    const def = prop.default;\n    // warn against non-factory defaults for Object & Array\n    if (isObject(def)) {\n        warn$2('Invalid default value for prop \"' +\n            key +\n            '\": ' +\n            'Props with type Object/Array must use a factory function ' +\n            'to return the default value.', vm);\n    }\n    // the raw prop value was also undefined from previous render,\n    // return previous default value to avoid unnecessary watcher trigger\n    if (vm &&\n        vm.$options.propsData &&\n        vm.$options.propsData[key] === undefined &&\n        vm._props[key] !== undefined) {\n        return vm._props[key];\n    }\n    // call factory function for non-Function types\n    // a value is Function if its prototype is function even across different execution context\n    return isFunction(def) && getType(prop.type) !== 'Function'\n        ? def.call(vm)\n        : def;\n}\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp(prop, name, value, vm, absent) {\n    if (prop.required && absent) {\n        warn$2('Missing required prop: \"' + name + '\"', vm);\n        return;\n    }\n    if (value == null && !prop.required) {\n        return;\n    }\n    let type = prop.type;\n    let valid = !type || type === true;\n    const expectedTypes = [];\n    if (type) {\n        if (!isArray(type)) {\n            type = [type];\n        }\n        for (let i = 0; i < type.length && !valid; i++) {\n            const assertedType = assertType(value, type[i], vm);\n            expectedTypes.push(assertedType.expectedType || '');\n            valid = assertedType.valid;\n        }\n    }\n    const haveExpectedTypes = expectedTypes.some(t => t);\n    if (!valid && haveExpectedTypes) {\n        warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);\n        return;\n    }\n    const validator = prop.validator;\n    if (validator) {\n        if (!validator(value)) {\n            warn$2('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n        }\n    }\n}\nconst simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\nfunction assertType(value, type, vm) {\n    let valid;\n    const expectedType = getType(type);\n    if (simpleCheckRE.test(expectedType)) {\n        const t = typeof value;\n        valid = t === expectedType.toLowerCase();\n        // for primitive wrapper objects\n        if (!valid && t === 'object') {\n            valid = value instanceof type;\n        }\n    }\n    else if (expectedType === 'Object') {\n        valid = isPlainObject(value);\n    }\n    else if (expectedType === 'Array') {\n        valid = isArray(value);\n    }\n    else {\n        try {\n            valid = value instanceof type;\n        }\n        catch (e) {\n            warn$2('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n            valid = false;\n        }\n    }\n    return {\n        valid,\n        expectedType\n    };\n}\nconst functionTypeCheckRE = /^\\s*function (\\w+)/;\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType(fn) {\n    const match = fn && fn.toString().match(functionTypeCheckRE);\n    return match ? match[1] : '';\n}\nfunction isSameType(a, b) {\n    return getType(a) === getType(b);\n}\nfunction getTypeIndex(type, expectedTypes) {\n    if (!isArray(expectedTypes)) {\n        return isSameType(expectedTypes, type) ? 0 : -1;\n    }\n    for (let i = 0, len = expectedTypes.length; i < len; i++) {\n        if (isSameType(expectedTypes[i], type)) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n    let message = `Invalid prop: type check failed for prop \"${name}\".` +\n        ` Expected ${expectedTypes.map(capitalize).join(', ')}`;\n    const expectedType = expectedTypes[0];\n    const receivedType = toRawType(value);\n    // check if we need to specify expected value\n    if (expectedTypes.length === 1 &&\n        isExplicable(expectedType) &&\n        isExplicable(typeof value) &&\n        !isBoolean(expectedType, receivedType)) {\n        message += ` with value ${styleValue(value, expectedType)}`;\n    }\n    message += `, got ${receivedType} `;\n    // check if we need to specify received value\n    if (isExplicable(receivedType)) {\n        message += `with value ${styleValue(value, receivedType)}.`;\n    }\n    return message;\n}\nfunction styleValue(value, type) {\n    if (type === 'String') {\n        return `\"${value}\"`;\n    }\n    else if (type === 'Number') {\n        return `${Number(value)}`;\n    }\n    else {\n        return `${value}`;\n    }\n}\nconst EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable(value) {\n    return EXPLICABLE_TYPES.some(elem => value.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n    return args.some(elem => elem.toLowerCase() === 'boolean');\n}\n\nfunction Vue(options) {\n    if (!(this instanceof Vue)) {\n        warn$2('Vue is a constructor and should be called with the `new` keyword');\n    }\n    this._init(options);\n}\n//@ts-expect-error Vue has function type\ninitMixin$1(Vue);\n//@ts-expect-error Vue has function type\nstateMixin(Vue);\n//@ts-expect-error Vue has function type\neventsMixin(Vue);\n//@ts-expect-error Vue has function type\nlifecycleMixin(Vue);\n//@ts-expect-error Vue has function type\nrenderMixin(Vue);\n\nfunction initUse(Vue) {\n    Vue.use = function (plugin) {\n        const installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n        if (installedPlugins.indexOf(plugin) > -1) {\n            return this;\n        }\n        // additional parameters\n        const args = toArray(arguments, 1);\n        args.unshift(this);\n        if (isFunction(plugin.install)) {\n            plugin.install.apply(plugin, args);\n        }\n        else if (isFunction(plugin)) {\n            plugin.apply(null, args);\n        }\n        installedPlugins.push(plugin);\n        return this;\n    };\n}\n\nfunction initMixin(Vue) {\n    Vue.mixin = function (mixin) {\n        this.options = mergeOptions(this.options, mixin);\n        return this;\n    };\n}\n\nfunction initExtend(Vue) {\n    /**\n     * Each instance constructor, including Vue, has a unique\n     * cid. This enables us to create wrapped \"child\n     * constructors\" for prototypal inheritance and cache them.\n     */\n    Vue.cid = 0;\n    let cid = 1;\n    /**\n     * Class inheritance\n     */\n    Vue.extend = function (extendOptions) {\n        extendOptions = extendOptions || {};\n        const Super = this;\n        const SuperId = Super.cid;\n        const cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n        if (cachedCtors[SuperId]) {\n            return cachedCtors[SuperId];\n        }\n        const name = getComponentName(extendOptions) || getComponentName(Super.options);\n        if (name) {\n            validateComponentName(name);\n        }\n        const Sub = function VueComponent(options) {\n            this._init(options);\n        };\n        Sub.prototype = Object.create(Super.prototype);\n        Sub.prototype.constructor = Sub;\n        Sub.cid = cid++;\n        Sub.options = mergeOptions(Super.options, extendOptions);\n        Sub['super'] = Super;\n        // For props and computed properties, we define the proxy getters on\n        // the Vue instances at extension time, on the extended prototype. This\n        // avoids Object.defineProperty calls for each instance created.\n        if (Sub.options.props) {\n            initProps(Sub);\n        }\n        if (Sub.options.computed) {\n            initComputed(Sub);\n        }\n        // allow further extension/mixin/plugin usage\n        Sub.extend = Super.extend;\n        Sub.mixin = Super.mixin;\n        Sub.use = Super.use;\n        // create asset registers, so extended classes\n        // can have their private assets too.\n        ASSET_TYPES.forEach(function (type) {\n            Sub[type] = Super[type];\n        });\n        // enable recursive self-lookup\n        if (name) {\n            Sub.options.components[name] = Sub;\n        }\n        // keep a reference to the super options at extension time.\n        // later at instantiation we can check if Super's options have\n        // been updated.\n        Sub.superOptions = Super.options;\n        Sub.extendOptions = extendOptions;\n        Sub.sealedOptions = extend({}, Sub.options);\n        // cache constructor\n        cachedCtors[SuperId] = Sub;\n        return Sub;\n    };\n}\nfunction initProps(Comp) {\n    const props = Comp.options.props;\n    for (const key in props) {\n        proxy(Comp.prototype, `_props`, key);\n    }\n}\nfunction initComputed(Comp) {\n    const computed = Comp.options.computed;\n    for (const key in computed) {\n        defineComputed(Comp.prototype, key, computed[key]);\n    }\n}\n\nfunction initAssetRegisters(Vue) {\n    /**\n     * Create asset registration methods.\n     */\n    ASSET_TYPES.forEach(type => {\n        // @ts-expect-error function is not exact same type\n        Vue[type] = function (id, definition) {\n            if (!definition) {\n                return this.options[type + 's'][id];\n            }\n            else {\n                /* istanbul ignore if */\n                if (type === 'component') {\n                    validateComponentName(id);\n                }\n                if (type === 'component' && isPlainObject(definition)) {\n                    // @ts-expect-error\n                    definition.name = definition.name || id;\n                    definition = this.options._base.extend(definition);\n                }\n                if (type === 'directive' && isFunction(definition)) {\n                    definition = { bind: definition, update: definition };\n                }\n                this.options[type + 's'][id] = definition;\n                return definition;\n            }\n        };\n    });\n}\n\nfunction _getComponentName(opts) {\n    return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n}\nfunction matches(pattern, name) {\n    if (isArray(pattern)) {\n        return pattern.indexOf(name) > -1;\n    }\n    else if (typeof pattern === 'string') {\n        return pattern.split(',').indexOf(name) > -1;\n    }\n    else if (isRegExp(pattern)) {\n        return pattern.test(name);\n    }\n    /* istanbul ignore next */\n    return false;\n}\nfunction pruneCache(keepAliveInstance, filter) {\n    const { cache, keys, _vnode, $vnode } = keepAliveInstance;\n    for (const key in cache) {\n        const entry = cache[key];\n        if (entry) {\n            const name = entry.name;\n            if (name && !filter(name)) {\n                pruneCacheEntry(cache, key, keys, _vnode);\n            }\n        }\n    }\n    $vnode.componentOptions.children = undefined;\n}\nfunction pruneCacheEntry(cache, key, keys, current) {\n    const entry = cache[key];\n    if (entry && (!current || entry.tag !== current.tag)) {\n        // @ts-expect-error can be undefined\n        entry.componentInstance.$destroy();\n    }\n    cache[key] = null;\n    remove$2(keys, key);\n}\nconst patternTypes = [String, RegExp, Array];\n// TODO defineComponent\nvar KeepAlive = {\n    name: 'keep-alive',\n    abstract: true,\n    props: {\n        include: patternTypes,\n        exclude: patternTypes,\n        max: [String, Number]\n    },\n    methods: {\n        cacheVNode() {\n            const { cache, keys, vnodeToCache, keyToCache } = this;\n            if (vnodeToCache) {\n                const { tag, componentInstance, componentOptions } = vnodeToCache;\n                cache[keyToCache] = {\n                    name: _getComponentName(componentOptions),\n                    tag,\n                    componentInstance\n                };\n                keys.push(keyToCache);\n                // prune oldest entry\n                if (this.max && keys.length > parseInt(this.max)) {\n                    pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                }\n                this.vnodeToCache = null;\n            }\n        }\n    },\n    created() {\n        this.cache = Object.create(null);\n        this.keys = [];\n    },\n    destroyed() {\n        for (const key in this.cache) {\n            pruneCacheEntry(this.cache, key, this.keys);\n        }\n    },\n    mounted() {\n        this.cacheVNode();\n        this.$watch('include', val => {\n            pruneCache(this, name => matches(val, name));\n        });\n        this.$watch('exclude', val => {\n            pruneCache(this, name => !matches(val, name));\n        });\n    },\n    updated() {\n        this.cacheVNode();\n    },\n    render() {\n        const slot = this.$slots.default;\n        const vnode = getFirstComponentChild(slot);\n        const componentOptions = vnode && vnode.componentOptions;\n        if (componentOptions) {\n            // check pattern\n            const name = _getComponentName(componentOptions);\n            const { include, exclude } = this;\n            if (\n            // not included\n            (include && (!name || !matches(include, name))) ||\n                // excluded\n                (exclude && name && matches(exclude, name))) {\n                return vnode;\n            }\n            const { cache, keys } = this;\n            const key = vnode.key == null\n                ? // same constructor may get registered as different local components\n                    // so cid alone is not enough (#3269)\n                    componentOptions.Ctor.cid +\n                        (componentOptions.tag ? `::${componentOptions.tag}` : '')\n                : vnode.key;\n            if (cache[key]) {\n                vnode.componentInstance = cache[key].componentInstance;\n                // make current key freshest\n                remove$2(keys, key);\n                keys.push(key);\n            }\n            else {\n                // delay setting the cache until update\n                this.vnodeToCache = vnode;\n                this.keyToCache = key;\n            }\n            // @ts-expect-error can vnode.data can be undefined\n            vnode.data.keepAlive = true;\n        }\n        return vnode || (slot && slot[0]);\n    }\n};\n\nvar builtInComponents = {\n    KeepAlive\n};\n\nfunction initGlobalAPI(Vue) {\n    // config\n    const configDef = {};\n    configDef.get = () => config;\n    {\n        configDef.set = () => {\n            warn$2('Do not replace the Vue.config object, set individual fields instead.');\n        };\n    }\n    Object.defineProperty(Vue, 'config', configDef);\n    // exposed util methods.\n    // NOTE: these are not considered part of the public API - avoid relying on\n    // them unless you are aware of the risk.\n    Vue.util = {\n        warn: warn$2,\n        extend,\n        mergeOptions,\n        defineReactive\n    };\n    Vue.set = set;\n    Vue.delete = del;\n    Vue.nextTick = nextTick;\n    // 2.6 explicit observable API\n    Vue.observable = (obj) => {\n        observe(obj);\n        return obj;\n    };\n    Vue.options = Object.create(null);\n    ASSET_TYPES.forEach(type => {\n        Vue.options[type + 's'] = Object.create(null);\n    });\n    // this is used to identify the \"base\" constructor to extend all plain-object\n    // components with in Weex's multi-instance scenarios.\n    Vue.options._base = Vue;\n    extend(Vue.options.components, builtInComponents);\n    initUse(Vue);\n    initMixin(Vue);\n    initExtend(Vue);\n    initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\nObject.defineProperty(Vue.prototype, '$isServer', {\n    get: isServerRendering\n});\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n    get() {\n        /* istanbul ignore next */\n        return this.$vnode && this.$vnode.ssrContext;\n    }\n});\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n    value: FunctionalRenderContext\n});\nVue.version = version;\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nconst isReservedAttr = makeMap('style,class');\n// attributes that should be using props for binding\nconst acceptValue = makeMap('input,textarea,option,select,progress');\nconst mustUseProp = (tag, type, attr) => {\n    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n        (attr === 'selected' && tag === 'option') ||\n        (attr === 'checked' && tag === 'input') ||\n        (attr === 'muted' && tag === 'video'));\n};\nconst isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\nconst isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\nconst convertEnumeratedValue = (key, value) => {\n    return isFalsyAttrValue(value) || value === 'false'\n        ? 'false'\n        : // allow arbitrary string value for contenteditable\n            key === 'contenteditable' && isValidContentEditableValue(value)\n                ? value\n                : 'true';\n};\nconst isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n    'required,reversed,scoped,seamless,selected,sortable,' +\n    'truespeed,typemustmatch,visible');\nconst xlinkNS = 'http://www.w3.org/1999/xlink';\nconst isXlink = (name) => {\n    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n};\nconst getXlinkProp = (name) => {\n    return isXlink(name) ? name.slice(6, name.length) : '';\n};\nconst isFalsyAttrValue = (val) => {\n    return val == null || val === false;\n};\n\nfunction genClassForVnode(vnode) {\n    let data = vnode.data;\n    let parentNode = vnode;\n    let childNode = vnode;\n    while (isDef(childNode.componentInstance)) {\n        childNode = childNode.componentInstance._vnode;\n        if (childNode && childNode.data) {\n            data = mergeClassData(childNode.data, data);\n        }\n    }\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while (isDef((parentNode = parentNode.parent))) {\n        if (parentNode && parentNode.data) {\n            data = mergeClassData(data, parentNode.data);\n        }\n    }\n    return renderClass(data.staticClass, data.class);\n}\nfunction mergeClassData(child, parent) {\n    return {\n        staticClass: concat(child.staticClass, parent.staticClass),\n        class: isDef(child.class) ? [child.class, parent.class] : parent.class\n    };\n}\nfunction renderClass(staticClass, dynamicClass) {\n    if (isDef(staticClass) || isDef(dynamicClass)) {\n        return concat(staticClass, stringifyClass(dynamicClass));\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction concat(a, b) {\n    return a ? (b ? a + ' ' + b : a) : b || '';\n}\nfunction stringifyClass(value) {\n    if (Array.isArray(value)) {\n        return stringifyArray(value);\n    }\n    if (isObject(value)) {\n        return stringifyObject(value);\n    }\n    if (typeof value === 'string') {\n        return value;\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction stringifyArray(value) {\n    let res = '';\n    let stringified;\n    for (let i = 0, l = value.length; i < l; i++) {\n        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n            if (res)\n                res += ' ';\n            res += stringified;\n        }\n    }\n    return res;\n}\nfunction stringifyObject(value) {\n    let res = '';\n    for (const key in value) {\n        if (value[key]) {\n            if (res)\n                res += ' ';\n            res += key;\n        }\n    }\n    return res;\n}\n\nconst namespaceMap = {\n    svg: 'http://www.w3.org/2000/svg',\n    math: 'http://www.w3.org/1998/Math/MathML'\n};\nconst isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n    'embed,object,param,source,canvas,script,noscript,del,ins,' +\n    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n    'output,progress,select,textarea,' +\n    'details,dialog,menu,menuitem,summary,' +\n    'content,element,shadow,template,blockquote,iframe,tfoot');\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nconst isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\nconst isPreTag = (tag) => tag === 'pre';\nconst isReservedTag = (tag) => {\n    return isHTMLTag(tag) || isSVG(tag);\n};\nfunction getTagNamespace(tag) {\n    if (isSVG(tag)) {\n        return 'svg';\n    }\n    // basic support for MathML\n    // note it doesn't support other MathML elements being component roots\n    if (tag === 'math') {\n        return 'math';\n    }\n}\nconst unknownElementCache = Object.create(null);\nfunction isUnknownElement(tag) {\n    /* istanbul ignore if */\n    if (!inBrowser) {\n        return true;\n    }\n    if (isReservedTag(tag)) {\n        return false;\n    }\n    tag = tag.toLowerCase();\n    /* istanbul ignore if */\n    if (unknownElementCache[tag] != null) {\n        return unknownElementCache[tag];\n    }\n    const el = document.createElement(tag);\n    if (tag.indexOf('-') > -1) {\n        // https://stackoverflow.com/a/28210364/1070244\n        return (unknownElementCache[tag] =\n            el.constructor === window.HTMLUnknownElement ||\n                el.constructor === window.HTMLElement);\n    }\n    else {\n        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n    }\n}\nconst isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query(el) {\n    if (typeof el === 'string') {\n        const selected = document.querySelector(el);\n        if (!selected) {\n            warn$2('Cannot find element: ' + el);\n            return document.createElement('div');\n        }\n        return selected;\n    }\n    else {\n        return el;\n    }\n}\n\nfunction createElement(tagName, vnode) {\n    const elm = document.createElement(tagName);\n    if (tagName !== 'select') {\n        return elm;\n    }\n    // false or null will remove the attribute but undefined will not\n    if (vnode.data &&\n        vnode.data.attrs &&\n        vnode.data.attrs.multiple !== undefined) {\n        elm.setAttribute('multiple', 'multiple');\n    }\n    return elm;\n}\nfunction createElementNS(namespace, tagName) {\n    return document.createElementNS(namespaceMap[namespace], tagName);\n}\nfunction createTextNode(text) {\n    return document.createTextNode(text);\n}\nfunction createComment(text) {\n    return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n    parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n    node.removeChild(child);\n}\nfunction appendChild(node, child) {\n    node.appendChild(child);\n}\nfunction parentNode(node) {\n    return node.parentNode;\n}\nfunction nextSibling(node) {\n    return node.nextSibling;\n}\nfunction tagName(node) {\n    return node.tagName;\n}\nfunction setTextContent(node, text) {\n    node.textContent = text;\n}\nfunction setStyleScope(node, scopeId) {\n    node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\nvar ref = {\n    create(_, vnode) {\n        registerRef(vnode);\n    },\n    update(oldVnode, vnode) {\n        if (oldVnode.data.ref !== vnode.data.ref) {\n            registerRef(oldVnode, true);\n            registerRef(vnode);\n        }\n    },\n    destroy(vnode) {\n        registerRef(vnode, true);\n    }\n};\nfunction registerRef(vnode, isRemoval) {\n    const ref = vnode.data.ref;\n    if (!isDef(ref))\n        return;\n    const vm = vnode.context;\n    const refValue = vnode.componentInstance || vnode.elm;\n    const value = isRemoval ? null : refValue;\n    const $refsValue = isRemoval ? undefined : refValue;\n    if (isFunction(ref)) {\n        invokeWithErrorHandling(ref, vm, [value], vm, `template ref function`);\n        return;\n    }\n    const isFor = vnode.data.refInFor;\n    const _isString = typeof ref === 'string' || typeof ref === 'number';\n    const _isRef = isRef(ref);\n    const refs = vm.$refs;\n    if (_isString || _isRef) {\n        if (isFor) {\n            const existing = _isString ? refs[ref] : ref.value;\n            if (isRemoval) {\n                isArray(existing) && remove$2(existing, refValue);\n            }\n            else {\n                if (!isArray(existing)) {\n                    if (_isString) {\n                        refs[ref] = [refValue];\n                        setSetupRef(vm, ref, refs[ref]);\n                    }\n                    else {\n                        ref.value = [refValue];\n                    }\n                }\n                else if (!existing.includes(refValue)) {\n                    existing.push(refValue);\n                }\n            }\n        }\n        else if (_isString) {\n            if (isRemoval && refs[ref] !== refValue) {\n                return;\n            }\n            refs[ref] = $refsValue;\n            setSetupRef(vm, ref, value);\n        }\n        else if (_isRef) {\n            if (isRemoval && ref.value !== refValue) {\n                return;\n            }\n            ref.value = value;\n        }\n        else {\n            warn$2(`Invalid template ref type: ${typeof ref}`);\n        }\n    }\n}\nfunction setSetupRef({ _setupState }, key, val) {\n    if (_setupState && hasOwn(_setupState, key)) {\n        if (isRef(_setupState[key])) {\n            _setupState[key].value = val;\n        }\n        else {\n            _setupState[key] = val;\n        }\n    }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\nconst emptyNode = new VNode('', {}, []);\nconst hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\nfunction sameVnode(a, b) {\n    return (a.key === b.key &&\n        a.asyncFactory === b.asyncFactory &&\n        ((a.tag === b.tag &&\n            a.isComment === b.isComment &&\n            isDef(a.data) === isDef(b.data) &&\n            sameInputType(a, b)) ||\n            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n}\nfunction sameInputType(a, b) {\n    if (a.tag !== 'input')\n        return true;\n    let i;\n    const typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n    const typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n    let i, key;\n    const map = {};\n    for (i = beginIdx; i <= endIdx; ++i) {\n        key = children[i].key;\n        if (isDef(key))\n            map[key] = i;\n    }\n    return map;\n}\nfunction createPatchFunction(backend) {\n    let i, j;\n    const cbs = {};\n    const { modules, nodeOps } = backend;\n    for (i = 0; i < hooks.length; ++i) {\n        cbs[hooks[i]] = [];\n        for (j = 0; j < modules.length; ++j) {\n            if (isDef(modules[j][hooks[i]])) {\n                cbs[hooks[i]].push(modules[j][hooks[i]]);\n            }\n        }\n    }\n    function emptyNodeAt(elm) {\n        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n    }\n    function createRmCb(childElm, listeners) {\n        function remove() {\n            if (--remove.listeners === 0) {\n                removeNode(childElm);\n            }\n        }\n        remove.listeners = listeners;\n        return remove;\n    }\n    function removeNode(el) {\n        const parent = nodeOps.parentNode(el);\n        // element may have already been removed due to v-html / v-text\n        if (isDef(parent)) {\n            nodeOps.removeChild(parent, el);\n        }\n    }\n    function isUnknownElement(vnode, inVPre) {\n        return (!inVPre &&\n            !vnode.ns &&\n            !(config.ignoredElements.length &&\n                config.ignoredElements.some(ignore => {\n                    return isRegExp(ignore)\n                        ? ignore.test(vnode.tag)\n                        : ignore === vnode.tag;\n                })) &&\n            config.isUnknownElement(vnode.tag));\n    }\n    let creatingElmInVPre = 0;\n    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // This vnode was used in a previous render!\n            // now it's used as a new node, overwriting its elm would cause\n            // potential patch errors down the road when it's used as an insertion\n            // reference node. Instead, we clone the node on-demand before creating\n            // associated DOM element for it.\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        vnode.isRootInsert = !nested; // for transition enter check\n        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n            return;\n        }\n        const data = vnode.data;\n        const children = vnode.children;\n        const tag = vnode.tag;\n        if (isDef(tag)) {\n            {\n                if (data && data.pre) {\n                    creatingElmInVPre++;\n                }\n                if (isUnknownElement(vnode, creatingElmInVPre)) {\n                    warn$2('Unknown custom element: <' +\n                        tag +\n                        '> - did you ' +\n                        'register the component correctly? For recursive components, ' +\n                        'make sure to provide the \"name\" option.', vnode.context);\n                }\n            }\n            vnode.elm = vnode.ns\n                ? nodeOps.createElementNS(vnode.ns, tag)\n                : nodeOps.createElement(tag, vnode);\n            setScope(vnode);\n            createChildren(vnode, children, insertedVnodeQueue);\n            if (isDef(data)) {\n                invokeCreateHooks(vnode, insertedVnodeQueue);\n            }\n            insert(parentElm, vnode.elm, refElm);\n            if (data && data.pre) {\n                creatingElmInVPre--;\n            }\n        }\n        else if (isTrue(vnode.isComment)) {\n            vnode.elm = nodeOps.createComment(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n        else {\n            vnode.elm = nodeOps.createTextNode(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n    }\n    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i = vnode.data;\n        if (isDef(i)) {\n            const isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n            if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                i(vnode, false /* hydrating */);\n            }\n            // after calling the init hook, if the vnode is a child component\n            // it should've created a child instance and mounted it. the child\n            // component also has set the placeholder vnode's elm.\n            // in that case we can just return the element and be done.\n            if (isDef(vnode.componentInstance)) {\n                initComponent(vnode, insertedVnodeQueue);\n                insert(parentElm, vnode.elm, refElm);\n                if (isTrue(isReactivated)) {\n                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                }\n                return true;\n            }\n        }\n    }\n    function initComponent(vnode, insertedVnodeQueue) {\n        if (isDef(vnode.data.pendingInsert)) {\n            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n            vnode.data.pendingInsert = null;\n        }\n        vnode.elm = vnode.componentInstance.$el;\n        if (isPatchable(vnode)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            setScope(vnode);\n        }\n        else {\n            // empty component root.\n            // skip all element-related modules except for ref (#3455)\n            registerRef(vnode);\n            // make sure to invoke the insert hook\n            insertedVnodeQueue.push(vnode);\n        }\n    }\n    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i;\n        // hack for #4339: a reactivated component with inner transition\n        // does not trigger because the inner node's created hooks are not called\n        // again. It's not ideal to involve module-specific logic in here but\n        // there doesn't seem to be a better way to do it.\n        let innerNode = vnode;\n        while (innerNode.componentInstance) {\n            innerNode = innerNode.componentInstance._vnode;\n            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                for (i = 0; i < cbs.activate.length; ++i) {\n                    cbs.activate[i](emptyNode, innerNode);\n                }\n                insertedVnodeQueue.push(innerNode);\n                break;\n            }\n        }\n        // unlike a newly created component,\n        // a reactivated keep-alive component doesn't insert itself\n        insert(parentElm, vnode.elm, refElm);\n    }\n    function insert(parent, elm, ref) {\n        if (isDef(parent)) {\n            if (isDef(ref)) {\n                if (nodeOps.parentNode(ref) === parent) {\n                    nodeOps.insertBefore(parent, elm, ref);\n                }\n            }\n            else {\n                nodeOps.appendChild(parent, elm);\n            }\n        }\n    }\n    function createChildren(vnode, children, insertedVnodeQueue) {\n        if (isArray(children)) {\n            {\n                checkDuplicateKeys(children);\n            }\n            for (let i = 0; i < children.length; ++i) {\n                createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n            }\n        }\n        else if (isPrimitive(vnode.text)) {\n            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n        }\n    }\n    function isPatchable(vnode) {\n        while (vnode.componentInstance) {\n            vnode = vnode.componentInstance._vnode;\n        }\n        return isDef(vnode.tag);\n    }\n    function invokeCreateHooks(vnode, insertedVnodeQueue) {\n        for (let i = 0; i < cbs.create.length; ++i) {\n            cbs.create[i](emptyNode, vnode);\n        }\n        i = vnode.data.hook; // Reuse variable\n        if (isDef(i)) {\n            if (isDef(i.create))\n                i.create(emptyNode, vnode);\n            if (isDef(i.insert))\n                insertedVnodeQueue.push(vnode);\n        }\n    }\n    // set scope id attribute for scoped CSS.\n    // this is implemented as a special case to avoid the overhead\n    // of going through the normal attribute patching process.\n    function setScope(vnode) {\n        let i;\n        if (isDef((i = vnode.fnScopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n        else {\n            let ancestor = vnode;\n            while (ancestor) {\n                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                    nodeOps.setStyleScope(vnode.elm, i);\n                }\n                ancestor = ancestor.parent;\n            }\n        }\n        // for slot content they should also get the scopeId from the host instance.\n        if (isDef((i = activeInstance)) &&\n            i !== vnode.context &&\n            i !== vnode.fnContext &&\n            isDef((i = i.$options._scopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n    }\n    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n        }\n    }\n    function invokeDestroyHook(vnode) {\n        let i, j;\n        const data = vnode.data;\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                i(vnode);\n            for (i = 0; i < cbs.destroy.length; ++i)\n                cbs.destroy[i](vnode);\n        }\n        if (isDef((i = vnode.children))) {\n            for (j = 0; j < vnode.children.length; ++j) {\n                invokeDestroyHook(vnode.children[j]);\n            }\n        }\n    }\n    function removeVnodes(vnodes, startIdx, endIdx) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            const ch = vnodes[startIdx];\n            if (isDef(ch)) {\n                if (isDef(ch.tag)) {\n                    removeAndInvokeRemoveHook(ch);\n                    invokeDestroyHook(ch);\n                }\n                else {\n                    // Text node\n                    removeNode(ch.elm);\n                }\n            }\n        }\n    }\n    function removeAndInvokeRemoveHook(vnode, rm) {\n        if (isDef(rm) || isDef(vnode.data)) {\n            let i;\n            const listeners = cbs.remove.length + 1;\n            if (isDef(rm)) {\n                // we have a recursively passed down rm callback\n                // increase the listeners count\n                rm.listeners += listeners;\n            }\n            else {\n                // directly removing\n                rm = createRmCb(vnode.elm, listeners);\n            }\n            // recursively invoke hooks on child component root node\n            if (isDef((i = vnode.componentInstance)) &&\n                isDef((i = i._vnode)) &&\n                isDef(i.data)) {\n                removeAndInvokeRemoveHook(i, rm);\n            }\n            for (i = 0; i < cbs.remove.length; ++i) {\n                cbs.remove[i](vnode, rm);\n            }\n            if (isDef((i = vnode.data.hook)) && isDef((i = i.remove))) {\n                i(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n        else {\n            removeNode(vnode.elm);\n        }\n    }\n    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n        let oldStartIdx = 0;\n        let newStartIdx = 0;\n        let oldEndIdx = oldCh.length - 1;\n        let oldStartVnode = oldCh[0];\n        let oldEndVnode = oldCh[oldEndIdx];\n        let newEndIdx = newCh.length - 1;\n        let newStartVnode = newCh[0];\n        let newEndVnode = newCh[newEndIdx];\n        let oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n        // removeOnly is a special flag used only by <transition-group>\n        // to ensure removed elements stay in correct relative positions\n        // during leaving transitions\n        const canMove = !removeOnly;\n        {\n            checkDuplicateKeys(newCh);\n        }\n        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n            if (isUndef(oldStartVnode)) {\n                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n            }\n            else if (isUndef(oldEndVnode)) {\n                oldEndVnode = oldCh[--oldEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newStartVnode)) {\n                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                oldStartVnode = oldCh[++oldStartIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else if (sameVnode(oldEndVnode, newEndVnode)) {\n                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newEndVnode)) {\n                // Vnode moved right\n                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                oldStartVnode = oldCh[++oldStartIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldEndVnode, newStartVnode)) {\n                // Vnode moved left\n                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else {\n                if (isUndef(oldKeyToIdx))\n                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                idxInOld = isDef(newStartVnode.key)\n                    ? oldKeyToIdx[newStartVnode.key]\n                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                if (isUndef(idxInOld)) {\n                    // New element\n                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                }\n                else {\n                    vnodeToMove = oldCh[idxInOld];\n                    if (sameVnode(vnodeToMove, newStartVnode)) {\n                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                        oldCh[idxInOld] = undefined;\n                        canMove &&\n                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                    }\n                    else {\n                        // same key but different element. treat as new element\n                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                    }\n                }\n                newStartVnode = newCh[++newStartIdx];\n            }\n        }\n        if (oldStartIdx > oldEndIdx) {\n            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n        }\n        else if (newStartIdx > newEndIdx) {\n            removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n        }\n    }\n    function checkDuplicateKeys(children) {\n        const seenKeys = {};\n        for (let i = 0; i < children.length; i++) {\n            const vnode = children[i];\n            const key = vnode.key;\n            if (isDef(key)) {\n                if (seenKeys[key]) {\n                    warn$2(`Duplicate keys detected: '${key}'. This may cause an update error.`, vnode.context);\n                }\n                else {\n                    seenKeys[key] = true;\n                }\n            }\n        }\n    }\n    function findIdxInOld(node, oldCh, start, end) {\n        for (let i = start; i < end; i++) {\n            const c = oldCh[i];\n            if (isDef(c) && sameVnode(node, c))\n                return i;\n        }\n    }\n    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n        if (oldVnode === vnode) {\n            return;\n        }\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // clone reused vnode\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        const elm = (vnode.elm = oldVnode.elm);\n        if (isTrue(oldVnode.isAsyncPlaceholder)) {\n            if (isDef(vnode.asyncFactory.resolved)) {\n                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n            }\n            else {\n                vnode.isAsyncPlaceholder = true;\n            }\n            return;\n        }\n        // reuse element for static trees.\n        // note we only do this if the vnode is cloned -\n        // if the new node is not cloned it means the render functions have been\n        // reset by the hot-reload-api and we need to do a proper re-render.\n        if (isTrue(vnode.isStatic) &&\n            isTrue(oldVnode.isStatic) &&\n            vnode.key === oldVnode.key &&\n            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n            vnode.componentInstance = oldVnode.componentInstance;\n            return;\n        }\n        let i;\n        const data = vnode.data;\n        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n            i(oldVnode, vnode);\n        }\n        const oldCh = oldVnode.children;\n        const ch = vnode.children;\n        if (isDef(data) && isPatchable(vnode)) {\n            for (i = 0; i < cbs.update.length; ++i)\n                cbs.update[i](oldVnode, vnode);\n            if (isDef((i = data.hook)) && isDef((i = i.update)))\n                i(oldVnode, vnode);\n        }\n        if (isUndef(vnode.text)) {\n            if (isDef(oldCh) && isDef(ch)) {\n                if (oldCh !== ch)\n                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n            }\n            else if (isDef(ch)) {\n                {\n                    checkDuplicateKeys(ch);\n                }\n                if (isDef(oldVnode.text))\n                    nodeOps.setTextContent(elm, '');\n                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n            }\n            else if (isDef(oldCh)) {\n                removeVnodes(oldCh, 0, oldCh.length - 1);\n            }\n            else if (isDef(oldVnode.text)) {\n                nodeOps.setTextContent(elm, '');\n            }\n        }\n        else if (oldVnode.text !== vnode.text) {\n            nodeOps.setTextContent(elm, vnode.text);\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                i(oldVnode, vnode);\n        }\n    }\n    function invokeInsertHook(vnode, queue, initial) {\n        // delay insert hooks for component root nodes, invoke them after the\n        // element is really inserted\n        if (isTrue(initial) && isDef(vnode.parent)) {\n            vnode.parent.data.pendingInsert = queue;\n        }\n        else {\n            for (let i = 0; i < queue.length; ++i) {\n                queue[i].data.hook.insert(queue[i]);\n            }\n        }\n    }\n    let hydrationBailed = false;\n    // list of modules that can skip create hook during hydration because they\n    // are already rendered on the client or has no need for initialization\n    // Note: style is excluded because it relies on initial clone for future\n    // deep updates (#7063).\n    const isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n    // Note: this is a browser-only function so we can assume elms are DOM nodes.\n    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n        let i;\n        const { tag, data, children } = vnode;\n        inVPre = inVPre || (data && data.pre);\n        vnode.elm = elm;\n        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n            vnode.isAsyncPlaceholder = true;\n            return true;\n        }\n        // assert node match\n        {\n            if (!assertNodeMatch(elm, vnode, inVPre)) {\n                return false;\n            }\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.init)))\n                i(vnode, true /* hydrating */);\n            if (isDef((i = vnode.componentInstance))) {\n                // child component. it should have hydrated its own tree.\n                initComponent(vnode, insertedVnodeQueue);\n                return true;\n            }\n        }\n        if (isDef(tag)) {\n            if (isDef(children)) {\n                // empty element, allow client to pick up and populate children\n                if (!elm.hasChildNodes()) {\n                    createChildren(vnode, children, insertedVnodeQueue);\n                }\n                else {\n                    // v-html and domProps: innerHTML\n                    if (isDef((i = data)) &&\n                        isDef((i = i.domProps)) &&\n                        isDef((i = i.innerHTML))) {\n                        if (i !== elm.innerHTML) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('server innerHTML: ', i);\n                                console.warn('client innerHTML: ', elm.innerHTML);\n                            }\n                            return false;\n                        }\n                    }\n                    else {\n                        // iterate and compare children lists\n                        let childrenMatch = true;\n                        let childNode = elm.firstChild;\n                        for (let i = 0; i < children.length; i++) {\n                            if (!childNode ||\n                                !hydrate(childNode, children[i], insertedVnodeQueue, inVPre)) {\n                                childrenMatch = false;\n                                break;\n                            }\n                            childNode = childNode.nextSibling;\n                        }\n                        // if childNode is not null, it means the actual childNodes list is\n                        // longer than the virtual children list.\n                        if (!childrenMatch || childNode) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                            }\n                            return false;\n                        }\n                    }\n                }\n            }\n            if (isDef(data)) {\n                let fullInvoke = false;\n                for (const key in data) {\n                    if (!isRenderedModule(key)) {\n                        fullInvoke = true;\n                        invokeCreateHooks(vnode, insertedVnodeQueue);\n                        break;\n                    }\n                }\n                if (!fullInvoke && data['class']) {\n                    // ensure collecting deps for deep class bindings for future updates\n                    traverse(data['class']);\n                }\n            }\n        }\n        else if (elm.data !== vnode.text) {\n            elm.data = vnode.text;\n        }\n        return true;\n    }\n    function assertNodeMatch(node, vnode, inVPre) {\n        if (isDef(vnode.tag)) {\n            return (vnode.tag.indexOf('vue-component') === 0 ||\n                (!isUnknownElement(vnode, inVPre) &&\n                    vnode.tag.toLowerCase() ===\n                        (node.tagName && node.tagName.toLowerCase())));\n        }\n        else {\n            return node.nodeType === (vnode.isComment ? 8 : 3);\n        }\n    }\n    return function patch(oldVnode, vnode, hydrating, removeOnly) {\n        if (isUndef(vnode)) {\n            if (isDef(oldVnode))\n                invokeDestroyHook(oldVnode);\n            return;\n        }\n        let isInitialPatch = false;\n        const insertedVnodeQueue = [];\n        if (isUndef(oldVnode)) {\n            // empty mount (likely as component), create new root element\n            isInitialPatch = true;\n            createElm(vnode, insertedVnodeQueue);\n        }\n        else {\n            const isRealElement = isDef(oldVnode.nodeType);\n            if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                // patch existing root node\n                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n            }\n            else {\n                if (isRealElement) {\n                    // mounting to a real element\n                    // check if this is server-rendered content and if we can perform\n                    // a successful hydration.\n                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                        oldVnode.removeAttribute(SSR_ATTR);\n                        hydrating = true;\n                    }\n                    if (isTrue(hydrating)) {\n                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                            invokeInsertHook(vnode, insertedVnodeQueue, true);\n                            return oldVnode;\n                        }\n                        else {\n                            warn$2('The client-side rendered virtual DOM tree is not matching ' +\n                                'server-rendered content. This is likely caused by incorrect ' +\n                                'HTML markup, for example nesting block-level elements inside ' +\n                                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                'full client-side render.');\n                        }\n                    }\n                    // either not server-rendered, or hydration failed.\n                    // create an empty node and replace it\n                    oldVnode = emptyNodeAt(oldVnode);\n                }\n                // replacing existing element\n                const oldElm = oldVnode.elm;\n                const parentElm = nodeOps.parentNode(oldElm);\n                // create new node\n                createElm(vnode, insertedVnodeQueue, \n                // extremely rare edge case: do not insert if old element is in a\n                // leaving transition. Only happens when combining transition +\n                // keep-alive + HOCs. (#4590)\n                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                // update parent placeholder node element, recursively\n                if (isDef(vnode.parent)) {\n                    let ancestor = vnode.parent;\n                    const patchable = isPatchable(vnode);\n                    while (ancestor) {\n                        for (let i = 0; i < cbs.destroy.length; ++i) {\n                            cbs.destroy[i](ancestor);\n                        }\n                        ancestor.elm = vnode.elm;\n                        if (patchable) {\n                            for (let i = 0; i < cbs.create.length; ++i) {\n                                cbs.create[i](emptyNode, ancestor);\n                            }\n                            // #6513\n                            // invoke insert hooks that may have been merged by create hooks.\n                            // e.g. for directives that uses the \"inserted\" hook.\n                            const insert = ancestor.data.hook.insert;\n                            if (insert.merged) {\n                                // start at index 1 to avoid re-invoking component mounted hook\n                                // clone insert hooks to avoid being mutated during iteration.\n                                // e.g. for customed directives under transition group.\n                                const cloned = insert.fns.slice(1);\n                                for (let i = 0; i < cloned.length; i++) {\n                                    cloned[i]();\n                                }\n                            }\n                        }\n                        else {\n                            registerRef(ancestor);\n                        }\n                        ancestor = ancestor.parent;\n                    }\n                }\n                // destroy old node\n                if (isDef(parentElm)) {\n                    removeVnodes([oldVnode], 0, 0);\n                }\n                else if (isDef(oldVnode.tag)) {\n                    invokeDestroyHook(oldVnode);\n                }\n            }\n        }\n        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n        return vnode.elm;\n    };\n}\n\nvar directives$1 = {\n    create: updateDirectives,\n    update: updateDirectives,\n    destroy: function unbindDirectives(vnode) {\n        // @ts-expect-error emptyNode is not VNodeWithData\n        updateDirectives(vnode, emptyNode);\n    }\n};\nfunction updateDirectives(oldVnode, vnode) {\n    if (oldVnode.data.directives || vnode.data.directives) {\n        _update(oldVnode, vnode);\n    }\n}\nfunction _update(oldVnode, vnode) {\n    const isCreate = oldVnode === emptyNode;\n    const isDestroy = vnode === emptyNode;\n    const oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n    const newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n    const dirsWithInsert = [];\n    const dirsWithPostpatch = [];\n    let key, oldDir, dir;\n    for (key in newDirs) {\n        oldDir = oldDirs[key];\n        dir = newDirs[key];\n        if (!oldDir) {\n            // new directive, bind\n            callHook(dir, 'bind', vnode, oldVnode);\n            if (dir.def && dir.def.inserted) {\n                dirsWithInsert.push(dir);\n            }\n        }\n        else {\n            // existing directive, update\n            dir.oldValue = oldDir.value;\n            dir.oldArg = oldDir.arg;\n            callHook(dir, 'update', vnode, oldVnode);\n            if (dir.def && dir.def.componentUpdated) {\n                dirsWithPostpatch.push(dir);\n            }\n        }\n    }\n    if (dirsWithInsert.length) {\n        const callInsert = () => {\n            for (let i = 0; i < dirsWithInsert.length; i++) {\n                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n            }\n        };\n        if (isCreate) {\n            mergeVNodeHook(vnode, 'insert', callInsert);\n        }\n        else {\n            callInsert();\n        }\n    }\n    if (dirsWithPostpatch.length) {\n        mergeVNodeHook(vnode, 'postpatch', () => {\n            for (let i = 0; i < dirsWithPostpatch.length; i++) {\n                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n            }\n        });\n    }\n    if (!isCreate) {\n        for (key in oldDirs) {\n            if (!newDirs[key]) {\n                // no longer present, unbind\n                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n            }\n        }\n    }\n}\nconst emptyModifiers = Object.create(null);\nfunction normalizeDirectives(dirs, vm) {\n    const res = Object.create(null);\n    if (!dirs) {\n        // $flow-disable-line\n        return res;\n    }\n    let i, dir;\n    for (i = 0; i < dirs.length; i++) {\n        dir = dirs[i];\n        if (!dir.modifiers) {\n            // $flow-disable-line\n            dir.modifiers = emptyModifiers;\n        }\n        res[getRawDirName(dir)] = dir;\n        if (vm._setupState && vm._setupState.__sfc) {\n            const setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n            if (typeof setupDef === 'function') {\n                dir.def = {\n                    bind: setupDef,\n                    update: setupDef,\n                };\n            }\n            else {\n                dir.def = setupDef;\n            }\n        }\n        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n    }\n    // $flow-disable-line\n    return res;\n}\nfunction getRawDirName(dir) {\n    return (dir.rawName || `${dir.name}.${Object.keys(dir.modifiers || {}).join('.')}`);\n}\nfunction callHook(dir, hook, vnode, oldVnode, isDestroy) {\n    const fn = dir.def && dir.def[hook];\n    if (fn) {\n        try {\n            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n        }\n        catch (e) {\n            handleError(e, vnode.context, `directive ${dir.name} ${hook} hook`);\n        }\n    }\n}\n\nvar baseModules = [ref, directives$1];\n\nfunction updateAttrs(oldVnode, vnode) {\n    const opts = vnode.componentOptions;\n    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n        return;\n    }\n    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n        return;\n    }\n    let key, cur, old;\n    const elm = vnode.elm;\n    const oldAttrs = oldVnode.data.attrs || {};\n    let attrs = vnode.data.attrs || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n        attrs = vnode.data.attrs = extend({}, attrs);\n    }\n    for (key in attrs) {\n        cur = attrs[key];\n        old = oldAttrs[key];\n        if (old !== cur) {\n            setAttr(elm, key, cur, vnode.data.pre);\n        }\n    }\n    // #4391: in IE9, setting type can reset value for input[type=radio]\n    // #6666: IE/Edge forces progress value down to 1 before setting a max\n    /* istanbul ignore if */\n    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n        setAttr(elm, 'value', attrs.value);\n    }\n    for (key in oldAttrs) {\n        if (isUndef(attrs[key])) {\n            if (isXlink(key)) {\n                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n            }\n            else if (!isEnumeratedAttr(key)) {\n                elm.removeAttribute(key);\n            }\n        }\n    }\n}\nfunction setAttr(el, key, value, isInPre) {\n    if (isInPre || el.tagName.indexOf('-') > -1) {\n        baseSetAttr(el, key, value);\n    }\n    else if (isBooleanAttr(key)) {\n        // set attribute for blank value\n        // e.g. <option disabled>Select one</option>\n        if (isFalsyAttrValue(value)) {\n            el.removeAttribute(key);\n        }\n        else {\n            // technically allowfullscreen is a boolean attribute for <iframe>,\n            // but Flash expects a value of \"true\" when used on <embed> tag\n            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n            el.setAttribute(key, value);\n        }\n    }\n    else if (isEnumeratedAttr(key)) {\n        el.setAttribute(key, convertEnumeratedValue(key, value));\n    }\n    else if (isXlink(key)) {\n        if (isFalsyAttrValue(value)) {\n            el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n        }\n        else {\n            el.setAttributeNS(xlinkNS, key, value);\n        }\n    }\n    else {\n        baseSetAttr(el, key, value);\n    }\n}\nfunction baseSetAttr(el, key, value) {\n    if (isFalsyAttrValue(value)) {\n        el.removeAttribute(key);\n    }\n    else {\n        // #7138: IE10 & 11 fires input event when setting placeholder on\n        // <textarea>... block the first input event and remove the blocker\n        // immediately.\n        /* istanbul ignore if */\n        if (isIE &&\n            !isIE9 &&\n            el.tagName === 'TEXTAREA' &&\n            key === 'placeholder' &&\n            value !== '' &&\n            !el.__ieph) {\n            const blocker = e => {\n                e.stopImmediatePropagation();\n                el.removeEventListener('input', blocker);\n            };\n            el.addEventListener('input', blocker);\n            // $flow-disable-line\n            el.__ieph = true; /* IE placeholder patched */\n        }\n        el.setAttribute(key, value);\n    }\n}\nvar attrs = {\n    create: updateAttrs,\n    update: updateAttrs\n};\n\nfunction updateClass(oldVnode, vnode) {\n    const el = vnode.elm;\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticClass) &&\n        isUndef(data.class) &&\n        (isUndef(oldData) ||\n            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n        return;\n    }\n    let cls = genClassForVnode(vnode);\n    // handle transition classes\n    const transitionClass = el._transitionClasses;\n    if (isDef(transitionClass)) {\n        cls = concat(cls, stringifyClass(transitionClass));\n    }\n    // set the class\n    if (cls !== el._prevClass) {\n        el.setAttribute('class', cls);\n        el._prevClass = cls;\n    }\n}\nvar klass$1 = {\n    create: updateClass,\n    update: updateClass\n};\n\nconst validDivisionCharRE = /[\\w).+\\-_$\\]]/;\nfunction parseFilters(exp) {\n    let inSingle = false;\n    let inDouble = false;\n    let inTemplateString = false;\n    let inRegex = false;\n    let curly = 0;\n    let square = 0;\n    let paren = 0;\n    let lastFilterIndex = 0;\n    let c, prev, i, expression, filters;\n    for (i = 0; i < exp.length; i++) {\n        prev = c;\n        c = exp.charCodeAt(i);\n        if (inSingle) {\n            if (c === 0x27 && prev !== 0x5c)\n                inSingle = false;\n        }\n        else if (inDouble) {\n            if (c === 0x22 && prev !== 0x5c)\n                inDouble = false;\n        }\n        else if (inTemplateString) {\n            if (c === 0x60 && prev !== 0x5c)\n                inTemplateString = false;\n        }\n        else if (inRegex) {\n            if (c === 0x2f && prev !== 0x5c)\n                inRegex = false;\n        }\n        else if (c === 0x7c && // pipe\n            exp.charCodeAt(i + 1) !== 0x7c &&\n            exp.charCodeAt(i - 1) !== 0x7c &&\n            !curly &&\n            !square &&\n            !paren) {\n            if (expression === undefined) {\n                // first filter, end of expression\n                lastFilterIndex = i + 1;\n                expression = exp.slice(0, i).trim();\n            }\n            else {\n                pushFilter();\n            }\n        }\n        else {\n            switch (c) {\n                case 0x22:\n                    inDouble = true;\n                    break; // \"\n                case 0x27:\n                    inSingle = true;\n                    break; // '\n                case 0x60:\n                    inTemplateString = true;\n                    break; // `\n                case 0x28:\n                    paren++;\n                    break; // (\n                case 0x29:\n                    paren--;\n                    break; // )\n                case 0x5b:\n                    square++;\n                    break; // [\n                case 0x5d:\n                    square--;\n                    break; // ]\n                case 0x7b:\n                    curly++;\n                    break; // {\n                case 0x7d:\n                    curly--;\n                    break; // }\n            }\n            if (c === 0x2f) {\n                // /\n                let j = i - 1;\n                let p;\n                // find first non-whitespace prev char\n                for (; j >= 0; j--) {\n                    p = exp.charAt(j);\n                    if (p !== ' ')\n                        break;\n                }\n                if (!p || !validDivisionCharRE.test(p)) {\n                    inRegex = true;\n                }\n            }\n        }\n    }\n    if (expression === undefined) {\n        expression = exp.slice(0, i).trim();\n    }\n    else if (lastFilterIndex !== 0) {\n        pushFilter();\n    }\n    function pushFilter() {\n        (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n        lastFilterIndex = i + 1;\n    }\n    if (filters) {\n        for (i = 0; i < filters.length; i++) {\n            expression = wrapFilter(expression, filters[i]);\n        }\n    }\n    return expression;\n}\nfunction wrapFilter(exp, filter) {\n    const i = filter.indexOf('(');\n    if (i < 0) {\n        // _f: resolveFilter\n        return `_f(\"${filter}\")(${exp})`;\n    }\n    else {\n        const name = filter.slice(0, i);\n        const args = filter.slice(i + 1);\n        return `_f(\"${name}\")(${exp}${args !== ')' ? ',' + args : args}`;\n    }\n}\n\n/* eslint-disable no-unused-vars */\nfunction baseWarn(msg, range) {\n    console.error(`[Vue compiler]: ${msg}`);\n}\n/* eslint-enable no-unused-vars */\nfunction pluckModuleFunction(modules, key) {\n    return modules ? modules.map(m => m[key]).filter(_ => _) : [];\n}\nfunction addProp(el, name, value, range, dynamic) {\n    (el.props || (el.props = [])).push(rangeSetItem({ name, value, dynamic }, range));\n    el.plain = false;\n}\nfunction addAttr(el, name, value, range, dynamic) {\n    const attrs = dynamic\n        ? el.dynamicAttrs || (el.dynamicAttrs = [])\n        : el.attrs || (el.attrs = []);\n    attrs.push(rangeSetItem({ name, value, dynamic }, range));\n    el.plain = false;\n}\n// add a raw attr (use this in preTransforms)\nfunction addRawAttr(el, name, value, range) {\n    el.attrsMap[name] = value;\n    el.attrsList.push(rangeSetItem({ name, value }, range));\n}\nfunction addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {\n    (el.directives || (el.directives = [])).push(rangeSetItem({\n        name,\n        rawName,\n        value,\n        arg,\n        isDynamicArg,\n        modifiers\n    }, range));\n    el.plain = false;\n}\nfunction prependModifierMarker(symbol, name, dynamic) {\n    return dynamic ? `_p(${name},\"${symbol}\")` : symbol + name; // mark the event as captured\n}\nfunction addHandler(el, name, value, modifiers, important, warn, range, dynamic) {\n    modifiers = modifiers || emptyObject;\n    // warn prevent and passive modifier\n    /* istanbul ignore if */\n    if (warn && modifiers.prevent && modifiers.passive) {\n        warn(\"passive and prevent can't be used together. \" +\n            \"Passive handler can't prevent default event.\", range);\n    }\n    // normalize click.right and click.middle since they don't actually fire\n    // this is technically browser-specific, but at least for now browsers are\n    // the only target envs that have right/middle clicks.\n    if (modifiers.right) {\n        if (dynamic) {\n            name = `(${name})==='click'?'contextmenu':(${name})`;\n        }\n        else if (name === 'click') {\n            name = 'contextmenu';\n            delete modifiers.right;\n        }\n    }\n    else if (modifiers.middle) {\n        if (dynamic) {\n            name = `(${name})==='click'?'mouseup':(${name})`;\n        }\n        else if (name === 'click') {\n            name = 'mouseup';\n        }\n    }\n    // check capture modifier\n    if (modifiers.capture) {\n        delete modifiers.capture;\n        name = prependModifierMarker('!', name, dynamic);\n    }\n    if (modifiers.once) {\n        delete modifiers.once;\n        name = prependModifierMarker('~', name, dynamic);\n    }\n    /* istanbul ignore if */\n    if (modifiers.passive) {\n        delete modifiers.passive;\n        name = prependModifierMarker('&', name, dynamic);\n    }\n    let events;\n    if (modifiers.native) {\n        delete modifiers.native;\n        events = el.nativeEvents || (el.nativeEvents = {});\n    }\n    else {\n        events = el.events || (el.events = {});\n    }\n    const newHandler = rangeSetItem({ value: value.trim(), dynamic }, range);\n    if (modifiers !== emptyObject) {\n        newHandler.modifiers = modifiers;\n    }\n    const handlers = events[name];\n    /* istanbul ignore if */\n    if (Array.isArray(handlers)) {\n        important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n    }\n    else if (handlers) {\n        events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n    }\n    else {\n        events[name] = newHandler;\n    }\n    el.plain = false;\n}\nfunction getRawBindingAttr(el, name) {\n    return (el.rawAttrsMap[':' + name] ||\n        el.rawAttrsMap['v-bind:' + name] ||\n        el.rawAttrsMap[name]);\n}\nfunction getBindingAttr(el, name, getStatic) {\n    const dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);\n    if (dynamicValue != null) {\n        return parseFilters(dynamicValue);\n    }\n    else if (getStatic !== false) {\n        const staticValue = getAndRemoveAttr(el, name);\n        if (staticValue != null) {\n            return JSON.stringify(staticValue);\n        }\n    }\n}\n// note: this only removes the attr from the Array (attrsList) so that it\n// doesn't get processed by processAttrs.\n// By default it does NOT remove it from the map (attrsMap) because the map is\n// needed during codegen.\nfunction getAndRemoveAttr(el, name, removeFromMap) {\n    let val;\n    if ((val = el.attrsMap[name]) != null) {\n        const list = el.attrsList;\n        for (let i = 0, l = list.length; i < l; i++) {\n            if (list[i].name === name) {\n                list.splice(i, 1);\n                break;\n            }\n        }\n    }\n    if (removeFromMap) {\n        delete el.attrsMap[name];\n    }\n    return val;\n}\nfunction getAndRemoveAttrByRegex(el, name) {\n    const list = el.attrsList;\n    for (let i = 0, l = list.length; i < l; i++) {\n        const attr = list[i];\n        if (name.test(attr.name)) {\n            list.splice(i, 1);\n            return attr;\n        }\n    }\n}\nfunction rangeSetItem(item, range) {\n    if (range) {\n        if (range.start != null) {\n            item.start = range.start;\n        }\n        if (range.end != null) {\n            item.end = range.end;\n        }\n    }\n    return item;\n}\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel(el, value, modifiers) {\n    const { number, trim } = modifiers || {};\n    const baseValueExpression = '$$v';\n    let valueExpression = baseValueExpression;\n    if (trim) {\n        valueExpression =\n            `(typeof ${baseValueExpression} === 'string'` +\n                `? ${baseValueExpression}.trim()` +\n                `: ${baseValueExpression})`;\n    }\n    if (number) {\n        valueExpression = `_n(${valueExpression})`;\n    }\n    const assignment = genAssignmentCode(value, valueExpression);\n    el.model = {\n        value: `(${value})`,\n        expression: JSON.stringify(value),\n        callback: `function (${baseValueExpression}) {${assignment}}`\n    };\n}\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode(value, assignment) {\n    const res = parseModel(value);\n    if (res.key === null) {\n        return `${value}=${assignment}`;\n    }\n    else {\n        return `$set(${res.exp}, ${res.key}, ${assignment})`;\n    }\n}\n/**\n * Parse a v-model expression into a base path and a final key segment.\n * Handles both dot-path and possible square brackets.\n *\n * Possible cases:\n *\n * - test\n * - test[key]\n * - test[test1[key]]\n * - test[\"a\"][key]\n * - xxx.test[a[a].test1[key]]\n * - test.xxx.a[\"asa\"][test1[key]]\n *\n */\nlet len, str, chr, index, expressionPos, expressionEndPos;\nfunction parseModel(val) {\n    // Fix https://github.com/vuejs/vue/pull/7730\n    // allow v-model=\"obj.val \" (trailing whitespace)\n    val = val.trim();\n    len = val.length;\n    if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n        index = val.lastIndexOf('.');\n        if (index > -1) {\n            return {\n                exp: val.slice(0, index),\n                key: '\"' + val.slice(index + 1) + '\"'\n            };\n        }\n        else {\n            return {\n                exp: val,\n                key: null\n            };\n        }\n    }\n    str = val;\n    index = expressionPos = expressionEndPos = 0;\n    while (!eof()) {\n        chr = next();\n        /* istanbul ignore if */\n        if (isStringStart(chr)) {\n            parseString(chr);\n        }\n        else if (chr === 0x5b) {\n            parseBracket(chr);\n        }\n    }\n    return {\n        exp: val.slice(0, expressionPos),\n        key: val.slice(expressionPos + 1, expressionEndPos)\n    };\n}\nfunction next() {\n    return str.charCodeAt(++index);\n}\nfunction eof() {\n    return index >= len;\n}\nfunction isStringStart(chr) {\n    return chr === 0x22 || chr === 0x27;\n}\nfunction parseBracket(chr) {\n    let inBracket = 1;\n    expressionPos = index;\n    while (!eof()) {\n        chr = next();\n        if (isStringStart(chr)) {\n            parseString(chr);\n            continue;\n        }\n        if (chr === 0x5b)\n            inBracket++;\n        if (chr === 0x5d)\n            inBracket--;\n        if (inBracket === 0) {\n            expressionEndPos = index;\n            break;\n        }\n    }\n}\nfunction parseString(chr) {\n    const stringQuote = chr;\n    while (!eof()) {\n        chr = next();\n        if (chr === stringQuote) {\n            break;\n        }\n    }\n}\n\nlet warn$1;\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nconst RANGE_TOKEN = '__r';\nconst CHECKBOX_RADIO_TOKEN = '__c';\nfunction model$1(el, dir, _warn) {\n    warn$1 = _warn;\n    const value = dir.value;\n    const modifiers = dir.modifiers;\n    const tag = el.tag;\n    const type = el.attrsMap.type;\n    {\n        // inputs with type=\"file\" are read only and setting the input's\n        // value will throw an error.\n        if (tag === 'input' && type === 'file') {\n            warn$1(`<${el.tag} v-model=\"${value}\" type=\"file\">:\\n` +\n                `File inputs are read only. Use a v-on:change listener instead.`, el.rawAttrsMap['v-model']);\n        }\n    }\n    if (el.component) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else if (tag === 'select') {\n        genSelect(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'checkbox') {\n        genCheckboxModel(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'radio') {\n        genRadioModel(el, value, modifiers);\n    }\n    else if (tag === 'input' || tag === 'textarea') {\n        genDefaultModel(el, value, modifiers);\n    }\n    else if (!config.isReservedTag(tag)) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else {\n        warn$1(`<${el.tag} v-model=\"${value}\">: ` +\n            `v-model is not supported on this element type. ` +\n            \"If you are working with contenteditable, it's recommended to \" +\n            'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);\n    }\n    // ensure runtime directive metadata\n    return true;\n}\nfunction genCheckboxModel(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    const valueBinding = getBindingAttr(el, 'value') || 'null';\n    const trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n    const falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n    addProp(el, 'checked', `Array.isArray(${value})` +\n        `?_i(${value},${valueBinding})>-1` +\n        (trueValueBinding === 'true'\n            ? `:(${value})`\n            : `:_q(${value},${trueValueBinding})`));\n    addHandler(el, 'change', `var $$a=${value},` +\n        '$$el=$event.target,' +\n        `$$c=$$el.checked?(${trueValueBinding}):(${falseValueBinding});` +\n        'if(Array.isArray($$a)){' +\n        `var $$v=${number ? '_n(' + valueBinding + ')' : valueBinding},` +\n        '$$i=_i($$a,$$v);' +\n        `if($$el.checked){$$i<0&&(${genAssignmentCode(value, '$$a.concat([$$v])')})}` +\n        `else{$$i>-1&&(${genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')})}` +\n        `}else{${genAssignmentCode(value, '$$c')}}`, null, true);\n}\nfunction genRadioModel(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    let valueBinding = getBindingAttr(el, 'value') || 'null';\n    valueBinding = number ? `_n(${valueBinding})` : valueBinding;\n    addProp(el, 'checked', `_q(${value},${valueBinding})`);\n    addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\n}\nfunction genSelect(el, value, modifiers) {\n    const number = modifiers && modifiers.number;\n    const selectedVal = `Array.prototype.filter` +\n        `.call($event.target.options,function(o){return o.selected})` +\n        `.map(function(o){var val = \"_value\" in o ? o._value : o.value;` +\n        `return ${number ? '_n(val)' : 'val'}})`;\n    const assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n    let code = `var $$selectedVal = ${selectedVal};`;\n    code = `${code} ${genAssignmentCode(value, assignment)}`;\n    addHandler(el, 'change', code, null, true);\n}\nfunction genDefaultModel(el, value, modifiers) {\n    const type = el.attrsMap.type;\n    // warn if v-bind:value conflicts with v-model\n    // except for inputs with v-bind:type\n    {\n        const value = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];\n        const typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n        if (value && !typeBinding) {\n            const binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';\n            warn$1(`${binding}=\"${value}\" conflicts with v-model on the same element ` +\n                'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);\n        }\n    }\n    const { lazy, number, trim } = modifiers || {};\n    const needCompositionGuard = !lazy && type !== 'range';\n    const event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';\n    let valueExpression = '$event.target.value';\n    if (trim) {\n        valueExpression = `$event.target.value.trim()`;\n    }\n    if (number) {\n        valueExpression = `_n(${valueExpression})`;\n    }\n    let code = genAssignmentCode(value, valueExpression);\n    if (needCompositionGuard) {\n        code = `if($event.target.composing)return;${code}`;\n    }\n    addProp(el, 'value', `(${value})`);\n    addHandler(el, event, code, null, true);\n    if (trim || number) {\n        addHandler(el, 'blur', '$forceUpdate()');\n    }\n}\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents(on) {\n    /* istanbul ignore if */\n    if (isDef(on[RANGE_TOKEN])) {\n        // IE input[type=range] only supports `change` event\n        const event = isIE ? 'change' : 'input';\n        on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n        delete on[RANGE_TOKEN];\n    }\n    // This was originally intended to fix #4521 but no longer necessary\n    // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n    /* istanbul ignore if */\n    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n        delete on[CHECKBOX_RADIO_TOKEN];\n    }\n}\nlet target;\nfunction createOnceHandler(event, handler, capture) {\n    const _target = target; // save current target element in closure\n    return function onceHandler() {\n        const res = handler.apply(null, arguments);\n        if (res !== null) {\n            remove(event, onceHandler, capture, _target);\n        }\n    };\n}\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nconst useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\nfunction add(name, handler, capture, passive) {\n    // async edge case #6566: inner click event triggers patch, event handler\n    // attached to outer element during patch, and triggered again. This\n    // happens because browsers fire microtask ticks between event propagation.\n    // the solution is simple: we save the timestamp when a handler is attached,\n    // and the handler would only fire if the event passed to it was fired\n    // AFTER it was attached.\n    if (useMicrotaskFix) {\n        const attachedTimestamp = currentFlushTimestamp;\n        const original = handler;\n        //@ts-expect-error\n        handler = original._wrapper = function (e) {\n            if (\n            // no bubbling, should always fire.\n            // this is just a safety net in case event.timeStamp is unreliable in\n            // certain weird environments...\n            e.target === e.currentTarget ||\n                // event is fired after handler attachment\n                e.timeStamp >= attachedTimestamp ||\n                // bail for environments that have buggy event.timeStamp implementations\n                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                // #9681 QtWebEngine event.timeStamp is negative value\n                e.timeStamp <= 0 ||\n                // #9448 bail if event is fired in another document in a multi-page\n                // electron/nw.js app, since event.timeStamp will be using a different\n                // starting reference\n                e.target.ownerDocument !== document) {\n                return original.apply(this, arguments);\n            }\n        };\n    }\n    target.addEventListener(name, handler, supportsPassive ? { capture, passive } : capture);\n}\nfunction remove(name, handler, capture, _target) {\n    (_target || target).removeEventListener(name, \n    //@ts-expect-error\n    handler._wrapper || handler, capture);\n}\nfunction updateDOMListeners(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n        return;\n    }\n    const on = vnode.data.on || {};\n    const oldOn = oldVnode.data.on || {};\n    // vnode is empty when removing all listeners,\n    // and use old vnode dom element\n    target = vnode.elm || oldVnode.elm;\n    normalizeEvents(on);\n    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n    target = undefined;\n}\nvar events = {\n    create: updateDOMListeners,\n    update: updateDOMListeners,\n    // @ts-expect-error emptyNode has actually data\n    destroy: (vnode) => updateDOMListeners(vnode, emptyNode)\n};\n\nlet svgContainer;\nfunction updateDOMProps(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n        return;\n    }\n    let key, cur;\n    const elm = vnode.elm;\n    const oldProps = oldVnode.data.domProps || {};\n    let props = vnode.data.domProps || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n        props = vnode.data.domProps = extend({}, props);\n    }\n    for (key in oldProps) {\n        if (!(key in props)) {\n            elm[key] = '';\n        }\n    }\n    for (key in props) {\n        cur = props[key];\n        // ignore children if the node has textContent or innerHTML,\n        // as these will throw away existing DOM nodes and cause removal errors\n        // on subsequent patches (#3360)\n        if (key === 'textContent' || key === 'innerHTML') {\n            if (vnode.children)\n                vnode.children.length = 0;\n            if (cur === oldProps[key])\n                continue;\n            // #6601 work around Chrome version <= 55 bug where single textNode\n            // replaced by innerHTML/textContent retains its parentNode property\n            if (elm.childNodes.length === 1) {\n                elm.removeChild(elm.childNodes[0]);\n            }\n        }\n        if (key === 'value' && elm.tagName !== 'PROGRESS') {\n            // store value as _value as well since\n            // non-string values will be stringified\n            elm._value = cur;\n            // avoid resetting cursor position when value is the same\n            const strCur = isUndef(cur) ? '' : String(cur);\n            if (shouldUpdateValue(elm, strCur)) {\n                elm.value = strCur;\n            }\n        }\n        else if (key === 'innerHTML' &&\n            isSVG(elm.tagName) &&\n            isUndef(elm.innerHTML)) {\n            // IE doesn't support innerHTML for SVG elements\n            svgContainer = svgContainer || document.createElement('div');\n            svgContainer.innerHTML = `<svg>${cur}</svg>`;\n            const svg = svgContainer.firstChild;\n            while (elm.firstChild) {\n                elm.removeChild(elm.firstChild);\n            }\n            while (svg.firstChild) {\n                elm.appendChild(svg.firstChild);\n            }\n        }\n        else if (\n        // skip the update if old and new VDOM state is the same.\n        // `value` is handled separately because the DOM value may be temporarily\n        // out of sync with VDOM state due to focus, composition and modifiers.\n        // This  #4521 by skipping the unnecessary `checked` update.\n        cur !== oldProps[key]) {\n            // some property updates can throw\n            // e.g. `value` on <progress> w/ non-finite value\n            try {\n                elm[key] = cur;\n            }\n            catch (e) { }\n        }\n    }\n}\nfunction shouldUpdateValue(elm, checkVal) {\n    return (\n    //@ts-expect-error\n    !elm.composing &&\n        (elm.tagName === 'OPTION' ||\n            isNotInFocusAndDirty(elm, checkVal) ||\n            isDirtyWithModifiers(elm, checkVal)));\n}\nfunction isNotInFocusAndDirty(elm, checkVal) {\n    // return true when textbox (.number and .trim) loses focus and its value is\n    // not equal to the updated value\n    let notInFocus = true;\n    // #6157\n    // work around IE bug when accessing document.activeElement in an iframe\n    try {\n        notInFocus = document.activeElement !== elm;\n    }\n    catch (e) { }\n    return notInFocus && elm.value !== checkVal;\n}\nfunction isDirtyWithModifiers(elm, newVal) {\n    const value = elm.value;\n    const modifiers = elm._vModifiers; // injected by v-model runtime\n    if (isDef(modifiers)) {\n        if (modifiers.number) {\n            return toNumber(value) !== toNumber(newVal);\n        }\n        if (modifiers.trim) {\n            return value.trim() !== newVal.trim();\n        }\n    }\n    return value !== newVal;\n}\nvar domProps = {\n    create: updateDOMProps,\n    update: updateDOMProps\n};\n\nconst parseStyleText = cached(function (cssText) {\n    const res = {};\n    const listDelimiter = /;(?![^(]*\\))/g;\n    const propertyDelimiter = /:(.+)/;\n    cssText.split(listDelimiter).forEach(function (item) {\n        if (item) {\n            const tmp = item.split(propertyDelimiter);\n            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n        }\n    });\n    return res;\n});\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData(data) {\n    const style = normalizeStyleBinding(data.style);\n    // static style is pre-processed into an object during compilation\n    // and is always a fresh object, so it's safe to merge into it\n    return data.staticStyle ? extend(data.staticStyle, style) : style;\n}\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding(bindingStyle) {\n    if (Array.isArray(bindingStyle)) {\n        return toObject(bindingStyle);\n    }\n    if (typeof bindingStyle === 'string') {\n        return parseStyleText(bindingStyle);\n    }\n    return bindingStyle;\n}\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle(vnode, checkChild) {\n    const res = {};\n    let styleData;\n    if (checkChild) {\n        let childNode = vnode;\n        while (childNode.componentInstance) {\n            childNode = childNode.componentInstance._vnode;\n            if (childNode &&\n                childNode.data &&\n                (styleData = normalizeStyleData(childNode.data))) {\n                extend(res, styleData);\n            }\n        }\n    }\n    if ((styleData = normalizeStyleData(vnode.data))) {\n        extend(res, styleData);\n    }\n    let parentNode = vnode;\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while ((parentNode = parentNode.parent)) {\n        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n            extend(res, styleData);\n        }\n    }\n    return res;\n}\n\nconst cssVarRE = /^--/;\nconst importantRE = /\\s*!important$/;\nconst setProp = (el, name, val) => {\n    /* istanbul ignore if */\n    if (cssVarRE.test(name)) {\n        el.style.setProperty(name, val);\n    }\n    else if (importantRE.test(val)) {\n        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n    }\n    else {\n        const normalizedName = normalize(name);\n        if (Array.isArray(val)) {\n            // Support values array created by autoprefixer, e.g.\n            // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n            // Set them one by one, and the browser will only set those it can recognize\n            for (let i = 0, len = val.length; i < len; i++) {\n                el.style[normalizedName] = val[i];\n            }\n        }\n        else {\n            el.style[normalizedName] = val;\n        }\n    }\n};\nconst vendorNames = ['Webkit', 'Moz', 'ms'];\nlet emptyStyle;\nconst normalize = cached(function (prop) {\n    emptyStyle = emptyStyle || document.createElement('div').style;\n    prop = camelize(prop);\n    if (prop !== 'filter' && prop in emptyStyle) {\n        return prop;\n    }\n    const capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n    for (let i = 0; i < vendorNames.length; i++) {\n        const name = vendorNames[i] + capName;\n        if (name in emptyStyle) {\n            return name;\n        }\n    }\n});\nfunction updateStyle(oldVnode, vnode) {\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticStyle) &&\n        isUndef(data.style) &&\n        isUndef(oldData.staticStyle) &&\n        isUndef(oldData.style)) {\n        return;\n    }\n    let cur, name;\n    const el = vnode.elm;\n    const oldStaticStyle = oldData.staticStyle;\n    const oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n    // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n    const oldStyle = oldStaticStyle || oldStyleBinding;\n    const style = normalizeStyleBinding(vnode.data.style) || {};\n    // store normalized style under a different key for next diff\n    // make sure to clone it if it's reactive, since the user likely wants\n    // to mutate it.\n    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n    const newStyle = getStyle(vnode, true);\n    for (name in oldStyle) {\n        if (isUndef(newStyle[name])) {\n            setProp(el, name, '');\n        }\n    }\n    for (name in newStyle) {\n        cur = newStyle[name];\n        // ie9 setting to null has no effect, must use empty string\n        setProp(el, name, cur == null ? '' : cur);\n    }\n}\nvar style$1 = {\n    create: updateStyle,\n    update: updateStyle\n};\n\nconst whitespaceRE$1 = /\\s+/;\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(c => el.classList.add(c));\n        }\n        else {\n            el.classList.add(cls);\n        }\n    }\n    else {\n        const cur = ` ${el.getAttribute('class') || ''} `;\n        if (cur.indexOf(' ' + cls + ' ') < 0) {\n            el.setAttribute('class', (cur + cls).trim());\n        }\n    }\n}\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(c => el.classList.remove(c));\n        }\n        else {\n            el.classList.remove(cls);\n        }\n        if (!el.classList.length) {\n            el.removeAttribute('class');\n        }\n    }\n    else {\n        let cur = ` ${el.getAttribute('class') || ''} `;\n        const tar = ' ' + cls + ' ';\n        while (cur.indexOf(tar) >= 0) {\n            cur = cur.replace(tar, ' ');\n        }\n        cur = cur.trim();\n        if (cur) {\n            el.setAttribute('class', cur);\n        }\n        else {\n            el.removeAttribute('class');\n        }\n    }\n}\n\nfunction resolveTransition(def) {\n    if (!def) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (typeof def === 'object') {\n        const res = {};\n        if (def.css !== false) {\n            extend(res, autoCssTransition(def.name || 'v'));\n        }\n        extend(res, def);\n        return res;\n    }\n    else if (typeof def === 'string') {\n        return autoCssTransition(def);\n    }\n}\nconst autoCssTransition = cached(name => {\n    return {\n        enterClass: `${name}-enter`,\n        enterToClass: `${name}-enter-to`,\n        enterActiveClass: `${name}-enter-active`,\n        leaveClass: `${name}-leave`,\n        leaveToClass: `${name}-leave-to`,\n        leaveActiveClass: `${name}-leave-active`\n    };\n});\nconst hasTransition = inBrowser && !isIE9;\nconst TRANSITION = 'transition';\nconst ANIMATION = 'animation';\n// Transition property/event sniffing\nlet transitionProp = 'transition';\nlet transitionEndEvent = 'transitionend';\nlet animationProp = 'animation';\nlet animationEndEvent = 'animationend';\nif (hasTransition) {\n    /* istanbul ignore if */\n    if (window.ontransitionend === undefined &&\n        window.onwebkittransitionend !== undefined) {\n        transitionProp = 'WebkitTransition';\n        transitionEndEvent = 'webkitTransitionEnd';\n    }\n    if (window.onanimationend === undefined &&\n        window.onwebkitanimationend !== undefined) {\n        animationProp = 'WebkitAnimation';\n        animationEndEvent = 'webkitAnimationEnd';\n    }\n}\n// binding to window is necessary to make hot reload work in IE in strict mode\nconst raf = inBrowser\n    ? window.requestAnimationFrame\n        ? window.requestAnimationFrame.bind(window)\n        : setTimeout\n    : /* istanbul ignore next */ /* istanbul ignore next */ fn => fn();\nfunction nextFrame(fn) {\n    raf(() => {\n        // @ts-expect-error\n        raf(fn);\n    });\n}\nfunction addTransitionClass(el, cls) {\n    const transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n    if (transitionClasses.indexOf(cls) < 0) {\n        transitionClasses.push(cls);\n        addClass(el, cls);\n    }\n}\nfunction removeTransitionClass(el, cls) {\n    if (el._transitionClasses) {\n        remove$2(el._transitionClasses, cls);\n    }\n    removeClass(el, cls);\n}\nfunction whenTransitionEnds(el, expectedType, cb) {\n    const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n    if (!type)\n        return cb();\n    const event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n    let ended = 0;\n    const end = () => {\n        el.removeEventListener(event, onEnd);\n        cb();\n    };\n    const onEnd = e => {\n        if (e.target === el) {\n            if (++ended >= propCount) {\n                end();\n            }\n        }\n    };\n    setTimeout(() => {\n        if (ended < propCount) {\n            end();\n        }\n    }, timeout + 1);\n    el.addEventListener(event, onEnd);\n}\nconst transformRE = /\\b(transform|all)(,|$)/;\nfunction getTransitionInfo(el, expectedType) {\n    const styles = window.getComputedStyle(el);\n    // JSDOM may return undefined for transition properties\n    const transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n    const transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n    const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n    const animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n    const animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n    const animationTimeout = getTimeout(animationDelays, animationDurations);\n    let type;\n    let timeout = 0;\n    let propCount = 0;\n    /* istanbul ignore if */\n    if (expectedType === TRANSITION) {\n        if (transitionTimeout > 0) {\n            type = TRANSITION;\n            timeout = transitionTimeout;\n            propCount = transitionDurations.length;\n        }\n    }\n    else if (expectedType === ANIMATION) {\n        if (animationTimeout > 0) {\n            type = ANIMATION;\n            timeout = animationTimeout;\n            propCount = animationDurations.length;\n        }\n    }\n    else {\n        timeout = Math.max(transitionTimeout, animationTimeout);\n        type =\n            timeout > 0\n                ? transitionTimeout > animationTimeout\n                    ? TRANSITION\n                    : ANIMATION\n                : null;\n        propCount = type\n            ? type === TRANSITION\n                ? transitionDurations.length\n                : animationDurations.length\n            : 0;\n    }\n    const hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n    return {\n        type,\n        timeout,\n        propCount,\n        hasTransform\n    };\n}\nfunction getTimeout(delays, durations) {\n    /* istanbul ignore next */\n    while (delays.length < durations.length) {\n        delays = delays.concat(delays);\n    }\n    return Math.max.apply(null, durations.map((d, i) => {\n        return toMs(d) + toMs(delays[i]);\n    }));\n}\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs(s) {\n    return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n}\n\nfunction enter(vnode, toggleDisplay) {\n    const el = vnode.elm;\n    // call leave callback now\n    if (isDef(el._leaveCb)) {\n        el._leaveCb.cancelled = true;\n        el._leaveCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data)) {\n        return;\n    }\n    /* istanbul ignore if */\n    if (isDef(el._enterCb) || el.nodeType !== 1) {\n        return;\n    }\n    const { css, type, enterClass, enterToClass, enterActiveClass, appearClass, appearToClass, appearActiveClass, beforeEnter, enter, afterEnter, enterCancelled, beforeAppear, appear, afterAppear, appearCancelled, duration } = data;\n    // activeInstance will always be the <transition> component managing this\n    // transition. One edge case to check is when the <transition> is placed\n    // as the root node of a child component. In that case we need to check\n    // <transition>'s parent for appear check.\n    let context = activeInstance;\n    let transitionNode = activeInstance.$vnode;\n    while (transitionNode && transitionNode.parent) {\n        context = transitionNode.context;\n        transitionNode = transitionNode.parent;\n    }\n    const isAppear = !context._isMounted || !vnode.isRootInsert;\n    if (isAppear && !appear && appear !== '') {\n        return;\n    }\n    const startClass = isAppear && appearClass ? appearClass : enterClass;\n    const activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n    const toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n    const beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n    const enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n    const afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n    const enterCancelledHook = isAppear\n        ? appearCancelled || enterCancelled\n        : enterCancelled;\n    const explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n    if (explicitEnterDuration != null) {\n        checkDuration(explicitEnterDuration, 'enter', vnode);\n    }\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(enterHook);\n    const cb = (el._enterCb = once(() => {\n        if (expectsCSS) {\n            removeTransitionClass(el, toClass);\n            removeTransitionClass(el, activeClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, startClass);\n            }\n            enterCancelledHook && enterCancelledHook(el);\n        }\n        else {\n            afterEnterHook && afterEnterHook(el);\n        }\n        el._enterCb = null;\n    }));\n    if (!vnode.data.show) {\n        // remove pending leave element on enter by injecting an insert hook\n        mergeVNodeHook(vnode, 'insert', () => {\n            const parent = el.parentNode;\n            const pendingNode = parent && parent._pending && parent._pending[vnode.key];\n            if (pendingNode &&\n                pendingNode.tag === vnode.tag &&\n                pendingNode.elm._leaveCb) {\n                pendingNode.elm._leaveCb();\n            }\n            enterHook && enterHook(el, cb);\n        });\n    }\n    // start enter transition\n    beforeEnterHook && beforeEnterHook(el);\n    if (expectsCSS) {\n        addTransitionClass(el, startClass);\n        addTransitionClass(el, activeClass);\n        nextFrame(() => {\n            removeTransitionClass(el, startClass);\n            // @ts-expect-error\n            if (!cb.cancelled) {\n                addTransitionClass(el, toClass);\n                if (!userWantsControl) {\n                    if (isValidDuration(explicitEnterDuration)) {\n                        setTimeout(cb, explicitEnterDuration);\n                    }\n                    else {\n                        whenTransitionEnds(el, type, cb);\n                    }\n                }\n            }\n        });\n    }\n    if (vnode.data.show) {\n        toggleDisplay && toggleDisplay();\n        enterHook && enterHook(el, cb);\n    }\n    if (!expectsCSS && !userWantsControl) {\n        cb();\n    }\n}\nfunction leave(vnode, rm) {\n    const el = vnode.elm;\n    // call enter callback now\n    if (isDef(el._enterCb)) {\n        el._enterCb.cancelled = true;\n        el._enterCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data) || el.nodeType !== 1) {\n        return rm();\n    }\n    /* istanbul ignore if */\n    if (isDef(el._leaveCb)) {\n        return;\n    }\n    const { css, type, leaveClass, leaveToClass, leaveActiveClass, beforeLeave, leave, afterLeave, leaveCancelled, delayLeave, duration } = data;\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(leave);\n    const explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n    if (isDef(explicitLeaveDuration)) {\n        checkDuration(explicitLeaveDuration, 'leave', vnode);\n    }\n    const cb = (el._leaveCb = once(() => {\n        if (el.parentNode && el.parentNode._pending) {\n            el.parentNode._pending[vnode.key] = null;\n        }\n        if (expectsCSS) {\n            removeTransitionClass(el, leaveToClass);\n            removeTransitionClass(el, leaveActiveClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, leaveClass);\n            }\n            leaveCancelled && leaveCancelled(el);\n        }\n        else {\n            rm();\n            afterLeave && afterLeave(el);\n        }\n        el._leaveCb = null;\n    }));\n    if (delayLeave) {\n        delayLeave(performLeave);\n    }\n    else {\n        performLeave();\n    }\n    function performLeave() {\n        // the delayed leave may have already been cancelled\n        // @ts-expect-error\n        if (cb.cancelled) {\n            return;\n        }\n        // record leaving element\n        if (!vnode.data.show && el.parentNode) {\n            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                vnode;\n        }\n        beforeLeave && beforeLeave(el);\n        if (expectsCSS) {\n            addTransitionClass(el, leaveClass);\n            addTransitionClass(el, leaveActiveClass);\n            nextFrame(() => {\n                removeTransitionClass(el, leaveClass);\n                // @ts-expect-error\n                if (!cb.cancelled) {\n                    addTransitionClass(el, leaveToClass);\n                    if (!userWantsControl) {\n                        if (isValidDuration(explicitLeaveDuration)) {\n                            setTimeout(cb, explicitLeaveDuration);\n                        }\n                        else {\n                            whenTransitionEnds(el, type, cb);\n                        }\n                    }\n                }\n            });\n        }\n        leave && leave(el, cb);\n        if (!expectsCSS && !userWantsControl) {\n            cb();\n        }\n    }\n}\n// only used in dev mode\nfunction checkDuration(val, name, vnode) {\n    if (typeof val !== 'number') {\n        warn$2(`<transition> explicit ${name} duration is not a valid number - ` +\n            `got ${JSON.stringify(val)}.`, vnode.context);\n    }\n    else if (isNaN(val)) {\n        warn$2(`<transition> explicit ${name} duration is NaN - ` +\n            'the duration expression might be incorrect.', vnode.context);\n    }\n}\nfunction isValidDuration(val) {\n    return typeof val === 'number' && !isNaN(val);\n}\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength(fn) {\n    if (isUndef(fn)) {\n        return false;\n    }\n    // @ts-expect-error\n    const invokerFns = fn.fns;\n    if (isDef(invokerFns)) {\n        // invoker\n        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n    }\n    else {\n        // @ts-expect-error\n        return (fn._length || fn.length) > 1;\n    }\n}\nfunction _enter(_, vnode) {\n    if (vnode.data.show !== true) {\n        enter(vnode);\n    }\n}\nvar transition = inBrowser\n    ? {\n        create: _enter,\n        activate: _enter,\n        remove(vnode, rm) {\n            /* istanbul ignore else */\n            if (vnode.data.show !== true) {\n                // @ts-expect-error\n                leave(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n    }\n    : {};\n\nvar platformModules = [attrs, klass$1, events, domProps, style$1, transition];\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nconst modules$1 = platformModules.concat(baseModules);\nconst patch = createPatchFunction({ nodeOps, modules: modules$1 });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n/* istanbul ignore if */\nif (isIE9) {\n    // http://www.matts411.com/post/internet-explorer-9-oninput/\n    document.addEventListener('selectionchange', () => {\n        const el = document.activeElement;\n        // @ts-expect-error\n        if (el && el.vmodel) {\n            trigger(el, 'input');\n        }\n    });\n}\nconst directive = {\n    inserted(el, binding, vnode, oldVnode) {\n        if (vnode.tag === 'select') {\n            // #6903\n            if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                mergeVNodeHook(vnode, 'postpatch', () => {\n                    directive.componentUpdated(el, binding, vnode);\n                });\n            }\n            else {\n                setSelected(el, binding, vnode.context);\n            }\n            el._vOptions = [].map.call(el.options, getValue);\n        }\n        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n            el._vModifiers = binding.modifiers;\n            if (!binding.modifiers.lazy) {\n                el.addEventListener('compositionstart', onCompositionStart);\n                el.addEventListener('compositionend', onCompositionEnd);\n                // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                // switching focus before confirming composition choice\n                // this also fixes the issue where some browsers e.g. iOS Chrome\n                // fires \"change\" instead of \"input\" on autocomplete.\n                el.addEventListener('change', onCompositionEnd);\n                /* istanbul ignore if */\n                if (isIE9) {\n                    el.vmodel = true;\n                }\n            }\n        }\n    },\n    componentUpdated(el, binding, vnode) {\n        if (vnode.tag === 'select') {\n            setSelected(el, binding, vnode.context);\n            // in case the options rendered by v-for have changed,\n            // it's possible that the value is out-of-sync with the rendered options.\n            // detect such cases and filter out values that no longer has a matching\n            // option in the DOM.\n            const prevOptions = el._vOptions;\n            const curOptions = (el._vOptions = [].map.call(el.options, getValue));\n            if (curOptions.some((o, i) => !looseEqual(o, prevOptions[i]))) {\n                // trigger change event if\n                // no matching option found for at least one value\n                const needReset = el.multiple\n                    ? binding.value.some(v => hasNoMatchingOption(v, curOptions))\n                    : binding.value !== binding.oldValue &&\n                        hasNoMatchingOption(binding.value, curOptions);\n                if (needReset) {\n                    trigger(el, 'change');\n                }\n            }\n        }\n    }\n};\nfunction setSelected(el, binding, vm) {\n    actuallySetSelected(el, binding, vm);\n    /* istanbul ignore if */\n    if (isIE || isEdge) {\n        setTimeout(() => {\n            actuallySetSelected(el, binding, vm);\n        }, 0);\n    }\n}\nfunction actuallySetSelected(el, binding, vm) {\n    const value = binding.value;\n    const isMultiple = el.multiple;\n    if (isMultiple && !Array.isArray(value)) {\n        warn$2(`<select multiple v-model=\"${binding.expression}\"> ` +\n                `expects an Array value for its binding, but got ${Object.prototype.toString\n                    .call(value)\n                    .slice(8, -1)}`, vm);\n        return;\n    }\n    let selected, option;\n    for (let i = 0, l = el.options.length; i < l; i++) {\n        option = el.options[i];\n        if (isMultiple) {\n            selected = looseIndexOf(value, getValue(option)) > -1;\n            if (option.selected !== selected) {\n                option.selected = selected;\n            }\n        }\n        else {\n            if (looseEqual(getValue(option), value)) {\n                if (el.selectedIndex !== i) {\n                    el.selectedIndex = i;\n                }\n                return;\n            }\n        }\n    }\n    if (!isMultiple) {\n        el.selectedIndex = -1;\n    }\n}\nfunction hasNoMatchingOption(value, options) {\n    return options.every(o => !looseEqual(o, value));\n}\nfunction getValue(option) {\n    return '_value' in option ? option._value : option.value;\n}\nfunction onCompositionStart(e) {\n    e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n    // prevent triggering an input event for no reason\n    if (!e.target.composing)\n        return;\n    e.target.composing = false;\n    trigger(e.target, 'input');\n}\nfunction trigger(el, type) {\n    const e = document.createEvent('HTMLEvents');\n    e.initEvent(type, true, true);\n    el.dispatchEvent(e);\n}\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode(vnode) {\n    // @ts-expect-error\n    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n        ? locateNode(vnode.componentInstance._vnode)\n        : vnode;\n}\nvar show = {\n    bind(el, { value }, vnode) {\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        const originalDisplay = (el.__vOriginalDisplay =\n            el.style.display === 'none' ? '' : el.style.display);\n        if (value && transition) {\n            vnode.data.show = true;\n            enter(vnode, () => {\n                el.style.display = originalDisplay;\n            });\n        }\n        else {\n            el.style.display = value ? originalDisplay : 'none';\n        }\n    },\n    update(el, { value, oldValue }, vnode) {\n        /* istanbul ignore if */\n        if (!value === !oldValue)\n            return;\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        if (transition) {\n            vnode.data.show = true;\n            if (value) {\n                enter(vnode, () => {\n                    el.style.display = el.__vOriginalDisplay;\n                });\n            }\n            else {\n                leave(vnode, () => {\n                    el.style.display = 'none';\n                });\n            }\n        }\n        else {\n            el.style.display = value ? el.__vOriginalDisplay : 'none';\n        }\n    },\n    unbind(el, binding, vnode, oldVnode, isDestroy) {\n        if (!isDestroy) {\n            el.style.display = el.__vOriginalDisplay;\n        }\n    }\n};\n\nvar platformDirectives = {\n    model: directive,\n    show\n};\n\n// Provides transition support for a single element/component.\nconst transitionProps = {\n    name: String,\n    appear: Boolean,\n    css: Boolean,\n    mode: String,\n    type: String,\n    enterClass: String,\n    leaveClass: String,\n    enterToClass: String,\n    leaveToClass: String,\n    enterActiveClass: String,\n    leaveActiveClass: String,\n    appearClass: String,\n    appearActiveClass: String,\n    appearToClass: String,\n    duration: [Number, String, Object]\n};\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild(vnode) {\n    const compOptions = vnode && vnode.componentOptions;\n    if (compOptions && compOptions.Ctor.options.abstract) {\n        return getRealChild(getFirstComponentChild(compOptions.children));\n    }\n    else {\n        return vnode;\n    }\n}\nfunction extractTransitionData(comp) {\n    const data = {};\n    const options = comp.$options;\n    // props\n    for (const key in options.propsData) {\n        data[key] = comp[key];\n    }\n    // events.\n    // extract listeners and pass them directly to the transition methods\n    const listeners = options._parentListeners;\n    for (const key in listeners) {\n        data[camelize(key)] = listeners[key];\n    }\n    return data;\n}\nfunction placeholder(h, rawChild) {\n    // @ts-expect-error\n    if (/\\d-keep-alive$/.test(rawChild.tag)) {\n        return h('keep-alive', {\n            props: rawChild.componentOptions.propsData\n        });\n    }\n}\nfunction hasParentTransition(vnode) {\n    while ((vnode = vnode.parent)) {\n        if (vnode.data.transition) {\n            return true;\n        }\n    }\n}\nfunction isSameChild(child, oldChild) {\n    return oldChild.key === child.key && oldChild.tag === child.tag;\n}\nconst isNotTextNode = (c) => c.tag || isAsyncPlaceholder(c);\nconst isVShowDirective = d => d.name === 'show';\nvar Transition = {\n    name: 'transition',\n    props: transitionProps,\n    abstract: true,\n    render(h) {\n        let children = this.$slots.default;\n        if (!children) {\n            return;\n        }\n        // filter out text nodes (possible whitespaces)\n        children = children.filter(isNotTextNode);\n        /* istanbul ignore if */\n        if (!children.length) {\n            return;\n        }\n        // warn multiple elements\n        if (children.length > 1) {\n            warn$2('<transition> can only be used on a single element. Use ' +\n                '<transition-group> for lists.', this.$parent);\n        }\n        const mode = this.mode;\n        // warn invalid mode\n        if (mode && mode !== 'in-out' && mode !== 'out-in') {\n            warn$2('invalid <transition> mode: ' + mode, this.$parent);\n        }\n        const rawChild = children[0];\n        // if this is a component root node and the component's\n        // parent container node also has transition, skip.\n        if (hasParentTransition(this.$vnode)) {\n            return rawChild;\n        }\n        // apply transition data to child\n        // use getRealChild() to ignore abstract components e.g. keep-alive\n        const child = getRealChild(rawChild);\n        /* istanbul ignore if */\n        if (!child) {\n            return rawChild;\n        }\n        if (this._leaving) {\n            return placeholder(h, rawChild);\n        }\n        // ensure a key that is unique to the vnode type and to this transition\n        // component instance. This key will be used to remove pending leaving nodes\n        // during entering.\n        const id = `__transition-${this._uid}-`;\n        child.key =\n            child.key == null\n                ? child.isComment\n                    ? id + 'comment'\n                    : id + child.tag\n                : isPrimitive(child.key)\n                    ? String(child.key).indexOf(id) === 0\n                        ? child.key\n                        : id + child.key\n                    : child.key;\n        const data = ((child.data || (child.data = {})).transition =\n            extractTransitionData(this));\n        const oldRawChild = this._vnode;\n        const oldChild = getRealChild(oldRawChild);\n        // mark v-show\n        // so that the transition module can hand over the control to the directive\n        if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n            child.data.show = true;\n        }\n        if (oldChild &&\n            oldChild.data &&\n            !isSameChild(child, oldChild) &&\n            !isAsyncPlaceholder(oldChild) &&\n            // #6687 component root is a comment node\n            !(oldChild.componentInstance &&\n                oldChild.componentInstance._vnode.isComment)) {\n            // replace old child transition data with fresh one\n            // important for dynamic transitions!\n            const oldData = (oldChild.data.transition = extend({}, data));\n            // handle transition mode\n            if (mode === 'out-in') {\n                // return placeholder node and queue update when leave finishes\n                this._leaving = true;\n                mergeVNodeHook(oldData, 'afterLeave', () => {\n                    this._leaving = false;\n                    this.$forceUpdate();\n                });\n                return placeholder(h, rawChild);\n            }\n            else if (mode === 'in-out') {\n                if (isAsyncPlaceholder(child)) {\n                    return oldRawChild;\n                }\n                let delayedLeave;\n                const performLeave = () => {\n                    delayedLeave();\n                };\n                mergeVNodeHook(data, 'afterEnter', performLeave);\n                mergeVNodeHook(data, 'enterCancelled', performLeave);\n                mergeVNodeHook(oldData, 'delayLeave', leave => {\n                    delayedLeave = leave;\n                });\n            }\n        }\n        return rawChild;\n    }\n};\n\n// Provides transition support for list items.\nconst props = extend({\n    tag: String,\n    moveClass: String\n}, transitionProps);\ndelete props.mode;\nvar TransitionGroup = {\n    props,\n    beforeMount() {\n        const update = this._update;\n        this._update = (vnode, hydrating) => {\n            const restoreActiveInstance = setActiveInstance(this);\n            // force removing pass\n            this.__patch__(this._vnode, this.kept, false, // hydrating\n            true // removeOnly (!important, avoids unnecessary moves)\n            );\n            this._vnode = this.kept;\n            restoreActiveInstance();\n            update.call(this, vnode, hydrating);\n        };\n    },\n    render(h) {\n        const tag = this.tag || this.$vnode.data.tag || 'span';\n        const map = Object.create(null);\n        const prevChildren = (this.prevChildren = this.children);\n        const rawChildren = this.$slots.default || [];\n        const children = (this.children = []);\n        const transitionData = extractTransitionData(this);\n        for (let i = 0; i < rawChildren.length; i++) {\n            const c = rawChildren[i];\n            if (c.tag) {\n                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                    children.push(c);\n                    map[c.key] = c;\n                    (c.data || (c.data = {})).transition = transitionData;\n                }\n                else {\n                    const opts = c.componentOptions;\n                    const name = opts\n                        ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                        : c.tag;\n                    warn$2(`<transition-group> children must be keyed: <${name}>`);\n                }\n            }\n        }\n        if (prevChildren) {\n            const kept = [];\n            const removed = [];\n            for (let i = 0; i < prevChildren.length; i++) {\n                const c = prevChildren[i];\n                c.data.transition = transitionData;\n                // @ts-expect-error .getBoundingClientRect is not typed in Node\n                c.data.pos = c.elm.getBoundingClientRect();\n                if (map[c.key]) {\n                    kept.push(c);\n                }\n                else {\n                    removed.push(c);\n                }\n            }\n            this.kept = h(tag, null, kept);\n            this.removed = removed;\n        }\n        return h(tag, null, children);\n    },\n    updated() {\n        const children = this.prevChildren;\n        const moveClass = this.moveClass || (this.name || 'v') + '-move';\n        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n            return;\n        }\n        // we divide the work into three loops to avoid mixing DOM reads and writes\n        // in each iteration - which helps prevent layout thrashing.\n        children.forEach(callPendingCbs);\n        children.forEach(recordPosition);\n        children.forEach(applyTranslation);\n        // force reflow to put everything in position\n        // assign to this to avoid being removed in tree-shaking\n        // $flow-disable-line\n        this._reflow = document.body.offsetHeight;\n        children.forEach((c) => {\n            if (c.data.moved) {\n                const el = c.elm;\n                const s = el.style;\n                addTransitionClass(el, moveClass);\n                s.transform = s.WebkitTransform = s.transitionDuration = '';\n                el.addEventListener(transitionEndEvent, (el._moveCb = function cb(e) {\n                    if (e && e.target !== el) {\n                        return;\n                    }\n                    if (!e || /transform$/.test(e.propertyName)) {\n                        el.removeEventListener(transitionEndEvent, cb);\n                        el._moveCb = null;\n                        removeTransitionClass(el, moveClass);\n                    }\n                }));\n            }\n        });\n    },\n    methods: {\n        hasMove(el, moveClass) {\n            /* istanbul ignore if */\n            if (!hasTransition) {\n                return false;\n            }\n            /* istanbul ignore if */\n            if (this._hasMove) {\n                return this._hasMove;\n            }\n            // Detect whether an element with the move class applied has\n            // CSS transitions. Since the element may be inside an entering\n            // transition at this very moment, we make a clone of it and remove\n            // all other transition classes applied to ensure only the move class\n            // is applied.\n            const clone = el.cloneNode();\n            if (el._transitionClasses) {\n                el._transitionClasses.forEach((cls) => {\n                    removeClass(clone, cls);\n                });\n            }\n            addClass(clone, moveClass);\n            clone.style.display = 'none';\n            this.$el.appendChild(clone);\n            const info = getTransitionInfo(clone);\n            this.$el.removeChild(clone);\n            return (this._hasMove = info.hasTransform);\n        }\n    }\n};\nfunction callPendingCbs(c) {\n    /* istanbul ignore if */\n    if (c.elm._moveCb) {\n        c.elm._moveCb();\n    }\n    /* istanbul ignore if */\n    if (c.elm._enterCb) {\n        c.elm._enterCb();\n    }\n}\nfunction recordPosition(c) {\n    c.data.newPos = c.elm.getBoundingClientRect();\n}\nfunction applyTranslation(c) {\n    const oldPos = c.data.pos;\n    const newPos = c.data.newPos;\n    const dx = oldPos.left - newPos.left;\n    const dy = oldPos.top - newPos.top;\n    if (dx || dy) {\n        c.data.moved = true;\n        const s = c.elm.style;\n        s.transform = s.WebkitTransform = `translate(${dx}px,${dy}px)`;\n        s.transitionDuration = '0s';\n    }\n}\n\nvar platformComponents = {\n    Transition,\n    TransitionGroup\n};\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n// public mount method\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && inBrowser ? query(el) : undefined;\n    return mountComponent(this, el, hydrating);\n};\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n    setTimeout(() => {\n        if (config.devtools) {\n            if (devtools) {\n                devtools.emit('init', Vue);\n            }\n            else {\n                // @ts-expect-error\n                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                    'https://github.com/vuejs/vue-devtools');\n            }\n        }\n        if (config.productionTip !== false &&\n            typeof console !== 'undefined') {\n            // @ts-expect-error\n            console[console.info ? 'info' : 'log'](`You are running Vue in development mode.\\n` +\n                `Make sure to turn on production mode when deploying for production.\\n` +\n                `See more tips at https://vuejs.org/guide/deployment.html`);\n        }\n    }, 0);\n}\n\nconst defaultTagRE = /\\{\\{((?:.|\\r?\\n)+?)\\}\\}/g;\nconst regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\nconst buildRegex = cached(delimiters => {\n    const open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n    const close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n    return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g');\n});\nfunction parseText(text, delimiters) {\n    //@ts-expect-error\n    const tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n    if (!tagRE.test(text)) {\n        return;\n    }\n    const tokens = [];\n    const rawTokens = [];\n    let lastIndex = (tagRE.lastIndex = 0);\n    let match, index, tokenValue;\n    while ((match = tagRE.exec(text))) {\n        index = match.index;\n        // push text token\n        if (index > lastIndex) {\n            rawTokens.push((tokenValue = text.slice(lastIndex, index)));\n            tokens.push(JSON.stringify(tokenValue));\n        }\n        // tag token\n        const exp = parseFilters(match[1].trim());\n        tokens.push(`_s(${exp})`);\n        rawTokens.push({ '@binding': exp });\n        lastIndex = index + match[0].length;\n    }\n    if (lastIndex < text.length) {\n        rawTokens.push((tokenValue = text.slice(lastIndex)));\n        tokens.push(JSON.stringify(tokenValue));\n    }\n    return {\n        expression: tokens.join('+'),\n        tokens: rawTokens\n    };\n}\n\nfunction transformNode$1(el, options) {\n    const warn = options.warn || baseWarn;\n    const staticClass = getAndRemoveAttr(el, 'class');\n    if (staticClass) {\n        const res = parseText(staticClass, options.delimiters);\n        if (res) {\n            warn(`class=\"${staticClass}\": ` +\n                'Interpolation inside attributes has been removed. ' +\n                'Use v-bind or the colon shorthand instead. For example, ' +\n                'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.', el.rawAttrsMap['class']);\n        }\n    }\n    if (staticClass) {\n        el.staticClass = JSON.stringify(staticClass.replace(/\\s+/g, ' ').trim());\n    }\n    const classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n    if (classBinding) {\n        el.classBinding = classBinding;\n    }\n}\nfunction genData$2(el) {\n    let data = '';\n    if (el.staticClass) {\n        data += `staticClass:${el.staticClass},`;\n    }\n    if (el.classBinding) {\n        data += `class:${el.classBinding},`;\n    }\n    return data;\n}\nvar klass = {\n    staticKeys: ['staticClass'],\n    transformNode: transformNode$1,\n    genData: genData$2\n};\n\nfunction transformNode(el, options) {\n    const warn = options.warn || baseWarn;\n    const staticStyle = getAndRemoveAttr(el, 'style');\n    if (staticStyle) {\n        /* istanbul ignore if */\n        {\n            const res = parseText(staticStyle, options.delimiters);\n            if (res) {\n                warn(`style=\"${staticStyle}\": ` +\n                    'Interpolation inside attributes has been removed. ' +\n                    'Use v-bind or the colon shorthand instead. For example, ' +\n                    'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.', el.rawAttrsMap['style']);\n            }\n        }\n        el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n    }\n    const styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n    if (styleBinding) {\n        el.styleBinding = styleBinding;\n    }\n}\nfunction genData$1(el) {\n    let data = '';\n    if (el.staticStyle) {\n        data += `staticStyle:${el.staticStyle},`;\n    }\n    if (el.styleBinding) {\n        data += `style:(${el.styleBinding}),`;\n    }\n    return data;\n}\nvar style = {\n    staticKeys: ['staticStyle'],\n    transformNode,\n    genData: genData$1\n};\n\nlet decoder;\nvar he = {\n    decode(html) {\n        decoder = decoder || document.createElement('div');\n        decoder.innerHTML = html;\n        return decoder.textContent;\n    }\n};\n\nconst isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n    'link,meta,param,source,track,wbr');\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nconst canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nconst isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n    'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n    'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n    'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n    'title,tr,track');\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n// Regular Expressions for parsing tags and attributes\nconst attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nconst dynamicArgAttribute = /^\\s*((?:v-[\\w-]+:|@|:|#)\\[[^=]+?\\][^\\s\"'<>\\/=]*)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nconst ncname = `[a-zA-Z_][\\\\-\\\\.0-9_a-zA-Z${unicodeRegExp.source}]*`;\nconst qnameCapture = `((?:${ncname}\\\\:)?${ncname})`;\nconst startTagOpen = new RegExp(`^<${qnameCapture}`);\nconst startTagClose = /^\\s*(\\/?)>/;\nconst endTag = new RegExp(`^<\\\\/${qnameCapture}[^>]*>`);\nconst doctype = /^<!DOCTYPE [^>]+>/i;\n// #7298: escape - to avoid being passed as HTML comment when inlined in page\nconst comment = /^<!\\--/;\nconst conditionalComment = /^<!\\[/;\n// Special Elements (can contain anything)\nconst isPlainTextElement = makeMap('script,style,textarea', true);\nconst reCache = {};\nconst decodingMap = {\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&amp;': '&',\n    '&#10;': '\\n',\n    '&#9;': '\\t',\n    '&#39;': \"'\"\n};\nconst encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;\nconst encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;\n// #5992\nconst isIgnoreNewlineTag = makeMap('pre,textarea', true);\nconst shouldIgnoreFirstNewline = (tag, html) => tag && isIgnoreNewlineTag(tag) && html[0] === '\\n';\nfunction decodeAttr(value, shouldDecodeNewlines) {\n    const re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n    return value.replace(re, match => decodingMap[match]);\n}\nfunction parseHTML(html, options) {\n    const stack = [];\n    const expectHTML = options.expectHTML;\n    const isUnaryTag = options.isUnaryTag || no;\n    const canBeLeftOpenTag = options.canBeLeftOpenTag || no;\n    let index = 0;\n    let last, lastTag;\n    while (html) {\n        last = html;\n        // Make sure we're not in a plaintext content element like script/style\n        if (!lastTag || !isPlainTextElement(lastTag)) {\n            let textEnd = html.indexOf('<');\n            if (textEnd === 0) {\n                // Comment:\n                if (comment.test(html)) {\n                    const commentEnd = html.indexOf('-->');\n                    if (commentEnd >= 0) {\n                        if (options.shouldKeepComment && options.comment) {\n                            options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);\n                        }\n                        advance(commentEnd + 3);\n                        continue;\n                    }\n                }\n                // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n                if (conditionalComment.test(html)) {\n                    const conditionalEnd = html.indexOf(']>');\n                    if (conditionalEnd >= 0) {\n                        advance(conditionalEnd + 2);\n                        continue;\n                    }\n                }\n                // Doctype:\n                const doctypeMatch = html.match(doctype);\n                if (doctypeMatch) {\n                    advance(doctypeMatch[0].length);\n                    continue;\n                }\n                // End tag:\n                const endTagMatch = html.match(endTag);\n                if (endTagMatch) {\n                    const curIndex = index;\n                    advance(endTagMatch[0].length);\n                    parseEndTag(endTagMatch[1], curIndex, index);\n                    continue;\n                }\n                // Start tag:\n                const startTagMatch = parseStartTag();\n                if (startTagMatch) {\n                    handleStartTag(startTagMatch);\n                    if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {\n                        advance(1);\n                    }\n                    continue;\n                }\n            }\n            let text, rest, next;\n            if (textEnd >= 0) {\n                rest = html.slice(textEnd);\n                while (!endTag.test(rest) &&\n                    !startTagOpen.test(rest) &&\n                    !comment.test(rest) &&\n                    !conditionalComment.test(rest)) {\n                    // < in plain text, be forgiving and treat it as text\n                    next = rest.indexOf('<', 1);\n                    if (next < 0)\n                        break;\n                    textEnd += next;\n                    rest = html.slice(textEnd);\n                }\n                text = html.substring(0, textEnd);\n            }\n            if (textEnd < 0) {\n                text = html;\n            }\n            if (text) {\n                advance(text.length);\n            }\n            if (options.chars && text) {\n                options.chars(text, index - text.length, index);\n            }\n        }\n        else {\n            let endTagLength = 0;\n            const stackedTag = lastTag.toLowerCase();\n            const reStackedTag = reCache[stackedTag] ||\n                (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n            const rest = html.replace(reStackedTag, function (all, text, endTag) {\n                endTagLength = endTag.length;\n                if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n                    text = text\n                        .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n                        .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n                }\n                if (shouldIgnoreFirstNewline(stackedTag, text)) {\n                    text = text.slice(1);\n                }\n                if (options.chars) {\n                    options.chars(text);\n                }\n                return '';\n            });\n            index += html.length - rest.length;\n            html = rest;\n            parseEndTag(stackedTag, index - endTagLength, index);\n        }\n        if (html === last) {\n            options.chars && options.chars(html);\n            if (!stack.length && options.warn) {\n                options.warn(`Mal-formatted tag at end of template: \"${html}\"`, {\n                    start: index + html.length\n                });\n            }\n            break;\n        }\n    }\n    // Clean up any remaining tags\n    parseEndTag();\n    function advance(n) {\n        index += n;\n        html = html.substring(n);\n    }\n    function parseStartTag() {\n        const start = html.match(startTagOpen);\n        if (start) {\n            const match = {\n                tagName: start[1],\n                attrs: [],\n                start: index\n            };\n            advance(start[0].length);\n            let end, attr;\n            while (!(end = html.match(startTagClose)) &&\n                (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {\n                attr.start = index;\n                advance(attr[0].length);\n                attr.end = index;\n                match.attrs.push(attr);\n            }\n            if (end) {\n                match.unarySlash = end[1];\n                advance(end[0].length);\n                match.end = index;\n                return match;\n            }\n        }\n    }\n    function handleStartTag(match) {\n        const tagName = match.tagName;\n        const unarySlash = match.unarySlash;\n        if (expectHTML) {\n            if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n                parseEndTag(lastTag);\n            }\n            if (canBeLeftOpenTag(tagName) && lastTag === tagName) {\n                parseEndTag(tagName);\n            }\n        }\n        const unary = isUnaryTag(tagName) || !!unarySlash;\n        const l = match.attrs.length;\n        const attrs = new Array(l);\n        for (let i = 0; i < l; i++) {\n            const args = match.attrs[i];\n            const value = args[3] || args[4] || args[5] || '';\n            const shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n                ? options.shouldDecodeNewlinesForHref\n                : options.shouldDecodeNewlines;\n            attrs[i] = {\n                name: args[1],\n                value: decodeAttr(value, shouldDecodeNewlines)\n            };\n            if (options.outputSourceRange) {\n                attrs[i].start = args.start + args[0].match(/^\\s*/).length;\n                attrs[i].end = args.end;\n            }\n        }\n        if (!unary) {\n            stack.push({\n                tag: tagName,\n                lowerCasedTag: tagName.toLowerCase(),\n                attrs: attrs,\n                start: match.start,\n                end: match.end\n            });\n            lastTag = tagName;\n        }\n        if (options.start) {\n            options.start(tagName, attrs, unary, match.start, match.end);\n        }\n    }\n    function parseEndTag(tagName, start, end) {\n        let pos, lowerCasedTagName;\n        if (start == null)\n            start = index;\n        if (end == null)\n            end = index;\n        // Find the closest opened tag of the same type\n        if (tagName) {\n            lowerCasedTagName = tagName.toLowerCase();\n            for (pos = stack.length - 1; pos >= 0; pos--) {\n                if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n                    break;\n                }\n            }\n        }\n        else {\n            // If no tag name is provided, clean shop\n            pos = 0;\n        }\n        if (pos >= 0) {\n            // Close all the open elements, up the stack\n            for (let i = stack.length - 1; i >= pos; i--) {\n                if ((i > pos || !tagName) && options.warn) {\n                    options.warn(`tag <${stack[i].tag}> has no matching end tag.`, {\n                        start: stack[i].start,\n                        end: stack[i].end\n                    });\n                }\n                if (options.end) {\n                    options.end(stack[i].tag, start, end);\n                }\n            }\n            // Remove the open elements from the stack\n            stack.length = pos;\n            lastTag = pos && stack[pos - 1].tag;\n        }\n        else if (lowerCasedTagName === 'br') {\n            if (options.start) {\n                options.start(tagName, [], true, start, end);\n            }\n        }\n        else if (lowerCasedTagName === 'p') {\n            if (options.start) {\n                options.start(tagName, [], false, start, end);\n            }\n            if (options.end) {\n                options.end(tagName, start, end);\n            }\n        }\n    }\n}\n\nconst onRE = /^@|^v-on:/;\nconst dirRE = /^v-|^@|^:|^#/;\nconst forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\nconst forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\nconst stripParensRE = /^\\(|\\)$/g;\nconst dynamicArgRE = /^\\[.*\\]$/;\nconst argRE = /:(.*)$/;\nconst bindRE = /^:|^\\.|^v-bind:/;\nconst modifierRE = /\\.[^.\\]]+(?=[^\\]]*$)/g;\nconst slotRE = /^v-slot(:|$)|^#/;\nconst lineBreakRE = /[\\r\\n]/;\nconst whitespaceRE = /[ \\f\\t\\r\\n]+/g;\nconst invalidAttributeRE = /[\\s\"'<>\\/=]/;\nconst decodeHTMLCached = cached(he.decode);\nconst emptySlotScopeToken = `_empty_`;\n// configurable state\nlet warn;\nlet delimiters;\nlet transforms;\nlet preTransforms;\nlet postTransforms;\nlet platformIsPreTag;\nlet platformMustUseProp;\nlet platformGetTagNamespace;\nlet maybeComponent;\nfunction createASTElement(tag, attrs, parent) {\n    return {\n        type: 1,\n        tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        rawAttrsMap: {},\n        parent,\n        children: []\n    };\n}\n/**\n * Convert HTML string to AST.\n */\nfunction parse(template, options) {\n    warn = options.warn || baseWarn;\n    platformIsPreTag = options.isPreTag || no;\n    platformMustUseProp = options.mustUseProp || no;\n    platformGetTagNamespace = options.getTagNamespace || no;\n    const isReservedTag = options.isReservedTag || no;\n    maybeComponent = (el) => !!(el.component ||\n        el.attrsMap[':is'] ||\n        el.attrsMap['v-bind:is'] ||\n        !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));\n    transforms = pluckModuleFunction(options.modules, 'transformNode');\n    preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n    postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n    delimiters = options.delimiters;\n    const stack = [];\n    const preserveWhitespace = options.preserveWhitespace !== false;\n    const whitespaceOption = options.whitespace;\n    let root;\n    let currentParent;\n    let inVPre = false;\n    let inPre = false;\n    let warned = false;\n    function warnOnce(msg, range) {\n        if (!warned) {\n            warned = true;\n            warn(msg, range);\n        }\n    }\n    function closeElement(element) {\n        trimEndingWhitespace(element);\n        if (!inVPre && !element.processed) {\n            element = processElement(element, options);\n        }\n        // tree management\n        if (!stack.length && element !== root) {\n            // allow root elements with v-if, v-else-if and v-else\n            if (root.if && (element.elseif || element.else)) {\n                {\n                    checkRootConstraints(element);\n                }\n                addIfCondition(root, {\n                    exp: element.elseif,\n                    block: element\n                });\n            }\n            else {\n                warnOnce(`Component template should contain exactly one root element. ` +\n                    `If you are using v-if on multiple elements, ` +\n                    `use v-else-if to chain them instead.`, { start: element.start });\n            }\n        }\n        if (currentParent && !element.forbidden) {\n            if (element.elseif || element.else) {\n                processIfConditions(element, currentParent);\n            }\n            else {\n                if (element.slotScope) {\n                    // scoped slot\n                    // keep it in the children list so that v-else(-if) conditions can\n                    // find it as the prev node.\n                    const name = element.slotTarget || '\"default\"';\n                    (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n                }\n                currentParent.children.push(element);\n                element.parent = currentParent;\n            }\n        }\n        // final children cleanup\n        // filter out scoped slots\n        element.children = element.children.filter(c => !c.slotScope);\n        // remove trailing whitespace node again\n        trimEndingWhitespace(element);\n        // check pre state\n        if (element.pre) {\n            inVPre = false;\n        }\n        if (platformIsPreTag(element.tag)) {\n            inPre = false;\n        }\n        // apply post-transforms\n        for (let i = 0; i < postTransforms.length; i++) {\n            postTransforms[i](element, options);\n        }\n    }\n    function trimEndingWhitespace(el) {\n        // remove trailing whitespace node\n        if (!inPre) {\n            let lastNode;\n            while ((lastNode = el.children[el.children.length - 1]) &&\n                lastNode.type === 3 &&\n                lastNode.text === ' ') {\n                el.children.pop();\n            }\n        }\n    }\n    function checkRootConstraints(el) {\n        if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(`Cannot use <${el.tag}> as component root element because it may ` +\n                'contain multiple nodes.', { start: el.start });\n        }\n        if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce('Cannot use v-for on stateful component root element because ' +\n                'it renders multiple elements.', el.rawAttrsMap['v-for']);\n        }\n    }\n    parseHTML(template, {\n        warn,\n        expectHTML: options.expectHTML,\n        isUnaryTag: options.isUnaryTag,\n        canBeLeftOpenTag: options.canBeLeftOpenTag,\n        shouldDecodeNewlines: options.shouldDecodeNewlines,\n        shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,\n        shouldKeepComment: options.comments,\n        outputSourceRange: options.outputSourceRange,\n        start(tag, attrs, unary, start, end) {\n            // check namespace.\n            // inherit parent ns if there is one\n            const ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n            // handle IE svg bug\n            /* istanbul ignore if */\n            if (isIE && ns === 'svg') {\n                attrs = guardIESVGBug(attrs);\n            }\n            let element = createASTElement(tag, attrs, currentParent);\n            if (ns) {\n                element.ns = ns;\n            }\n            {\n                if (options.outputSourceRange) {\n                    element.start = start;\n                    element.end = end;\n                    element.rawAttrsMap = element.attrsList.reduce((cumulated, attr) => {\n                        cumulated[attr.name] = attr;\n                        return cumulated;\n                    }, {});\n                }\n                attrs.forEach(attr => {\n                    if (invalidAttributeRE.test(attr.name)) {\n                        warn(`Invalid dynamic argument expression: attribute names cannot contain ` +\n                            `spaces, quotes, <, >, / or =.`, options.outputSourceRange\n                            ? {\n                                start: attr.start + attr.name.indexOf(`[`),\n                                end: attr.start + attr.name.length\n                            }\n                            : undefined);\n                    }\n                });\n            }\n            if (isForbiddenTag(element) && !isServerRendering()) {\n                element.forbidden = true;\n                warn('Templates should only be responsible for mapping the state to the ' +\n                        'UI. Avoid placing tags with side-effects in your templates, such as ' +\n                        `<${tag}>` +\n                        ', as they will not be parsed.', { start: element.start });\n            }\n            // apply pre-transforms\n            for (let i = 0; i < preTransforms.length; i++) {\n                element = preTransforms[i](element, options) || element;\n            }\n            if (!inVPre) {\n                processPre(element);\n                if (element.pre) {\n                    inVPre = true;\n                }\n            }\n            if (platformIsPreTag(element.tag)) {\n                inPre = true;\n            }\n            if (inVPre) {\n                processRawAttrs(element);\n            }\n            else if (!element.processed) {\n                // structural directives\n                processFor(element);\n                processIf(element);\n                processOnce(element);\n            }\n            if (!root) {\n                root = element;\n                {\n                    checkRootConstraints(root);\n                }\n            }\n            if (!unary) {\n                currentParent = element;\n                stack.push(element);\n            }\n            else {\n                closeElement(element);\n            }\n        },\n        end(tag, start, end) {\n            const element = stack[stack.length - 1];\n            // pop stack\n            stack.length -= 1;\n            currentParent = stack[stack.length - 1];\n            if (options.outputSourceRange) {\n                element.end = end;\n            }\n            closeElement(element);\n        },\n        chars(text, start, end) {\n            if (!currentParent) {\n                {\n                    if (text === template) {\n                        warnOnce('Component template requires a root element, rather than just text.', { start });\n                    }\n                    else if ((text = text.trim())) {\n                        warnOnce(`text \"${text}\" outside root element will be ignored.`, {\n                            start\n                        });\n                    }\n                }\n                return;\n            }\n            // IE textarea placeholder bug\n            /* istanbul ignore if */\n            if (isIE &&\n                currentParent.tag === 'textarea' &&\n                currentParent.attrsMap.placeholder === text) {\n                return;\n            }\n            const children = currentParent.children;\n            if (inPre || text.trim()) {\n                text = isTextTag(currentParent)\n                    ? text\n                    : decodeHTMLCached(text);\n            }\n            else if (!children.length) {\n                // remove the whitespace-only node right after an opening tag\n                text = '';\n            }\n            else if (whitespaceOption) {\n                if (whitespaceOption === 'condense') {\n                    // in condense mode, remove the whitespace node if it contains\n                    // line break, otherwise condense to a single space\n                    text = lineBreakRE.test(text) ? '' : ' ';\n                }\n                else {\n                    text = ' ';\n                }\n            }\n            else {\n                text = preserveWhitespace ? ' ' : '';\n            }\n            if (text) {\n                if (!inPre && whitespaceOption === 'condense') {\n                    // condense consecutive whitespaces into single space\n                    text = text.replace(whitespaceRE, ' ');\n                }\n                let res;\n                let child;\n                if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {\n                    child = {\n                        type: 2,\n                        expression: res.expression,\n                        tokens: res.tokens,\n                        text\n                    };\n                }\n                else if (text !== ' ' ||\n                    !children.length ||\n                    children[children.length - 1].text !== ' ') {\n                    child = {\n                        type: 3,\n                        text\n                    };\n                }\n                if (child) {\n                    if (options.outputSourceRange) {\n                        child.start = start;\n                        child.end = end;\n                    }\n                    children.push(child);\n                }\n            }\n        },\n        comment(text, start, end) {\n            // adding anything as a sibling to the root node is forbidden\n            // comments should still be allowed, but ignored\n            if (currentParent) {\n                const child = {\n                    type: 3,\n                    text,\n                    isComment: true\n                };\n                if (options.outputSourceRange) {\n                    child.start = start;\n                    child.end = end;\n                }\n                currentParent.children.push(child);\n            }\n        }\n    });\n    return root;\n}\nfunction processPre(el) {\n    if (getAndRemoveAttr(el, 'v-pre') != null) {\n        el.pre = true;\n    }\n}\nfunction processRawAttrs(el) {\n    const list = el.attrsList;\n    const len = list.length;\n    if (len) {\n        const attrs = (el.attrs = new Array(len));\n        for (let i = 0; i < len; i++) {\n            attrs[i] = {\n                name: list[i].name,\n                value: JSON.stringify(list[i].value)\n            };\n            if (list[i].start != null) {\n                attrs[i].start = list[i].start;\n                attrs[i].end = list[i].end;\n            }\n        }\n    }\n    else if (!el.pre) {\n        // non root node in pre blocks with no attributes\n        el.plain = true;\n    }\n}\nfunction processElement(element, options) {\n    processKey(element);\n    // determine whether this is a plain element after\n    // removing structural attributes\n    element.plain =\n        !element.key && !element.scopedSlots && !element.attrsList.length;\n    processRef(element);\n    processSlotContent(element);\n    processSlotOutlet(element);\n    processComponent(element);\n    for (let i = 0; i < transforms.length; i++) {\n        element = transforms[i](element, options) || element;\n    }\n    processAttrs(element);\n    return element;\n}\nfunction processKey(el) {\n    const exp = getBindingAttr(el, 'key');\n    if (exp) {\n        {\n            if (el.tag === 'template') {\n                warn(`<template> cannot be keyed. Place the key on real elements instead.`, getRawBindingAttr(el, 'key'));\n            }\n            if (el.for) {\n                const iterator = el.iterator2 || el.iterator1;\n                const parent = el.parent;\n                if (iterator &&\n                    iterator === exp &&\n                    parent &&\n                    parent.tag === 'transition-group') {\n                    warn(`Do not use v-for index as key on <transition-group> children, ` +\n                        `this is the same as not using keys.`, getRawBindingAttr(el, 'key'), true /* tip */);\n                }\n            }\n        }\n        el.key = exp;\n    }\n}\nfunction processRef(el) {\n    const ref = getBindingAttr(el, 'ref');\n    if (ref) {\n        el.ref = ref;\n        el.refInFor = checkInFor(el);\n    }\n}\nfunction processFor(el) {\n    let exp;\n    if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n        const res = parseFor(exp);\n        if (res) {\n            extend(el, res);\n        }\n        else {\n            warn(`Invalid v-for expression: ${exp}`, el.rawAttrsMap['v-for']);\n        }\n    }\n}\nfunction parseFor(exp) {\n    const inMatch = exp.match(forAliasRE);\n    if (!inMatch)\n        return;\n    const res = {};\n    res.for = inMatch[2].trim();\n    const alias = inMatch[1].trim().replace(stripParensRE, '');\n    const iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n        res.alias = alias.replace(forIteratorRE, '').trim();\n        res.iterator1 = iteratorMatch[1].trim();\n        if (iteratorMatch[2]) {\n            res.iterator2 = iteratorMatch[2].trim();\n        }\n    }\n    else {\n        res.alias = alias;\n    }\n    return res;\n}\nfunction processIf(el) {\n    const exp = getAndRemoveAttr(el, 'v-if');\n    if (exp) {\n        el.if = exp;\n        addIfCondition(el, {\n            exp: exp,\n            block: el\n        });\n    }\n    else {\n        if (getAndRemoveAttr(el, 'v-else') != null) {\n            el.else = true;\n        }\n        const elseif = getAndRemoveAttr(el, 'v-else-if');\n        if (elseif) {\n            el.elseif = elseif;\n        }\n    }\n}\nfunction processIfConditions(el, parent) {\n    const prev = findPrevElement(parent.children);\n    if (prev && prev.if) {\n        addIfCondition(prev, {\n            exp: el.elseif,\n            block: el\n        });\n    }\n    else {\n        warn(`v-${el.elseif ? 'else-if=\"' + el.elseif + '\"' : 'else'} ` +\n            `used on element <${el.tag}> without corresponding v-if.`, el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);\n    }\n}\nfunction findPrevElement(children) {\n    let i = children.length;\n    while (i--) {\n        if (children[i].type === 1) {\n            return children[i];\n        }\n        else {\n            if (children[i].text !== ' ') {\n                warn(`text \"${children[i].text.trim()}\" between v-if and v-else(-if) ` +\n                    `will be ignored.`, children[i]);\n            }\n            children.pop();\n        }\n    }\n}\nfunction addIfCondition(el, condition) {\n    if (!el.ifConditions) {\n        el.ifConditions = [];\n    }\n    el.ifConditions.push(condition);\n}\nfunction processOnce(el) {\n    const once = getAndRemoveAttr(el, 'v-once');\n    if (once != null) {\n        el.once = true;\n    }\n}\n// handle content being passed to a component as slot,\n// e.g. <template slot=\"xxx\">, <div slot-scope=\"xxx\">\nfunction processSlotContent(el) {\n    let slotScope;\n    if (el.tag === 'template') {\n        slotScope = getAndRemoveAttr(el, 'scope');\n        /* istanbul ignore if */\n        if (slotScope) {\n            warn(`the \"scope\" attribute for scoped slots have been deprecated and ` +\n                `replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute ` +\n                `can also be used on plain elements in addition to <template> to ` +\n                `denote scoped slots.`, el.rawAttrsMap['scope'], true);\n        }\n        el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');\n    }\n    else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {\n        /* istanbul ignore if */\n        if (el.attrsMap['v-for']) {\n            warn(`Ambiguous combined usage of slot-scope and v-for on <${el.tag}> ` +\n                `(v-for takes higher priority). Use a wrapper <template> for the ` +\n                `scoped slot to make it clearer.`, el.rawAttrsMap['slot-scope'], true);\n        }\n        el.slotScope = slotScope;\n    }\n    // slot=\"xxx\"\n    const slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n        el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n        el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);\n        // preserve slot as an attribute for native shadow DOM compat\n        // only for non-scoped slots.\n        if (el.tag !== 'template' && !el.slotScope) {\n            addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));\n        }\n    }\n    // 2.6 v-slot syntax\n    {\n        if (el.tag === 'template') {\n            // v-slot on <template>\n            const slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                {\n                    if (el.slotTarget || el.slotScope) {\n                        warn(`Unexpected mixed usage of different slot syntaxes.`, el);\n                    }\n                    if (el.parent && !maybeComponent(el.parent)) {\n                        warn(`<template v-slot> can only appear at the root level inside ` +\n                            `the receiving component`, el);\n                    }\n                }\n                const { name, dynamic } = getSlotName(slotBinding);\n                el.slotTarget = name;\n                el.slotTargetDynamic = dynamic;\n                el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf\n            }\n        }\n        else {\n            // v-slot on component, denotes default slot\n            const slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                {\n                    if (!maybeComponent(el)) {\n                        warn(`v-slot can only be used on components or <template>.`, slotBinding);\n                    }\n                    if (el.slotScope || el.slotTarget) {\n                        warn(`Unexpected mixed usage of different slot syntaxes.`, el);\n                    }\n                    if (el.scopedSlots) {\n                        warn(`To avoid scope ambiguity, the default slot should also use ` +\n                            `<template> syntax when there are other named slots.`, slotBinding);\n                    }\n                }\n                // add the component's children to its default slot\n                const slots = el.scopedSlots || (el.scopedSlots = {});\n                const { name, dynamic } = getSlotName(slotBinding);\n                const slotContainer = (slots[name] = createASTElement('template', [], el));\n                slotContainer.slotTarget = name;\n                slotContainer.slotTargetDynamic = dynamic;\n                slotContainer.children = el.children.filter((c) => {\n                    if (!c.slotScope) {\n                        c.parent = slotContainer;\n                        return true;\n                    }\n                });\n                slotContainer.slotScope = slotBinding.value || emptySlotScopeToken;\n                // remove children as they are returned from scopedSlots now\n                el.children = [];\n                // mark el non-plain so data gets generated\n                el.plain = false;\n            }\n        }\n    }\n}\nfunction getSlotName(binding) {\n    let name = binding.name.replace(slotRE, '');\n    if (!name) {\n        if (binding.name[0] !== '#') {\n            name = 'default';\n        }\n        else {\n            warn(`v-slot shorthand syntax requires a slot name.`, binding);\n        }\n    }\n    return dynamicArgRE.test(name)\n        ? // dynamic [name]\n            { name: name.slice(1, -1), dynamic: true }\n        : // static name\n            { name: `\"${name}\"`, dynamic: false };\n}\n// handle <slot/> outlets\nfunction processSlotOutlet(el) {\n    if (el.tag === 'slot') {\n        el.slotName = getBindingAttr(el, 'name');\n        if (el.key) {\n            warn(`\\`key\\` does not work on <slot> because slots are abstract outlets ` +\n                `and can possibly expand into multiple elements. ` +\n                `Use the key on a wrapping element instead.`, getRawBindingAttr(el, 'key'));\n        }\n    }\n}\nfunction processComponent(el) {\n    let binding;\n    if ((binding = getBindingAttr(el, 'is'))) {\n        el.component = binding;\n    }\n    if (getAndRemoveAttr(el, 'inline-template') != null) {\n        el.inlineTemplate = true;\n    }\n}\nfunction processAttrs(el) {\n    const list = el.attrsList;\n    let i, l, name, rawName, value, modifiers, syncGen, isDynamic;\n    for (i = 0, l = list.length; i < l; i++) {\n        name = rawName = list[i].name;\n        value = list[i].value;\n        if (dirRE.test(name)) {\n            // mark element as dynamic\n            el.hasBindings = true;\n            // modifiers\n            modifiers = parseModifiers(name.replace(dirRE, ''));\n            // support .foo shorthand syntax for the .prop modifier\n            if (modifiers) {\n                name = name.replace(modifierRE, '');\n            }\n            if (bindRE.test(name)) {\n                // v-bind\n                name = name.replace(bindRE, '');\n                value = parseFilters(value);\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                if (value.trim().length === 0) {\n                    warn(`The value for a v-bind expression cannot be empty. Found in \"v-bind:${name}\"`);\n                }\n                if (modifiers) {\n                    if (modifiers.prop && !isDynamic) {\n                        name = camelize(name);\n                        if (name === 'innerHtml')\n                            name = 'innerHTML';\n                    }\n                    if (modifiers.camel && !isDynamic) {\n                        name = camelize(name);\n                    }\n                    if (modifiers.sync) {\n                        syncGen = genAssignmentCode(value, `$event`);\n                        if (!isDynamic) {\n                            addHandler(el, `update:${camelize(name)}`, syncGen, null, false, warn, list[i]);\n                            if (hyphenate(name) !== camelize(name)) {\n                                addHandler(el, `update:${hyphenate(name)}`, syncGen, null, false, warn, list[i]);\n                            }\n                        }\n                        else {\n                            // handler w/ dynamic event name\n                            addHandler(el, `\"update:\"+(${name})`, syncGen, null, false, warn, list[i], true // dynamic\n                            );\n                        }\n                    }\n                }\n                if ((modifiers && modifiers.prop) ||\n                    (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {\n                    addProp(el, name, value, list[i], isDynamic);\n                }\n                else {\n                    addAttr(el, name, value, list[i], isDynamic);\n                }\n            }\n            else if (onRE.test(name)) {\n                // v-on\n                name = name.replace(onRE, '');\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);\n            }\n            else {\n                // normal directives\n                name = name.replace(dirRE, '');\n                // parse arg\n                const argMatch = name.match(argRE);\n                let arg = argMatch && argMatch[1];\n                isDynamic = false;\n                if (arg) {\n                    name = name.slice(0, -(arg.length + 1));\n                    if (dynamicArgRE.test(arg)) {\n                        arg = arg.slice(1, -1);\n                        isDynamic = true;\n                    }\n                }\n                addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);\n                if (name === 'model') {\n                    checkForAliasModel(el, value);\n                }\n            }\n        }\n        else {\n            // literal attribute\n            {\n                const res = parseText(value, delimiters);\n                if (res) {\n                    warn(`${name}=\"${value}\": ` +\n                        'Interpolation inside attributes has been removed. ' +\n                        'Use v-bind or the colon shorthand instead. For example, ' +\n                        'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.', list[i]);\n                }\n            }\n            addAttr(el, name, JSON.stringify(value), list[i]);\n            // #6887 firefox doesn't update muted state if set via attribute\n            // even immediately after element creation\n            if (!el.component &&\n                name === 'muted' &&\n                platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n                addProp(el, name, 'true', list[i]);\n            }\n        }\n    }\n}\nfunction checkInFor(el) {\n    let parent = el;\n    while (parent) {\n        if (parent.for !== undefined) {\n            return true;\n        }\n        parent = parent.parent;\n    }\n    return false;\n}\nfunction parseModifiers(name) {\n    const match = name.match(modifierRE);\n    if (match) {\n        const ret = {};\n        match.forEach(m => {\n            ret[m.slice(1)] = true;\n        });\n        return ret;\n    }\n}\nfunction makeAttrsMap(attrs) {\n    const map = {};\n    for (let i = 0, l = attrs.length; i < l; i++) {\n        if (map[attrs[i].name] && !isIE && !isEdge) {\n            warn('duplicate attribute: ' + attrs[i].name, attrs[i]);\n        }\n        map[attrs[i].name] = attrs[i].value;\n    }\n    return map;\n}\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag(el) {\n    return el.tag === 'script' || el.tag === 'style';\n}\nfunction isForbiddenTag(el) {\n    return (el.tag === 'style' ||\n        (el.tag === 'script' &&\n            (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));\n}\nconst ieNSBug = /^xmlns:NS\\d+/;\nconst ieNSPrefix = /^NS\\d+:/;\n/* istanbul ignore next */\nfunction guardIESVGBug(attrs) {\n    const res = [];\n    for (let i = 0; i < attrs.length; i++) {\n        const attr = attrs[i];\n        if (!ieNSBug.test(attr.name)) {\n            attr.name = attr.name.replace(ieNSPrefix, '');\n            res.push(attr);\n        }\n    }\n    return res;\n}\nfunction checkForAliasModel(el, value) {\n    let _el = el;\n    while (_el) {\n        if (_el.for && _el.alias === value) {\n            warn(`<${el.tag} v-model=\"${value}\">: ` +\n                `You are binding v-model directly to a v-for iteration alias. ` +\n                `This will not be able to modify the v-for source array because ` +\n                `writing to the alias is like modifying a function local variable. ` +\n                `Consider using an array of objects and use v-model on an object property instead.`, el.rawAttrsMap['v-model']);\n        }\n        _el = _el.parent;\n    }\n}\n\n/**\n * Expand input[v-model] with dynamic type bindings into v-if-else chains\n * Turn this:\n *   <input v-model=\"data[type]\" :type=\"type\">\n * into this:\n *   <input v-if=\"type === 'checkbox'\" type=\"checkbox\" v-model=\"data[type]\">\n *   <input v-else-if=\"type === 'radio'\" type=\"radio\" v-model=\"data[type]\">\n *   <input v-else :type=\"type\" v-model=\"data[type]\">\n */\nfunction preTransformNode(el, options) {\n    if (el.tag === 'input') {\n        const map = el.attrsMap;\n        if (!map['v-model']) {\n            return;\n        }\n        let typeBinding;\n        if (map[':type'] || map['v-bind:type']) {\n            typeBinding = getBindingAttr(el, 'type');\n        }\n        if (!map.type && !typeBinding && map['v-bind']) {\n            typeBinding = `(${map['v-bind']}).type`;\n        }\n        if (typeBinding) {\n            const ifCondition = getAndRemoveAttr(el, 'v-if', true);\n            const ifConditionExtra = ifCondition ? `&&(${ifCondition})` : ``;\n            const hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n            const elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n            // 1. checkbox\n            const branch0 = cloneASTElement(el);\n            // process for on the main node\n            processFor(branch0);\n            addRawAttr(branch0, 'type', 'checkbox');\n            processElement(branch0, options);\n            branch0.processed = true; // prevent it from double-processed\n            branch0.if = `(${typeBinding})==='checkbox'` + ifConditionExtra;\n            addIfCondition(branch0, {\n                exp: branch0.if,\n                block: branch0\n            });\n            // 2. add radio else-if condition\n            const branch1 = cloneASTElement(el);\n            getAndRemoveAttr(branch1, 'v-for', true);\n            addRawAttr(branch1, 'type', 'radio');\n            processElement(branch1, options);\n            addIfCondition(branch0, {\n                exp: `(${typeBinding})==='radio'` + ifConditionExtra,\n                block: branch1\n            });\n            // 3. other\n            const branch2 = cloneASTElement(el);\n            getAndRemoveAttr(branch2, 'v-for', true);\n            addRawAttr(branch2, ':type', typeBinding);\n            processElement(branch2, options);\n            addIfCondition(branch0, {\n                exp: ifCondition,\n                block: branch2\n            });\n            if (hasElse) {\n                branch0.else = true;\n            }\n            else if (elseIfCondition) {\n                branch0.elseif = elseIfCondition;\n            }\n            return branch0;\n        }\n    }\n}\nfunction cloneASTElement(el) {\n    return createASTElement(el.tag, el.attrsList.slice(), el.parent);\n}\nvar model = {\n    preTransformNode\n};\n\nvar modules = [klass, style, model];\n\nfunction text(el, dir) {\n    if (dir.value) {\n        addProp(el, 'textContent', `_s(${dir.value})`, dir);\n    }\n}\n\nfunction html(el, dir) {\n    if (dir.value) {\n        addProp(el, 'innerHTML', `_s(${dir.value})`, dir);\n    }\n}\n\nvar directives = {\n    model: model$1,\n    text,\n    html\n};\n\nconst baseOptions = {\n    expectHTML: true,\n    modules,\n    directives,\n    isPreTag,\n    isUnaryTag,\n    mustUseProp,\n    canBeLeftOpenTag,\n    isReservedTag,\n    getTagNamespace,\n    staticKeys: genStaticKeys$1(modules)\n};\n\nlet isStaticKey;\nlet isPlatformReservedTag;\nconst genStaticKeysCached = cached(genStaticKeys);\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize(root, options) {\n    if (!root)\n        return;\n    isStaticKey = genStaticKeysCached(options.staticKeys || '');\n    isPlatformReservedTag = options.isReservedTag || no;\n    // first pass: mark all non-static nodes.\n    markStatic(root);\n    // second pass: mark static roots.\n    markStaticRoots(root, false);\n}\nfunction genStaticKeys(keys) {\n    return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +\n        (keys ? ',' + keys : ''));\n}\nfunction markStatic(node) {\n    node.static = isStatic(node);\n    if (node.type === 1) {\n        // do not make component slot content static. this avoids\n        // 1. components not able to mutate slot nodes\n        // 2. static slot content fails for hot-reloading\n        if (!isPlatformReservedTag(node.tag) &&\n            node.tag !== 'slot' &&\n            node.attrsMap['inline-template'] == null) {\n            return;\n        }\n        for (let i = 0, l = node.children.length; i < l; i++) {\n            const child = node.children[i];\n            markStatic(child);\n            if (!child.static) {\n                node.static = false;\n            }\n        }\n        if (node.ifConditions) {\n            for (let i = 1, l = node.ifConditions.length; i < l; i++) {\n                const block = node.ifConditions[i].block;\n                markStatic(block);\n                if (!block.static) {\n                    node.static = false;\n                }\n            }\n        }\n    }\n}\nfunction markStaticRoots(node, isInFor) {\n    if (node.type === 1) {\n        if (node.static || node.once) {\n            node.staticInFor = isInFor;\n        }\n        // For a node to qualify as a static root, it should have children that\n        // are not just static text. Otherwise the cost of hoisting out will\n        // outweigh the benefits and it's better off to just always render it fresh.\n        if (node.static &&\n            node.children.length &&\n            !(node.children.length === 1 && node.children[0].type === 3)) {\n            node.staticRoot = true;\n            return;\n        }\n        else {\n            node.staticRoot = false;\n        }\n        if (node.children) {\n            for (let i = 0, l = node.children.length; i < l; i++) {\n                markStaticRoots(node.children[i], isInFor || !!node.for);\n            }\n        }\n        if (node.ifConditions) {\n            for (let i = 1, l = node.ifConditions.length; i < l; i++) {\n                markStaticRoots(node.ifConditions[i].block, isInFor);\n            }\n        }\n    }\n}\nfunction isStatic(node) {\n    if (node.type === 2) {\n        // expression\n        return false;\n    }\n    if (node.type === 3) {\n        // text\n        return true;\n    }\n    return !!(node.pre ||\n        (!node.hasBindings && // no dynamic bindings\n            !node.if &&\n            !node.for && // not v-if or v-for or v-else\n            !isBuiltInTag(node.tag) && // not a built-in\n            isPlatformReservedTag(node.tag) && // not a component\n            !isDirectChildOfTemplateFor(node) &&\n            Object.keys(node).every(isStaticKey)));\n}\nfunction isDirectChildOfTemplateFor(node) {\n    while (node.parent) {\n        node = node.parent;\n        if (node.tag !== 'template') {\n            return false;\n        }\n        if (node.for) {\n            return true;\n        }\n    }\n    return false;\n}\n\nconst fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/;\nconst fnInvokeRE = /\\([^)]*?\\);*$/;\nconst simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n// KeyboardEvent.keyCode aliases\nconst keyCodes = {\n    esc: 27,\n    tab: 9,\n    enter: 13,\n    space: 32,\n    up: 38,\n    left: 37,\n    right: 39,\n    down: 40,\n    delete: [8, 46]\n};\n// KeyboardEvent.key aliases\nconst keyNames = {\n    // #7880: IE11 and Edge use `Esc` for Escape key name.\n    esc: ['Esc', 'Escape'],\n    tab: 'Tab',\n    enter: 'Enter',\n    // #9112: IE11 uses `Spacebar` for Space key name.\n    space: [' ', 'Spacebar'],\n    // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n    up: ['Up', 'ArrowUp'],\n    left: ['Left', 'ArrowLeft'],\n    right: ['Right', 'ArrowRight'],\n    down: ['Down', 'ArrowDown'],\n    // #9112: IE11 uses `Del` for Delete key name.\n    delete: ['Backspace', 'Delete', 'Del']\n};\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nconst genGuard = condition => `if(${condition})return null;`;\nconst modifierCode = {\n    stop: '$event.stopPropagation();',\n    prevent: '$event.preventDefault();',\n    self: genGuard(`$event.target !== $event.currentTarget`),\n    ctrl: genGuard(`!$event.ctrlKey`),\n    shift: genGuard(`!$event.shiftKey`),\n    alt: genGuard(`!$event.altKey`),\n    meta: genGuard(`!$event.metaKey`),\n    left: genGuard(`'button' in $event && $event.button !== 0`),\n    middle: genGuard(`'button' in $event && $event.button !== 1`),\n    right: genGuard(`'button' in $event && $event.button !== 2`)\n};\nfunction genHandlers(events, isNative) {\n    const prefix = isNative ? 'nativeOn:' : 'on:';\n    let staticHandlers = ``;\n    let dynamicHandlers = ``;\n    for (const name in events) {\n        const handlerCode = genHandler(events[name]);\n        //@ts-expect-error\n        if (events[name] && events[name].dynamic) {\n            dynamicHandlers += `${name},${handlerCode},`;\n        }\n        else {\n            staticHandlers += `\"${name}\":${handlerCode},`;\n        }\n    }\n    staticHandlers = `{${staticHandlers.slice(0, -1)}}`;\n    if (dynamicHandlers) {\n        return prefix + `_d(${staticHandlers},[${dynamicHandlers.slice(0, -1)}])`;\n    }\n    else {\n        return prefix + staticHandlers;\n    }\n}\nfunction genHandler(handler) {\n    if (!handler) {\n        return 'function(){}';\n    }\n    if (Array.isArray(handler)) {\n        return `[${handler.map(handler => genHandler(handler)).join(',')}]`;\n    }\n    const isMethodPath = simplePathRE.test(handler.value);\n    const isFunctionExpression = fnExpRE.test(handler.value);\n    const isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));\n    if (!handler.modifiers) {\n        if (isMethodPath || isFunctionExpression) {\n            return handler.value;\n        }\n        return `function($event){${isFunctionInvocation ? `return ${handler.value}` : handler.value}}`; // inline statement\n    }\n    else {\n        let code = '';\n        let genModifierCode = '';\n        const keys = [];\n        for (const key in handler.modifiers) {\n            if (modifierCode[key]) {\n                genModifierCode += modifierCode[key];\n                // left/right\n                if (keyCodes[key]) {\n                    keys.push(key);\n                }\n            }\n            else if (key === 'exact') {\n                const modifiers = handler.modifiers;\n                genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']\n                    .filter(keyModifier => !modifiers[keyModifier])\n                    .map(keyModifier => `$event.${keyModifier}Key`)\n                    .join('||'));\n            }\n            else {\n                keys.push(key);\n            }\n        }\n        if (keys.length) {\n            code += genKeyFilter(keys);\n        }\n        // Make sure modifiers like prevent and stop get executed after key filtering\n        if (genModifierCode) {\n            code += genModifierCode;\n        }\n        const handlerCode = isMethodPath\n            ? `return ${handler.value}.apply(null, arguments)`\n            : isFunctionExpression\n                ? `return (${handler.value}).apply(null, arguments)`\n                : isFunctionInvocation\n                    ? `return ${handler.value}`\n                    : handler.value;\n        return `function($event){${code}${handlerCode}}`;\n    }\n}\nfunction genKeyFilter(keys) {\n    return (\n    // make sure the key filters only apply to KeyboardEvents\n    // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake\n    // key events that do not have keyCode property...\n    `if(!$event.type.indexOf('key')&&` +\n        `${keys.map(genFilterCode).join('&&')})return null;`);\n}\nfunction genFilterCode(key) {\n    const keyVal = parseInt(key, 10);\n    if (keyVal) {\n        return `$event.keyCode!==${keyVal}`;\n    }\n    const keyCode = keyCodes[key];\n    const keyName = keyNames[key];\n    return (`_k($event.keyCode,` +\n        `${JSON.stringify(key)},` +\n        `${JSON.stringify(keyCode)},` +\n        `$event.key,` +\n        `${JSON.stringify(keyName)}` +\n        `)`);\n}\n\nfunction on(el, dir) {\n    if (dir.modifiers) {\n        warn$2(`v-on without argument does not support modifiers.`);\n    }\n    el.wrapListeners = (code) => `_g(${code},${dir.value})`;\n}\n\nfunction bind(el, dir) {\n    el.wrapData = (code) => {\n        return `_b(${code},'${el.tag}',${dir.value},${dir.modifiers && dir.modifiers.prop ? 'true' : 'false'}${dir.modifiers && dir.modifiers.sync ? ',true' : ''})`;\n    };\n}\n\nvar baseDirectives = {\n    on,\n    bind,\n    cloak: noop\n};\n\nclass CodegenState {\n    constructor(options) {\n        this.options = options;\n        this.warn = options.warn || baseWarn;\n        this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n        this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n        this.directives = extend(extend({}, baseDirectives), options.directives);\n        const isReservedTag = options.isReservedTag || no;\n        this.maybeComponent = (el) => !!el.component || !isReservedTag(el.tag);\n        this.onceId = 0;\n        this.staticRenderFns = [];\n        this.pre = false;\n    }\n}\nfunction generate(ast, options) {\n    const state = new CodegenState(options);\n    // fix #11483, Root level <script> tags should not be rendered.\n    const code = ast\n        ? ast.tag === 'script'\n            ? 'null'\n            : genElement(ast, state)\n        : '_c(\"div\")';\n    return {\n        render: `with(this){return ${code}}`,\n        staticRenderFns: state.staticRenderFns\n    };\n}\nfunction genElement(el, state) {\n    if (el.parent) {\n        el.pre = el.pre || el.parent.pre;\n    }\n    if (el.staticRoot && !el.staticProcessed) {\n        return genStatic(el, state);\n    }\n    else if (el.once && !el.onceProcessed) {\n        return genOnce(el, state);\n    }\n    else if (el.for && !el.forProcessed) {\n        return genFor(el, state);\n    }\n    else if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.tag === 'template' && !el.slotTarget && !state.pre) {\n        return genChildren(el, state) || 'void 0';\n    }\n    else if (el.tag === 'slot') {\n        return genSlot(el, state);\n    }\n    else {\n        // component or element\n        let code;\n        if (el.component) {\n            code = genComponent(el.component, el, state);\n        }\n        else {\n            let data;\n            const maybeComponent = state.maybeComponent(el);\n            if (!el.plain || (el.pre && maybeComponent)) {\n                data = genData(el, state);\n            }\n            let tag;\n            // check if this is a component in <script setup>\n            const bindings = state.options.bindings;\n            if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {\n                tag = checkBindingType(bindings, el.tag);\n            }\n            if (!tag)\n                tag = `'${el.tag}'`;\n            const children = el.inlineTemplate ? null : genChildren(el, state, true);\n            code = `_c(${tag}${data ? `,${data}` : '' // data\n            }${children ? `,${children}` : '' // children\n            })`;\n        }\n        // module transforms\n        for (let i = 0; i < state.transforms.length; i++) {\n            code = state.transforms[i](el, code);\n        }\n        return code;\n    }\n}\nfunction checkBindingType(bindings, key) {\n    const camelName = camelize(key);\n    const PascalName = capitalize(camelName);\n    const checkType = (type) => {\n        if (bindings[key] === type) {\n            return key;\n        }\n        if (bindings[camelName] === type) {\n            return camelName;\n        }\n        if (bindings[PascalName] === type) {\n            return PascalName;\n        }\n    };\n    const fromConst = checkType(\"setup-const\" /* BindingTypes.SETUP_CONST */) ||\n        checkType(\"setup-reactive-const\" /* BindingTypes.SETUP_REACTIVE_CONST */);\n    if (fromConst) {\n        return fromConst;\n    }\n    const fromMaybeRef = checkType(\"setup-let\" /* BindingTypes.SETUP_LET */) ||\n        checkType(\"setup-ref\" /* BindingTypes.SETUP_REF */) ||\n        checkType(\"setup-maybe-ref\" /* BindingTypes.SETUP_MAYBE_REF */);\n    if (fromMaybeRef) {\n        return fromMaybeRef;\n    }\n}\n// hoist static sub-trees out\nfunction genStatic(el, state) {\n    el.staticProcessed = true;\n    // Some elements (templates) need to behave differently inside of a v-pre\n    // node.  All pre nodes are static roots, so we can use this as a location to\n    // wrap a state change and reset it upon exiting the pre node.\n    const originalPreState = state.pre;\n    if (el.pre) {\n        state.pre = el.pre;\n    }\n    state.staticRenderFns.push(`with(this){return ${genElement(el, state)}}`);\n    state.pre = originalPreState;\n    return `_m(${state.staticRenderFns.length - 1}${el.staticInFor ? ',true' : ''})`;\n}\n// v-once\nfunction genOnce(el, state) {\n    el.onceProcessed = true;\n    if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.staticInFor) {\n        let key = '';\n        let parent = el.parent;\n        while (parent) {\n            if (parent.for) {\n                key = parent.key;\n                break;\n            }\n            parent = parent.parent;\n        }\n        if (!key) {\n            state.warn(`v-once can only be used inside v-for that is keyed. `, el.rawAttrsMap['v-once']);\n            return genElement(el, state);\n        }\n        return `_o(${genElement(el, state)},${state.onceId++},${key})`;\n    }\n    else {\n        return genStatic(el, state);\n    }\n}\nfunction genIf(el, state, altGen, altEmpty) {\n    el.ifProcessed = true; // avoid recursion\n    return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);\n}\nfunction genIfConditions(conditions, state, altGen, altEmpty) {\n    if (!conditions.length) {\n        return altEmpty || '_e()';\n    }\n    const condition = conditions.shift();\n    if (condition.exp) {\n        return `(${condition.exp})?${genTernaryExp(condition.block)}:${genIfConditions(conditions, state, altGen, altEmpty)}`;\n    }\n    else {\n        return `${genTernaryExp(condition.block)}`;\n    }\n    // v-if with v-once should generate code like (a)?_m(0):_m(1)\n    function genTernaryExp(el) {\n        return altGen\n            ? altGen(el, state)\n            : el.once\n                ? genOnce(el, state)\n                : genElement(el, state);\n    }\n}\nfunction genFor(el, state, altGen, altHelper) {\n    const exp = el.for;\n    const alias = el.alias;\n    const iterator1 = el.iterator1 ? `,${el.iterator1}` : '';\n    const iterator2 = el.iterator2 ? `,${el.iterator2}` : '';\n    if (state.maybeComponent(el) &&\n        el.tag !== 'slot' &&\n        el.tag !== 'template' &&\n        !el.key) {\n        state.warn(`<${el.tag} v-for=\"${alias} in ${exp}\">: component lists rendered with ` +\n            `v-for should have explicit keys. ` +\n            `See https://v2.vuejs.org/v2/guide/list.html#key for more info.`, el.rawAttrsMap['v-for'], true /* tip */);\n    }\n    el.forProcessed = true; // avoid recursion\n    return (`${altHelper || '_l'}((${exp}),` +\n        `function(${alias}${iterator1}${iterator2}){` +\n        `return ${(altGen || genElement)(el, state)}` +\n        '})');\n}\nfunction genData(el, state) {\n    let data = '{';\n    // directives first.\n    // directives may mutate the el's other properties before they are generated.\n    const dirs = genDirectives(el, state);\n    if (dirs)\n        data += dirs + ',';\n    // key\n    if (el.key) {\n        data += `key:${el.key},`;\n    }\n    // ref\n    if (el.ref) {\n        data += `ref:${el.ref},`;\n    }\n    if (el.refInFor) {\n        data += `refInFor:true,`;\n    }\n    // pre\n    if (el.pre) {\n        data += `pre:true,`;\n    }\n    // record original tag name for components using \"is\" attribute\n    if (el.component) {\n        data += `tag:\"${el.tag}\",`;\n    }\n    // module data generation functions\n    for (let i = 0; i < state.dataGenFns.length; i++) {\n        data += state.dataGenFns[i](el);\n    }\n    // attributes\n    if (el.attrs) {\n        data += `attrs:${genProps(el.attrs)},`;\n    }\n    // DOM props\n    if (el.props) {\n        data += `domProps:${genProps(el.props)},`;\n    }\n    // event handlers\n    if (el.events) {\n        data += `${genHandlers(el.events, false)},`;\n    }\n    if (el.nativeEvents) {\n        data += `${genHandlers(el.nativeEvents, true)},`;\n    }\n    // slot target\n    // only for non-scoped slots\n    if (el.slotTarget && !el.slotScope) {\n        data += `slot:${el.slotTarget},`;\n    }\n    // scoped slots\n    if (el.scopedSlots) {\n        data += `${genScopedSlots(el, el.scopedSlots, state)},`;\n    }\n    // component v-model\n    if (el.model) {\n        data += `model:{value:${el.model.value},callback:${el.model.callback},expression:${el.model.expression}},`;\n    }\n    // inline-template\n    if (el.inlineTemplate) {\n        const inlineTemplate = genInlineTemplate(el, state);\n        if (inlineTemplate) {\n            data += `${inlineTemplate},`;\n        }\n    }\n    data = data.replace(/,$/, '') + '}';\n    // v-bind dynamic argument wrap\n    // v-bind with dynamic arguments must be applied using the same v-bind object\n    // merge helper so that class/style/mustUseProp attrs are handled correctly.\n    if (el.dynamicAttrs) {\n        data = `_b(${data},\"${el.tag}\",${genProps(el.dynamicAttrs)})`;\n    }\n    // v-bind data wrap\n    if (el.wrapData) {\n        data = el.wrapData(data);\n    }\n    // v-on data wrap\n    if (el.wrapListeners) {\n        data = el.wrapListeners(data);\n    }\n    return data;\n}\nfunction genDirectives(el, state) {\n    const dirs = el.directives;\n    if (!dirs)\n        return;\n    let res = 'directives:[';\n    let hasRuntime = false;\n    let i, l, dir, needRuntime;\n    for (i = 0, l = dirs.length; i < l; i++) {\n        dir = dirs[i];\n        needRuntime = true;\n        const gen = state.directives[dir.name];\n        if (gen) {\n            // compile-time directive that manipulates AST.\n            // returns true if it also needs a runtime counterpart.\n            needRuntime = !!gen(el, dir, state.warn);\n        }\n        if (needRuntime) {\n            hasRuntime = true;\n            res += `{name:\"${dir.name}\",rawName:\"${dir.rawName}\"${dir.value\n                ? `,value:(${dir.value}),expression:${JSON.stringify(dir.value)}`\n                : ''}${dir.arg ? `,arg:${dir.isDynamicArg ? dir.arg : `\"${dir.arg}\"`}` : ''}${dir.modifiers ? `,modifiers:${JSON.stringify(dir.modifiers)}` : ''}},`;\n        }\n    }\n    if (hasRuntime) {\n        return res.slice(0, -1) + ']';\n    }\n}\nfunction genInlineTemplate(el, state) {\n    const ast = el.children[0];\n    if ((el.children.length !== 1 || ast.type !== 1)) {\n        state.warn('Inline-template components must have exactly one child element.', { start: el.start });\n    }\n    if (ast && ast.type === 1) {\n        const inlineRenderFns = generate(ast, state.options);\n        return `inlineTemplate:{render:function(){${inlineRenderFns.render}},staticRenderFns:[${inlineRenderFns.staticRenderFns\n            .map(code => `function(){${code}}`)\n            .join(',')}]}`;\n    }\n}\nfunction genScopedSlots(el, slots, state) {\n    // by default scoped slots are considered \"stable\", this allows child\n    // components with only scoped slots to skip forced updates from parent.\n    // but in some cases we have to bail-out of this optimization\n    // for example if the slot contains dynamic names, has v-if or v-for on them...\n    let needsForceUpdate = el.for ||\n        Object.keys(slots).some(key => {\n            const slot = slots[key];\n            return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic\n            );\n        });\n    // #9534: if a component with scoped slots is inside a conditional branch,\n    // it's possible for the same component to be reused but with different\n    // compiled slot content. To avoid that, we generate a unique key based on\n    // the generated code of all the slot contents.\n    let needsKey = !!el.if;\n    // OR when it is inside another scoped slot or v-for (the reactivity may be\n    // disconnected due to the intermediate scope variable)\n    // #9438, #9506\n    // TODO: this can be further optimized by properly analyzing in-scope bindings\n    // and skip force updating ones that do not actually use scope variables.\n    if (!needsForceUpdate) {\n        let parent = el.parent;\n        while (parent) {\n            if ((parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||\n                parent.for) {\n                needsForceUpdate = true;\n                break;\n            }\n            if (parent.if) {\n                needsKey = true;\n            }\n            parent = parent.parent;\n        }\n    }\n    const generatedSlots = Object.keys(slots)\n        .map(key => genScopedSlot(slots[key], state))\n        .join(',');\n    return `scopedSlots:_u([${generatedSlots}]${needsForceUpdate ? `,null,true` : ``}${!needsForceUpdate && needsKey ? `,null,false,${hash(generatedSlots)}` : ``})`;\n}\nfunction hash(str) {\n    let hash = 5381;\n    let i = str.length;\n    while (i) {\n        hash = (hash * 33) ^ str.charCodeAt(--i);\n    }\n    return hash >>> 0;\n}\nfunction containsSlotChild(el) {\n    if (el.type === 1) {\n        if (el.tag === 'slot') {\n            return true;\n        }\n        return el.children.some(containsSlotChild);\n    }\n    return false;\n}\nfunction genScopedSlot(el, state) {\n    const isLegacySyntax = el.attrsMap['slot-scope'];\n    if (el.if && !el.ifProcessed && !isLegacySyntax) {\n        return genIf(el, state, genScopedSlot, `null`);\n    }\n    if (el.for && !el.forProcessed) {\n        return genFor(el, state, genScopedSlot);\n    }\n    const slotScope = el.slotScope === emptySlotScopeToken ? `` : String(el.slotScope);\n    const fn = `function(${slotScope}){` +\n        `return ${el.tag === 'template'\n            ? el.if && isLegacySyntax\n                ? `(${el.if})?${genChildren(el, state) || 'undefined'}:undefined`\n                : genChildren(el, state) || 'undefined'\n            : genElement(el, state)}}`;\n    // reverse proxy v-slot without scope on this.$slots\n    const reverseProxy = slotScope ? `` : `,proxy:true`;\n    return `{key:${el.slotTarget || `\"default\"`},fn:${fn}${reverseProxy}}`;\n}\nfunction genChildren(el, state, checkSkip, altGenElement, altGenNode) {\n    const children = el.children;\n    if (children.length) {\n        const el = children[0];\n        // optimize single v-for\n        if (children.length === 1 &&\n            el.for &&\n            el.tag !== 'template' &&\n            el.tag !== 'slot') {\n            const normalizationType = checkSkip\n                ? state.maybeComponent(el)\n                    ? `,1`\n                    : `,0`\n                : ``;\n            return `${(altGenElement || genElement)(el, state)}${normalizationType}`;\n        }\n        const normalizationType = checkSkip\n            ? getNormalizationType(children, state.maybeComponent)\n            : 0;\n        const gen = altGenNode || genNode;\n        return `[${children.map(c => gen(c, state)).join(',')}]${normalizationType ? `,${normalizationType}` : ''}`;\n    }\n}\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType(children, maybeComponent) {\n    let res = 0;\n    for (let i = 0; i < children.length; i++) {\n        const el = children[i];\n        if (el.type !== 1) {\n            continue;\n        }\n        if (needsNormalization(el) ||\n            (el.ifConditions &&\n                el.ifConditions.some(c => needsNormalization(c.block)))) {\n            res = 2;\n            break;\n        }\n        if (maybeComponent(el) ||\n            (el.ifConditions && el.ifConditions.some(c => maybeComponent(c.block)))) {\n            res = 1;\n        }\n    }\n    return res;\n}\nfunction needsNormalization(el) {\n    return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';\n}\nfunction genNode(node, state) {\n    if (node.type === 1) {\n        return genElement(node, state);\n    }\n    else if (node.type === 3 && node.isComment) {\n        return genComment(node);\n    }\n    else {\n        return genText(node);\n    }\n}\nfunction genText(text) {\n    return `_v(${text.type === 2\n        ? text.expression // no need for () because already wrapped in _s()\n        : transformSpecialNewlines(JSON.stringify(text.text))})`;\n}\nfunction genComment(comment) {\n    return `_e(${JSON.stringify(comment.text)})`;\n}\nfunction genSlot(el, state) {\n    const slotName = el.slotName || '\"default\"';\n    const children = genChildren(el, state);\n    let res = `_t(${slotName}${children ? `,function(){return ${children}}` : ''}`;\n    const attrs = el.attrs || el.dynamicAttrs\n        ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(attr => ({\n            // slot props are camelized\n            name: camelize(attr.name),\n            value: attr.value,\n            dynamic: attr.dynamic\n        })))\n        : null;\n    const bind = el.attrsMap['v-bind'];\n    if ((attrs || bind) && !children) {\n        res += `,null`;\n    }\n    if (attrs) {\n        res += `,${attrs}`;\n    }\n    if (bind) {\n        res += `${attrs ? '' : ',null'},${bind}`;\n    }\n    return res + ')';\n}\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent(componentName, el, state) {\n    const children = el.inlineTemplate ? null : genChildren(el, state, true);\n    return `_c(${componentName},${genData(el, state)}${children ? `,${children}` : ''})`;\n}\nfunction genProps(props) {\n    let staticProps = ``;\n    let dynamicProps = ``;\n    for (let i = 0; i < props.length; i++) {\n        const prop = props[i];\n        const value = transformSpecialNewlines(prop.value);\n        if (prop.dynamic) {\n            dynamicProps += `${prop.name},${value},`;\n        }\n        else {\n            staticProps += `\"${prop.name}\":${value},`;\n        }\n    }\n    staticProps = `{${staticProps.slice(0, -1)}}`;\n    if (dynamicProps) {\n        return `_d(${staticProps},[${dynamicProps.slice(0, -1)}])`;\n    }\n    else {\n        return staticProps;\n    }\n}\n// #3895, #4268\nfunction transformSpecialNewlines(text) {\n    return text.replace(/\\u2028/g, '\\\\u2028').replace(/\\u2029/g, '\\\\u2029');\n}\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nconst prohibitedKeywordRE = new RegExp('\\\\b' +\n    ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n        'super,throw,while,yield,delete,export,import,return,switch,default,' +\n        'extends,finally,continue,debugger,function,arguments')\n        .split(',')\n        .join('\\\\b|\\\\b') +\n    '\\\\b');\n// these unary operators should not be used as property/method names\nconst unaryOperatorsRE = new RegExp('\\\\b' +\n    'delete,typeof,void'.split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') +\n    '\\\\s*\\\\([^\\\\)]*\\\\)');\n// strip strings in expressions\nconst stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n// detect problematic expressions in a template\nfunction detectErrors(ast, warn) {\n    if (ast) {\n        checkNode(ast, warn);\n    }\n}\nfunction checkNode(node, warn) {\n    if (node.type === 1) {\n        for (const name in node.attrsMap) {\n            if (dirRE.test(name)) {\n                const value = node.attrsMap[name];\n                if (value) {\n                    const range = node.rawAttrsMap[name];\n                    if (name === 'v-for') {\n                        checkFor(node, `v-for=\"${value}\"`, warn, range);\n                    }\n                    else if (name === 'v-slot' || name[0] === '#') {\n                        checkFunctionParameterExpression(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                    else if (onRE.test(name)) {\n                        checkEvent(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                    else {\n                        checkExpression(value, `${name}=\"${value}\"`, warn, range);\n                    }\n                }\n            }\n        }\n        if (node.children) {\n            for (let i = 0; i < node.children.length; i++) {\n                checkNode(node.children[i], warn);\n            }\n        }\n    }\n    else if (node.type === 2) {\n        checkExpression(node.expression, node.text, warn, node);\n    }\n}\nfunction checkEvent(exp, text, warn, range) {\n    const stripped = exp.replace(stripStringRE, '');\n    const keywordMatch = stripped.match(unaryOperatorsRE);\n    if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {\n        warn(`avoid using JavaScript unary operator as property name: ` +\n            `\"${keywordMatch[0]}\" in expression ${text.trim()}`, range);\n    }\n    checkExpression(exp, text, warn, range);\n}\nfunction checkFor(node, text, warn, range) {\n    checkExpression(node.for || '', text, warn, range);\n    checkIdentifier(node.alias, 'v-for alias', text, warn, range);\n    checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);\n    checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);\n}\nfunction checkIdentifier(ident, type, text, warn, range) {\n    if (typeof ident === 'string') {\n        try {\n            new Function(`var ${ident}=_`);\n        }\n        catch (e) {\n            warn(`invalid ${type} \"${ident}\" in expression: ${text.trim()}`, range);\n        }\n    }\n}\nfunction checkExpression(exp, text, warn, range) {\n    try {\n        new Function(`return ${exp}`);\n    }\n    catch (e) {\n        const keywordMatch = exp\n            .replace(stripStringRE, '')\n            .match(prohibitedKeywordRE);\n        if (keywordMatch) {\n            warn(`avoid using JavaScript keyword as property name: ` +\n                `\"${keywordMatch[0]}\"\\n  Raw expression: ${text.trim()}`, range);\n        }\n        else {\n            warn(`invalid expression: ${e.message} in\\n\\n` +\n                `    ${exp}\\n\\n` +\n                `  Raw expression: ${text.trim()}\\n`, range);\n        }\n    }\n}\nfunction checkFunctionParameterExpression(exp, text, warn, range) {\n    try {\n        new Function(exp, '');\n    }\n    catch (e) {\n        warn(`invalid function parameter expression: ${e.message} in\\n\\n` +\n            `    ${exp}\\n\\n` +\n            `  Raw expression: ${text.trim()}\\n`, range);\n    }\n}\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n    const lines = source.split(/\\r?\\n/);\n    let count = 0;\n    const res = [];\n    for (let i = 0; i < lines.length; i++) {\n        count += lines[i].length + 1;\n        if (count >= start) {\n            for (let j = i - range; j <= i + range || end > count; j++) {\n                if (j < 0 || j >= lines.length)\n                    continue;\n                res.push(`${j + 1}${repeat(` `, 3 - String(j + 1).length)}|  ${lines[j]}`);\n                const lineLength = lines[j].length;\n                if (j === i) {\n                    // push underline\n                    const pad = start - (count - lineLength) + 1;\n                    const length = end > count ? lineLength - pad : end - start;\n                    res.push(`   |  ` + repeat(` `, pad) + repeat(`^`, length));\n                }\n                else if (j > i) {\n                    if (end > count) {\n                        const length = Math.min(end - count, lineLength);\n                        res.push(`   |  ` + repeat(`^`, length));\n                    }\n                    count += lineLength + 1;\n                }\n            }\n            break;\n        }\n    }\n    return res.join('\\n');\n}\nfunction repeat(str, n) {\n    let result = '';\n    if (n > 0) {\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            // eslint-disable-line\n            if (n & 1)\n                result += str;\n            n >>>= 1;\n            if (n <= 0)\n                break;\n            str += str;\n        }\n    }\n    return result;\n}\n\nfunction createFunction(code, errors) {\n    try {\n        return new Function(code);\n    }\n    catch (err) {\n        errors.push({ err, code });\n        return noop;\n    }\n}\nfunction createCompileToFunctionFn(compile) {\n    const cache = Object.create(null);\n    return function compileToFunctions(template, options, vm) {\n        options = extend({}, options);\n        const warn = options.warn || warn$2;\n        delete options.warn;\n        /* istanbul ignore if */\n        {\n            // detect possible CSP restriction\n            try {\n                new Function('return 1');\n            }\n            catch (e) {\n                if (e.toString().match(/unsafe-eval|CSP/)) {\n                    warn('It seems you are using the standalone build of Vue.js in an ' +\n                        'environment with Content Security Policy that prohibits unsafe-eval. ' +\n                        'The template compiler cannot work in this environment. Consider ' +\n                        'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n                        'templates into render functions.');\n                }\n            }\n        }\n        // check cache\n        const key = options.delimiters\n            ? String(options.delimiters) + template\n            : template;\n        if (cache[key]) {\n            return cache[key];\n        }\n        // compile\n        const compiled = compile(template, options);\n        // check compilation errors/tips\n        {\n            if (compiled.errors && compiled.errors.length) {\n                if (options.outputSourceRange) {\n                    compiled.errors.forEach(e => {\n                        warn(`Error compiling template:\\n\\n${e.msg}\\n\\n` +\n                            generateCodeFrame(template, e.start, e.end), vm);\n                    });\n                }\n                else {\n                    warn(`Error compiling template:\\n\\n${template}\\n\\n` +\n                        compiled.errors.map(e => `- ${e}`).join('\\n') +\n                        '\\n', vm);\n                }\n            }\n            if (compiled.tips && compiled.tips.length) {\n                if (options.outputSourceRange) {\n                    compiled.tips.forEach(e => tip(e.msg, vm));\n                }\n                else {\n                    compiled.tips.forEach(msg => tip(msg, vm));\n                }\n            }\n        }\n        // turn code into functions\n        const res = {};\n        const fnGenErrors = [];\n        res.render = createFunction(compiled.render, fnGenErrors);\n        res.staticRenderFns = compiled.staticRenderFns.map(code => {\n            return createFunction(code, fnGenErrors);\n        });\n        // check function generation errors.\n        // this should only happen if there is a bug in the compiler itself.\n        // mostly for codegen development use\n        /* istanbul ignore if */\n        {\n            if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n                warn(`Failed to generate render function:\\n\\n` +\n                    fnGenErrors\n                        .map(({ err, code }) => `${err.toString()} in\\n\\n${code}\\n`)\n                        .join('\\n'), vm);\n            }\n        }\n        return (cache[key] = res);\n    };\n}\n\nfunction createCompilerCreator(baseCompile) {\n    return function createCompiler(baseOptions) {\n        function compile(template, options) {\n            const finalOptions = Object.create(baseOptions);\n            const errors = [];\n            const tips = [];\n            let warn = (msg, range, tip) => {\n                (tip ? tips : errors).push(msg);\n            };\n            if (options) {\n                if (options.outputSourceRange) {\n                    // $flow-disable-line\n                    const leadingSpaceLength = template.match(/^\\s*/)[0].length;\n                    warn = (msg, range, tip) => {\n                        const data = typeof msg === 'string' ? { msg } : msg;\n                        if (range) {\n                            if (range.start != null) {\n                                data.start = range.start + leadingSpaceLength;\n                            }\n                            if (range.end != null) {\n                                data.end = range.end + leadingSpaceLength;\n                            }\n                        }\n                        (tip ? tips : errors).push(data);\n                    };\n                }\n                // merge custom modules\n                if (options.modules) {\n                    finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n                }\n                // merge custom directives\n                if (options.directives) {\n                    finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);\n                }\n                // copy other options\n                for (const key in options) {\n                    if (key !== 'modules' && key !== 'directives') {\n                        finalOptions[key] = options[key];\n                    }\n                }\n            }\n            finalOptions.warn = warn;\n            const compiled = baseCompile(template.trim(), finalOptions);\n            {\n                detectErrors(compiled.ast, warn);\n            }\n            compiled.errors = errors;\n            compiled.tips = tips;\n            return compiled;\n        }\n        return {\n            compile,\n            compileToFunctions: createCompileToFunctionFn(compile)\n        };\n    };\n}\n\n// `createCompilerCreator` allows creating compilers that use alternative\n// parser/optimizer/codegen, e.g the SSR optimizing compiler.\n// Here we just export a default compiler using the default parts.\nconst createCompiler = createCompilerCreator(function baseCompile(template, options) {\n    const ast = parse(template.trim(), options);\n    if (options.optimize !== false) {\n        optimize(ast, options);\n    }\n    const code = generate(ast, options);\n    return {\n        ast,\n        render: code.render,\n        staticRenderFns: code.staticRenderFns\n    };\n});\n\nconst { compile, compileToFunctions } = createCompiler(baseOptions);\n\n// check whether current browser encodes a char inside attribute values\nlet div;\nfunction getShouldDecode(href) {\n    div = div || document.createElement('div');\n    div.innerHTML = href ? `<a href=\"\\n\"/>` : `<div a=\"\\n\"/>`;\n    return div.innerHTML.indexOf('&#10;') > 0;\n}\n// #3663: IE encodes newlines inside attribute values while other browsers don't\nconst shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n// #6828: chrome encodes content in a[href]\nconst shouldDecodeNewlinesForHref = inBrowser\n    ? getShouldDecode(true)\n    : false;\n\nconst idToTemplate = cached(id => {\n    const el = query(id);\n    return el && el.innerHTML;\n});\nconst mount = Vue.prototype.$mount;\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && query(el);\n    /* istanbul ignore if */\n    if (el === document.body || el === document.documentElement) {\n        warn$2(`Do not mount Vue to <html> or <body> - mount to normal elements instead.`);\n        return this;\n    }\n    const options = this.$options;\n    // resolve template/el and convert to render function\n    if (!options.render) {\n        let template = options.template;\n        if (template) {\n            if (typeof template === 'string') {\n                if (template.charAt(0) === '#') {\n                    template = idToTemplate(template);\n                    /* istanbul ignore if */\n                    if (!template) {\n                        warn$2(`Template element not found or is empty: ${options.template}`, this);\n                    }\n                }\n            }\n            else if (template.nodeType) {\n                template = template.innerHTML;\n            }\n            else {\n                {\n                    warn$2('invalid template option:' + template, this);\n                }\n                return this;\n            }\n        }\n        else if (el) {\n            // @ts-expect-error\n            template = getOuterHTML(el);\n        }\n        if (template) {\n            /* istanbul ignore if */\n            if (config.performance && mark) {\n                mark('compile');\n            }\n            const { render, staticRenderFns } = compileToFunctions(template, {\n                outputSourceRange: true,\n                shouldDecodeNewlines,\n                shouldDecodeNewlinesForHref,\n                delimiters: options.delimiters,\n                comments: options.comments\n            }, this);\n            options.render = render;\n            options.staticRenderFns = staticRenderFns;\n            /* istanbul ignore if */\n            if (config.performance && mark) {\n                mark('compile end');\n                measure(`vue ${this._name} compile`, 'compile', 'compile end');\n            }\n        }\n    }\n    return mount.call(this, el, hydrating);\n};\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML(el) {\n    if (el.outerHTML) {\n        return el.outerHTML;\n    }\n    else {\n        const container = document.createElement('div');\n        container.appendChild(el.cloneNode(true));\n        return container.innerHTML;\n    }\n}\nVue.compile = compileToFunctions;\n\nexport { EffectScope, computed, customRef, Vue as default, defineAsyncComponent, defineComponent, del, effectScope, getCurrentInstance, getCurrentScope, h, inject, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, mergeDefaults, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref$1 as ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useListeners, useSlots, version, watch, watchEffect, watchPostEffect, watchSyncEffect };\n"
  },
  {
    "path": "web/assets/vue/vue.esm.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\nvar emptyObject = Object.freeze({});\nvar isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n    return v === undefined || v === null;\n}\nfunction isDef(v) {\n    return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n    return v === true;\n}\nfunction isFalse(v) {\n    return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n    return (typeof value === 'string' ||\n        typeof value === 'number' ||\n        // $flow-disable-line\n        typeof value === 'symbol' ||\n        typeof value === 'boolean');\n}\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n    return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\nfunction toRawType(value) {\n    return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n    return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n    return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n    var n = parseFloat(String(val));\n    return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n    return (isDef(val) &&\n        typeof val.then === 'function' &&\n        typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n    return val == null\n        ? ''\n        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n            ? JSON.stringify(val, replacer, 2)\n            : String(val);\n}\nfunction replacer(_key, val) {\n    // avoid circular deps from v3\n    if (val && val.__v_isRef) {\n        return val.value;\n    }\n    return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n    var n = parseFloat(val);\n    return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n    var map = Object.create(null);\n    var list = str.split(',');\n    for (var i = 0; i < list.length; i++) {\n        map[list[i]] = true;\n    }\n    return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };\n}\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n    var len = arr.length;\n    if (len) {\n        // fast path for the only / last item\n        if (item === arr[len - 1]) {\n            arr.length = len - 1;\n            return;\n        }\n        var index = arr.indexOf(item);\n        if (index > -1) {\n            return arr.splice(index, 1);\n        }\n    }\n}\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n    var cache = Object.create(null);\n    return function cachedFn(str) {\n        var hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n    return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n    return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n    function boundFn(a) {\n        var l = arguments.length;\n        return l\n            ? l > 1\n                ? fn.apply(ctx, arguments)\n                : fn.call(ctx, a)\n            : fn.call(ctx);\n    }\n    boundFn._length = fn.length;\n    return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n    return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nvar bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n    start = start || 0;\n    var i = list.length - start;\n    var ret = new Array(i);\n    while (i--) {\n        ret[i] = list[i + start];\n    }\n    return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n    for (var key in _from) {\n        to[key] = _from[key];\n    }\n    return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n    var res = {};\n    for (var i = 0; i < arr.length; i++) {\n        if (arr[i]) {\n            extend(res, arr[i]);\n        }\n    }\n    return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n/**\n * Generate a string containing static keys from compiler modules.\n */\nfunction genStaticKeys$1(modules) {\n    return modules\n        .reduce(function (keys, m) { return keys.concat(m.staticKeys || []); }, [])\n        .join(',');\n}\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n    if (a === b)\n        return true;\n    var isObjectA = isObject(a);\n    var isObjectB = isObject(b);\n    if (isObjectA && isObjectB) {\n        try {\n            var isArrayA = Array.isArray(a);\n            var isArrayB = Array.isArray(b);\n            if (isArrayA && isArrayB) {\n                return (a.length === b.length &&\n                    a.every(function (e, i) {\n                        return looseEqual(e, b[i]);\n                    }));\n            }\n            else if (a instanceof Date && b instanceof Date) {\n                return a.getTime() === b.getTime();\n            }\n            else if (!isArrayA && !isArrayB) {\n                var keysA = Object.keys(a);\n                var keysB = Object.keys(b);\n                return (keysA.length === keysB.length &&\n                    keysA.every(function (key) {\n                        return looseEqual(a[key], b[key]);\n                    }));\n            }\n            else {\n                /* istanbul ignore next */\n                return false;\n            }\n        }\n        catch (e) {\n            /* istanbul ignore next */\n            return false;\n        }\n    }\n    else if (!isObjectA && !isObjectB) {\n        return String(a) === String(b);\n    }\n    else {\n        return false;\n    }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n    for (var i = 0; i < arr.length; i++) {\n        if (looseEqual(arr[i], val))\n            return i;\n    }\n    return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n    var called = false;\n    return function () {\n        if (!called) {\n            called = true;\n            fn.apply(this, arguments);\n        }\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n    if (x === y) {\n        return x === 0 && 1 / x !== 1 / y;\n    }\n    else {\n        return x === x || y === y;\n    }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\nvar ASSET_TYPES = ['component', 'directive', 'filter'];\nvar LIFECYCLE_HOOKS = [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated',\n    'errorCaptured',\n    'serverPrefetch',\n    'renderTracked',\n    'renderTriggered'\n];\n\nvar config = {\n    /**\n     * Option merge strategies (used in core/util/options)\n     */\n    // $flow-disable-line\n    optionMergeStrategies: Object.create(null),\n    /**\n     * Whether to suppress warnings.\n     */\n    silent: false,\n    /**\n     * Show production mode tip message on boot?\n     */\n    productionTip: process.env.NODE_ENV !== 'production',\n    /**\n     * Whether to enable devtools\n     */\n    devtools: process.env.NODE_ENV !== 'production',\n    /**\n     * Whether to record perf\n     */\n    performance: false,\n    /**\n     * Error handler for watcher errors\n     */\n    errorHandler: null,\n    /**\n     * Warn handler for watcher warns\n     */\n    warnHandler: null,\n    /**\n     * Ignore certain custom elements\n     */\n    ignoredElements: [],\n    /**\n     * Custom user key aliases for v-on\n     */\n    // $flow-disable-line\n    keyCodes: Object.create(null),\n    /**\n     * Check if a tag is reserved so that it cannot be registered as a\n     * component. This is platform-dependent and may be overwritten.\n     */\n    isReservedTag: no,\n    /**\n     * Check if an attribute is reserved so that it cannot be used as a component\n     * prop. This is platform-dependent and may be overwritten.\n     */\n    isReservedAttr: no,\n    /**\n     * Check if a tag is an unknown element.\n     * Platform-dependent.\n     */\n    isUnknownElement: no,\n    /**\n     * Get the namespace of an element\n     */\n    getTagNamespace: noop,\n    /**\n     * Parse the real tag name for the specific platform.\n     */\n    parsePlatformTagName: identity,\n    /**\n     * Check if an attribute must be bound using property, e.g. value\n     * Platform-dependent.\n     */\n    mustUseProp: no,\n    /**\n     * Perform updates asynchronously. Intended to be used by Vue Test Utils\n     * This will significantly reduce performance if set to false.\n     */\n    async: true,\n    /**\n     * Exposed for legacy reasons\n     */\n    _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n    var c = (str + '').charCodeAt(0);\n    return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n    Object.defineProperty(obj, key, {\n        value: val,\n        enumerable: !!enumerable,\n        writable: true,\n        configurable: true\n    });\n}\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp(\"[^\".concat(unicodeRegExp.source, \".$_\\\\d]\"));\nfunction parsePath(path) {\n    if (bailRE.test(path)) {\n        return;\n    }\n    var segments = path.split('.');\n    return function (obj) {\n        for (var i = 0; i < segments.length; i++) {\n            if (!obj)\n                return;\n            obj = obj[segments[i]];\n        }\n        return obj;\n    };\n}\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nvar nativeWatch = {}.watch;\nvar supportsPassive = false;\nif (inBrowser) {\n    try {\n        var opts = {};\n        Object.defineProperty(opts, 'passive', {\n            get: function () {\n                /* istanbul ignore next */\n                supportsPassive = true;\n            }\n        }); // https://github.com/facebook/flow/issues/285\n        window.addEventListener('test-passive', null, opts);\n    }\n    catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n    if (_isServer === undefined) {\n        /* istanbul ignore if */\n        if (!inBrowser && typeof global !== 'undefined') {\n            // detect presence of vue-server-renderer and avoid\n            // Webpack shimming the process\n            _isServer =\n                global['process'] && global['process'].env.VUE_ENV === 'server';\n        }\n        else {\n            _isServer = false;\n        }\n    }\n    return _isServer;\n};\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nvar hasSymbol = typeof Symbol !== 'undefined' &&\n    isNative(Symbol) &&\n    typeof Reflect !== 'undefined' &&\n    isNative(Reflect.ownKeys);\nvar _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n    // use native Set when available.\n    _Set = Set;\n}\nelse {\n    // a non-standard Set polyfill that only works with primitive keys.\n    _Set = /** @class */ (function () {\n        function Set() {\n            this.set = Object.create(null);\n        }\n        Set.prototype.has = function (key) {\n            return this.set[key] === true;\n        };\n        Set.prototype.add = function (key) {\n            this.set[key] = true;\n        };\n        Set.prototype.clear = function () {\n            this.set = Object.create(null);\n        };\n        return Set;\n    }());\n}\n\nvar currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n    return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm) {\n    if (vm === void 0) { vm = null; }\n    if (!vm)\n        currentInstance && currentInstance._scope.off();\n    currentInstance = vm;\n    vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nvar VNode = /** @class */ (function () {\n    function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n        this.tag = tag;\n        this.data = data;\n        this.children = children;\n        this.text = text;\n        this.elm = elm;\n        this.ns = undefined;\n        this.context = context;\n        this.fnContext = undefined;\n        this.fnOptions = undefined;\n        this.fnScopeId = undefined;\n        this.key = data && data.key;\n        this.componentOptions = componentOptions;\n        this.componentInstance = undefined;\n        this.parent = undefined;\n        this.raw = false;\n        this.isStatic = false;\n        this.isRootInsert = true;\n        this.isComment = false;\n        this.isCloned = false;\n        this.isOnce = false;\n        this.asyncFactory = asyncFactory;\n        this.asyncMeta = undefined;\n        this.isAsyncPlaceholder = false;\n    }\n    Object.defineProperty(VNode.prototype, \"child\", {\n        // DEPRECATED: alias for componentInstance for backwards compat.\n        /* istanbul ignore next */\n        get: function () {\n            return this.componentInstance;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return VNode;\n}());\nvar createEmptyVNode = function (text) {\n    if (text === void 0) { text = ''; }\n    var node = new VNode();\n    node.text = text;\n    node.isComment = true;\n    return node;\n};\nfunction createTextVNode(val) {\n    return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n    var cloned = new VNode(vnode.tag, vnode.data, \n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n    cloned.ns = vnode.ns;\n    cloned.isStatic = vnode.isStatic;\n    cloned.key = vnode.key;\n    cloned.isComment = vnode.isComment;\n    cloned.fnContext = vnode.fnContext;\n    cloned.fnOptions = vnode.fnOptions;\n    cloned.fnScopeId = vnode.fnScopeId;\n    cloned.asyncMeta = vnode.asyncMeta;\n    cloned.isCloned = true;\n    return cloned;\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\nvar initProxy;\nif (process.env.NODE_ENV !== 'production') {\n    var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n        'require' // for Webpack/Browserify\n    );\n    var warnNonPresent_1 = function (target, key) {\n        warn$2(\"Property or method \\\"\".concat(key, \"\\\" is not defined on the instance but \") +\n            'referenced during render. Make sure that this property is reactive, ' +\n            'either in the data option, or for class-based components, by ' +\n            'initializing the property. ' +\n            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n    };\n    var warnReservedPrefix_1 = function (target, key) {\n        warn$2(\"Property \\\"\".concat(key, \"\\\" must be accessed with \\\"$data.\").concat(key, \"\\\" because \") +\n            'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n            'prevent conflicts with Vue internals. ' +\n            'See: https://v2.vuejs.org/v2/api/#data', target);\n    };\n    var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);\n    if (hasProxy_1) {\n        var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n        config.keyCodes = new Proxy(config.keyCodes, {\n            set: function (target, key, value) {\n                if (isBuiltInModifier_1(key)) {\n                    warn$2(\"Avoid overwriting built-in modifier in config.keyCodes: .\".concat(key));\n                    return false;\n                }\n                else {\n                    target[key] = value;\n                    return true;\n                }\n            }\n        });\n    }\n    var hasHandler_1 = {\n        has: function (target, key) {\n            var has = key in target;\n            var isAllowed = allowedGlobals_1(key) ||\n                (typeof key === 'string' &&\n                    key.charAt(0) === '_' &&\n                    !(key in target.$data));\n            if (!has && !isAllowed) {\n                if (key in target.$data)\n                    warnReservedPrefix_1(target, key);\n                else\n                    warnNonPresent_1(target, key);\n            }\n            return has || !isAllowed;\n        }\n    };\n    var getHandler_1 = {\n        get: function (target, key) {\n            if (typeof key === 'string' && !(key in target)) {\n                if (key in target.$data)\n                    warnReservedPrefix_1(target, key);\n                else\n                    warnNonPresent_1(target, key);\n            }\n            return target[key];\n        }\n    };\n    initProxy = function initProxy(vm) {\n        if (hasProxy_1) {\n            // determine which proxy handler to use\n            var options = vm.$options;\n            var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;\n            vm._renderProxy = new Proxy(vm, handlers);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n    };\n}\n\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n\nvar __assign = function() {\n    __assign = Object.assign || function __assign(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\n\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n    var e = new Error(message);\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar uid$2 = 0;\nvar pendingCleanupDeps = [];\nvar cleanupDeps = function () {\n    for (var i = 0; i < pendingCleanupDeps.length; i++) {\n        var dep = pendingCleanupDeps[i];\n        dep.subs = dep.subs.filter(function (s) { return s; });\n        dep._pending = false;\n    }\n    pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nvar Dep = /** @class */ (function () {\n    function Dep() {\n        // pending subs cleanup\n        this._pending = false;\n        this.id = uid$2++;\n        this.subs = [];\n    }\n    Dep.prototype.addSub = function (sub) {\n        this.subs.push(sub);\n    };\n    Dep.prototype.removeSub = function (sub) {\n        // #12696 deps with massive amount of subscribers are extremely slow to\n        // clean up in Chromium\n        // to workaround this, we unset the sub for now, and clear them on\n        // next scheduler flush.\n        this.subs[this.subs.indexOf(sub)] = null;\n        if (!this._pending) {\n            this._pending = true;\n            pendingCleanupDeps.push(this);\n        }\n    };\n    Dep.prototype.depend = function (info) {\n        if (Dep.target) {\n            Dep.target.addDep(this);\n            if (process.env.NODE_ENV !== 'production' && info && Dep.target.onTrack) {\n                Dep.target.onTrack(__assign({ effect: Dep.target }, info));\n            }\n        }\n    };\n    Dep.prototype.notify = function (info) {\n        // stabilize the subscriber list first\n        var subs = this.subs.filter(function (s) { return s; });\n        if (process.env.NODE_ENV !== 'production' && !config.async) {\n            // subs aren't sorted in scheduler if not running async\n            // we need to sort them now to make sure they fire in correct\n            // order\n            subs.sort(function (a, b) { return a.id - b.id; });\n        }\n        for (var i = 0, l = subs.length; i < l; i++) {\n            var sub = subs[i];\n            if (process.env.NODE_ENV !== 'production' && info) {\n                sub.onTrigger &&\n                    sub.onTrigger(__assign({ effect: subs[i] }, info));\n            }\n            sub.update();\n        }\n    };\n    return Dep;\n}());\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\nfunction pushTarget(target) {\n    targetStack.push(target);\n    Dep.target = target;\n}\nfunction popTarget() {\n    targetStack.pop();\n    Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\nvar methodsToPatch = [\n    'push',\n    'pop',\n    'shift',\n    'unshift',\n    'splice',\n    'sort',\n    'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n    // cache original method\n    var original = arrayProto[method];\n    def(arrayMethods, method, function mutator() {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var result = original.apply(this, args);\n        var ob = this.__ob__;\n        var inserted;\n        switch (method) {\n            case 'push':\n            case 'unshift':\n                inserted = args;\n                break;\n            case 'splice':\n                inserted = args.slice(2);\n                break;\n        }\n        if (inserted)\n            ob.observeArray(inserted);\n        // notify change\n        if (process.env.NODE_ENV !== 'production') {\n            ob.dep.notify({\n                type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                target: this,\n                key: method\n            });\n        }\n        else {\n            ob.dep.notify();\n        }\n        return result;\n    });\n});\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nvar NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\nfunction toggleObserving(value) {\n    shouldObserve = value;\n}\n// ssr mock dep\nvar mockDep = {\n    notify: noop,\n    depend: noop,\n    addSub: noop,\n    removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = /** @class */ (function () {\n    function Observer(value, shallow, mock) {\n        if (shallow === void 0) { shallow = false; }\n        if (mock === void 0) { mock = false; }\n        this.value = value;\n        this.shallow = shallow;\n        this.mock = mock;\n        // this.value = value\n        this.dep = mock ? mockDep : new Dep();\n        this.vmCount = 0;\n        def(value, '__ob__', this);\n        if (isArray(value)) {\n            if (!mock) {\n                if (hasProto) {\n                    value.__proto__ = arrayMethods;\n                    /* eslint-enable no-proto */\n                }\n                else {\n                    for (var i = 0, l = arrayKeys.length; i < l; i++) {\n                        var key = arrayKeys[i];\n                        def(value, key, arrayMethods[key]);\n                    }\n                }\n            }\n            if (!shallow) {\n                this.observeArray(value);\n            }\n        }\n        else {\n            /**\n             * Walk through all properties and convert them into\n             * getter/setters. This method should only be called when\n             * value type is Object.\n             */\n            var keys = Object.keys(value);\n            for (var i = 0; i < keys.length; i++) {\n                var key = keys[i];\n                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n            }\n        }\n    }\n    /**\n     * Observe a list of Array items.\n     */\n    Observer.prototype.observeArray = function (value) {\n        for (var i = 0, l = value.length; i < l; i++) {\n            observe(value[i], false, this.mock);\n        }\n    };\n    return Observer;\n}());\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n        return value.__ob__;\n    }\n    if (shouldObserve &&\n        (ssrMockReactivity || !isServerRendering()) &&\n        (isArray(value) || isPlainObject(value)) &&\n        Object.isExtensible(value) &&\n        !value.__v_skip /* ReactiveFlags.SKIP */ &&\n        !isRef(value) &&\n        !(value instanceof VNode)) {\n        return new Observer(value, shallow, ssrMockReactivity);\n    }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {\n    if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }\n    var dep = new Dep();\n    var property = Object.getOwnPropertyDescriptor(obj, key);\n    if (property && property.configurable === false) {\n        return;\n    }\n    // cater for pre-defined getter/setters\n    var getter = property && property.get;\n    var setter = property && property.set;\n    if ((!getter || setter) &&\n        (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n        val = obj[key];\n    }\n    var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n    Object.defineProperty(obj, key, {\n        enumerable: true,\n        configurable: true,\n        get: function reactiveGetter() {\n            var value = getter ? getter.call(obj) : val;\n            if (Dep.target) {\n                if (process.env.NODE_ENV !== 'production') {\n                    dep.depend({\n                        target: obj,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key: key\n                    });\n                }\n                else {\n                    dep.depend();\n                }\n                if (childOb) {\n                    childOb.dep.depend();\n                    if (isArray(value)) {\n                        dependArray(value);\n                    }\n                }\n            }\n            return isRef(value) && !shallow ? value.value : value;\n        },\n        set: function reactiveSetter(newVal) {\n            var value = getter ? getter.call(obj) : val;\n            if (!hasChanged(value, newVal)) {\n                return;\n            }\n            if (process.env.NODE_ENV !== 'production' && customSetter) {\n                customSetter();\n            }\n            if (setter) {\n                setter.call(obj, newVal);\n            }\n            else if (getter) {\n                // #7981: for accessor properties without setter\n                return;\n            }\n            else if (!shallow && isRef(value) && !isRef(newVal)) {\n                value.value = newVal;\n                return;\n            }\n            else {\n                val = newVal;\n            }\n            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n            if (process.env.NODE_ENV !== 'production') {\n                dep.notify({\n                    type: \"set\" /* TriggerOpTypes.SET */,\n                    target: obj,\n                    key: key,\n                    newValue: newVal,\n                    oldValue: value\n                });\n            }\n            else {\n                dep.notify();\n            }\n        }\n    });\n    return dep;\n}\nfunction set(target, key, val) {\n    if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n        warn$2(\"Cannot set reactive property on undefined, null, or primitive value: \".concat(target));\n    }\n    if (isReadonly(target)) {\n        process.env.NODE_ENV !== 'production' && warn$2(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        return;\n    }\n    var ob = target.__ob__;\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.length = Math.max(target.length, key);\n        target.splice(key, 1, val);\n        // when mocking for SSR, array methods are not hijacked\n        if (ob && !ob.shallow && ob.mock) {\n            observe(val, false, true);\n        }\n        return val;\n    }\n    if (key in target && !(key in Object.prototype)) {\n        target[key] = val;\n        return val;\n    }\n    if (target._isVue || (ob && ob.vmCount)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                'at runtime - declare it upfront in the data option.');\n        return val;\n    }\n    if (!ob) {\n        target[key] = val;\n        return val;\n    }\n    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n    if (process.env.NODE_ENV !== 'production') {\n        ob.dep.notify({\n            type: \"add\" /* TriggerOpTypes.ADD */,\n            target: target,\n            key: key,\n            newValue: val,\n            oldValue: undefined\n        });\n    }\n    else {\n        ob.dep.notify();\n    }\n    return val;\n}\nfunction del(target, key) {\n    if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n        warn$2(\"Cannot delete reactive property on undefined, null, or primitive value: \".concat(target));\n    }\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.splice(key, 1);\n        return;\n    }\n    var ob = target.__ob__;\n    if (target._isVue || (ob && ob.vmCount)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2('Avoid deleting properties on a Vue instance or its root $data ' +\n                '- just set it to null.');\n        return;\n    }\n    if (isReadonly(target)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"Delete operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        return;\n    }\n    if (!hasOwn(target, key)) {\n        return;\n    }\n    delete target[key];\n    if (!ob) {\n        return;\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        ob.dep.notify({\n            type: \"delete\" /* TriggerOpTypes.DELETE */,\n            target: target,\n            key: key\n        });\n    }\n    else {\n        ob.dep.notify();\n    }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n    for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n        e = value[i];\n        if (e && e.__ob__) {\n            e.__ob__.dep.depend();\n        }\n        if (isArray(e)) {\n            dependArray(e);\n        }\n    }\n}\n\nfunction reactive(target) {\n    makeReactive(target, false);\n    return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n    makeReactive(target, true);\n    def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    return target;\n}\nfunction makeReactive(target, shallow) {\n    // if trying to observe a readonly proxy, return the readonly version.\n    if (!isReadonly(target)) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (isArray(target)) {\n                warn$2(\"Avoid using Array as root value for \".concat(shallow ? \"shallowReactive()\" : \"reactive()\", \" as it cannot be tracked in watch() or watchEffect(). Use \").concat(shallow ? \"shallowRef()\" : \"ref()\", \" instead. This is a Vue-2-only limitation.\"));\n            }\n            var existingOb = target && target.__ob__;\n            if (existingOb && existingOb.shallow !== shallow) {\n                warn$2(\"Target is already a \".concat(existingOb.shallow ? \"\" : \"non-\", \"shallow reactive object, and cannot be converted to \").concat(shallow ? \"\" : \"non-\", \"shallow.\"));\n            }\n        }\n        var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n        if (process.env.NODE_ENV !== 'production' && !ob) {\n            if (target == null || isPrimitive(target)) {\n                warn$2(\"value cannot be made reactive: \".concat(String(target)));\n            }\n            if (isCollectionType(target)) {\n                warn$2(\"Vue 2 does not support reactive collection types such as Map or Set.\");\n            }\n        }\n    }\n}\nfunction isReactive(value) {\n    if (isReadonly(value)) {\n        return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n    }\n    return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n    return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n    return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n    return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n    var raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n    return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n    // non-extensible objects won't be observed anyway\n    if (Object.isExtensible(value)) {\n        def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n    }\n    return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n    var type = toRawType(value);\n    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nvar RefFlag = \"__v_isRef\";\nfunction isRef(r) {\n    return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n    return createRef(value, false);\n}\nfunction shallowRef(value) {\n    return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n    if (isRef(rawValue)) {\n        return rawValue;\n    }\n    var ref = {};\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n    return ref;\n}\nfunction triggerRef(ref) {\n    if (process.env.NODE_ENV !== 'production' && !ref.dep) {\n        warn$2(\"received object is not a triggerable ref.\");\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        ref.dep &&\n            ref.dep.notify({\n                type: \"set\" /* TriggerOpTypes.SET */,\n                target: ref,\n                key: 'value'\n            });\n    }\n    else {\n        ref.dep && ref.dep.notify();\n    }\n}\nfunction unref(ref) {\n    return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n    if (isReactive(objectWithRefs)) {\n        return objectWithRefs;\n    }\n    var proxy = {};\n    var keys = Object.keys(objectWithRefs);\n    for (var i = 0; i < keys.length; i++) {\n        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n    }\n    return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n    Object.defineProperty(target, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            var val = source[key];\n            if (isRef(val)) {\n                return val.value;\n            }\n            else {\n                var ob = val && val.__ob__;\n                if (ob)\n                    ob.dep.depend();\n                return val;\n            }\n        },\n        set: function (value) {\n            var oldValue = source[key];\n            if (isRef(oldValue) && !isRef(value)) {\n                oldValue.value = value;\n            }\n            else {\n                source[key] = value;\n            }\n        }\n    });\n}\nfunction customRef(factory) {\n    var dep = new Dep();\n    var _a = factory(function () {\n        if (process.env.NODE_ENV !== 'production') {\n            dep.depend({\n                target: ref,\n                type: \"get\" /* TrackOpTypes.GET */,\n                key: 'value'\n            });\n        }\n        else {\n            dep.depend();\n        }\n    }, function () {\n        if (process.env.NODE_ENV !== 'production') {\n            dep.notify({\n                target: ref,\n                type: \"set\" /* TriggerOpTypes.SET */,\n                key: 'value'\n            });\n        }\n        else {\n            dep.notify();\n        }\n    }), get = _a.get, set = _a.set;\n    var ref = {\n        get value() {\n            return get();\n        },\n        set value(newVal) {\n            set(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\nfunction toRefs(object) {\n    if (process.env.NODE_ENV !== 'production' && !isReactive(object)) {\n        warn$2(\"toRefs() expects a reactive object but received a plain one.\");\n    }\n    var ret = isArray(object) ? new Array(object.length) : {};\n    for (var key in object) {\n        ret[key] = toRef(object, key);\n    }\n    return ret;\n}\nfunction toRef(object, key, defaultValue) {\n    var val = object[key];\n    if (isRef(val)) {\n        return val;\n    }\n    var ref = {\n        get value() {\n            var val = object[key];\n            return val === undefined ? defaultValue : val;\n        },\n        set value(newVal) {\n            object[key] = newVal;\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\n\nvar rawToReadonlyFlag = \"__v_rawToReadonly\";\nvar rawToShallowReadonlyFlag = \"__v_rawToShallowReadonly\";\nfunction readonly(target) {\n    return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n    if (!isPlainObject(target)) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (isArray(target)) {\n                warn$2(\"Vue 2 does not support readonly arrays.\");\n            }\n            else if (isCollectionType(target)) {\n                warn$2(\"Vue 2 does not support readonly collection types such as Map or Set.\");\n            }\n            else {\n                warn$2(\"value cannot be made readonly: \".concat(typeof target));\n            }\n        }\n        return target;\n    }\n    if (process.env.NODE_ENV !== 'production' && !Object.isExtensible(target)) {\n        warn$2(\"Vue 2 does not support creating readonly proxy for non-extensible object.\");\n    }\n    // already a readonly object\n    if (isReadonly(target)) {\n        return target;\n    }\n    // already has a readonly proxy\n    var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n    var existingProxy = target[existingFlag];\n    if (existingProxy) {\n        return existingProxy;\n    }\n    var proxy = Object.create(Object.getPrototypeOf(target));\n    def(target, existingFlag, proxy);\n    def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n    def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n    if (isRef(target)) {\n        def(proxy, RefFlag, true);\n    }\n    if (shallow || isShallow(target)) {\n        def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    }\n    var keys = Object.keys(target);\n    for (var i = 0; i < keys.length; i++) {\n        defineReadonlyProperty(proxy, target, keys[i], shallow);\n    }\n    return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            var val = target[key];\n            return shallow || !isPlainObject(val) ? val : readonly(val);\n        },\n        set: function () {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        }\n    });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n    return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n    var getter;\n    var setter;\n    var onlyGetter = isFunction(getterOrOptions);\n    if (onlyGetter) {\n        getter = getterOrOptions;\n        setter = process.env.NODE_ENV !== 'production'\n            ? function () {\n                warn$2('Write operation failed: computed value is readonly');\n            }\n            : noop;\n    }\n    else {\n        getter = getterOrOptions.get;\n        setter = getterOrOptions.set;\n    }\n    var watcher = isServerRendering()\n        ? null\n        : new Watcher(currentInstance, getter, noop, { lazy: true });\n    if (process.env.NODE_ENV !== 'production' && watcher && debugOptions) {\n        watcher.onTrack = debugOptions.onTrack;\n        watcher.onTrigger = debugOptions.onTrigger;\n    }\n    var ref = {\n        // some libs rely on the presence effect for checking computed refs\n        // from normal refs, but the implementation doesn't matter\n        effect: watcher,\n        get value() {\n            if (watcher) {\n                if (watcher.dirty) {\n                    watcher.evaluate();\n                }\n                if (Dep.target) {\n                    if (process.env.NODE_ENV !== 'production' && Dep.target.onTrack) {\n                        Dep.target.onTrack({\n                            effect: Dep.target,\n                            target: ref,\n                            type: \"get\" /* TrackOpTypes.GET */,\n                            key: 'value'\n                        });\n                    }\n                    watcher.depend();\n                }\n                return watcher.value;\n            }\n            else {\n                return getter();\n            }\n        },\n        set value(newVal) {\n            setter(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n    return ref;\n}\n\nvar mark;\nvar measure;\nif (process.env.NODE_ENV !== 'production') {\n    var perf_1 = inBrowser && window.performance;\n    /* istanbul ignore if */\n    if (perf_1 &&\n        // @ts-ignore\n        perf_1.mark &&\n        // @ts-ignore\n        perf_1.measure &&\n        // @ts-ignore\n        perf_1.clearMarks &&\n        // @ts-ignore\n        perf_1.clearMeasures) {\n        mark = function (tag) { return perf_1.mark(tag); };\n        measure = function (name, startTag, endTag) {\n            perf_1.measure(name, startTag, endTag);\n            perf_1.clearMarks(startTag);\n            perf_1.clearMarks(endTag);\n            // perf.clearMeasures(name)\n        };\n    }\n}\n\nvar normalizeEvent = cached(function (name) {\n    var passive = name.charAt(0) === '&';\n    name = passive ? name.slice(1) : name;\n    var once = name.charAt(0) === '~'; // Prefixed last, checked first\n    name = once ? name.slice(1) : name;\n    var capture = name.charAt(0) === '!';\n    name = capture ? name.slice(1) : name;\n    return {\n        name: name,\n        once: once,\n        capture: capture,\n        passive: passive\n    };\n});\nfunction createFnInvoker(fns, vm) {\n    function invoker() {\n        var fns = invoker.fns;\n        if (isArray(fns)) {\n            var cloned = fns.slice();\n            for (var i = 0; i < cloned.length; i++) {\n                invokeWithErrorHandling(cloned[i], null, arguments, vm, \"v-on handler\");\n            }\n        }\n        else {\n            // return handler return value for single handlers\n            return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n        }\n    }\n    invoker.fns = fns;\n    return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n    var name, cur, old, event;\n    for (name in on) {\n        cur = on[name];\n        old = oldOn[name];\n        event = normalizeEvent(name);\n        if (isUndef(cur)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"Invalid handler for event \\\"\".concat(event.name, \"\\\": got \") + String(cur), vm);\n        }\n        else if (isUndef(old)) {\n            if (isUndef(cur.fns)) {\n                cur = on[name] = createFnInvoker(cur, vm);\n            }\n            if (isTrue(event.once)) {\n                cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n            }\n            add(event.name, cur, event.capture, event.passive, event.params);\n        }\n        else if (cur !== old) {\n            old.fns = cur;\n            on[name] = old;\n        }\n    }\n    for (name in oldOn) {\n        if (isUndef(on[name])) {\n            event = normalizeEvent(name);\n            remove(event.name, oldOn[name], event.capture);\n        }\n    }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n    if (def instanceof VNode) {\n        def = def.data.hook || (def.data.hook = {});\n    }\n    var invoker;\n    var oldHook = def[hookKey];\n    function wrappedHook() {\n        hook.apply(this, arguments);\n        // important: remove merged hook to ensure it's called only once\n        // and prevent memory leak\n        remove$2(invoker.fns, wrappedHook);\n    }\n    if (isUndef(oldHook)) {\n        // no existing hook\n        invoker = createFnInvoker([wrappedHook]);\n    }\n    else {\n        /* istanbul ignore if */\n        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n            // already a merged invoker\n            invoker = oldHook;\n            invoker.fns.push(wrappedHook);\n        }\n        else {\n            // existing plain hook\n            invoker = createFnInvoker([oldHook, wrappedHook]);\n        }\n    }\n    invoker.merged = true;\n    def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n    // we are only extracting raw values here.\n    // validation and default values are handled in the child\n    // component itself.\n    var propOptions = Ctor.options.props;\n    if (isUndef(propOptions)) {\n        return;\n    }\n    var res = {};\n    var attrs = data.attrs, props = data.props;\n    if (isDef(attrs) || isDef(props)) {\n        for (var key in propOptions) {\n            var altKey = hyphenate(key);\n            if (process.env.NODE_ENV !== 'production') {\n                var keyInLowerCase = key.toLowerCase();\n                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                    tip(\"Prop \\\"\".concat(keyInLowerCase, \"\\\" is passed to component \") +\n                        \"\".concat(formatComponentName(\n                        // @ts-expect-error tag is string\n                        tag || Ctor), \", but the declared prop name is\") +\n                        \" \\\"\".concat(key, \"\\\". \") +\n                        \"Note that HTML attributes are case-insensitive and camelCased \" +\n                        \"props need to use their kebab-case equivalents when using in-DOM \" +\n                        \"templates. You should probably use \\\"\".concat(altKey, \"\\\" instead of \\\"\").concat(key, \"\\\".\"));\n                }\n            }\n            checkProp(res, props, key, altKey, true) ||\n                checkProp(res, attrs, key, altKey, false);\n        }\n    }\n    return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n    if (isDef(hash)) {\n        if (hasOwn(hash, key)) {\n            res[key] = hash[key];\n            if (!preserve) {\n                delete hash[key];\n            }\n            return true;\n        }\n        else if (hasOwn(hash, altKey)) {\n            res[key] = hash[altKey];\n            if (!preserve) {\n                delete hash[altKey];\n            }\n            return true;\n        }\n    }\n    return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n    for (var i = 0; i < children.length; i++) {\n        if (isArray(children[i])) {\n            return Array.prototype.concat.apply([], children);\n        }\n    }\n    return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren(children) {\n    return isPrimitive(children)\n        ? [createTextVNode(children)]\n        : isArray(children)\n            ? normalizeArrayChildren(children)\n            : undefined;\n}\nfunction isTextNode(node) {\n    return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n}\nfunction normalizeArrayChildren(children, nestedIndex) {\n    var res = [];\n    var i, c, lastIndex, last;\n    for (i = 0; i < children.length; i++) {\n        c = children[i];\n        if (isUndef(c) || typeof c === 'boolean')\n            continue;\n        lastIndex = res.length - 1;\n        last = res[lastIndex];\n        //  nested\n        if (isArray(c)) {\n            if (c.length > 0) {\n                c = normalizeArrayChildren(c, \"\".concat(nestedIndex || '', \"_\").concat(i));\n                // merge adjacent text nodes\n                if (isTextNode(c[0]) && isTextNode(last)) {\n                    res[lastIndex] = createTextVNode(last.text + c[0].text);\n                    c.shift();\n                }\n                res.push.apply(res, c);\n            }\n        }\n        else if (isPrimitive(c)) {\n            if (isTextNode(last)) {\n                // merge adjacent text nodes\n                // this is necessary for SSR hydration because text nodes are\n                // essentially merged when rendered to HTML strings\n                res[lastIndex] = createTextVNode(last.text + c);\n            }\n            else if (c !== '') {\n                // convert primitive to vnode\n                res.push(createTextVNode(c));\n            }\n        }\n        else {\n            if (isTextNode(c) && isTextNode(last)) {\n                // merge adjacent text nodes\n                res[lastIndex] = createTextVNode(last.text + c.text);\n            }\n            else {\n                // default key for nested array children (likely generated by v-for)\n                if (isTrue(children._isVList) &&\n                    isDef(c.tag) &&\n                    isUndef(c.key) &&\n                    isDef(nestedIndex)) {\n                    c.key = \"__vlist\".concat(nestedIndex, \"_\").concat(i, \"__\");\n                }\n                res.push(c);\n            }\n        }\n    }\n    return res;\n}\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n    if (isArray(data) || isPrimitive(data)) {\n        normalizationType = children;\n        children = data;\n        data = undefined;\n    }\n    if (isTrue(alwaysNormalize)) {\n        normalizationType = ALWAYS_NORMALIZE;\n    }\n    return _createElement(context, tag, data, children, normalizationType);\n}\nfunction _createElement(context, tag, data, children, normalizationType) {\n    if (isDef(data) && isDef(data.__ob__)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"Avoid using observed data object as vnode data: \".concat(JSON.stringify(data), \"\\n\") + 'Always create fresh vnode data objects in each render!', context);\n        return createEmptyVNode();\n    }\n    // object syntax in v-bind\n    if (isDef(data) && isDef(data.is)) {\n        tag = data.is;\n    }\n    if (!tag) {\n        // in case of component :is set to falsy value\n        return createEmptyVNode();\n    }\n    // warn against non-primitive key\n    if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n        warn$2('Avoid using non-primitive value as key, ' +\n            'use string/number value instead.', context);\n    }\n    // support single function children as default scoped slot\n    if (isArray(children) && isFunction(children[0])) {\n        data = data || {};\n        data.scopedSlots = { default: children[0] };\n        children.length = 0;\n    }\n    if (normalizationType === ALWAYS_NORMALIZE) {\n        children = normalizeChildren(children);\n    }\n    else if (normalizationType === SIMPLE_NORMALIZE) {\n        children = simpleNormalizeChildren(children);\n    }\n    var vnode, ns;\n    if (typeof tag === 'string') {\n        var Ctor = void 0;\n        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n        if (config.isReservedTag(tag)) {\n            // platform built-in elements\n            if (process.env.NODE_ENV !== 'production' &&\n                isDef(data) &&\n                isDef(data.nativeOn) &&\n                data.tag !== 'component') {\n                warn$2(\"The .native modifier for v-on is only valid on components but it was used on <\".concat(tag, \">.\"), context);\n            }\n            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n        }\n        else if ((!data || !data.pre) &&\n            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n            // component\n            vnode = createComponent(Ctor, data, context, children, tag);\n        }\n        else {\n            // unknown or unlisted namespaced elements\n            // check at runtime because it may get assigned a namespace when its\n            // parent normalizes children\n            vnode = new VNode(tag, data, children, undefined, undefined, context);\n        }\n    }\n    else {\n        // direct component options / constructor\n        vnode = createComponent(tag, data, context, children);\n    }\n    if (isArray(vnode)) {\n        return vnode;\n    }\n    else if (isDef(vnode)) {\n        if (isDef(ns))\n            applyNS(vnode, ns);\n        if (isDef(data))\n            registerDeepBindings(data);\n        return vnode;\n    }\n    else {\n        return createEmptyVNode();\n    }\n}\nfunction applyNS(vnode, ns, force) {\n    vnode.ns = ns;\n    if (vnode.tag === 'foreignObject') {\n        // use default namespace inside foreignObject\n        ns = undefined;\n        force = true;\n    }\n    if (isDef(vnode.children)) {\n        for (var i = 0, l = vnode.children.length; i < l; i++) {\n            var child = vnode.children[i];\n            if (isDef(child.tag) &&\n                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                applyNS(child, ns, force);\n            }\n        }\n    }\n}\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings(data) {\n    if (isObject(data.style)) {\n        traverse(data.style);\n    }\n    if (isObject(data.class)) {\n        traverse(data.class);\n    }\n}\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList(val, render) {\n    var ret = null, i, l, keys, key;\n    if (isArray(val) || typeof val === 'string') {\n        ret = new Array(val.length);\n        for (i = 0, l = val.length; i < l; i++) {\n            ret[i] = render(val[i], i);\n        }\n    }\n    else if (typeof val === 'number') {\n        ret = new Array(val);\n        for (i = 0; i < val; i++) {\n            ret[i] = render(i + 1, i);\n        }\n    }\n    else if (isObject(val)) {\n        if (hasSymbol && val[Symbol.iterator]) {\n            ret = [];\n            var iterator = val[Symbol.iterator]();\n            var result = iterator.next();\n            while (!result.done) {\n                ret.push(render(result.value, ret.length));\n                result = iterator.next();\n            }\n        }\n        else {\n            keys = Object.keys(val);\n            ret = new Array(keys.length);\n            for (i = 0, l = keys.length; i < l; i++) {\n                key = keys[i];\n                ret[i] = render(val[key], key, i);\n            }\n        }\n    }\n    if (!isDef(ret)) {\n        ret = [];\n    }\n    ret._isVList = true;\n    return ret;\n}\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot(name, fallbackRender, props, bindObject) {\n    var scopedSlotFn = this.$scopedSlots[name];\n    var nodes;\n    if (scopedSlotFn) {\n        // scoped slot\n        props = props || {};\n        if (bindObject) {\n            if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {\n                warn$2('slot v-bind without argument expects an Object', this);\n            }\n            props = extend(extend({}, bindObject), props);\n        }\n        nodes =\n            scopedSlotFn(props) ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    else {\n        nodes =\n            this.$slots[name] ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    var target = props && props.slot;\n    if (target) {\n        return this.$createElement('template', { slot: target }, nodes);\n    }\n    else {\n        return nodes;\n    }\n}\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter(id) {\n    return resolveAsset(this.$options, 'filters', id, true) || identity;\n}\n\nfunction isKeyNotMatch(expect, actual) {\n    if (isArray(expect)) {\n        return expect.indexOf(actual) === -1;\n    }\n    else {\n        return expect !== actual;\n    }\n}\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n    var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n        return isKeyNotMatch(builtInKeyName, eventKeyName);\n    }\n    else if (mappedKeyCode) {\n        return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n    }\n    else if (eventKeyName) {\n        return hyphenate(eventKeyName) !== key;\n    }\n    return eventKeyCode === undefined;\n}\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps(data, tag, value, asProp, isSync) {\n    if (value) {\n        if (!isObject(value)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2('v-bind without argument expects an Object or Array value', this);\n        }\n        else {\n            if (isArray(value)) {\n                value = toObject(value);\n            }\n            var hash = void 0;\n            var _loop_1 = function (key) {\n                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                    hash = data;\n                }\n                else {\n                    var type = data.attrs && data.attrs.type;\n                    hash =\n                        asProp || config.mustUseProp(tag, type, key)\n                            ? data.domProps || (data.domProps = {})\n                            : data.attrs || (data.attrs = {});\n                }\n                var camelizedKey = camelize(key);\n                var hyphenatedKey = hyphenate(key);\n                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                    hash[key] = value[key];\n                    if (isSync) {\n                        var on = data.on || (data.on = {});\n                        on[\"update:\".concat(key)] = function ($event) {\n                            value[key] = $event;\n                        };\n                    }\n                }\n            };\n            for (var key in value) {\n                _loop_1(key);\n            }\n        }\n    }\n    return data;\n}\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic(index, isInFor) {\n    var cached = this._staticTrees || (this._staticTrees = []);\n    var tree = cached[index];\n    // if has already-rendered static tree and not inside v-for,\n    // we can reuse the same tree.\n    if (tree && !isInFor) {\n        return tree;\n    }\n    // otherwise, render a fresh tree.\n    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n    );\n    markStatic$1(tree, \"__static__\".concat(index), false);\n    return tree;\n}\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce(tree, index, key) {\n    markStatic$1(tree, \"__once__\".concat(index).concat(key ? \"_\".concat(key) : \"\"), true);\n    return tree;\n}\nfunction markStatic$1(tree, key, isOnce) {\n    if (isArray(tree)) {\n        for (var i = 0; i < tree.length; i++) {\n            if (tree[i] && typeof tree[i] !== 'string') {\n                markStaticNode(tree[i], \"\".concat(key, \"_\").concat(i), isOnce);\n            }\n        }\n    }\n    else {\n        markStaticNode(tree, key, isOnce);\n    }\n}\nfunction markStaticNode(node, key, isOnce) {\n    node.isStatic = true;\n    node.key = key;\n    node.isOnce = isOnce;\n}\n\nfunction bindObjectListeners(data, value) {\n    if (value) {\n        if (!isPlainObject(value)) {\n            process.env.NODE_ENV !== 'production' && warn$2('v-on without argument expects an Object value', this);\n        }\n        else {\n            var on = (data.on = data.on ? extend({}, data.on) : {});\n            for (var key in value) {\n                var existing = on[key];\n                var ours = value[key];\n                on[key] = existing ? [].concat(existing, ours) : ours;\n            }\n        }\n    }\n    return data;\n}\n\nfunction resolveScopedSlots(fns, res, \n// the following are added in 2.6\nhasDynamicKeys, contentHashKey) {\n    res = res || { $stable: !hasDynamicKeys };\n    for (var i = 0; i < fns.length; i++) {\n        var slot = fns[i];\n        if (isArray(slot)) {\n            resolveScopedSlots(slot, res, hasDynamicKeys);\n        }\n        else if (slot) {\n            // marker for reverse proxying v-slot without scope on this.$slots\n            // @ts-expect-error\n            if (slot.proxy) {\n                // @ts-expect-error\n                slot.fn.proxy = true;\n            }\n            res[slot.key] = slot.fn;\n        }\n    }\n    if (contentHashKey) {\n        res.$key = contentHashKey;\n    }\n    return res;\n}\n\n// helper to process dynamic keys for dynamic arguments in v-bind and v-on.\nfunction bindDynamicKeys(baseObj, values) {\n    for (var i = 0; i < values.length; i += 2) {\n        var key = values[i];\n        if (typeof key === 'string' && key) {\n            baseObj[values[i]] = values[i + 1];\n        }\n        else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {\n            // null is a special value for explicitly removing a binding\n            warn$2(\"Invalid value for dynamic directive argument (expected string or null): \".concat(key), this);\n        }\n    }\n    return baseObj;\n}\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier(value, symbol) {\n    return typeof value === 'string' ? symbol + value : value;\n}\n\nfunction installRenderHelpers(target) {\n    target._o = markOnce;\n    target._n = toNumber;\n    target._s = toString;\n    target._l = renderList;\n    target._t = renderSlot;\n    target._q = looseEqual;\n    target._i = looseIndexOf;\n    target._m = renderStatic;\n    target._f = resolveFilter;\n    target._k = checkKeyCodes;\n    target._b = bindObjectProps;\n    target._v = createTextVNode;\n    target._e = createEmptyVNode;\n    target._u = resolveScopedSlots;\n    target._g = bindObjectListeners;\n    target._d = bindDynamicKeys;\n    target._p = prependModifier;\n}\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots(children, context) {\n    if (!children || !children.length) {\n        return {};\n    }\n    var slots = {};\n    for (var i = 0, l = children.length; i < l; i++) {\n        var child = children[i];\n        var data = child.data;\n        // remove slot attribute if the node is resolved as a Vue slot node\n        if (data && data.attrs && data.attrs.slot) {\n            delete data.attrs.slot;\n        }\n        // named slots should only be respected if the vnode was rendered in the\n        // same context.\n        if ((child.context === context || child.fnContext === context) &&\n            data &&\n            data.slot != null) {\n            var name_1 = data.slot;\n            var slot = slots[name_1] || (slots[name_1] = []);\n            if (child.tag === 'template') {\n                slot.push.apply(slot, child.children || []);\n            }\n            else {\n                slot.push(child);\n            }\n        }\n        else {\n            (slots.default || (slots.default = [])).push(child);\n        }\n    }\n    // ignore slots that contains only whitespace\n    for (var name_2 in slots) {\n        if (slots[name_2].every(isWhitespace)) {\n            delete slots[name_2];\n        }\n    }\n    return slots;\n}\nfunction isWhitespace(node) {\n    return (node.isComment && !node.asyncFactory) || node.text === ' ';\n}\n\nfunction isAsyncPlaceholder(node) {\n    // @ts-expect-error not really boolean type\n    return node.isComment && node.asyncFactory;\n}\n\nfunction normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n    var res;\n    var hasNormalSlots = Object.keys(normalSlots).length > 0;\n    var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n    var key = scopedSlots && scopedSlots.$key;\n    if (!scopedSlots) {\n        res = {};\n    }\n    else if (scopedSlots._normalized) {\n        // fast path 1: child component re-render only, parent did not change\n        return scopedSlots._normalized;\n    }\n    else if (isStable &&\n        prevScopedSlots &&\n        prevScopedSlots !== emptyObject &&\n        key === prevScopedSlots.$key &&\n        !hasNormalSlots &&\n        !prevScopedSlots.$hasNormal) {\n        // fast path 2: stable scoped slots w/ no normal slots to proxy,\n        // only need to normalize once\n        return prevScopedSlots;\n    }\n    else {\n        res = {};\n        for (var key_1 in scopedSlots) {\n            if (scopedSlots[key_1] && key_1[0] !== '$') {\n                res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);\n            }\n        }\n    }\n    // expose normal slots on scopedSlots\n    for (var key_2 in normalSlots) {\n        if (!(key_2 in res)) {\n            res[key_2] = proxyNormalSlot(normalSlots, key_2);\n        }\n    }\n    // avoriaz seems to mock a non-extensible $scopedSlots object\n    // and when that is passed down this would cause an error\n    if (scopedSlots && Object.isExtensible(scopedSlots)) {\n        scopedSlots._normalized = res;\n    }\n    def(res, '$stable', isStable);\n    def(res, '$key', key);\n    def(res, '$hasNormal', hasNormalSlots);\n    return res;\n}\nfunction normalizeScopedSlot(vm, normalSlots, key, fn) {\n    var normalized = function () {\n        var cur = currentInstance;\n        setCurrentInstance(vm);\n        var res = arguments.length ? fn.apply(null, arguments) : fn({});\n        res =\n            res && typeof res === 'object' && !isArray(res)\n                ? [res] // single vnode\n                : normalizeChildren(res);\n        var vnode = res && res[0];\n        setCurrentInstance(cur);\n        return res &&\n            (!vnode ||\n                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n            ? undefined\n            : res;\n    };\n    // this is a slot using the new v-slot syntax without scope. although it is\n    // compiled as a scoped slot, render fn users would expect it to be present\n    // on this.$slots because the usage is semantically a normal slot.\n    if (fn.proxy) {\n        Object.defineProperty(normalSlots, key, {\n            get: normalized,\n            enumerable: true,\n            configurable: true\n        });\n    }\n    return normalized;\n}\nfunction proxyNormalSlot(slots, key) {\n    return function () { return slots[key]; };\n}\n\nfunction initSetup(vm) {\n    var options = vm.$options;\n    var setup = options.setup;\n    if (setup) {\n        var ctx = (vm._setupContext = createSetupContext(vm));\n        setCurrentInstance(vm);\n        pushTarget();\n        var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, \"setup\");\n        popTarget();\n        setCurrentInstance();\n        if (isFunction(setupResult)) {\n            // render function\n            // @ts-ignore\n            options.render = setupResult;\n        }\n        else if (isObject(setupResult)) {\n            // bindings\n            if (process.env.NODE_ENV !== 'production' && setupResult instanceof VNode) {\n                warn$2(\"setup() should not return VNodes directly - \" +\n                    \"return a render function instead.\");\n            }\n            vm._setupState = setupResult;\n            // __sfc indicates compiled bindings from <script setup>\n            if (!setupResult.__sfc) {\n                for (var key in setupResult) {\n                    if (!isReserved(key)) {\n                        proxyWithRefUnwrap(vm, setupResult, key);\n                    }\n                    else if (process.env.NODE_ENV !== 'production') {\n                        warn$2(\"Avoid using variables that start with _ or $ in setup().\");\n                    }\n                }\n            }\n            else {\n                // exposed for compiled render fn\n                var proxy = (vm._setupProxy = {});\n                for (var key in setupResult) {\n                    if (key !== '__sfc') {\n                        proxyWithRefUnwrap(proxy, setupResult, key);\n                    }\n                }\n            }\n        }\n        else if (process.env.NODE_ENV !== 'production' && setupResult !== undefined) {\n            warn$2(\"setup() should return an object. Received: \".concat(setupResult === null ? 'null' : typeof setupResult));\n        }\n    }\n}\nfunction createSetupContext(vm) {\n    var exposeCalled = false;\n    return {\n        get attrs() {\n            if (!vm._attrsProxy) {\n                var proxy = (vm._attrsProxy = {});\n                def(proxy, '_v_attr_proxy', true);\n                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n            }\n            return vm._attrsProxy;\n        },\n        get listeners() {\n            if (!vm._listenersProxy) {\n                var proxy = (vm._listenersProxy = {});\n                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n            }\n            return vm._listenersProxy;\n        },\n        get slots() {\n            return initSlotsProxy(vm);\n        },\n        emit: bind$1(vm.$emit, vm),\n        expose: function (exposed) {\n            if (process.env.NODE_ENV !== 'production') {\n                if (exposeCalled) {\n                    warn$2(\"expose() should be called only once per setup().\", vm);\n                }\n                exposeCalled = true;\n            }\n            if (exposed) {\n                Object.keys(exposed).forEach(function (key) {\n                    return proxyWithRefUnwrap(vm, exposed, key);\n                });\n            }\n        }\n    };\n}\nfunction syncSetupProxy(to, from, prev, instance, type) {\n    var changed = false;\n    for (var key in from) {\n        if (!(key in to)) {\n            changed = true;\n            defineProxyAttr(to, key, instance, type);\n        }\n        else if (from[key] !== prev[key]) {\n            changed = true;\n        }\n    }\n    for (var key in to) {\n        if (!(key in from)) {\n            changed = true;\n            delete to[key];\n        }\n    }\n    return changed;\n}\nfunction defineProxyAttr(proxy, key, instance, type) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            return instance[type][key];\n        }\n    });\n}\nfunction initSlotsProxy(vm) {\n    if (!vm._slotsProxy) {\n        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n    }\n    return vm._slotsProxy;\n}\nfunction syncSetupSlots(to, from) {\n    for (var key in from) {\n        to[key] = from[key];\n    }\n    for (var key in to) {\n        if (!(key in from)) {\n            delete to[key];\n        }\n    }\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useSlots() {\n    return getContext().slots;\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useAttrs() {\n    return getContext().attrs;\n}\n/**\n * Vue 2 only\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useListeners() {\n    return getContext().listeners;\n}\nfunction getContext() {\n    if (process.env.NODE_ENV !== 'production' && !currentInstance) {\n        warn$2(\"useContext() called without active instance.\");\n    }\n    var vm = currentInstance;\n    return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n}\n/**\n * Runtime helper for merging default declarations. Imported by compiled code\n * only.\n * @internal\n */\nfunction mergeDefaults(raw, defaults) {\n    var props = isArray(raw)\n        ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})\n        : raw;\n    for (var key in defaults) {\n        var opt = props[key];\n        if (opt) {\n            if (isArray(opt) || isFunction(opt)) {\n                props[key] = { type: opt, default: defaults[key] };\n            }\n            else {\n                opt.default = defaults[key];\n            }\n        }\n        else if (opt === null) {\n            props[key] = { default: defaults[key] };\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"props default key \\\"\".concat(key, \"\\\" has no corresponding declaration.\"));\n        }\n    }\n    return props;\n}\n\nfunction initRender(vm) {\n    vm._vnode = null; // the root of the child tree\n    vm._staticTrees = null; // v-once cached trees\n    var options = vm.$options;\n    var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n    var renderContext = parentVnode && parentVnode.context;\n    vm.$slots = resolveSlots(options._renderChildren, renderContext);\n    vm.$scopedSlots = parentVnode\n        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n        : emptyObject;\n    // bind the createElement fn to this instance\n    // so that we get proper render context inside it.\n    // args order: tag, data, children, normalizationType, alwaysNormalize\n    // internal version is used by render functions compiled from templates\n    // @ts-expect-error\n    vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };\n    // normalization is always applied for the public version, used in\n    // user-written render functions.\n    // @ts-expect-error\n    vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };\n    // $attrs & $listeners are exposed for easier HOC creation.\n    // they need to be reactive so that HOCs using them are always updated\n    var parentData = parentVnode && parentVnode.data;\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {\n            !isUpdatingChildComponent && warn$2(\"$attrs is readonly.\", vm);\n        }, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {\n            !isUpdatingChildComponent && warn$2(\"$listeners is readonly.\", vm);\n        }, true);\n    }\n    else {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, null, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n    }\n}\nvar currentRenderingInstance = null;\nfunction renderMixin(Vue) {\n    // install runtime convenience helpers\n    installRenderHelpers(Vue.prototype);\n    Vue.prototype.$nextTick = function (fn) {\n        return nextTick(fn, this);\n    };\n    Vue.prototype._render = function () {\n        var vm = this;\n        var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;\n        if (_parentVnode && vm._isMounted) {\n            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n            if (vm._slotsProxy) {\n                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n            }\n        }\n        // set parent vnode. this allows render functions to have access\n        // to the data on the placeholder node.\n        vm.$vnode = _parentVnode;\n        // render self\n        var prevInst = currentInstance;\n        var prevRenderInst = currentRenderingInstance;\n        var vnode;\n        try {\n            setCurrentInstance(vm);\n            currentRenderingInstance = vm;\n            vnode = render.call(vm._renderProxy, vm.$createElement);\n        }\n        catch (e) {\n            handleError(e, vm, \"render\");\n            // return error render result,\n            // or previous vnode to prevent render error causing blank component\n            /* istanbul ignore else */\n            if (process.env.NODE_ENV !== 'production' && vm.$options.renderError) {\n                try {\n                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                }\n                catch (e) {\n                    handleError(e, vm, \"renderError\");\n                    vnode = vm._vnode;\n                }\n            }\n            else {\n                vnode = vm._vnode;\n            }\n        }\n        finally {\n            currentRenderingInstance = prevRenderInst;\n            setCurrentInstance(prevInst);\n        }\n        // if the returned array contains only a single node, allow it\n        if (isArray(vnode) && vnode.length === 1) {\n            vnode = vnode[0];\n        }\n        // return empty vnode in case the render function errored out\n        if (!(vnode instanceof VNode)) {\n            if (process.env.NODE_ENV !== 'production' && isArray(vnode)) {\n                warn$2('Multiple root nodes returned from render function. Render function ' +\n                    'should return a single root node.', vm);\n            }\n            vnode = createEmptyVNode();\n        }\n        // set parent\n        vnode.parent = _parentVnode;\n        return vnode;\n    };\n}\n\nfunction ensureCtor(comp, base) {\n    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n        comp = comp.default;\n    }\n    return isObject(comp) ? base.extend(comp) : comp;\n}\nfunction createAsyncPlaceholder(factory, data, context, children, tag) {\n    var node = createEmptyVNode();\n    node.asyncFactory = factory;\n    node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n    return node;\n}\nfunction resolveAsyncComponent(factory, baseCtor) {\n    if (isTrue(factory.error) && isDef(factory.errorComp)) {\n        return factory.errorComp;\n    }\n    if (isDef(factory.resolved)) {\n        return factory.resolved;\n    }\n    var owner = currentRenderingInstance;\n    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n        // already pending\n        factory.owners.push(owner);\n    }\n    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n        return factory.loadingComp;\n    }\n    if (owner && !isDef(factory.owners)) {\n        var owners_1 = (factory.owners = [owner]);\n        var sync_1 = true;\n        var timerLoading_1 = null;\n        var timerTimeout_1 = null;\n        owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });\n        var forceRender_1 = function (renderCompleted) {\n            for (var i = 0, l = owners_1.length; i < l; i++) {\n                owners_1[i].$forceUpdate();\n            }\n            if (renderCompleted) {\n                owners_1.length = 0;\n                if (timerLoading_1 !== null) {\n                    clearTimeout(timerLoading_1);\n                    timerLoading_1 = null;\n                }\n                if (timerTimeout_1 !== null) {\n                    clearTimeout(timerTimeout_1);\n                    timerTimeout_1 = null;\n                }\n            }\n        };\n        var resolve = once(function (res) {\n            // cache resolved\n            factory.resolved = ensureCtor(res, baseCtor);\n            // invoke callbacks only if this is not a synchronous resolve\n            // (async resolves are shimmed as synchronous during SSR)\n            if (!sync_1) {\n                forceRender_1(true);\n            }\n            else {\n                owners_1.length = 0;\n            }\n        });\n        var reject_1 = once(function (reason) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"Failed to resolve async component: \".concat(String(factory)) +\n                    (reason ? \"\\nReason: \".concat(reason) : ''));\n            if (isDef(factory.errorComp)) {\n                factory.error = true;\n                forceRender_1(true);\n            }\n        });\n        var res_1 = factory(resolve, reject_1);\n        if (isObject(res_1)) {\n            if (isPromise(res_1)) {\n                // () => Promise\n                if (isUndef(factory.resolved)) {\n                    res_1.then(resolve, reject_1);\n                }\n            }\n            else if (isPromise(res_1.component)) {\n                res_1.component.then(resolve, reject_1);\n                if (isDef(res_1.error)) {\n                    factory.errorComp = ensureCtor(res_1.error, baseCtor);\n                }\n                if (isDef(res_1.loading)) {\n                    factory.loadingComp = ensureCtor(res_1.loading, baseCtor);\n                    if (res_1.delay === 0) {\n                        factory.loading = true;\n                    }\n                    else {\n                        // @ts-expect-error NodeJS timeout type\n                        timerLoading_1 = setTimeout(function () {\n                            timerLoading_1 = null;\n                            if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                factory.loading = true;\n                                forceRender_1(false);\n                            }\n                        }, res_1.delay || 200);\n                    }\n                }\n                if (isDef(res_1.timeout)) {\n                    // @ts-expect-error NodeJS timeout type\n                    timerTimeout_1 = setTimeout(function () {\n                        timerTimeout_1 = null;\n                        if (isUndef(factory.resolved)) {\n                            reject_1(process.env.NODE_ENV !== 'production' ? \"timeout (\".concat(res_1.timeout, \"ms)\") : null);\n                        }\n                    }, res_1.timeout);\n                }\n            }\n        }\n        sync_1 = false;\n        // return in case resolved synchronously\n        return factory.loading ? factory.loadingComp : factory.resolved;\n    }\n}\n\nfunction getFirstComponentChild(children) {\n    if (isArray(children)) {\n        for (var i = 0; i < children.length; i++) {\n            var c = children[i];\n            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                return c;\n            }\n        }\n    }\n}\n\nfunction initEvents(vm) {\n    vm._events = Object.create(null);\n    vm._hasHookEvent = false;\n    // init parent attached events\n    var listeners = vm.$options._parentListeners;\n    if (listeners) {\n        updateComponentListeners(vm, listeners);\n    }\n}\nvar target$1;\nfunction add$1(event, fn) {\n    target$1.$on(event, fn);\n}\nfunction remove$1(event, fn) {\n    target$1.$off(event, fn);\n}\nfunction createOnceHandler$1(event, fn) {\n    var _target = target$1;\n    return function onceHandler() {\n        var res = fn.apply(null, arguments);\n        if (res !== null) {\n            _target.$off(event, onceHandler);\n        }\n    };\n}\nfunction updateComponentListeners(vm, listeners, oldListeners) {\n    target$1 = vm;\n    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n    target$1 = undefined;\n}\nfunction eventsMixin(Vue) {\n    var hookRE = /^hook:/;\n    Vue.prototype.$on = function (event, fn) {\n        var vm = this;\n        if (isArray(event)) {\n            for (var i = 0, l = event.length; i < l; i++) {\n                vm.$on(event[i], fn);\n            }\n        }\n        else {\n            (vm._events[event] || (vm._events[event] = [])).push(fn);\n            // optimize hook:event cost by using a boolean flag marked at registration\n            // instead of a hash lookup\n            if (hookRE.test(event)) {\n                vm._hasHookEvent = true;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$once = function (event, fn) {\n        var vm = this;\n        function on() {\n            vm.$off(event, on);\n            fn.apply(vm, arguments);\n        }\n        on.fn = fn;\n        vm.$on(event, on);\n        return vm;\n    };\n    Vue.prototype.$off = function (event, fn) {\n        var vm = this;\n        // all\n        if (!arguments.length) {\n            vm._events = Object.create(null);\n            return vm;\n        }\n        // array of events\n        if (isArray(event)) {\n            for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {\n                vm.$off(event[i_1], fn);\n            }\n            return vm;\n        }\n        // specific event\n        var cbs = vm._events[event];\n        if (!cbs) {\n            return vm;\n        }\n        if (!fn) {\n            vm._events[event] = null;\n            return vm;\n        }\n        // specific handler\n        var cb;\n        var i = cbs.length;\n        while (i--) {\n            cb = cbs[i];\n            if (cb === fn || cb.fn === fn) {\n                cbs.splice(i, 1);\n                break;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$emit = function (event) {\n        var vm = this;\n        if (process.env.NODE_ENV !== 'production') {\n            var lowerCaseEvent = event.toLowerCase();\n            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                tip(\"Event \\\"\".concat(lowerCaseEvent, \"\\\" is emitted in component \") +\n                    \"\".concat(formatComponentName(vm), \" but the handler is registered for \\\"\").concat(event, \"\\\". \") +\n                    \"Note that HTML attributes are case-insensitive and you cannot use \" +\n                    \"v-on to listen to camelCase events when using in-DOM templates. \" +\n                    \"You should probably use \\\"\".concat(hyphenate(event), \"\\\" instead of \\\"\").concat(event, \"\\\".\"));\n            }\n        }\n        var cbs = vm._events[event];\n        if (cbs) {\n            cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n            var args = toArray(arguments, 1);\n            var info = \"event handler for \\\"\".concat(event, \"\\\"\");\n            for (var i = 0, l = cbs.length; i < l; i++) {\n                invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n            }\n        }\n        return vm;\n    };\n}\n\nvar activeEffectScope;\nvar EffectScope = /** @class */ (function () {\n    function EffectScope(detached) {\n        if (detached === void 0) { detached = false; }\n        this.detached = detached;\n        /**\n         * @internal\n         */\n        this.active = true;\n        /**\n         * @internal\n         */\n        this.effects = [];\n        /**\n         * @internal\n         */\n        this.cleanups = [];\n        this.parent = activeEffectScope;\n        if (!detached && activeEffectScope) {\n            this.index =\n                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n        }\n    }\n    EffectScope.prototype.run = function (fn) {\n        if (this.active) {\n            var currentEffectScope = activeEffectScope;\n            try {\n                activeEffectScope = this;\n                return fn();\n            }\n            finally {\n                activeEffectScope = currentEffectScope;\n            }\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"cannot run an inactive effect scope.\");\n        }\n    };\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    EffectScope.prototype.on = function () {\n        activeEffectScope = this;\n    };\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    EffectScope.prototype.off = function () {\n        activeEffectScope = this.parent;\n    };\n    EffectScope.prototype.stop = function (fromParent) {\n        if (this.active) {\n            var i = void 0, l = void 0;\n            for (i = 0, l = this.effects.length; i < l; i++) {\n                this.effects[i].teardown();\n            }\n            for (i = 0, l = this.cleanups.length; i < l; i++) {\n                this.cleanups[i]();\n            }\n            if (this.scopes) {\n                for (i = 0, l = this.scopes.length; i < l; i++) {\n                    this.scopes[i].stop(true);\n                }\n            }\n            // nested scope, dereference from parent to avoid memory leaks\n            if (!this.detached && this.parent && !fromParent) {\n                // optimized O(1) removal\n                var last = this.parent.scopes.pop();\n                if (last && last !== this) {\n                    this.parent.scopes[this.index] = last;\n                    last.index = this.index;\n                }\n            }\n            this.parent = undefined;\n            this.active = false;\n        }\n    };\n    return EffectScope;\n}());\nfunction effectScope(detached) {\n    return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope) {\n    if (scope === void 0) { scope = activeEffectScope; }\n    if (scope && scope.active) {\n        scope.effects.push(effect);\n    }\n}\nfunction getCurrentScope() {\n    return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n    if (activeEffectScope) {\n        activeEffectScope.cleanups.push(fn);\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn$2(\"onScopeDispose() is called when there is no active effect scope\" +\n            \" to be associated with.\");\n    }\n}\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\nfunction setActiveInstance(vm) {\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    return function () {\n        activeInstance = prevActiveInstance;\n    };\n}\nfunction initLifecycle(vm) {\n    var options = vm.$options;\n    // locate first non-abstract parent\n    var parent = options.parent;\n    if (parent && !options.abstract) {\n        while (parent.$options.abstract && parent.$parent) {\n            parent = parent.$parent;\n        }\n        parent.$children.push(vm);\n    }\n    vm.$parent = parent;\n    vm.$root = parent ? parent.$root : vm;\n    vm.$children = [];\n    vm.$refs = {};\n    vm._provided = parent ? parent._provided : Object.create(null);\n    vm._watcher = null;\n    vm._inactive = null;\n    vm._directInactive = false;\n    vm._isMounted = false;\n    vm._isDestroyed = false;\n    vm._isBeingDestroyed = false;\n}\nfunction lifecycleMixin(Vue) {\n    Vue.prototype._update = function (vnode, hydrating) {\n        var vm = this;\n        var prevEl = vm.$el;\n        var prevVnode = vm._vnode;\n        var restoreActiveInstance = setActiveInstance(vm);\n        vm._vnode = vnode;\n        // Vue.prototype.__patch__ is injected in entry points\n        // based on the rendering backend used.\n        if (!prevVnode) {\n            // initial render\n            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n        }\n        else {\n            // updates\n            vm.$el = vm.__patch__(prevVnode, vnode);\n        }\n        restoreActiveInstance();\n        // update __vue__ reference\n        if (prevEl) {\n            prevEl.__vue__ = null;\n        }\n        if (vm.$el) {\n            vm.$el.__vue__ = vm;\n        }\n        // if parent is an HOC, update its $el as well\n        var wrapper = vm;\n        while (wrapper &&\n            wrapper.$vnode &&\n            wrapper.$parent &&\n            wrapper.$vnode === wrapper.$parent._vnode) {\n            wrapper.$parent.$el = wrapper.$el;\n            wrapper = wrapper.$parent;\n        }\n        // updated hook is called by the scheduler to ensure that children are\n        // updated in a parent's updated hook.\n    };\n    Vue.prototype.$forceUpdate = function () {\n        var vm = this;\n        if (vm._watcher) {\n            vm._watcher.update();\n        }\n    };\n    Vue.prototype.$destroy = function () {\n        var vm = this;\n        if (vm._isBeingDestroyed) {\n            return;\n        }\n        callHook$1(vm, 'beforeDestroy');\n        vm._isBeingDestroyed = true;\n        // remove self from parent\n        var parent = vm.$parent;\n        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n            remove$2(parent.$children, vm);\n        }\n        // teardown scope. this includes both the render watcher and other\n        // watchers created\n        vm._scope.stop();\n        // remove reference from data ob\n        // frozen object may not have observer.\n        if (vm._data.__ob__) {\n            vm._data.__ob__.vmCount--;\n        }\n        // call the last hook...\n        vm._isDestroyed = true;\n        // invoke destroy hooks on current rendered tree\n        vm.__patch__(vm._vnode, null);\n        // fire destroyed hook\n        callHook$1(vm, 'destroyed');\n        // turn off all instance listeners.\n        vm.$off();\n        // remove __vue__ reference\n        if (vm.$el) {\n            vm.$el.__vue__ = null;\n        }\n        // release circular reference (#6759)\n        if (vm.$vnode) {\n            vm.$vnode.parent = null;\n        }\n    };\n}\nfunction mountComponent(vm, el, hydrating) {\n    vm.$el = el;\n    if (!vm.$options.render) {\n        // @ts-expect-error invalid type\n        vm.$options.render = createEmptyVNode;\n        if (process.env.NODE_ENV !== 'production') {\n            /* istanbul ignore if */\n            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                vm.$options.el ||\n                el) {\n                warn$2('You are using the runtime-only build of Vue where the template ' +\n                    'compiler is not available. Either pre-compile the templates into ' +\n                    'render functions, or use the compiler-included build.', vm);\n            }\n            else {\n                warn$2('Failed to mount component: template or render function not defined.', vm);\n            }\n        }\n    }\n    callHook$1(vm, 'beforeMount');\n    var updateComponent;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        updateComponent = function () {\n            var name = vm._name;\n            var id = vm._uid;\n            var startTag = \"vue-perf-start:\".concat(id);\n            var endTag = \"vue-perf-end:\".concat(id);\n            mark(startTag);\n            var vnode = vm._render();\n            mark(endTag);\n            measure(\"vue \".concat(name, \" render\"), startTag, endTag);\n            mark(startTag);\n            vm._update(vnode, hydrating);\n            mark(endTag);\n            measure(\"vue \".concat(name, \" patch\"), startTag, endTag);\n        };\n    }\n    else {\n        updateComponent = function () {\n            vm._update(vm._render(), hydrating);\n        };\n    }\n    var watcherOptions = {\n        before: function () {\n            if (vm._isMounted && !vm._isDestroyed) {\n                callHook$1(vm, 'beforeUpdate');\n            }\n        }\n    };\n    if (process.env.NODE_ENV !== 'production') {\n        watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };\n        watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };\n    }\n    // we set this to vm._watcher inside the watcher's constructor\n    // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n    // component's mounted hook), which relies on vm._watcher being already defined\n    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n    hydrating = false;\n    // flush buffer for flush: \"pre\" watchers queued in setup()\n    var preWatchers = vm._preWatchers;\n    if (preWatchers) {\n        for (var i = 0; i < preWatchers.length; i++) {\n            preWatchers[i].run();\n        }\n    }\n    // manually mounted instance, call mounted on self\n    // mounted is called for render-created child components in its inserted hook\n    if (vm.$vnode == null) {\n        vm._isMounted = true;\n        callHook$1(vm, 'mounted');\n    }\n    return vm;\n}\nfunction updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n    if (process.env.NODE_ENV !== 'production') {\n        isUpdatingChildComponent = true;\n    }\n    // determine whether component has slot children\n    // we need to do this before overwriting $options._renderChildren.\n    // check if there are dynamic scopedSlots (hand-written or compiled but with\n    // dynamic slot names). Static scoped slots compiled from template has the\n    // \"$stable\" marker.\n    var newScopedSlots = parentVnode.data.scopedSlots;\n    var oldScopedSlots = vm.$scopedSlots;\n    var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n        (!newScopedSlots && vm.$scopedSlots.$key));\n    // Any static slot children from the parent may have changed during parent's\n    // update. Dynamic scoped slots may also have changed. In such cases, a forced\n    // update is necessary to ensure correctness.\n    var needsForceUpdate = !!(renderChildren || // has new static slots\n        vm.$options._renderChildren || // has old static slots\n        hasDynamicScopedSlot);\n    var prevVNode = vm.$vnode;\n    vm.$options._parentVnode = parentVnode;\n    vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n    if (vm._vnode) {\n        // update child tree's parent\n        vm._vnode.parent = parentVnode;\n    }\n    vm.$options._renderChildren = renderChildren;\n    // update $attrs and $listeners hash\n    // these are also reactive so they may trigger child update if the child\n    // used them during render\n    var attrs = parentVnode.data.attrs || emptyObject;\n    if (vm._attrsProxy) {\n        // force update if attrs are accessed and has changed since it may be\n        // passed to a child component.\n        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n            needsForceUpdate = true;\n        }\n    }\n    vm.$attrs = attrs;\n    // update listeners\n    listeners = listeners || emptyObject;\n    var prevListeners = vm.$options._parentListeners;\n    if (vm._listenersProxy) {\n        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n    }\n    vm.$listeners = vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, prevListeners);\n    // update props\n    if (propsData && vm.$options.props) {\n        toggleObserving(false);\n        var props = vm._props;\n        var propKeys = vm.$options._propKeys || [];\n        for (var i = 0; i < propKeys.length; i++) {\n            var key = propKeys[i];\n            var propOptions = vm.$options.props; // wtf flow?\n            props[key] = validateProp(key, propOptions, propsData, vm);\n        }\n        toggleObserving(true);\n        // keep a copy of raw propsData\n        vm.$options.propsData = propsData;\n    }\n    // resolve slots + force update if has children\n    if (needsForceUpdate) {\n        vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n        vm.$forceUpdate();\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        isUpdatingChildComponent = false;\n    }\n}\nfunction isInInactiveTree(vm) {\n    while (vm && (vm = vm.$parent)) {\n        if (vm._inactive)\n            return true;\n    }\n    return false;\n}\nfunction activateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = false;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    else if (vm._directInactive) {\n        return;\n    }\n    if (vm._inactive || vm._inactive === null) {\n        vm._inactive = false;\n        for (var i = 0; i < vm.$children.length; i++) {\n            activateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'activated');\n    }\n}\nfunction deactivateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = true;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    if (!vm._inactive) {\n        vm._inactive = true;\n        for (var i = 0; i < vm.$children.length; i++) {\n            deactivateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'deactivated');\n    }\n}\nfunction callHook$1(vm, hook, args, setContext) {\n    if (setContext === void 0) { setContext = true; }\n    // #7573 disable dep collection when invoking lifecycle hooks\n    pushTarget();\n    var prevInst = currentInstance;\n    var prevScope = getCurrentScope();\n    setContext && setCurrentInstance(vm);\n    var handlers = vm.$options[hook];\n    var info = \"\".concat(hook, \" hook\");\n    if (handlers) {\n        for (var i = 0, j = handlers.length; i < j; i++) {\n            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n        }\n    }\n    if (vm._hasHookEvent) {\n        vm.$emit('hook:' + hook);\n    }\n    if (setContext) {\n        setCurrentInstance(prevInst);\n        prevScope && prevScope.on();\n    }\n    popTarget();\n}\n\nvar MAX_UPDATE_COUNT = 100;\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index$1 = 0;\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState() {\n    index$1 = queue.length = activatedChildren.length = 0;\n    has = {};\n    if (process.env.NODE_ENV !== 'production') {\n        circular = {};\n    }\n    waiting = flushing = false;\n}\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n    var performance_1 = window.performance;\n    if (performance_1 &&\n        typeof performance_1.now === 'function' &&\n        getNow() > document.createEvent('Event').timeStamp) {\n        // if the event timestamp, although evaluated AFTER the Date.now(), is\n        // smaller than it, it means the event is using a hi-res timestamp,\n        // and we need to use the hi-res version for event listener timestamps as\n        // well.\n        getNow = function () { return performance_1.now(); };\n    }\n}\nvar sortCompareFn = function (a, b) {\n    if (a.post) {\n        if (!b.post)\n            return 1;\n    }\n    else if (b.post) {\n        return -1;\n    }\n    return a.id - b.id;\n};\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue() {\n    currentFlushTimestamp = getNow();\n    flushing = true;\n    var watcher, id;\n    // Sort queue before flush.\n    // This ensures that:\n    // 1. Components are updated from parent to child. (because parent is always\n    //    created before the child)\n    // 2. A component's user watchers are run before its render watcher (because\n    //    user watchers are created before the render watcher)\n    // 3. If a component is destroyed during a parent component's watcher run,\n    //    its watchers can be skipped.\n    queue.sort(sortCompareFn);\n    // do not cache length because more watchers might be pushed\n    // as we run existing watchers\n    for (index$1 = 0; index$1 < queue.length; index$1++) {\n        watcher = queue[index$1];\n        if (watcher.before) {\n            watcher.before();\n        }\n        id = watcher.id;\n        has[id] = null;\n        watcher.run();\n        // in dev build, check and stop circular updates.\n        if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n            circular[id] = (circular[id] || 0) + 1;\n            if (circular[id] > MAX_UPDATE_COUNT) {\n                warn$2('You may have an infinite update loop ' +\n                    (watcher.user\n                        ? \"in watcher with expression \\\"\".concat(watcher.expression, \"\\\"\")\n                        : \"in a component render function.\"), watcher.vm);\n                break;\n            }\n        }\n    }\n    // keep copies of post queues before resetting state\n    var activatedQueue = activatedChildren.slice();\n    var updatedQueue = queue.slice();\n    resetSchedulerState();\n    // call component updated and activated hooks\n    callActivatedHooks(activatedQueue);\n    callUpdatedHooks(updatedQueue);\n    cleanupDeps();\n    // devtool hook\n    /* istanbul ignore if */\n    if (devtools && config.devtools) {\n        devtools.emit('flush');\n    }\n}\nfunction callUpdatedHooks(queue) {\n    var i = queue.length;\n    while (i--) {\n        var watcher = queue[i];\n        var vm = watcher.vm;\n        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n            callHook$1(vm, 'updated');\n        }\n    }\n}\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent(vm) {\n    // setting _inactive to false here so that a render function can\n    // rely on checking whether it's in an inactive tree (e.g. router-view)\n    vm._inactive = false;\n    activatedChildren.push(vm);\n}\nfunction callActivatedHooks(queue) {\n    for (var i = 0; i < queue.length; i++) {\n        queue[i]._inactive = true;\n        activateChildComponent(queue[i], true /* true */);\n    }\n}\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher(watcher) {\n    var id = watcher.id;\n    if (has[id] != null) {\n        return;\n    }\n    if (watcher === Dep.target && watcher.noRecurse) {\n        return;\n    }\n    has[id] = true;\n    if (!flushing) {\n        queue.push(watcher);\n    }\n    else {\n        // if already flushing, splice the watcher based on its id\n        // if already past its id, it will be run next immediately.\n        var i = queue.length - 1;\n        while (i > index$1 && queue[i].id > watcher.id) {\n            i--;\n        }\n        queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n        waiting = true;\n        if (process.env.NODE_ENV !== 'production' && !config.async) {\n            flushSchedulerQueue();\n            return;\n        }\n        nextTick(flushSchedulerQueue);\n    }\n}\n\nvar WATCHER = \"watcher\";\nvar WATCHER_CB = \"\".concat(WATCHER, \" callback\");\nvar WATCHER_GETTER = \"\".concat(WATCHER, \" getter\");\nvar WATCHER_CLEANUP = \"\".concat(WATCHER, \" cleanup\");\n// Simple effect.\nfunction watchEffect(effect, options) {\n    return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n    return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n        ? __assign(__assign({}, options), { flush: 'post' }) : { flush: 'post' }));\n}\nfunction watchSyncEffect(effect, options) {\n    return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n        ? __assign(__assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));\n}\n// initial value for watchers to trigger on undefined initial values\nvar INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n    if (process.env.NODE_ENV !== 'production' && typeof cb !== 'function') {\n        warn$2(\"`watch(fn, options?)` signature has been moved to a separate API. \" +\n            \"Use `watchEffect(fn, options?)` instead. `watch` now only \" +\n            \"supports `watch(source, cb, options?) signature.\");\n    }\n    return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, _a) {\n    var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;\n    if (process.env.NODE_ENV !== 'production' && !cb) {\n        if (immediate !== undefined) {\n            warn$2(\"watch() \\\"immediate\\\" option is only respected when using the \" +\n                \"watch(source, callback, options?) signature.\");\n        }\n        if (deep !== undefined) {\n            warn$2(\"watch() \\\"deep\\\" option is only respected when using the \" +\n                \"watch(source, callback, options?) signature.\");\n        }\n    }\n    var warnInvalidSource = function (s) {\n        warn$2(\"Invalid watch source: \".concat(s, \". A watch source can only be a getter/effect \") +\n            \"function, a ref, a reactive object, or an array of these types.\");\n    };\n    var instance = currentInstance;\n    var call = function (fn, type, args) {\n        if (args === void 0) { args = null; }\n        var res = invokeWithErrorHandling(fn, null, args, instance, type);\n        if (deep && res && res.__ob__)\n            res.__ob__.dep.depend();\n        return res;\n    };\n    var getter;\n    var forceTrigger = false;\n    var isMultiSource = false;\n    if (isRef(source)) {\n        getter = function () { return source.value; };\n        forceTrigger = isShallow(source);\n    }\n    else if (isReactive(source)) {\n        getter = function () {\n            source.__ob__.dep.depend();\n            return source;\n        };\n        deep = true;\n    }\n    else if (isArray(source)) {\n        isMultiSource = true;\n        forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });\n        getter = function () {\n            return source.map(function (s) {\n                if (isRef(s)) {\n                    return s.value;\n                }\n                else if (isReactive(s)) {\n                    s.__ob__.dep.depend();\n                    return traverse(s);\n                }\n                else if (isFunction(s)) {\n                    return call(s, WATCHER_GETTER);\n                }\n                else {\n                    process.env.NODE_ENV !== 'production' && warnInvalidSource(s);\n                }\n            });\n        };\n    }\n    else if (isFunction(source)) {\n        if (cb) {\n            // getter with cb\n            getter = function () { return call(source, WATCHER_GETTER); };\n        }\n        else {\n            // no cb -> simple effect\n            getter = function () {\n                if (instance && instance._isDestroyed) {\n                    return;\n                }\n                if (cleanup) {\n                    cleanup();\n                }\n                return call(source, WATCHER, [onCleanup]);\n            };\n        }\n    }\n    else {\n        getter = noop;\n        process.env.NODE_ENV !== 'production' && warnInvalidSource(source);\n    }\n    if (cb && deep) {\n        var baseGetter_1 = getter;\n        getter = function () { return traverse(baseGetter_1()); };\n    }\n    var cleanup;\n    var onCleanup = function (fn) {\n        cleanup = watcher.onStop = function () {\n            call(fn, WATCHER_CLEANUP);\n        };\n    };\n    // in SSR there is no need to setup an actual effect, and it should be noop\n    // unless it's eager\n    if (isServerRendering()) {\n        // we will also not call the invalidate callback (+ runner is not set up)\n        onCleanup = noop;\n        if (!cb) {\n            getter();\n        }\n        else if (immediate) {\n            call(cb, WATCHER_CB, [\n                getter(),\n                isMultiSource ? [] : undefined,\n                onCleanup\n            ]);\n        }\n        return noop;\n    }\n    var watcher = new Watcher(currentInstance, getter, noop, {\n        lazy: true\n    });\n    watcher.noRecurse = !cb;\n    var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n    // overwrite default run\n    watcher.run = function () {\n        if (!watcher.active) {\n            return;\n        }\n        if (cb) {\n            // watch(source, cb)\n            var newValue = watcher.get();\n            if (deep ||\n                forceTrigger ||\n                (isMultiSource\n                    ? newValue.some(function (v, i) {\n                        return hasChanged(v, oldValue[i]);\n                    })\n                    : hasChanged(newValue, oldValue))) {\n                // cleanup before running cb again\n                if (cleanup) {\n                    cleanup();\n                }\n                call(cb, WATCHER_CB, [\n                    newValue,\n                    // pass undefined as the old value when it's changed for the first time\n                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                    onCleanup\n                ]);\n                oldValue = newValue;\n            }\n        }\n        else {\n            // watchEffect\n            watcher.get();\n        }\n    };\n    if (flush === 'sync') {\n        watcher.update = watcher.run;\n    }\n    else if (flush === 'post') {\n        watcher.post = true;\n        watcher.update = function () { return queueWatcher(watcher); };\n    }\n    else {\n        // pre\n        watcher.update = function () {\n            if (instance && instance === currentInstance && !instance._isMounted) {\n                // pre-watcher triggered before\n                var buffer = instance._preWatchers || (instance._preWatchers = []);\n                if (buffer.indexOf(watcher) < 0)\n                    buffer.push(watcher);\n            }\n            else {\n                queueWatcher(watcher);\n            }\n        };\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        watcher.onTrack = onTrack;\n        watcher.onTrigger = onTrigger;\n    }\n    // initial run\n    if (cb) {\n        if (immediate) {\n            watcher.run();\n        }\n        else {\n            oldValue = watcher.get();\n        }\n    }\n    else if (flush === 'post' && instance) {\n        instance.$once('hook:mounted', function () { return watcher.get(); });\n    }\n    else {\n        watcher.get();\n    }\n    return function () {\n        watcher.teardown();\n    };\n}\n\nfunction provide(key, value) {\n    if (!currentInstance) {\n        if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"provide() can only be used inside setup().\");\n        }\n    }\n    else {\n        // TS doesn't allow symbol as index type\n        resolveProvided(currentInstance)[key] = value;\n    }\n}\nfunction resolveProvided(vm) {\n    // by default an instance inherits its parent's provides object\n    // but when it needs to provide values of its own, it creates its\n    // own provides object using parent provides object as prototype.\n    // this way in `inject` we can simply look up injections from direct\n    // parent and let the prototype chain do the work.\n    var existing = vm._provided;\n    var parentProvides = vm.$parent && vm.$parent._provided;\n    if (parentProvides === existing) {\n        return (vm._provided = Object.create(parentProvides));\n    }\n    else {\n        return existing;\n    }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory) {\n    if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }\n    // fallback to `currentRenderingInstance` so that this can be called in\n    // a functional component\n    var instance = currentInstance;\n    if (instance) {\n        // #2400\n        // to support `app.use` plugins,\n        // fallback to appContext's `provides` if the instance is at root\n        var provides = instance.$parent && instance.$parent._provided;\n        if (provides && key in provides) {\n            // TS doesn't allow symbol as index type\n            return provides[key];\n        }\n        else if (arguments.length > 1) {\n            return treatDefaultAsFactory && isFunction(defaultValue)\n                ? defaultValue.call(instance)\n                : defaultValue;\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"injection \\\"\".concat(String(key), \"\\\" not found.\"));\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn$2(\"inject() can only be used inside setup() or functional components.\");\n    }\n}\n\n/**\n * @internal this function needs manual public type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction h(type, props, children) {\n    if (!currentInstance) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"globally imported h() can only be invoked when there is an active \" +\n                \"component instance, e.g. synchronously in a component's render or setup function.\");\n    }\n    return createElement$1(currentInstance, type, props, children, 2, true);\n}\n\nfunction handleError(err, vm, info) {\n    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n    // See: https://github.com/vuejs/vuex/issues/1505\n    pushTarget();\n    try {\n        if (vm) {\n            var cur = vm;\n            while ((cur = cur.$parent)) {\n                var hooks = cur.$options.errorCaptured;\n                if (hooks) {\n                    for (var i = 0; i < hooks.length; i++) {\n                        try {\n                            var capture = hooks[i].call(cur, err, vm, info) === false;\n                            if (capture)\n                                return;\n                        }\n                        catch (e) {\n                            globalHandleError(e, cur, 'errorCaptured hook');\n                        }\n                    }\n                }\n            }\n        }\n        globalHandleError(err, vm, info);\n    }\n    finally {\n        popTarget();\n    }\n}\nfunction invokeWithErrorHandling(handler, context, args, vm, info) {\n    var res;\n    try {\n        res = args ? handler.apply(context, args) : handler.call(context);\n        if (res && !res._isVue && isPromise(res) && !res._handled) {\n            res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n            res._handled = true;\n        }\n    }\n    catch (e) {\n        handleError(e, vm, info);\n    }\n    return res;\n}\nfunction globalHandleError(err, vm, info) {\n    if (config.errorHandler) {\n        try {\n            return config.errorHandler.call(null, err, vm, info);\n        }\n        catch (e) {\n            // if the user intentionally throws the original error in the handler,\n            // do not log it twice\n            if (e !== err) {\n                logError(e, null, 'config.errorHandler');\n            }\n        }\n    }\n    logError(err, vm, info);\n}\nfunction logError(err, vm, info) {\n    if (process.env.NODE_ENV !== 'production') {\n        warn$2(\"Error in \".concat(info, \": \\\"\").concat(err.toString(), \"\\\"\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n        console.error(err);\n    }\n    else {\n        throw err;\n    }\n}\n\n/* globals MutationObserver */\nvar isUsingMicroTask = false;\nvar callbacks = [];\nvar pending = false;\nfunction flushCallbacks() {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n        copies[i]();\n    }\n}\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p_1 = Promise.resolve();\n    timerFunc = function () {\n        p_1.then(flushCallbacks);\n        // In problematic UIWebViews, Promise.then doesn't completely break, but\n        // it can get stuck in a weird state where callbacks are pushed into the\n        // microtask queue but the queue isn't being flushed, until the browser\n        // needs to do some other work, e.g. handle a timer. Therefore we can\n        // \"force\" the microtask queue to be flushed by adding an empty timer.\n        if (isIOS)\n            setTimeout(noop);\n    };\n    isUsingMicroTask = true;\n}\nelse if (!isIE &&\n    typeof MutationObserver !== 'undefined' &&\n    (isNative(MutationObserver) ||\n        // PhantomJS and iOS 7.x\n        MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n    // Use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS, iOS7, Android 4.4\n    // (#6466 MutationObserver is unreliable in IE11)\n    var counter_1 = 1;\n    var observer = new MutationObserver(flushCallbacks);\n    var textNode_1 = document.createTextNode(String(counter_1));\n    observer.observe(textNode_1, {\n        characterData: true\n    });\n    timerFunc = function () {\n        counter_1 = (counter_1 + 1) % 2;\n        textNode_1.data = String(counter_1);\n    };\n    isUsingMicroTask = true;\n}\nelse if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n    // Fallback to setImmediate.\n    // Technically it leverages the (macro) task queue,\n    // but it is still a better choice than setTimeout.\n    timerFunc = function () {\n        setImmediate(flushCallbacks);\n    };\n}\nelse {\n    // Fallback to setTimeout.\n    timerFunc = function () {\n        setTimeout(flushCallbacks, 0);\n    };\n}\n/**\n * @internal\n */\nfunction nextTick(cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n        if (cb) {\n            try {\n                cb.call(ctx);\n            }\n            catch (e) {\n                handleError(e, ctx, 'nextTick');\n            }\n        }\n        else if (_resolve) {\n            _resolve(ctx);\n        }\n    });\n    if (!pending) {\n        pending = true;\n        timerFunc();\n    }\n    // $flow-disable-line\n    if (!cb && typeof Promise !== 'undefined') {\n        return new Promise(function (resolve) {\n            _resolve = resolve;\n        });\n    }\n}\n\nfunction useCssModule(name) {\n    if (name === void 0) { name = '$style'; }\n    /* istanbul ignore else */\n    {\n        if (!currentInstance) {\n            process.env.NODE_ENV !== 'production' && warn$2(\"useCssModule must be called inside setup()\");\n            return emptyObject;\n        }\n        var mod = currentInstance[name];\n        if (!mod) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"Current instance does not have CSS module named \\\"\".concat(name, \"\\\".\"));\n            return emptyObject;\n        }\n        return mod;\n    }\n}\n\n/**\n * Runtime helper for SFC's CSS variable injection feature.\n * @private\n */\nfunction useCssVars(getter) {\n    if (!inBrowser && !false)\n        return;\n    var instance = currentInstance;\n    if (!instance) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"useCssVars is called without current active component instance.\");\n        return;\n    }\n    watchPostEffect(function () {\n        var el = instance.$el;\n        var vars = getter(instance, instance._setupProxy);\n        if (el && el.nodeType === 1) {\n            var style = el.style;\n            for (var key in vars) {\n                style.setProperty(\"--\".concat(key), vars[key]);\n            }\n        }\n    });\n}\n\n/**\n * v3-compatible async component API.\n * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n * because it relies on existing manual types\n */\nfunction defineAsyncComponent(source) {\n    if (isFunction(source)) {\n        source = { loader: source };\n    }\n    var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out\n    _b = source.suspensible, // undefined = never times out\n    suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true\n    userOnError = source.onError;\n    if (process.env.NODE_ENV !== 'production' && suspensible) {\n        warn$2(\"The suspensible option for async components is not supported in Vue2. It is ignored.\");\n    }\n    var pendingRequest = null;\n    var retries = 0;\n    var retry = function () {\n        retries++;\n        pendingRequest = null;\n        return load();\n    };\n    var load = function () {\n        var thisRequest;\n        return (pendingRequest ||\n            (thisRequest = pendingRequest =\n                loader()\n                    .catch(function (err) {\n                    err = err instanceof Error ? err : new Error(String(err));\n                    if (userOnError) {\n                        return new Promise(function (resolve, reject) {\n                            var userRetry = function () { return resolve(retry()); };\n                            var userFail = function () { return reject(err); };\n                            userOnError(err, userRetry, userFail, retries + 1);\n                        });\n                    }\n                    else {\n                        throw err;\n                    }\n                })\n                    .then(function (comp) {\n                    if (thisRequest !== pendingRequest && pendingRequest) {\n                        return pendingRequest;\n                    }\n                    if (process.env.NODE_ENV !== 'production' && !comp) {\n                        warn$2(\"Async component loader resolved to undefined. \" +\n                            \"If you are using retry(), make sure to return its return value.\");\n                    }\n                    // interop module default\n                    if (comp &&\n                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                        comp = comp.default;\n                    }\n                    if (process.env.NODE_ENV !== 'production' && comp && !isObject(comp) && !isFunction(comp)) {\n                        throw new Error(\"Invalid async component load result: \".concat(comp));\n                    }\n                    return comp;\n                })));\n    };\n    return function () {\n        var component = load();\n        return {\n            component: component,\n            delay: delay,\n            timeout: timeout,\n            error: errorComponent,\n            loading: loadingComponent\n        };\n    };\n}\n\nfunction createLifeCycle(hookName) {\n    return function (fn, target) {\n        if (target === void 0) { target = currentInstance; }\n        if (!target) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"\".concat(formatName(hookName), \" is called when there is no active component instance to be \") +\n                    \"associated with. \" +\n                    \"Lifecycle injection APIs can only be used during execution of setup().\");\n            return;\n        }\n        return injectHook(target, hookName, fn);\n    };\n}\nfunction formatName(name) {\n    if (name === 'beforeDestroy') {\n        name = 'beforeUnmount';\n    }\n    else if (name === 'destroyed') {\n        name = 'unmounted';\n    }\n    return \"on\".concat(name[0].toUpperCase() + name.slice(1));\n}\nfunction injectHook(instance, hookName, fn) {\n    var options = instance.$options;\n    options[hookName] = mergeLifecycleHook(options[hookName], fn);\n}\nvar onBeforeMount = createLifeCycle('beforeMount');\nvar onMounted = createLifeCycle('mounted');\nvar onBeforeUpdate = createLifeCycle('beforeUpdate');\nvar onUpdated = createLifeCycle('updated');\nvar onBeforeUnmount = createLifeCycle('beforeDestroy');\nvar onUnmounted = createLifeCycle('destroyed');\nvar onActivated = createLifeCycle('activated');\nvar onDeactivated = createLifeCycle('deactivated');\nvar onServerPrefetch = createLifeCycle('serverPrefetch');\nvar onRenderTracked = createLifeCycle('renderTracked');\nvar onRenderTriggered = createLifeCycle('renderTriggered');\nvar injectErrorCapturedHook = createLifeCycle('errorCaptured');\nfunction onErrorCaptured(hook, target) {\n    if (target === void 0) { target = currentInstance; }\n    injectErrorCapturedHook(hook, target);\n}\n\n/**\n * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n */\nvar version = '2.7.16';\n/**\n * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n */\nfunction defineComponent(options) {\n    return options;\n}\n\nvar seenObjects = new _Set();\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse(val) {\n    _traverse(val, seenObjects);\n    seenObjects.clear();\n    return val;\n}\nfunction _traverse(val, seen) {\n    var i, keys;\n    var isA = isArray(val);\n    if ((!isA && !isObject(val)) ||\n        val.__v_skip /* ReactiveFlags.SKIP */ ||\n        Object.isFrozen(val) ||\n        val instanceof VNode) {\n        return;\n    }\n    if (val.__ob__) {\n        var depId = val.__ob__.dep.id;\n        if (seen.has(depId)) {\n            return;\n        }\n        seen.add(depId);\n    }\n    if (isA) {\n        i = val.length;\n        while (i--)\n            _traverse(val[i], seen);\n    }\n    else if (isRef(val)) {\n        _traverse(val.value, seen);\n    }\n    else {\n        keys = Object.keys(val);\n        i = keys.length;\n        while (i--)\n            _traverse(val[keys[i]], seen);\n    }\n}\n\nvar uid$1 = 0;\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n * @internal\n */\nvar Watcher = /** @class */ (function () {\n    function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {\n        recordEffectScope(this, \n        // if the active effect scope is manually created (not a component scope),\n        // prioritize it\n        activeEffectScope && !activeEffectScope._vm\n            ? activeEffectScope\n            : vm\n                ? vm._scope\n                : undefined);\n        if ((this.vm = vm) && isRenderWatcher) {\n            vm._watcher = this;\n        }\n        // options\n        if (options) {\n            this.deep = !!options.deep;\n            this.user = !!options.user;\n            this.lazy = !!options.lazy;\n            this.sync = !!options.sync;\n            this.before = options.before;\n            if (process.env.NODE_ENV !== 'production') {\n                this.onTrack = options.onTrack;\n                this.onTrigger = options.onTrigger;\n            }\n        }\n        else {\n            this.deep = this.user = this.lazy = this.sync = false;\n        }\n        this.cb = cb;\n        this.id = ++uid$1; // uid for batching\n        this.active = true;\n        this.post = false;\n        this.dirty = this.lazy; // for lazy watchers\n        this.deps = [];\n        this.newDeps = [];\n        this.depIds = new _Set();\n        this.newDepIds = new _Set();\n        this.expression = process.env.NODE_ENV !== 'production' ? expOrFn.toString() : '';\n        // parse expression for getter\n        if (isFunction(expOrFn)) {\n            this.getter = expOrFn;\n        }\n        else {\n            this.getter = parsePath(expOrFn);\n            if (!this.getter) {\n                this.getter = noop;\n                process.env.NODE_ENV !== 'production' &&\n                    warn$2(\"Failed watching path: \\\"\".concat(expOrFn, \"\\\" \") +\n                        'Watcher only accepts simple dot-delimited paths. ' +\n                        'For full control, use a function instead.', vm);\n            }\n        }\n        this.value = this.lazy ? undefined : this.get();\n    }\n    /**\n     * Evaluate the getter, and re-collect dependencies.\n     */\n    Watcher.prototype.get = function () {\n        pushTarget(this);\n        var value;\n        var vm = this.vm;\n        try {\n            value = this.getter.call(vm, vm);\n        }\n        catch (e) {\n            if (this.user) {\n                handleError(e, vm, \"getter for watcher \\\"\".concat(this.expression, \"\\\"\"));\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // \"touch\" every property so they are all tracked as\n            // dependencies for deep watching\n            if (this.deep) {\n                traverse(value);\n            }\n            popTarget();\n            this.cleanupDeps();\n        }\n        return value;\n    };\n    /**\n     * Add a dependency to this directive.\n     */\n    Watcher.prototype.addDep = function (dep) {\n        var id = dep.id;\n        if (!this.newDepIds.has(id)) {\n            this.newDepIds.add(id);\n            this.newDeps.push(dep);\n            if (!this.depIds.has(id)) {\n                dep.addSub(this);\n            }\n        }\n    };\n    /**\n     * Clean up for dependency collection.\n     */\n    Watcher.prototype.cleanupDeps = function () {\n        var i = this.deps.length;\n        while (i--) {\n            var dep = this.deps[i];\n            if (!this.newDepIds.has(dep.id)) {\n                dep.removeSub(this);\n            }\n        }\n        var tmp = this.depIds;\n        this.depIds = this.newDepIds;\n        this.newDepIds = tmp;\n        this.newDepIds.clear();\n        tmp = this.deps;\n        this.deps = this.newDeps;\n        this.newDeps = tmp;\n        this.newDeps.length = 0;\n    };\n    /**\n     * Subscriber interface.\n     * Will be called when a dependency changes.\n     */\n    Watcher.prototype.update = function () {\n        /* istanbul ignore else */\n        if (this.lazy) {\n            this.dirty = true;\n        }\n        else if (this.sync) {\n            this.run();\n        }\n        else {\n            queueWatcher(this);\n        }\n    };\n    /**\n     * Scheduler job interface.\n     * Will be called by the scheduler.\n     */\n    Watcher.prototype.run = function () {\n        if (this.active) {\n            var value = this.get();\n            if (value !== this.value ||\n                // Deep watchers and watchers on Object/Arrays should fire even\n                // when the value is the same, because the value may\n                // have mutated.\n                isObject(value) ||\n                this.deep) {\n                // set new value\n                var oldValue = this.value;\n                this.value = value;\n                if (this.user) {\n                    var info = \"callback for watcher \\\"\".concat(this.expression, \"\\\"\");\n                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                }\n                else {\n                    this.cb.call(this.vm, value, oldValue);\n                }\n            }\n        }\n    };\n    /**\n     * Evaluate the value of the watcher.\n     * This only gets called for lazy watchers.\n     */\n    Watcher.prototype.evaluate = function () {\n        this.value = this.get();\n        this.dirty = false;\n    };\n    /**\n     * Depend on all deps collected by this watcher.\n     */\n    Watcher.prototype.depend = function () {\n        var i = this.deps.length;\n        while (i--) {\n            this.deps[i].depend();\n        }\n    };\n    /**\n     * Remove self from all dependencies' subscriber list.\n     */\n    Watcher.prototype.teardown = function () {\n        if (this.vm && !this.vm._isBeingDestroyed) {\n            remove$2(this.vm._scope.effects, this);\n        }\n        if (this.active) {\n            var i = this.deps.length;\n            while (i--) {\n                this.deps[i].removeSub(this);\n            }\n            this.active = false;\n            if (this.onStop) {\n                this.onStop();\n            }\n        }\n    };\n    return Watcher;\n}());\n\nvar sharedPropertyDefinition = {\n    enumerable: true,\n    configurable: true,\n    get: noop,\n    set: noop\n};\nfunction proxy(target, sourceKey, key) {\n    sharedPropertyDefinition.get = function proxyGetter() {\n        return this[sourceKey][key];\n    };\n    sharedPropertyDefinition.set = function proxySetter(val) {\n        this[sourceKey][key] = val;\n    };\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction initState(vm) {\n    var opts = vm.$options;\n    if (opts.props)\n        initProps$1(vm, opts.props);\n    // Composition API\n    initSetup(vm);\n    if (opts.methods)\n        initMethods(vm, opts.methods);\n    if (opts.data) {\n        initData(vm);\n    }\n    else {\n        var ob = observe((vm._data = {}));\n        ob && ob.vmCount++;\n    }\n    if (opts.computed)\n        initComputed$1(vm, opts.computed);\n    if (opts.watch && opts.watch !== nativeWatch) {\n        initWatch(vm, opts.watch);\n    }\n}\nfunction initProps$1(vm, propsOptions) {\n    var propsData = vm.$options.propsData || {};\n    var props = (vm._props = shallowReactive({}));\n    // cache prop keys so that future props updates can iterate using Array\n    // instead of dynamic object key enumeration.\n    var keys = (vm.$options._propKeys = []);\n    var isRoot = !vm.$parent;\n    // root instance props should be converted\n    if (!isRoot) {\n        toggleObserving(false);\n    }\n    var _loop_1 = function (key) {\n        keys.push(key);\n        var value = validateProp(key, propsOptions, propsData, vm);\n        /* istanbul ignore else */\n        if (process.env.NODE_ENV !== 'production') {\n            var hyphenatedKey = hyphenate(key);\n            if (isReservedAttribute(hyphenatedKey) ||\n                config.isReservedAttr(hyphenatedKey)) {\n                warn$2(\"\\\"\".concat(hyphenatedKey, \"\\\" is a reserved attribute and cannot be used as component prop.\"), vm);\n            }\n            defineReactive(props, key, value, function () {\n                if (!isRoot && !isUpdatingChildComponent) {\n                    warn$2(\"Avoid mutating a prop directly since the value will be \" +\n                        \"overwritten whenever the parent component re-renders. \" +\n                        \"Instead, use a data or computed property based on the prop's \" +\n                        \"value. Prop being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                }\n            }, true /* shallow */);\n        }\n        else {\n            defineReactive(props, key, value, undefined, true /* shallow */);\n        }\n        // static props are already proxied on the component's prototype\n        // during Vue.extend(). We only need to proxy props defined at\n        // instantiation here.\n        if (!(key in vm)) {\n            proxy(vm, \"_props\", key);\n        }\n    };\n    for (var key in propsOptions) {\n        _loop_1(key);\n    }\n    toggleObserving(true);\n}\nfunction initData(vm) {\n    var data = vm.$options.data;\n    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n    if (!isPlainObject(data)) {\n        data = {};\n        process.env.NODE_ENV !== 'production' &&\n            warn$2('data functions should return an object:\\n' +\n                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n    }\n    // proxy data on instance\n    var keys = Object.keys(data);\n    var props = vm.$options.props;\n    var methods = vm.$options.methods;\n    var i = keys.length;\n    while (i--) {\n        var key = keys[i];\n        if (process.env.NODE_ENV !== 'production') {\n            if (methods && hasOwn(methods, key)) {\n                warn$2(\"Method \\\"\".concat(key, \"\\\" has already been defined as a data property.\"), vm);\n            }\n        }\n        if (props && hasOwn(props, key)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2(\"The data property \\\"\".concat(key, \"\\\" is already declared as a prop. \") +\n                    \"Use prop default value instead.\", vm);\n        }\n        else if (!isReserved(key)) {\n            proxy(vm, \"_data\", key);\n        }\n    }\n    // observe data\n    var ob = observe(data);\n    ob && ob.vmCount++;\n}\nfunction getData(data, vm) {\n    // #7573 disable dep collection when invoking data getters\n    pushTarget();\n    try {\n        return data.call(vm, vm);\n    }\n    catch (e) {\n        handleError(e, vm, \"data()\");\n        return {};\n    }\n    finally {\n        popTarget();\n    }\n}\nvar computedWatcherOptions = { lazy: true };\nfunction initComputed$1(vm, computed) {\n    // $flow-disable-line\n    var watchers = (vm._computedWatchers = Object.create(null));\n    // computed properties are just getters during SSR\n    var isSSR = isServerRendering();\n    for (var key in computed) {\n        var userDef = computed[key];\n        var getter = isFunction(userDef) ? userDef : userDef.get;\n        if (process.env.NODE_ENV !== 'production' && getter == null) {\n            warn$2(\"Getter is missing for computed property \\\"\".concat(key, \"\\\".\"), vm);\n        }\n        if (!isSSR) {\n            // create internal watcher for the computed property.\n            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n        }\n        // component-defined computed properties are already defined on the\n        // component prototype. We only need to define computed properties defined\n        // at instantiation here.\n        if (!(key in vm)) {\n            defineComputed(vm, key, userDef);\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            if (key in vm.$data) {\n                warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined in data.\"), vm);\n            }\n            else if (vm.$options.props && key in vm.$options.props) {\n                warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a prop.\"), vm);\n            }\n            else if (vm.$options.methods && key in vm.$options.methods) {\n                warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a method.\"), vm);\n            }\n        }\n    }\n}\nfunction defineComputed(target, key, userDef) {\n    var shouldCache = !isServerRendering();\n    if (isFunction(userDef)) {\n        sharedPropertyDefinition.get = shouldCache\n            ? createComputedGetter(key)\n            : createGetterInvoker(userDef);\n        sharedPropertyDefinition.set = noop;\n    }\n    else {\n        sharedPropertyDefinition.get = userDef.get\n            ? shouldCache && userDef.cache !== false\n                ? createComputedGetter(key)\n                : createGetterInvoker(userDef.get)\n            : noop;\n        sharedPropertyDefinition.set = userDef.set || noop;\n    }\n    if (process.env.NODE_ENV !== 'production' && sharedPropertyDefinition.set === noop) {\n        sharedPropertyDefinition.set = function () {\n            warn$2(\"Computed property \\\"\".concat(key, \"\\\" was assigned to but it has no setter.\"), this);\n        };\n    }\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction createComputedGetter(key) {\n    return function computedGetter() {\n        var watcher = this._computedWatchers && this._computedWatchers[key];\n        if (watcher) {\n            if (watcher.dirty) {\n                watcher.evaluate();\n            }\n            if (Dep.target) {\n                if (process.env.NODE_ENV !== 'production' && Dep.target.onTrack) {\n                    Dep.target.onTrack({\n                        effect: Dep.target,\n                        target: this,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key: key\n                    });\n                }\n                watcher.depend();\n            }\n            return watcher.value;\n        }\n    };\n}\nfunction createGetterInvoker(fn) {\n    return function computedGetter() {\n        return fn.call(this, this);\n    };\n}\nfunction initMethods(vm, methods) {\n    var props = vm.$options.props;\n    for (var key in methods) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (typeof methods[key] !== 'function') {\n                warn$2(\"Method \\\"\".concat(key, \"\\\" has type \\\"\").concat(typeof methods[key], \"\\\" in the component definition. \") +\n                    \"Did you reference the function correctly?\", vm);\n            }\n            if (props && hasOwn(props, key)) {\n                warn$2(\"Method \\\"\".concat(key, \"\\\" has already been defined as a prop.\"), vm);\n            }\n            if (key in vm && isReserved(key)) {\n                warn$2(\"Method \\\"\".concat(key, \"\\\" conflicts with an existing Vue instance method. \") +\n                    \"Avoid defining component methods that start with _ or $.\");\n            }\n        }\n        vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);\n    }\n}\nfunction initWatch(vm, watch) {\n    for (var key in watch) {\n        var handler = watch[key];\n        if (isArray(handler)) {\n            for (var i = 0; i < handler.length; i++) {\n                createWatcher(vm, key, handler[i]);\n            }\n        }\n        else {\n            createWatcher(vm, key, handler);\n        }\n    }\n}\nfunction createWatcher(vm, expOrFn, handler, options) {\n    if (isPlainObject(handler)) {\n        options = handler;\n        handler = handler.handler;\n    }\n    if (typeof handler === 'string') {\n        handler = vm[handler];\n    }\n    return vm.$watch(expOrFn, handler, options);\n}\nfunction stateMixin(Vue) {\n    // flow somehow has problems with directly declared definition object\n    // when using Object.defineProperty, so we have to procedurally build up\n    // the object here.\n    var dataDef = {};\n    dataDef.get = function () {\n        return this._data;\n    };\n    var propsDef = {};\n    propsDef.get = function () {\n        return this._props;\n    };\n    if (process.env.NODE_ENV !== 'production') {\n        dataDef.set = function () {\n            warn$2('Avoid replacing instance root $data. ' +\n                'Use nested data properties instead.', this);\n        };\n        propsDef.set = function () {\n            warn$2(\"$props is readonly.\", this);\n        };\n    }\n    Object.defineProperty(Vue.prototype, '$data', dataDef);\n    Object.defineProperty(Vue.prototype, '$props', propsDef);\n    Vue.prototype.$set = set;\n    Vue.prototype.$delete = del;\n    Vue.prototype.$watch = function (expOrFn, cb, options) {\n        var vm = this;\n        if (isPlainObject(cb)) {\n            return createWatcher(vm, expOrFn, cb, options);\n        }\n        options = options || {};\n        options.user = true;\n        var watcher = new Watcher(vm, expOrFn, cb, options);\n        if (options.immediate) {\n            var info = \"callback for immediate watcher \\\"\".concat(watcher.expression, \"\\\"\");\n            pushTarget();\n            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n            popTarget();\n        }\n        return function unwatchFn() {\n            watcher.teardown();\n        };\n    };\n}\n\nfunction initProvide(vm) {\n    var provideOption = vm.$options.provide;\n    if (provideOption) {\n        var provided = isFunction(provideOption)\n            ? provideOption.call(vm)\n            : provideOption;\n        if (!isObject(provided)) {\n            return;\n        }\n        var source = resolveProvided(vm);\n        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n        // iterate the keys ourselves.\n        var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n        for (var i = 0; i < keys.length; i++) {\n            var key = keys[i];\n            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n        }\n    }\n}\nfunction initInjections(vm) {\n    var result = resolveInject(vm.$options.inject, vm);\n    if (result) {\n        toggleObserving(false);\n        Object.keys(result).forEach(function (key) {\n            /* istanbul ignore else */\n            if (process.env.NODE_ENV !== 'production') {\n                defineReactive(vm, key, result[key], function () {\n                    warn$2(\"Avoid mutating an injected value directly since the changes will be \" +\n                        \"overwritten whenever the provided component re-renders. \" +\n                        \"injection being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                });\n            }\n            else {\n                defineReactive(vm, key, result[key]);\n            }\n        });\n        toggleObserving(true);\n    }\n}\nfunction resolveInject(inject, vm) {\n    if (inject) {\n        // inject is :any because flow is not smart enough to figure out cached\n        var result = Object.create(null);\n        var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n        for (var i = 0; i < keys.length; i++) {\n            var key = keys[i];\n            // #6574 in case the inject object is observed...\n            if (key === '__ob__')\n                continue;\n            var provideKey = inject[key].from;\n            if (provideKey in vm._provided) {\n                result[key] = vm._provided[provideKey];\n            }\n            else if ('default' in inject[key]) {\n                var provideDefault = inject[key].default;\n                result[key] = isFunction(provideDefault)\n                    ? provideDefault.call(vm)\n                    : provideDefault;\n            }\n            else if (process.env.NODE_ENV !== 'production') {\n                warn$2(\"Injection \\\"\".concat(key, \"\\\" not found\"), vm);\n            }\n        }\n        return result;\n    }\n}\n\nvar uid = 0;\nfunction initMixin$1(Vue) {\n    Vue.prototype._init = function (options) {\n        var vm = this;\n        // a uid\n        vm._uid = uid++;\n        var startTag, endTag;\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n            startTag = \"vue-perf-start:\".concat(vm._uid);\n            endTag = \"vue-perf-end:\".concat(vm._uid);\n            mark(startTag);\n        }\n        // a flag to mark this as a Vue instance without having to do instanceof\n        // check\n        vm._isVue = true;\n        // avoid instances from being observed\n        vm.__v_skip = true;\n        // effect scope\n        vm._scope = new EffectScope(true /* detached */);\n        // #13134 edge case where a child component is manually created during the\n        // render of a parent component\n        vm._scope.parent = undefined;\n        vm._scope._vm = true;\n        // merge options\n        if (options && options._isComponent) {\n            // optimize internal component instantiation\n            // since dynamic options merging is pretty slow, and none of the\n            // internal component options needs special treatment.\n            initInternalComponent(vm, options);\n        }\n        else {\n            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n        }\n        /* istanbul ignore else */\n        if (process.env.NODE_ENV !== 'production') {\n            initProxy(vm);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n        // expose real self\n        vm._self = vm;\n        initLifecycle(vm);\n        initEvents(vm);\n        initRender(vm);\n        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n        initInjections(vm); // resolve injections before data/props\n        initState(vm);\n        initProvide(vm); // resolve provide after data/props\n        callHook$1(vm, 'created');\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n            vm._name = formatComponentName(vm, false);\n            mark(endTag);\n            measure(\"vue \".concat(vm._name, \" init\"), startTag, endTag);\n        }\n        if (vm.$options.el) {\n            vm.$mount(vm.$options.el);\n        }\n    };\n}\nfunction initInternalComponent(vm, options) {\n    var opts = (vm.$options = Object.create(vm.constructor.options));\n    // doing this because it's faster than dynamic enumeration.\n    var parentVnode = options._parentVnode;\n    opts.parent = options.parent;\n    opts._parentVnode = parentVnode;\n    var vnodeComponentOptions = parentVnode.componentOptions;\n    opts.propsData = vnodeComponentOptions.propsData;\n    opts._parentListeners = vnodeComponentOptions.listeners;\n    opts._renderChildren = vnodeComponentOptions.children;\n    opts._componentTag = vnodeComponentOptions.tag;\n    if (options.render) {\n        opts.render = options.render;\n        opts.staticRenderFns = options.staticRenderFns;\n    }\n}\nfunction resolveConstructorOptions(Ctor) {\n    var options = Ctor.options;\n    if (Ctor.super) {\n        var superOptions = resolveConstructorOptions(Ctor.super);\n        var cachedSuperOptions = Ctor.superOptions;\n        if (superOptions !== cachedSuperOptions) {\n            // super option changed,\n            // need to resolve new options.\n            Ctor.superOptions = superOptions;\n            // check if there are any late-modified/attached options (#4976)\n            var modifiedOptions = resolveModifiedOptions(Ctor);\n            // update base extend options\n            if (modifiedOptions) {\n                extend(Ctor.extendOptions, modifiedOptions);\n            }\n            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n            if (options.name) {\n                options.components[options.name] = Ctor;\n            }\n        }\n    }\n    return options;\n}\nfunction resolveModifiedOptions(Ctor) {\n    var modified;\n    var latest = Ctor.options;\n    var sealed = Ctor.sealedOptions;\n    for (var key in latest) {\n        if (latest[key] !== sealed[key]) {\n            if (!modified)\n                modified = {};\n            modified[key] = latest[key];\n        }\n    }\n    return modified;\n}\n\nfunction FunctionalRenderContext(data, props, children, parent, Ctor) {\n    var _this = this;\n    var options = Ctor.options;\n    // ensure the createElement function in functional components\n    // gets a unique context - this is necessary for correct named slot check\n    var contextVm;\n    if (hasOwn(parent, '_uid')) {\n        contextVm = Object.create(parent);\n        contextVm._original = parent;\n    }\n    else {\n        // the context vm passed in is a functional context as well.\n        // in this case we want to make sure we are able to get a hold to the\n        // real context instance.\n        contextVm = parent;\n        // @ts-ignore\n        parent = parent._original;\n    }\n    var isCompiled = isTrue(options._compiled);\n    var needNormalization = !isCompiled;\n    this.data = data;\n    this.props = props;\n    this.children = children;\n    this.parent = parent;\n    this.listeners = data.on || emptyObject;\n    this.injections = resolveInject(options.inject, parent);\n    this.slots = function () {\n        if (!_this.$slots) {\n            normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));\n        }\n        return _this.$slots;\n    };\n    Object.defineProperty(this, 'scopedSlots', {\n        enumerable: true,\n        get: function () {\n            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n        }\n    });\n    // support for compiled functional template\n    if (isCompiled) {\n        // exposing $options for renderStatic()\n        this.$options = options;\n        // pre-resolve slots for renderSlot()\n        this.$slots = this.slots();\n        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n    }\n    if (options._scopeId) {\n        this._c = function (a, b, c, d) {\n            var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n            if (vnode && !isArray(vnode)) {\n                vnode.fnScopeId = options._scopeId;\n                vnode.fnContext = parent;\n            }\n            return vnode;\n        };\n    }\n    else {\n        this._c = function (a, b, c, d) {\n            return createElement$1(contextVm, a, b, c, d, needNormalization);\n        };\n    }\n}\ninstallRenderHelpers(FunctionalRenderContext.prototype);\nfunction createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n    var options = Ctor.options;\n    var props = {};\n    var propOptions = options.props;\n    if (isDef(propOptions)) {\n        for (var key in propOptions) {\n            props[key] = validateProp(key, propOptions, propsData || emptyObject);\n        }\n    }\n    else {\n        if (isDef(data.attrs))\n            mergeProps(props, data.attrs);\n        if (isDef(data.props))\n            mergeProps(props, data.props);\n    }\n    var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n    var vnode = options.render.call(null, renderContext._c, renderContext);\n    if (vnode instanceof VNode) {\n        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n    }\n    else if (isArray(vnode)) {\n        var vnodes = normalizeChildren(vnode) || [];\n        var res = new Array(vnodes.length);\n        for (var i = 0; i < vnodes.length; i++) {\n            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n        }\n        return res;\n    }\n}\nfunction cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n    // #7817 clone node before setting fnContext, otherwise if the node is reused\n    // (e.g. it was from a cached normal slot) the fnContext causes named slots\n    // that should not be matched to match.\n    var clone = cloneVNode(vnode);\n    clone.fnContext = contextVm;\n    clone.fnOptions = options;\n    if (process.env.NODE_ENV !== 'production') {\n        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n            renderContext;\n    }\n    if (data.slot) {\n        (clone.data || (clone.data = {})).slot = data.slot;\n    }\n    return clone;\n}\nfunction mergeProps(to, from) {\n    for (var key in from) {\n        to[camelize(key)] = from[key];\n    }\n}\n\nfunction getComponentName(options) {\n    return options.name || options.__name || options._componentTag;\n}\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n    init: function (vnode, hydrating) {\n        if (vnode.componentInstance &&\n            !vnode.componentInstance._isDestroyed &&\n            vnode.data.keepAlive) {\n            // kept-alive components, treat as a patch\n            var mountedNode = vnode; // work around flow\n            componentVNodeHooks.prepatch(mountedNode, mountedNode);\n        }\n        else {\n            var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n            child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n        }\n    },\n    prepatch: function (oldVnode, vnode) {\n        var options = vnode.componentOptions;\n        var child = (vnode.componentInstance = oldVnode.componentInstance);\n        updateChildComponent(child, options.propsData, // updated props\n        options.listeners, // updated listeners\n        vnode, // new parent vnode\n        options.children // new children\n        );\n    },\n    insert: function (vnode) {\n        var context = vnode.context, componentInstance = vnode.componentInstance;\n        if (!componentInstance._isMounted) {\n            componentInstance._isMounted = true;\n            callHook$1(componentInstance, 'mounted');\n        }\n        if (vnode.data.keepAlive) {\n            if (context._isMounted) {\n                // vue-router#1212\n                // During updates, a kept-alive component's child components may\n                // change, so directly walking the tree here may call activated hooks\n                // on incorrect children. Instead we push them into a queue which will\n                // be processed after the whole patch process ended.\n                queueActivatedComponent(componentInstance);\n            }\n            else {\n                activateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    },\n    destroy: function (vnode) {\n        var componentInstance = vnode.componentInstance;\n        if (!componentInstance._isDestroyed) {\n            if (!vnode.data.keepAlive) {\n                componentInstance.$destroy();\n            }\n            else {\n                deactivateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    }\n};\nvar hooksToMerge = Object.keys(componentVNodeHooks);\nfunction createComponent(Ctor, data, context, children, tag) {\n    if (isUndef(Ctor)) {\n        return;\n    }\n    var baseCtor = context.$options._base;\n    // plain options object: turn it into a constructor\n    if (isObject(Ctor)) {\n        Ctor = baseCtor.extend(Ctor);\n    }\n    // if at this stage it's not a constructor or an async component factory,\n    // reject.\n    if (typeof Ctor !== 'function') {\n        if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"Invalid Component definition: \".concat(String(Ctor)), context);\n        }\n        return;\n    }\n    // async component\n    var asyncFactory;\n    // @ts-expect-error\n    if (isUndef(Ctor.cid)) {\n        asyncFactory = Ctor;\n        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n        if (Ctor === undefined) {\n            // return a placeholder node for async component, which is rendered\n            // as a comment node but preserves all the raw information for the node.\n            // the information will be used for async server-rendering and hydration.\n            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n        }\n    }\n    data = data || {};\n    // resolve constructor options in case global mixins are applied after\n    // component constructor creation\n    resolveConstructorOptions(Ctor);\n    // transform component v-model data into props & events\n    if (isDef(data.model)) {\n        // @ts-expect-error\n        transformModel(Ctor.options, data);\n    }\n    // extract props\n    // @ts-expect-error\n    var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n    // functional component\n    // @ts-expect-error\n    if (isTrue(Ctor.options.functional)) {\n        return createFunctionalComponent(Ctor, propsData, data, context, children);\n    }\n    // extract listeners, since these needs to be treated as\n    // child component listeners instead of DOM listeners\n    var listeners = data.on;\n    // replace with listeners with .native modifier\n    // so it gets processed during parent component patch.\n    data.on = data.nativeOn;\n    // @ts-expect-error\n    if (isTrue(Ctor.options.abstract)) {\n        // abstract components do not keep anything\n        // other than props & listeners & slot\n        // work around flow\n        var slot = data.slot;\n        data = {};\n        if (slot) {\n            data.slot = slot;\n        }\n    }\n    // install component management hooks onto the placeholder node\n    installComponentHooks(data);\n    // return a placeholder vnode\n    // @ts-expect-error\n    var name = getComponentName(Ctor.options) || tag;\n    var vnode = new VNode(\n    // @ts-expect-error\n    \"vue-component-\".concat(Ctor.cid).concat(name ? \"-\".concat(name) : ''), data, undefined, undefined, undefined, context, \n    // @ts-expect-error\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);\n    return vnode;\n}\nfunction createComponentInstanceForVnode(\n// we know it's MountedComponentVNode but flow doesn't\nvnode, \n// activeInstance in lifecycle state\nparent) {\n    var options = {\n        _isComponent: true,\n        _parentVnode: vnode,\n        parent: parent\n    };\n    // check inline-template render functions\n    var inlineTemplate = vnode.data.inlineTemplate;\n    if (isDef(inlineTemplate)) {\n        options.render = inlineTemplate.render;\n        options.staticRenderFns = inlineTemplate.staticRenderFns;\n    }\n    return new vnode.componentOptions.Ctor(options);\n}\nfunction installComponentHooks(data) {\n    var hooks = data.hook || (data.hook = {});\n    for (var i = 0; i < hooksToMerge.length; i++) {\n        var key = hooksToMerge[i];\n        var existing = hooks[key];\n        var toMerge = componentVNodeHooks[key];\n        // @ts-expect-error\n        if (existing !== toMerge && !(existing && existing._merged)) {\n            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n        }\n    }\n}\nfunction mergeHook(f1, f2) {\n    var merged = function (a, b) {\n        // flow complains about extra args which is why we use any\n        f1(a, b);\n        f2(a, b);\n    };\n    merged._merged = true;\n    return merged;\n}\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel(options, data) {\n    var prop = (options.model && options.model.prop) || 'value';\n    var event = (options.model && options.model.event) || 'input';\n    (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n    var on = data.on || (data.on = {});\n    var existing = on[event];\n    var callback = data.model.callback;\n    if (isDef(existing)) {\n        if (isArray(existing)\n            ? existing.indexOf(callback) === -1\n            : existing !== callback) {\n            on[event] = [callback].concat(existing);\n        }\n    }\n    else {\n        on[event] = callback;\n    }\n}\n\nvar warn$2 = noop;\nvar tip = noop;\nvar generateComponentTrace; // work around flow check\nvar formatComponentName;\nif (process.env.NODE_ENV !== 'production') {\n    var hasConsole_1 = typeof console !== 'undefined';\n    var classifyRE_1 = /(?:^|[-_])(\\w)/g;\n    var classify_1 = function (str) {\n        return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');\n    };\n    warn$2 = function (msg, vm) {\n        if (vm === void 0) { vm = currentInstance; }\n        var trace = vm ? generateComponentTrace(vm) : '';\n        if (config.warnHandler) {\n            config.warnHandler.call(null, msg, vm, trace);\n        }\n        else if (hasConsole_1 && !config.silent) {\n            console.error(\"[Vue warn]: \".concat(msg).concat(trace));\n        }\n    };\n    tip = function (msg, vm) {\n        if (hasConsole_1 && !config.silent) {\n            console.warn(\"[Vue tip]: \".concat(msg) + (vm ? generateComponentTrace(vm) : ''));\n        }\n    };\n    formatComponentName = function (vm, includeFile) {\n        if (vm.$root === vm) {\n            return '<Root>';\n        }\n        var options = isFunction(vm) && vm.cid != null\n            ? vm.options\n            : vm._isVue\n                ? vm.$options || vm.constructor.options\n                : vm;\n        var name = getComponentName(options);\n        var file = options.__file;\n        if (!name && file) {\n            var match = file.match(/([^/\\\\]+)\\.vue$/);\n            name = match && match[1];\n        }\n        return ((name ? \"<\".concat(classify_1(name), \">\") : \"<Anonymous>\") +\n            (file && includeFile !== false ? \" at \".concat(file) : ''));\n    };\n    var repeat_1 = function (str, n) {\n        var res = '';\n        while (n) {\n            if (n % 2 === 1)\n                res += str;\n            if (n > 1)\n                str += str;\n            n >>= 1;\n        }\n        return res;\n    };\n    generateComponentTrace = function (vm) {\n        if (vm._isVue && vm.$parent) {\n            var tree = [];\n            var currentRecursiveSequence = 0;\n            while (vm) {\n                if (tree.length > 0) {\n                    var last = tree[tree.length - 1];\n                    if (last.constructor === vm.constructor) {\n                        currentRecursiveSequence++;\n                        vm = vm.$parent;\n                        continue;\n                    }\n                    else if (currentRecursiveSequence > 0) {\n                        tree[tree.length - 1] = [last, currentRecursiveSequence];\n                        currentRecursiveSequence = 0;\n                    }\n                }\n                tree.push(vm);\n                vm = vm.$parent;\n            }\n            return ('\\n\\nfound in\\n\\n' +\n                tree\n                    .map(function (vm, i) {\n                    return \"\".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)\n                        ? \"\".concat(formatComponentName(vm[0]), \"... (\").concat(vm[1], \" recursive calls)\")\n                        : formatComponentName(vm));\n                })\n                    .join('\\n'));\n        }\n        else {\n            return \"\\n\\n(found in \".concat(formatComponentName(vm), \")\");\n        }\n    };\n}\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n    strats.el = strats.propsData = function (parent, child, vm, key) {\n        if (!vm) {\n            warn$2(\"option \\\"\".concat(key, \"\\\" can only be used during instance \") +\n                'creation with the `new` keyword.');\n        }\n        return defaultStrat(parent, child);\n    };\n}\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData(to, from, recursive) {\n    if (recursive === void 0) { recursive = true; }\n    if (!from)\n        return to;\n    var key, toVal, fromVal;\n    var keys = hasSymbol\n        ? Reflect.ownKeys(from)\n        : Object.keys(from);\n    for (var i = 0; i < keys.length; i++) {\n        key = keys[i];\n        // in case the object is already observed...\n        if (key === '__ob__')\n            continue;\n        toVal = to[key];\n        fromVal = from[key];\n        if (!recursive || !hasOwn(to, key)) {\n            set(to, key, fromVal);\n        }\n        else if (toVal !== fromVal &&\n            isPlainObject(toVal) &&\n            isPlainObject(fromVal)) {\n            mergeData(toVal, fromVal);\n        }\n    }\n    return to;\n}\n/**\n * Data\n */\nfunction mergeDataOrFn(parentVal, childVal, vm) {\n    if (!vm) {\n        // in a Vue.extend merge, both should be functions\n        if (!childVal) {\n            return parentVal;\n        }\n        if (!parentVal) {\n            return childVal;\n        }\n        // when parentVal & childVal are both present,\n        // we need to return a function that returns the\n        // merged result of both functions... no need to\n        // check if parentVal is a function here because\n        // it has to be a function to pass previous merges.\n        return function mergedDataFn() {\n            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n        };\n    }\n    else {\n        return function mergedInstanceDataFn() {\n            // instance merge\n            var instanceData = isFunction(childVal)\n                ? childVal.call(vm, vm)\n                : childVal;\n            var defaultData = isFunction(parentVal)\n                ? parentVal.call(vm, vm)\n                : parentVal;\n            if (instanceData) {\n                return mergeData(instanceData, defaultData);\n            }\n            else {\n                return defaultData;\n            }\n        };\n    }\n}\nstrats.data = function (parentVal, childVal, vm) {\n    if (!vm) {\n        if (childVal && typeof childVal !== 'function') {\n            process.env.NODE_ENV !== 'production' &&\n                warn$2('The \"data\" option should be a function ' +\n                    'that returns a per-instance value in component ' +\n                    'definitions.', vm);\n            return parentVal;\n        }\n        return mergeDataOrFn(parentVal, childVal);\n    }\n    return mergeDataOrFn(parentVal, childVal, vm);\n};\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeLifecycleHook(parentVal, childVal) {\n    var res = childVal\n        ? parentVal\n            ? parentVal.concat(childVal)\n            : isArray(childVal)\n                ? childVal\n                : [childVal]\n        : parentVal;\n    return res ? dedupeHooks(res) : res;\n}\nfunction dedupeHooks(hooks) {\n    var res = [];\n    for (var i = 0; i < hooks.length; i++) {\n        if (res.indexOf(hooks[i]) === -1) {\n            res.push(hooks[i]);\n        }\n    }\n    return res;\n}\nLIFECYCLE_HOOKS.forEach(function (hook) {\n    strats[hook] = mergeLifecycleHook;\n});\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets(parentVal, childVal, vm, key) {\n    var res = Object.create(parentVal || null);\n    if (childVal) {\n        process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n        return extend(res, childVal);\n    }\n    else {\n        return res;\n    }\n}\nASSET_TYPES.forEach(function (type) {\n    strats[type + 's'] = mergeAssets;\n});\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal, vm, key) {\n    // work around Firefox's Object.prototype.watch...\n    //@ts-expect-error work around\n    if (parentVal === nativeWatch)\n        parentVal = undefined;\n    //@ts-expect-error work around\n    if (childVal === nativeWatch)\n        childVal = undefined;\n    /* istanbul ignore if */\n    if (!childVal)\n        return Object.create(parentVal || null);\n    if (process.env.NODE_ENV !== 'production') {\n        assertObjectType(key, childVal, vm);\n    }\n    if (!parentVal)\n        return childVal;\n    var ret = {};\n    extend(ret, parentVal);\n    for (var key_1 in childVal) {\n        var parent_1 = ret[key_1];\n        var child = childVal[key_1];\n        if (parent_1 && !isArray(parent_1)) {\n            parent_1 = [parent_1];\n        }\n        ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];\n    }\n    return ret;\n};\n/**\n * Other object hashes.\n */\nstrats.props =\n    strats.methods =\n        strats.inject =\n            strats.computed =\n                function (parentVal, childVal, vm, key) {\n                    if (childVal && process.env.NODE_ENV !== 'production') {\n                        assertObjectType(key, childVal, vm);\n                    }\n                    if (!parentVal)\n                        return childVal;\n                    var ret = Object.create(null);\n                    extend(ret, parentVal);\n                    if (childVal)\n                        extend(ret, childVal);\n                    return ret;\n                };\nstrats.provide = function (parentVal, childVal) {\n    if (!parentVal)\n        return childVal;\n    return function () {\n        var ret = Object.create(null);\n        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n        if (childVal) {\n            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n            );\n        }\n        return ret;\n    };\n};\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n    return childVal === undefined ? parentVal : childVal;\n};\n/**\n * Validate component names\n */\nfunction checkComponents(options) {\n    for (var key in options.components) {\n        validateComponentName(key);\n    }\n}\nfunction validateComponentName(name) {\n    if (!new RegExp(\"^[a-zA-Z][\\\\-\\\\.0-9_\".concat(unicodeRegExp.source, \"]*$\")).test(name)) {\n        warn$2('Invalid component name: \"' +\n            name +\n            '\". Component names ' +\n            'should conform to valid custom element name in html5 specification.');\n    }\n    if (isBuiltInTag(name) || config.isReservedTag(name)) {\n        warn$2('Do not use built-in or reserved HTML elements as component ' +\n            'id: ' +\n            name);\n    }\n}\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps(options, vm) {\n    var props = options.props;\n    if (!props)\n        return;\n    var res = {};\n    var i, val, name;\n    if (isArray(props)) {\n        i = props.length;\n        while (i--) {\n            val = props[i];\n            if (typeof val === 'string') {\n                name = camelize(val);\n                res[name] = { type: null };\n            }\n            else if (process.env.NODE_ENV !== 'production') {\n                warn$2('props must be strings when using array syntax.');\n            }\n        }\n    }\n    else if (isPlainObject(props)) {\n        for (var key in props) {\n            val = props[key];\n            name = camelize(key);\n            res[name] = isPlainObject(val) ? val : { type: val };\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn$2(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n            \"but got \".concat(toRawType(props), \".\"), vm);\n    }\n    options.props = res;\n}\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject(options, vm) {\n    var inject = options.inject;\n    if (!inject)\n        return;\n    var normalized = (options.inject = {});\n    if (isArray(inject)) {\n        for (var i = 0; i < inject.length; i++) {\n            normalized[inject[i]] = { from: inject[i] };\n        }\n    }\n    else if (isPlainObject(inject)) {\n        for (var key in inject) {\n            var val = inject[key];\n            normalized[key] = isPlainObject(val)\n                ? extend({ from: key }, val)\n                : { from: val };\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn$2(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n            \"but got \".concat(toRawType(inject), \".\"), vm);\n    }\n}\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives$1(options) {\n    var dirs = options.directives;\n    if (dirs) {\n        for (var key in dirs) {\n            var def = dirs[key];\n            if (isFunction(def)) {\n                dirs[key] = { bind: def, update: def };\n            }\n        }\n    }\n}\nfunction assertObjectType(name, value, vm) {\n    if (!isPlainObject(value)) {\n        warn$2(\"Invalid value for option \\\"\".concat(name, \"\\\": expected an Object, \") +\n            \"but got \".concat(toRawType(value), \".\"), vm);\n    }\n}\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions(parent, child, vm) {\n    if (process.env.NODE_ENV !== 'production') {\n        checkComponents(child);\n    }\n    if (isFunction(child)) {\n        // @ts-expect-error\n        child = child.options;\n    }\n    normalizeProps(child, vm);\n    normalizeInject(child, vm);\n    normalizeDirectives$1(child);\n    // Apply extends and mixins on the child options,\n    // but only if it is a raw options object that isn't\n    // the result of another mergeOptions call.\n    // Only merged options has the _base property.\n    if (!child._base) {\n        if (child.extends) {\n            parent = mergeOptions(parent, child.extends, vm);\n        }\n        if (child.mixins) {\n            for (var i = 0, l = child.mixins.length; i < l; i++) {\n                parent = mergeOptions(parent, child.mixins[i], vm);\n            }\n        }\n    }\n    var options = {};\n    var key;\n    for (key in parent) {\n        mergeField(key);\n    }\n    for (key in child) {\n        if (!hasOwn(parent, key)) {\n            mergeField(key);\n        }\n    }\n    function mergeField(key) {\n        var strat = strats[key] || defaultStrat;\n        options[key] = strat(parent[key], child[key], vm, key);\n    }\n    return options;\n}\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset(options, type, id, warnMissing) {\n    /* istanbul ignore if */\n    if (typeof id !== 'string') {\n        return;\n    }\n    var assets = options[type];\n    // check local registration variations first\n    if (hasOwn(assets, id))\n        return assets[id];\n    var camelizedId = camelize(id);\n    if (hasOwn(assets, camelizedId))\n        return assets[camelizedId];\n    var PascalCaseId = capitalize(camelizedId);\n    if (hasOwn(assets, PascalCaseId))\n        return assets[PascalCaseId];\n    // fallback to prototype chain\n    var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n    if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n        warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n    }\n    return res;\n}\n\nfunction validateProp(key, propOptions, propsData, vm) {\n    var prop = propOptions[key];\n    var absent = !hasOwn(propsData, key);\n    var value = propsData[key];\n    // boolean casting\n    var booleanIndex = getTypeIndex(Boolean, prop.type);\n    if (booleanIndex > -1) {\n        if (absent && !hasOwn(prop, 'default')) {\n            value = false;\n        }\n        else if (value === '' || value === hyphenate(key)) {\n            // only cast empty string / same name to boolean if\n            // boolean has higher priority\n            var stringIndex = getTypeIndex(String, prop.type);\n            if (stringIndex < 0 || booleanIndex < stringIndex) {\n                value = true;\n            }\n        }\n    }\n    // check default value\n    if (value === undefined) {\n        value = getPropDefaultValue(vm, prop, key);\n        // since the default value is a fresh copy,\n        // make sure to observe it.\n        var prevShouldObserve = shouldObserve;\n        toggleObserving(true);\n        observe(value);\n        toggleObserving(prevShouldObserve);\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        assertProp(prop, key, value, vm, absent);\n    }\n    return value;\n}\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue(vm, prop, key) {\n    // no default, return undefined\n    if (!hasOwn(prop, 'default')) {\n        return undefined;\n    }\n    var def = prop.default;\n    // warn against non-factory defaults for Object & Array\n    if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n        warn$2('Invalid default value for prop \"' +\n            key +\n            '\": ' +\n            'Props with type Object/Array must use a factory function ' +\n            'to return the default value.', vm);\n    }\n    // the raw prop value was also undefined from previous render,\n    // return previous default value to avoid unnecessary watcher trigger\n    if (vm &&\n        vm.$options.propsData &&\n        vm.$options.propsData[key] === undefined &&\n        vm._props[key] !== undefined) {\n        return vm._props[key];\n    }\n    // call factory function for non-Function types\n    // a value is Function if its prototype is function even across different execution context\n    return isFunction(def) && getType(prop.type) !== 'Function'\n        ? def.call(vm)\n        : def;\n}\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp(prop, name, value, vm, absent) {\n    if (prop.required && absent) {\n        warn$2('Missing required prop: \"' + name + '\"', vm);\n        return;\n    }\n    if (value == null && !prop.required) {\n        return;\n    }\n    var type = prop.type;\n    var valid = !type || type === true;\n    var expectedTypes = [];\n    if (type) {\n        if (!isArray(type)) {\n            type = [type];\n        }\n        for (var i = 0; i < type.length && !valid; i++) {\n            var assertedType = assertType(value, type[i], vm);\n            expectedTypes.push(assertedType.expectedType || '');\n            valid = assertedType.valid;\n        }\n    }\n    var haveExpectedTypes = expectedTypes.some(function (t) { return t; });\n    if (!valid && haveExpectedTypes) {\n        warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);\n        return;\n    }\n    var validator = prop.validator;\n    if (validator) {\n        if (!validator(value)) {\n            warn$2('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n        }\n    }\n}\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\nfunction assertType(value, type, vm) {\n    var valid;\n    var expectedType = getType(type);\n    if (simpleCheckRE.test(expectedType)) {\n        var t = typeof value;\n        valid = t === expectedType.toLowerCase();\n        // for primitive wrapper objects\n        if (!valid && t === 'object') {\n            valid = value instanceof type;\n        }\n    }\n    else if (expectedType === 'Object') {\n        valid = isPlainObject(value);\n    }\n    else if (expectedType === 'Array') {\n        valid = isArray(value);\n    }\n    else {\n        try {\n            valid = value instanceof type;\n        }\n        catch (e) {\n            warn$2('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n            valid = false;\n        }\n    }\n    return {\n        valid: valid,\n        expectedType: expectedType\n    };\n}\nvar functionTypeCheckRE = /^\\s*function (\\w+)/;\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType(fn) {\n    var match = fn && fn.toString().match(functionTypeCheckRE);\n    return match ? match[1] : '';\n}\nfunction isSameType(a, b) {\n    return getType(a) === getType(b);\n}\nfunction getTypeIndex(type, expectedTypes) {\n    if (!isArray(expectedTypes)) {\n        return isSameType(expectedTypes, type) ? 0 : -1;\n    }\n    for (var i = 0, len = expectedTypes.length; i < len; i++) {\n        if (isSameType(expectedTypes[i], type)) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n    var message = \"Invalid prop: type check failed for prop \\\"\".concat(name, \"\\\".\") +\n        \" Expected \".concat(expectedTypes.map(capitalize).join(', '));\n    var expectedType = expectedTypes[0];\n    var receivedType = toRawType(value);\n    // check if we need to specify expected value\n    if (expectedTypes.length === 1 &&\n        isExplicable(expectedType) &&\n        isExplicable(typeof value) &&\n        !isBoolean(expectedType, receivedType)) {\n        message += \" with value \".concat(styleValue(value, expectedType));\n    }\n    message += \", got \".concat(receivedType, \" \");\n    // check if we need to specify received value\n    if (isExplicable(receivedType)) {\n        message += \"with value \".concat(styleValue(value, receivedType), \".\");\n    }\n    return message;\n}\nfunction styleValue(value, type) {\n    if (type === 'String') {\n        return \"\\\"\".concat(value, \"\\\"\");\n    }\n    else if (type === 'Number') {\n        return \"\".concat(Number(value));\n    }\n    else {\n        return \"\".concat(value);\n    }\n}\nvar EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable(value) {\n    return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });\n}\nfunction isBoolean() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });\n}\n\nfunction Vue(options) {\n    if (process.env.NODE_ENV !== 'production' && !(this instanceof Vue)) {\n        warn$2('Vue is a constructor and should be called with the `new` keyword');\n    }\n    this._init(options);\n}\n//@ts-expect-error Vue has function type\ninitMixin$1(Vue);\n//@ts-expect-error Vue has function type\nstateMixin(Vue);\n//@ts-expect-error Vue has function type\neventsMixin(Vue);\n//@ts-expect-error Vue has function type\nlifecycleMixin(Vue);\n//@ts-expect-error Vue has function type\nrenderMixin(Vue);\n\nfunction initUse(Vue) {\n    Vue.use = function (plugin) {\n        var installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n        if (installedPlugins.indexOf(plugin) > -1) {\n            return this;\n        }\n        // additional parameters\n        var args = toArray(arguments, 1);\n        args.unshift(this);\n        if (isFunction(plugin.install)) {\n            plugin.install.apply(plugin, args);\n        }\n        else if (isFunction(plugin)) {\n            plugin.apply(null, args);\n        }\n        installedPlugins.push(plugin);\n        return this;\n    };\n}\n\nfunction initMixin(Vue) {\n    Vue.mixin = function (mixin) {\n        this.options = mergeOptions(this.options, mixin);\n        return this;\n    };\n}\n\nfunction initExtend(Vue) {\n    /**\n     * Each instance constructor, including Vue, has a unique\n     * cid. This enables us to create wrapped \"child\n     * constructors\" for prototypal inheritance and cache them.\n     */\n    Vue.cid = 0;\n    var cid = 1;\n    /**\n     * Class inheritance\n     */\n    Vue.extend = function (extendOptions) {\n        extendOptions = extendOptions || {};\n        var Super = this;\n        var SuperId = Super.cid;\n        var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n        if (cachedCtors[SuperId]) {\n            return cachedCtors[SuperId];\n        }\n        var name = getComponentName(extendOptions) || getComponentName(Super.options);\n        if (process.env.NODE_ENV !== 'production' && name) {\n            validateComponentName(name);\n        }\n        var Sub = function VueComponent(options) {\n            this._init(options);\n        };\n        Sub.prototype = Object.create(Super.prototype);\n        Sub.prototype.constructor = Sub;\n        Sub.cid = cid++;\n        Sub.options = mergeOptions(Super.options, extendOptions);\n        Sub['super'] = Super;\n        // For props and computed properties, we define the proxy getters on\n        // the Vue instances at extension time, on the extended prototype. This\n        // avoids Object.defineProperty calls for each instance created.\n        if (Sub.options.props) {\n            initProps(Sub);\n        }\n        if (Sub.options.computed) {\n            initComputed(Sub);\n        }\n        // allow further extension/mixin/plugin usage\n        Sub.extend = Super.extend;\n        Sub.mixin = Super.mixin;\n        Sub.use = Super.use;\n        // create asset registers, so extended classes\n        // can have their private assets too.\n        ASSET_TYPES.forEach(function (type) {\n            Sub[type] = Super[type];\n        });\n        // enable recursive self-lookup\n        if (name) {\n            Sub.options.components[name] = Sub;\n        }\n        // keep a reference to the super options at extension time.\n        // later at instantiation we can check if Super's options have\n        // been updated.\n        Sub.superOptions = Super.options;\n        Sub.extendOptions = extendOptions;\n        Sub.sealedOptions = extend({}, Sub.options);\n        // cache constructor\n        cachedCtors[SuperId] = Sub;\n        return Sub;\n    };\n}\nfunction initProps(Comp) {\n    var props = Comp.options.props;\n    for (var key in props) {\n        proxy(Comp.prototype, \"_props\", key);\n    }\n}\nfunction initComputed(Comp) {\n    var computed = Comp.options.computed;\n    for (var key in computed) {\n        defineComputed(Comp.prototype, key, computed[key]);\n    }\n}\n\nfunction initAssetRegisters(Vue) {\n    /**\n     * Create asset registration methods.\n     */\n    ASSET_TYPES.forEach(function (type) {\n        // @ts-expect-error function is not exact same type\n        Vue[type] = function (id, definition) {\n            if (!definition) {\n                return this.options[type + 's'][id];\n            }\n            else {\n                /* istanbul ignore if */\n                if (process.env.NODE_ENV !== 'production' && type === 'component') {\n                    validateComponentName(id);\n                }\n                if (type === 'component' && isPlainObject(definition)) {\n                    // @ts-expect-error\n                    definition.name = definition.name || id;\n                    definition = this.options._base.extend(definition);\n                }\n                if (type === 'directive' && isFunction(definition)) {\n                    definition = { bind: definition, update: definition };\n                }\n                this.options[type + 's'][id] = definition;\n                return definition;\n            }\n        };\n    });\n}\n\nfunction _getComponentName(opts) {\n    return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n}\nfunction matches(pattern, name) {\n    if (isArray(pattern)) {\n        return pattern.indexOf(name) > -1;\n    }\n    else if (typeof pattern === 'string') {\n        return pattern.split(',').indexOf(name) > -1;\n    }\n    else if (isRegExp(pattern)) {\n        return pattern.test(name);\n    }\n    /* istanbul ignore next */\n    return false;\n}\nfunction pruneCache(keepAliveInstance, filter) {\n    var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode, $vnode = keepAliveInstance.$vnode;\n    for (var key in cache) {\n        var entry = cache[key];\n        if (entry) {\n            var name_1 = entry.name;\n            if (name_1 && !filter(name_1)) {\n                pruneCacheEntry(cache, key, keys, _vnode);\n            }\n        }\n    }\n    $vnode.componentOptions.children = undefined;\n}\nfunction pruneCacheEntry(cache, key, keys, current) {\n    var entry = cache[key];\n    if (entry && (!current || entry.tag !== current.tag)) {\n        // @ts-expect-error can be undefined\n        entry.componentInstance.$destroy();\n    }\n    cache[key] = null;\n    remove$2(keys, key);\n}\nvar patternTypes = [String, RegExp, Array];\n// TODO defineComponent\nvar KeepAlive = {\n    name: 'keep-alive',\n    abstract: true,\n    props: {\n        include: patternTypes,\n        exclude: patternTypes,\n        max: [String, Number]\n    },\n    methods: {\n        cacheVNode: function () {\n            var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;\n            if (vnodeToCache) {\n                var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;\n                cache[keyToCache] = {\n                    name: _getComponentName(componentOptions),\n                    tag: tag,\n                    componentInstance: componentInstance\n                };\n                keys.push(keyToCache);\n                // prune oldest entry\n                if (this.max && keys.length > parseInt(this.max)) {\n                    pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                }\n                this.vnodeToCache = null;\n            }\n        }\n    },\n    created: function () {\n        this.cache = Object.create(null);\n        this.keys = [];\n    },\n    destroyed: function () {\n        for (var key in this.cache) {\n            pruneCacheEntry(this.cache, key, this.keys);\n        }\n    },\n    mounted: function () {\n        var _this = this;\n        this.cacheVNode();\n        this.$watch('include', function (val) {\n            pruneCache(_this, function (name) { return matches(val, name); });\n        });\n        this.$watch('exclude', function (val) {\n            pruneCache(_this, function (name) { return !matches(val, name); });\n        });\n    },\n    updated: function () {\n        this.cacheVNode();\n    },\n    render: function () {\n        var slot = this.$slots.default;\n        var vnode = getFirstComponentChild(slot);\n        var componentOptions = vnode && vnode.componentOptions;\n        if (componentOptions) {\n            // check pattern\n            var name_2 = _getComponentName(componentOptions);\n            var _a = this, include = _a.include, exclude = _a.exclude;\n            if (\n            // not included\n            (include && (!name_2 || !matches(include, name_2))) ||\n                // excluded\n                (exclude && name_2 && matches(exclude, name_2))) {\n                return vnode;\n            }\n            var _b = this, cache = _b.cache, keys = _b.keys;\n            var key = vnode.key == null\n                ? // same constructor may get registered as different local components\n                    // so cid alone is not enough (#3269)\n                    componentOptions.Ctor.cid +\n                        (componentOptions.tag ? \"::\".concat(componentOptions.tag) : '')\n                : vnode.key;\n            if (cache[key]) {\n                vnode.componentInstance = cache[key].componentInstance;\n                // make current key freshest\n                remove$2(keys, key);\n                keys.push(key);\n            }\n            else {\n                // delay setting the cache until update\n                this.vnodeToCache = vnode;\n                this.keyToCache = key;\n            }\n            // @ts-expect-error can vnode.data can be undefined\n            vnode.data.keepAlive = true;\n        }\n        return vnode || (slot && slot[0]);\n    }\n};\n\nvar builtInComponents = {\n    KeepAlive: KeepAlive\n};\n\nfunction initGlobalAPI(Vue) {\n    // config\n    var configDef = {};\n    configDef.get = function () { return config; };\n    if (process.env.NODE_ENV !== 'production') {\n        configDef.set = function () {\n            warn$2('Do not replace the Vue.config object, set individual fields instead.');\n        };\n    }\n    Object.defineProperty(Vue, 'config', configDef);\n    // exposed util methods.\n    // NOTE: these are not considered part of the public API - avoid relying on\n    // them unless you are aware of the risk.\n    Vue.util = {\n        warn: warn$2,\n        extend: extend,\n        mergeOptions: mergeOptions,\n        defineReactive: defineReactive\n    };\n    Vue.set = set;\n    Vue.delete = del;\n    Vue.nextTick = nextTick;\n    // 2.6 explicit observable API\n    Vue.observable = function (obj) {\n        observe(obj);\n        return obj;\n    };\n    Vue.options = Object.create(null);\n    ASSET_TYPES.forEach(function (type) {\n        Vue.options[type + 's'] = Object.create(null);\n    });\n    // this is used to identify the \"base\" constructor to extend all plain-object\n    // components with in Weex's multi-instance scenarios.\n    Vue.options._base = Vue;\n    extend(Vue.options.components, builtInComponents);\n    initUse(Vue);\n    initMixin(Vue);\n    initExtend(Vue);\n    initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\nObject.defineProperty(Vue.prototype, '$isServer', {\n    get: isServerRendering\n});\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n    get: function () {\n        /* istanbul ignore next */\n        return this.$vnode && this.$vnode.ssrContext;\n    }\n});\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n    value: FunctionalRenderContext\n});\nVue.version = version;\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n        (attr === 'selected' && tag === 'option') ||\n        (attr === 'checked' && tag === 'input') ||\n        (attr === 'muted' && tag === 'video'));\n};\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\nvar isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\nvar convertEnumeratedValue = function (key, value) {\n    return isFalsyAttrValue(value) || value === 'false'\n        ? 'false'\n        : // allow arbitrary string value for contenteditable\n            key === 'contenteditable' && isValidContentEditableValue(value)\n                ? value\n                : 'true';\n};\nvar isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n    'required,reversed,scoped,seamless,selected,sortable,' +\n    'truespeed,typemustmatch,visible');\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\nvar isXlink = function (name) {\n    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n};\nvar getXlinkProp = function (name) {\n    return isXlink(name) ? name.slice(6, name.length) : '';\n};\nvar isFalsyAttrValue = function (val) {\n    return val == null || val === false;\n};\n\nfunction genClassForVnode(vnode) {\n    var data = vnode.data;\n    var parentNode = vnode;\n    var childNode = vnode;\n    while (isDef(childNode.componentInstance)) {\n        childNode = childNode.componentInstance._vnode;\n        if (childNode && childNode.data) {\n            data = mergeClassData(childNode.data, data);\n        }\n    }\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while (isDef((parentNode = parentNode.parent))) {\n        if (parentNode && parentNode.data) {\n            data = mergeClassData(data, parentNode.data);\n        }\n    }\n    return renderClass(data.staticClass, data.class);\n}\nfunction mergeClassData(child, parent) {\n    return {\n        staticClass: concat(child.staticClass, parent.staticClass),\n        class: isDef(child.class) ? [child.class, parent.class] : parent.class\n    };\n}\nfunction renderClass(staticClass, dynamicClass) {\n    if (isDef(staticClass) || isDef(dynamicClass)) {\n        return concat(staticClass, stringifyClass(dynamicClass));\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction concat(a, b) {\n    return a ? (b ? a + ' ' + b : a) : b || '';\n}\nfunction stringifyClass(value) {\n    if (Array.isArray(value)) {\n        return stringifyArray(value);\n    }\n    if (isObject(value)) {\n        return stringifyObject(value);\n    }\n    if (typeof value === 'string') {\n        return value;\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction stringifyArray(value) {\n    var res = '';\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n            if (res)\n                res += ' ';\n            res += stringified;\n        }\n    }\n    return res;\n}\nfunction stringifyObject(value) {\n    var res = '';\n    for (var key in value) {\n        if (value[key]) {\n            if (res)\n                res += ' ';\n            res += key;\n        }\n    }\n    return res;\n}\n\nvar namespaceMap = {\n    svg: 'http://www.w3.org/2000/svg',\n    math: 'http://www.w3.org/1998/Math/MathML'\n};\nvar isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n    'embed,object,param,source,canvas,script,noscript,del,ins,' +\n    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n    'output,progress,select,textarea,' +\n    'details,dialog,menu,menuitem,summary,' +\n    'content,element,shadow,template,blockquote,iframe,tfoot');\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\nvar isPreTag = function (tag) { return tag === 'pre'; };\nvar isReservedTag = function (tag) {\n    return isHTMLTag(tag) || isSVG(tag);\n};\nfunction getTagNamespace(tag) {\n    if (isSVG(tag)) {\n        return 'svg';\n    }\n    // basic support for MathML\n    // note it doesn't support other MathML elements being component roots\n    if (tag === 'math') {\n        return 'math';\n    }\n}\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement(tag) {\n    /* istanbul ignore if */\n    if (!inBrowser) {\n        return true;\n    }\n    if (isReservedTag(tag)) {\n        return false;\n    }\n    tag = tag.toLowerCase();\n    /* istanbul ignore if */\n    if (unknownElementCache[tag] != null) {\n        return unknownElementCache[tag];\n    }\n    var el = document.createElement(tag);\n    if (tag.indexOf('-') > -1) {\n        // https://stackoverflow.com/a/28210364/1070244\n        return (unknownElementCache[tag] =\n            el.constructor === window.HTMLUnknownElement ||\n                el.constructor === window.HTMLElement);\n    }\n    else {\n        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n    }\n}\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query(el) {\n    if (typeof el === 'string') {\n        var selected = document.querySelector(el);\n        if (!selected) {\n            process.env.NODE_ENV !== 'production' && warn$2('Cannot find element: ' + el);\n            return document.createElement('div');\n        }\n        return selected;\n    }\n    else {\n        return el;\n    }\n}\n\nfunction createElement(tagName, vnode) {\n    var elm = document.createElement(tagName);\n    if (tagName !== 'select') {\n        return elm;\n    }\n    // false or null will remove the attribute but undefined will not\n    if (vnode.data &&\n        vnode.data.attrs &&\n        vnode.data.attrs.multiple !== undefined) {\n        elm.setAttribute('multiple', 'multiple');\n    }\n    return elm;\n}\nfunction createElementNS(namespace, tagName) {\n    return document.createElementNS(namespaceMap[namespace], tagName);\n}\nfunction createTextNode(text) {\n    return document.createTextNode(text);\n}\nfunction createComment(text) {\n    return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n    parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n    node.removeChild(child);\n}\nfunction appendChild(node, child) {\n    node.appendChild(child);\n}\nfunction parentNode(node) {\n    return node.parentNode;\n}\nfunction nextSibling(node) {\n    return node.nextSibling;\n}\nfunction tagName(node) {\n    return node.tagName;\n}\nfunction setTextContent(node, text) {\n    node.textContent = text;\n}\nfunction setStyleScope(node, scopeId) {\n    node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\nvar ref = {\n    create: function (_, vnode) {\n        registerRef(vnode);\n    },\n    update: function (oldVnode, vnode) {\n        if (oldVnode.data.ref !== vnode.data.ref) {\n            registerRef(oldVnode, true);\n            registerRef(vnode);\n        }\n    },\n    destroy: function (vnode) {\n        registerRef(vnode, true);\n    }\n};\nfunction registerRef(vnode, isRemoval) {\n    var ref = vnode.data.ref;\n    if (!isDef(ref))\n        return;\n    var vm = vnode.context;\n    var refValue = vnode.componentInstance || vnode.elm;\n    var value = isRemoval ? null : refValue;\n    var $refsValue = isRemoval ? undefined : refValue;\n    if (isFunction(ref)) {\n        invokeWithErrorHandling(ref, vm, [value], vm, \"template ref function\");\n        return;\n    }\n    var isFor = vnode.data.refInFor;\n    var _isString = typeof ref === 'string' || typeof ref === 'number';\n    var _isRef = isRef(ref);\n    var refs = vm.$refs;\n    if (_isString || _isRef) {\n        if (isFor) {\n            var existing = _isString ? refs[ref] : ref.value;\n            if (isRemoval) {\n                isArray(existing) && remove$2(existing, refValue);\n            }\n            else {\n                if (!isArray(existing)) {\n                    if (_isString) {\n                        refs[ref] = [refValue];\n                        setSetupRef(vm, ref, refs[ref]);\n                    }\n                    else {\n                        ref.value = [refValue];\n                    }\n                }\n                else if (!existing.includes(refValue)) {\n                    existing.push(refValue);\n                }\n            }\n        }\n        else if (_isString) {\n            if (isRemoval && refs[ref] !== refValue) {\n                return;\n            }\n            refs[ref] = $refsValue;\n            setSetupRef(vm, ref, value);\n        }\n        else if (_isRef) {\n            if (isRemoval && ref.value !== refValue) {\n                return;\n            }\n            ref.value = value;\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn$2(\"Invalid template ref type: \".concat(typeof ref));\n        }\n    }\n}\nfunction setSetupRef(_a, key, val) {\n    var _setupState = _a._setupState;\n    if (_setupState && hasOwn(_setupState, key)) {\n        if (isRef(_setupState[key])) {\n            _setupState[key].value = val;\n        }\n        else {\n            _setupState[key] = val;\n        }\n    }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\nvar emptyNode = new VNode('', {}, []);\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\nfunction sameVnode(a, b) {\n    return (a.key === b.key &&\n        a.asyncFactory === b.asyncFactory &&\n        ((a.tag === b.tag &&\n            a.isComment === b.isComment &&\n            isDef(a.data) === isDef(b.data) &&\n            sameInputType(a, b)) ||\n            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n}\nfunction sameInputType(a, b) {\n    if (a.tag !== 'input')\n        return true;\n    var i;\n    var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n    var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n    var i, key;\n    var map = {};\n    for (i = beginIdx; i <= endIdx; ++i) {\n        key = children[i].key;\n        if (isDef(key))\n            map[key] = i;\n    }\n    return map;\n}\nfunction createPatchFunction(backend) {\n    var i, j;\n    var cbs = {};\n    var modules = backend.modules, nodeOps = backend.nodeOps;\n    for (i = 0; i < hooks.length; ++i) {\n        cbs[hooks[i]] = [];\n        for (j = 0; j < modules.length; ++j) {\n            if (isDef(modules[j][hooks[i]])) {\n                cbs[hooks[i]].push(modules[j][hooks[i]]);\n            }\n        }\n    }\n    function emptyNodeAt(elm) {\n        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n    }\n    function createRmCb(childElm, listeners) {\n        function remove() {\n            if (--remove.listeners === 0) {\n                removeNode(childElm);\n            }\n        }\n        remove.listeners = listeners;\n        return remove;\n    }\n    function removeNode(el) {\n        var parent = nodeOps.parentNode(el);\n        // element may have already been removed due to v-html / v-text\n        if (isDef(parent)) {\n            nodeOps.removeChild(parent, el);\n        }\n    }\n    function isUnknownElement(vnode, inVPre) {\n        return (!inVPre &&\n            !vnode.ns &&\n            !(config.ignoredElements.length &&\n                config.ignoredElements.some(function (ignore) {\n                    return isRegExp(ignore)\n                        ? ignore.test(vnode.tag)\n                        : ignore === vnode.tag;\n                })) &&\n            config.isUnknownElement(vnode.tag));\n    }\n    var creatingElmInVPre = 0;\n    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // This vnode was used in a previous render!\n            // now it's used as a new node, overwriting its elm would cause\n            // potential patch errors down the road when it's used as an insertion\n            // reference node. Instead, we clone the node on-demand before creating\n            // associated DOM element for it.\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        vnode.isRootInsert = !nested; // for transition enter check\n        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n            return;\n        }\n        var data = vnode.data;\n        var children = vnode.children;\n        var tag = vnode.tag;\n        if (isDef(tag)) {\n            if (process.env.NODE_ENV !== 'production') {\n                if (data && data.pre) {\n                    creatingElmInVPre++;\n                }\n                if (isUnknownElement(vnode, creatingElmInVPre)) {\n                    warn$2('Unknown custom element: <' +\n                        tag +\n                        '> - did you ' +\n                        'register the component correctly? For recursive components, ' +\n                        'make sure to provide the \"name\" option.', vnode.context);\n                }\n            }\n            vnode.elm = vnode.ns\n                ? nodeOps.createElementNS(vnode.ns, tag)\n                : nodeOps.createElement(tag, vnode);\n            setScope(vnode);\n            createChildren(vnode, children, insertedVnodeQueue);\n            if (isDef(data)) {\n                invokeCreateHooks(vnode, insertedVnodeQueue);\n            }\n            insert(parentElm, vnode.elm, refElm);\n            if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n                creatingElmInVPre--;\n            }\n        }\n        else if (isTrue(vnode.isComment)) {\n            vnode.elm = nodeOps.createComment(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n        else {\n            vnode.elm = nodeOps.createTextNode(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n    }\n    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        var i = vnode.data;\n        if (isDef(i)) {\n            var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n            if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                i(vnode, false /* hydrating */);\n            }\n            // after calling the init hook, if the vnode is a child component\n            // it should've created a child instance and mounted it. the child\n            // component also has set the placeholder vnode's elm.\n            // in that case we can just return the element and be done.\n            if (isDef(vnode.componentInstance)) {\n                initComponent(vnode, insertedVnodeQueue);\n                insert(parentElm, vnode.elm, refElm);\n                if (isTrue(isReactivated)) {\n                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                }\n                return true;\n            }\n        }\n    }\n    function initComponent(vnode, insertedVnodeQueue) {\n        if (isDef(vnode.data.pendingInsert)) {\n            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n            vnode.data.pendingInsert = null;\n        }\n        vnode.elm = vnode.componentInstance.$el;\n        if (isPatchable(vnode)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            setScope(vnode);\n        }\n        else {\n            // empty component root.\n            // skip all element-related modules except for ref (#3455)\n            registerRef(vnode);\n            // make sure to invoke the insert hook\n            insertedVnodeQueue.push(vnode);\n        }\n    }\n    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        var i;\n        // hack for #4339: a reactivated component with inner transition\n        // does not trigger because the inner node's created hooks are not called\n        // again. It's not ideal to involve module-specific logic in here but\n        // there doesn't seem to be a better way to do it.\n        var innerNode = vnode;\n        while (innerNode.componentInstance) {\n            innerNode = innerNode.componentInstance._vnode;\n            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                for (i = 0; i < cbs.activate.length; ++i) {\n                    cbs.activate[i](emptyNode, innerNode);\n                }\n                insertedVnodeQueue.push(innerNode);\n                break;\n            }\n        }\n        // unlike a newly created component,\n        // a reactivated keep-alive component doesn't insert itself\n        insert(parentElm, vnode.elm, refElm);\n    }\n    function insert(parent, elm, ref) {\n        if (isDef(parent)) {\n            if (isDef(ref)) {\n                if (nodeOps.parentNode(ref) === parent) {\n                    nodeOps.insertBefore(parent, elm, ref);\n                }\n            }\n            else {\n                nodeOps.appendChild(parent, elm);\n            }\n        }\n    }\n    function createChildren(vnode, children, insertedVnodeQueue) {\n        if (isArray(children)) {\n            if (process.env.NODE_ENV !== 'production') {\n                checkDuplicateKeys(children);\n            }\n            for (var i_1 = 0; i_1 < children.length; ++i_1) {\n                createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);\n            }\n        }\n        else if (isPrimitive(vnode.text)) {\n            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n        }\n    }\n    function isPatchable(vnode) {\n        while (vnode.componentInstance) {\n            vnode = vnode.componentInstance._vnode;\n        }\n        return isDef(vnode.tag);\n    }\n    function invokeCreateHooks(vnode, insertedVnodeQueue) {\n        for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {\n            cbs.create[i_2](emptyNode, vnode);\n        }\n        i = vnode.data.hook; // Reuse variable\n        if (isDef(i)) {\n            if (isDef(i.create))\n                i.create(emptyNode, vnode);\n            if (isDef(i.insert))\n                insertedVnodeQueue.push(vnode);\n        }\n    }\n    // set scope id attribute for scoped CSS.\n    // this is implemented as a special case to avoid the overhead\n    // of going through the normal attribute patching process.\n    function setScope(vnode) {\n        var i;\n        if (isDef((i = vnode.fnScopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n        else {\n            var ancestor = vnode;\n            while (ancestor) {\n                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                    nodeOps.setStyleScope(vnode.elm, i);\n                }\n                ancestor = ancestor.parent;\n            }\n        }\n        // for slot content they should also get the scopeId from the host instance.\n        if (isDef((i = activeInstance)) &&\n            i !== vnode.context &&\n            i !== vnode.fnContext &&\n            isDef((i = i.$options._scopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n    }\n    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n        }\n    }\n    function invokeDestroyHook(vnode) {\n        var i, j;\n        var data = vnode.data;\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                i(vnode);\n            for (i = 0; i < cbs.destroy.length; ++i)\n                cbs.destroy[i](vnode);\n        }\n        if (isDef((i = vnode.children))) {\n            for (j = 0; j < vnode.children.length; ++j) {\n                invokeDestroyHook(vnode.children[j]);\n            }\n        }\n    }\n    function removeVnodes(vnodes, startIdx, endIdx) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            var ch = vnodes[startIdx];\n            if (isDef(ch)) {\n                if (isDef(ch.tag)) {\n                    removeAndInvokeRemoveHook(ch);\n                    invokeDestroyHook(ch);\n                }\n                else {\n                    // Text node\n                    removeNode(ch.elm);\n                }\n            }\n        }\n    }\n    function removeAndInvokeRemoveHook(vnode, rm) {\n        if (isDef(rm) || isDef(vnode.data)) {\n            var i_3;\n            var listeners = cbs.remove.length + 1;\n            if (isDef(rm)) {\n                // we have a recursively passed down rm callback\n                // increase the listeners count\n                rm.listeners += listeners;\n            }\n            else {\n                // directly removing\n                rm = createRmCb(vnode.elm, listeners);\n            }\n            // recursively invoke hooks on child component root node\n            if (isDef((i_3 = vnode.componentInstance)) &&\n                isDef((i_3 = i_3._vnode)) &&\n                isDef(i_3.data)) {\n                removeAndInvokeRemoveHook(i_3, rm);\n            }\n            for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {\n                cbs.remove[i_3](vnode, rm);\n            }\n            if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {\n                i_3(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n        else {\n            removeNode(vnode.elm);\n        }\n    }\n    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n        var oldStartIdx = 0;\n        var newStartIdx = 0;\n        var oldEndIdx = oldCh.length - 1;\n        var oldStartVnode = oldCh[0];\n        var oldEndVnode = oldCh[oldEndIdx];\n        var newEndIdx = newCh.length - 1;\n        var newStartVnode = newCh[0];\n        var newEndVnode = newCh[newEndIdx];\n        var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n        // removeOnly is a special flag used only by <transition-group>\n        // to ensure removed elements stay in correct relative positions\n        // during leaving transitions\n        var canMove = !removeOnly;\n        if (process.env.NODE_ENV !== 'production') {\n            checkDuplicateKeys(newCh);\n        }\n        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n            if (isUndef(oldStartVnode)) {\n                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n            }\n            else if (isUndef(oldEndVnode)) {\n                oldEndVnode = oldCh[--oldEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newStartVnode)) {\n                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                oldStartVnode = oldCh[++oldStartIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else if (sameVnode(oldEndVnode, newEndVnode)) {\n                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newEndVnode)) {\n                // Vnode moved right\n                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                oldStartVnode = oldCh[++oldStartIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldEndVnode, newStartVnode)) {\n                // Vnode moved left\n                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else {\n                if (isUndef(oldKeyToIdx))\n                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                idxInOld = isDef(newStartVnode.key)\n                    ? oldKeyToIdx[newStartVnode.key]\n                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                if (isUndef(idxInOld)) {\n                    // New element\n                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                }\n                else {\n                    vnodeToMove = oldCh[idxInOld];\n                    if (sameVnode(vnodeToMove, newStartVnode)) {\n                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                        oldCh[idxInOld] = undefined;\n                        canMove &&\n                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                    }\n                    else {\n                        // same key but different element. treat as new element\n                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                    }\n                }\n                newStartVnode = newCh[++newStartIdx];\n            }\n        }\n        if (oldStartIdx > oldEndIdx) {\n            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n        }\n        else if (newStartIdx > newEndIdx) {\n            removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n        }\n    }\n    function checkDuplicateKeys(children) {\n        var seenKeys = {};\n        for (var i_4 = 0; i_4 < children.length; i_4++) {\n            var vnode = children[i_4];\n            var key = vnode.key;\n            if (isDef(key)) {\n                if (seenKeys[key]) {\n                    warn$2(\"Duplicate keys detected: '\".concat(key, \"'. This may cause an update error.\"), vnode.context);\n                }\n                else {\n                    seenKeys[key] = true;\n                }\n            }\n        }\n    }\n    function findIdxInOld(node, oldCh, start, end) {\n        for (var i_5 = start; i_5 < end; i_5++) {\n            var c = oldCh[i_5];\n            if (isDef(c) && sameVnode(node, c))\n                return i_5;\n        }\n    }\n    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n        if (oldVnode === vnode) {\n            return;\n        }\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // clone reused vnode\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        var elm = (vnode.elm = oldVnode.elm);\n        if (isTrue(oldVnode.isAsyncPlaceholder)) {\n            if (isDef(vnode.asyncFactory.resolved)) {\n                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n            }\n            else {\n                vnode.isAsyncPlaceholder = true;\n            }\n            return;\n        }\n        // reuse element for static trees.\n        // note we only do this if the vnode is cloned -\n        // if the new node is not cloned it means the render functions have been\n        // reset by the hot-reload-api and we need to do a proper re-render.\n        if (isTrue(vnode.isStatic) &&\n            isTrue(oldVnode.isStatic) &&\n            vnode.key === oldVnode.key &&\n            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n            vnode.componentInstance = oldVnode.componentInstance;\n            return;\n        }\n        var i;\n        var data = vnode.data;\n        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n            i(oldVnode, vnode);\n        }\n        var oldCh = oldVnode.children;\n        var ch = vnode.children;\n        if (isDef(data) && isPatchable(vnode)) {\n            for (i = 0; i < cbs.update.length; ++i)\n                cbs.update[i](oldVnode, vnode);\n            if (isDef((i = data.hook)) && isDef((i = i.update)))\n                i(oldVnode, vnode);\n        }\n        if (isUndef(vnode.text)) {\n            if (isDef(oldCh) && isDef(ch)) {\n                if (oldCh !== ch)\n                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n            }\n            else if (isDef(ch)) {\n                if (process.env.NODE_ENV !== 'production') {\n                    checkDuplicateKeys(ch);\n                }\n                if (isDef(oldVnode.text))\n                    nodeOps.setTextContent(elm, '');\n                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n            }\n            else if (isDef(oldCh)) {\n                removeVnodes(oldCh, 0, oldCh.length - 1);\n            }\n            else if (isDef(oldVnode.text)) {\n                nodeOps.setTextContent(elm, '');\n            }\n        }\n        else if (oldVnode.text !== vnode.text) {\n            nodeOps.setTextContent(elm, vnode.text);\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                i(oldVnode, vnode);\n        }\n    }\n    function invokeInsertHook(vnode, queue, initial) {\n        // delay insert hooks for component root nodes, invoke them after the\n        // element is really inserted\n        if (isTrue(initial) && isDef(vnode.parent)) {\n            vnode.parent.data.pendingInsert = queue;\n        }\n        else {\n            for (var i_6 = 0; i_6 < queue.length; ++i_6) {\n                queue[i_6].data.hook.insert(queue[i_6]);\n            }\n        }\n    }\n    var hydrationBailed = false;\n    // list of modules that can skip create hook during hydration because they\n    // are already rendered on the client or has no need for initialization\n    // Note: style is excluded because it relies on initial clone for future\n    // deep updates (#7063).\n    var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n    // Note: this is a browser-only function so we can assume elms are DOM nodes.\n    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n        var i;\n        var tag = vnode.tag, data = vnode.data, children = vnode.children;\n        inVPre = inVPre || (data && data.pre);\n        vnode.elm = elm;\n        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n            vnode.isAsyncPlaceholder = true;\n            return true;\n        }\n        // assert node match\n        if (process.env.NODE_ENV !== 'production') {\n            if (!assertNodeMatch(elm, vnode, inVPre)) {\n                return false;\n            }\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.init)))\n                i(vnode, true /* hydrating */);\n            if (isDef((i = vnode.componentInstance))) {\n                // child component. it should have hydrated its own tree.\n                initComponent(vnode, insertedVnodeQueue);\n                return true;\n            }\n        }\n        if (isDef(tag)) {\n            if (isDef(children)) {\n                // empty element, allow client to pick up and populate children\n                if (!elm.hasChildNodes()) {\n                    createChildren(vnode, children, insertedVnodeQueue);\n                }\n                else {\n                    // v-html and domProps: innerHTML\n                    if (isDef((i = data)) &&\n                        isDef((i = i.domProps)) &&\n                        isDef((i = i.innerHTML))) {\n                        if (i !== elm.innerHTML) {\n                            /* istanbul ignore if */\n                            if (process.env.NODE_ENV !== 'production' &&\n                                typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('server innerHTML: ', i);\n                                console.warn('client innerHTML: ', elm.innerHTML);\n                            }\n                            return false;\n                        }\n                    }\n                    else {\n                        // iterate and compare children lists\n                        var childrenMatch = true;\n                        var childNode = elm.firstChild;\n                        for (var i_7 = 0; i_7 < children.length; i_7++) {\n                            if (!childNode ||\n                                !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {\n                                childrenMatch = false;\n                                break;\n                            }\n                            childNode = childNode.nextSibling;\n                        }\n                        // if childNode is not null, it means the actual childNodes list is\n                        // longer than the virtual children list.\n                        if (!childrenMatch || childNode) {\n                            /* istanbul ignore if */\n                            if (process.env.NODE_ENV !== 'production' &&\n                                typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                            }\n                            return false;\n                        }\n                    }\n                }\n            }\n            if (isDef(data)) {\n                var fullInvoke = false;\n                for (var key in data) {\n                    if (!isRenderedModule(key)) {\n                        fullInvoke = true;\n                        invokeCreateHooks(vnode, insertedVnodeQueue);\n                        break;\n                    }\n                }\n                if (!fullInvoke && data['class']) {\n                    // ensure collecting deps for deep class bindings for future updates\n                    traverse(data['class']);\n                }\n            }\n        }\n        else if (elm.data !== vnode.text) {\n            elm.data = vnode.text;\n        }\n        return true;\n    }\n    function assertNodeMatch(node, vnode, inVPre) {\n        if (isDef(vnode.tag)) {\n            return (vnode.tag.indexOf('vue-component') === 0 ||\n                (!isUnknownElement(vnode, inVPre) &&\n                    vnode.tag.toLowerCase() ===\n                        (node.tagName && node.tagName.toLowerCase())));\n        }\n        else {\n            return node.nodeType === (vnode.isComment ? 8 : 3);\n        }\n    }\n    return function patch(oldVnode, vnode, hydrating, removeOnly) {\n        if (isUndef(vnode)) {\n            if (isDef(oldVnode))\n                invokeDestroyHook(oldVnode);\n            return;\n        }\n        var isInitialPatch = false;\n        var insertedVnodeQueue = [];\n        if (isUndef(oldVnode)) {\n            // empty mount (likely as component), create new root element\n            isInitialPatch = true;\n            createElm(vnode, insertedVnodeQueue);\n        }\n        else {\n            var isRealElement = isDef(oldVnode.nodeType);\n            if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                // patch existing root node\n                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n            }\n            else {\n                if (isRealElement) {\n                    // mounting to a real element\n                    // check if this is server-rendered content and if we can perform\n                    // a successful hydration.\n                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                        oldVnode.removeAttribute(SSR_ATTR);\n                        hydrating = true;\n                    }\n                    if (isTrue(hydrating)) {\n                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                            invokeInsertHook(vnode, insertedVnodeQueue, true);\n                            return oldVnode;\n                        }\n                        else if (process.env.NODE_ENV !== 'production') {\n                            warn$2('The client-side rendered virtual DOM tree is not matching ' +\n                                'server-rendered content. This is likely caused by incorrect ' +\n                                'HTML markup, for example nesting block-level elements inside ' +\n                                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                'full client-side render.');\n                        }\n                    }\n                    // either not server-rendered, or hydration failed.\n                    // create an empty node and replace it\n                    oldVnode = emptyNodeAt(oldVnode);\n                }\n                // replacing existing element\n                var oldElm = oldVnode.elm;\n                var parentElm = nodeOps.parentNode(oldElm);\n                // create new node\n                createElm(vnode, insertedVnodeQueue, \n                // extremely rare edge case: do not insert if old element is in a\n                // leaving transition. Only happens when combining transition +\n                // keep-alive + HOCs. (#4590)\n                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                // update parent placeholder node element, recursively\n                if (isDef(vnode.parent)) {\n                    var ancestor = vnode.parent;\n                    var patchable = isPatchable(vnode);\n                    while (ancestor) {\n                        for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {\n                            cbs.destroy[i_8](ancestor);\n                        }\n                        ancestor.elm = vnode.elm;\n                        if (patchable) {\n                            for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {\n                                cbs.create[i_9](emptyNode, ancestor);\n                            }\n                            // #6513\n                            // invoke insert hooks that may have been merged by create hooks.\n                            // e.g. for directives that uses the \"inserted\" hook.\n                            var insert_1 = ancestor.data.hook.insert;\n                            if (insert_1.merged) {\n                                // start at index 1 to avoid re-invoking component mounted hook\n                                // clone insert hooks to avoid being mutated during iteration.\n                                // e.g. for customed directives under transition group.\n                                var cloned = insert_1.fns.slice(1);\n                                for (var i_10 = 0; i_10 < cloned.length; i_10++) {\n                                    cloned[i_10]();\n                                }\n                            }\n                        }\n                        else {\n                            registerRef(ancestor);\n                        }\n                        ancestor = ancestor.parent;\n                    }\n                }\n                // destroy old node\n                if (isDef(parentElm)) {\n                    removeVnodes([oldVnode], 0, 0);\n                }\n                else if (isDef(oldVnode.tag)) {\n                    invokeDestroyHook(oldVnode);\n                }\n            }\n        }\n        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n        return vnode.elm;\n    };\n}\n\nvar directives$1 = {\n    create: updateDirectives,\n    update: updateDirectives,\n    destroy: function unbindDirectives(vnode) {\n        // @ts-expect-error emptyNode is not VNodeWithData\n        updateDirectives(vnode, emptyNode);\n    }\n};\nfunction updateDirectives(oldVnode, vnode) {\n    if (oldVnode.data.directives || vnode.data.directives) {\n        _update(oldVnode, vnode);\n    }\n}\nfunction _update(oldVnode, vnode) {\n    var isCreate = oldVnode === emptyNode;\n    var isDestroy = vnode === emptyNode;\n    var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n    var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n    var dirsWithInsert = [];\n    var dirsWithPostpatch = [];\n    var key, oldDir, dir;\n    for (key in newDirs) {\n        oldDir = oldDirs[key];\n        dir = newDirs[key];\n        if (!oldDir) {\n            // new directive, bind\n            callHook(dir, 'bind', vnode, oldVnode);\n            if (dir.def && dir.def.inserted) {\n                dirsWithInsert.push(dir);\n            }\n        }\n        else {\n            // existing directive, update\n            dir.oldValue = oldDir.value;\n            dir.oldArg = oldDir.arg;\n            callHook(dir, 'update', vnode, oldVnode);\n            if (dir.def && dir.def.componentUpdated) {\n                dirsWithPostpatch.push(dir);\n            }\n        }\n    }\n    if (dirsWithInsert.length) {\n        var callInsert = function () {\n            for (var i = 0; i < dirsWithInsert.length; i++) {\n                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n            }\n        };\n        if (isCreate) {\n            mergeVNodeHook(vnode, 'insert', callInsert);\n        }\n        else {\n            callInsert();\n        }\n    }\n    if (dirsWithPostpatch.length) {\n        mergeVNodeHook(vnode, 'postpatch', function () {\n            for (var i = 0; i < dirsWithPostpatch.length; i++) {\n                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n            }\n        });\n    }\n    if (!isCreate) {\n        for (key in oldDirs) {\n            if (!newDirs[key]) {\n                // no longer present, unbind\n                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n            }\n        }\n    }\n}\nvar emptyModifiers = Object.create(null);\nfunction normalizeDirectives(dirs, vm) {\n    var res = Object.create(null);\n    if (!dirs) {\n        // $flow-disable-line\n        return res;\n    }\n    var i, dir;\n    for (i = 0; i < dirs.length; i++) {\n        dir = dirs[i];\n        if (!dir.modifiers) {\n            // $flow-disable-line\n            dir.modifiers = emptyModifiers;\n        }\n        res[getRawDirName(dir)] = dir;\n        if (vm._setupState && vm._setupState.__sfc) {\n            var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n            if (typeof setupDef === 'function') {\n                dir.def = {\n                    bind: setupDef,\n                    update: setupDef,\n                };\n            }\n            else {\n                dir.def = setupDef;\n            }\n        }\n        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n    }\n    // $flow-disable-line\n    return res;\n}\nfunction getRawDirName(dir) {\n    return (dir.rawName || \"\".concat(dir.name, \".\").concat(Object.keys(dir.modifiers || {}).join('.')));\n}\nfunction callHook(dir, hook, vnode, oldVnode, isDestroy) {\n    var fn = dir.def && dir.def[hook];\n    if (fn) {\n        try {\n            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n        }\n        catch (e) {\n            handleError(e, vnode.context, \"directive \".concat(dir.name, \" \").concat(hook, \" hook\"));\n        }\n    }\n}\n\nvar baseModules = [ref, directives$1];\n\nfunction updateAttrs(oldVnode, vnode) {\n    var opts = vnode.componentOptions;\n    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n        return;\n    }\n    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n        return;\n    }\n    var key, cur, old;\n    var elm = vnode.elm;\n    var oldAttrs = oldVnode.data.attrs || {};\n    var attrs = vnode.data.attrs || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n        attrs = vnode.data.attrs = extend({}, attrs);\n    }\n    for (key in attrs) {\n        cur = attrs[key];\n        old = oldAttrs[key];\n        if (old !== cur) {\n            setAttr(elm, key, cur, vnode.data.pre);\n        }\n    }\n    // #4391: in IE9, setting type can reset value for input[type=radio]\n    // #6666: IE/Edge forces progress value down to 1 before setting a max\n    /* istanbul ignore if */\n    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n        setAttr(elm, 'value', attrs.value);\n    }\n    for (key in oldAttrs) {\n        if (isUndef(attrs[key])) {\n            if (isXlink(key)) {\n                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n            }\n            else if (!isEnumeratedAttr(key)) {\n                elm.removeAttribute(key);\n            }\n        }\n    }\n}\nfunction setAttr(el, key, value, isInPre) {\n    if (isInPre || el.tagName.indexOf('-') > -1) {\n        baseSetAttr(el, key, value);\n    }\n    else if (isBooleanAttr(key)) {\n        // set attribute for blank value\n        // e.g. <option disabled>Select one</option>\n        if (isFalsyAttrValue(value)) {\n            el.removeAttribute(key);\n        }\n        else {\n            // technically allowfullscreen is a boolean attribute for <iframe>,\n            // but Flash expects a value of \"true\" when used on <embed> tag\n            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n            el.setAttribute(key, value);\n        }\n    }\n    else if (isEnumeratedAttr(key)) {\n        el.setAttribute(key, convertEnumeratedValue(key, value));\n    }\n    else if (isXlink(key)) {\n        if (isFalsyAttrValue(value)) {\n            el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n        }\n        else {\n            el.setAttributeNS(xlinkNS, key, value);\n        }\n    }\n    else {\n        baseSetAttr(el, key, value);\n    }\n}\nfunction baseSetAttr(el, key, value) {\n    if (isFalsyAttrValue(value)) {\n        el.removeAttribute(key);\n    }\n    else {\n        // #7138: IE10 & 11 fires input event when setting placeholder on\n        // <textarea>... block the first input event and remove the blocker\n        // immediately.\n        /* istanbul ignore if */\n        if (isIE &&\n            !isIE9 &&\n            el.tagName === 'TEXTAREA' &&\n            key === 'placeholder' &&\n            value !== '' &&\n            !el.__ieph) {\n            var blocker_1 = function (e) {\n                e.stopImmediatePropagation();\n                el.removeEventListener('input', blocker_1);\n            };\n            el.addEventListener('input', blocker_1);\n            // $flow-disable-line\n            el.__ieph = true; /* IE placeholder patched */\n        }\n        el.setAttribute(key, value);\n    }\n}\nvar attrs = {\n    create: updateAttrs,\n    update: updateAttrs\n};\n\nfunction updateClass(oldVnode, vnode) {\n    var el = vnode.elm;\n    var data = vnode.data;\n    var oldData = oldVnode.data;\n    if (isUndef(data.staticClass) &&\n        isUndef(data.class) &&\n        (isUndef(oldData) ||\n            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n        return;\n    }\n    var cls = genClassForVnode(vnode);\n    // handle transition classes\n    var transitionClass = el._transitionClasses;\n    if (isDef(transitionClass)) {\n        cls = concat(cls, stringifyClass(transitionClass));\n    }\n    // set the class\n    if (cls !== el._prevClass) {\n        el.setAttribute('class', cls);\n        el._prevClass = cls;\n    }\n}\nvar klass$1 = {\n    create: updateClass,\n    update: updateClass\n};\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\nfunction parseFilters(exp) {\n    var inSingle = false;\n    var inDouble = false;\n    var inTemplateString = false;\n    var inRegex = false;\n    var curly = 0;\n    var square = 0;\n    var paren = 0;\n    var lastFilterIndex = 0;\n    var c, prev, i, expression, filters;\n    for (i = 0; i < exp.length; i++) {\n        prev = c;\n        c = exp.charCodeAt(i);\n        if (inSingle) {\n            if (c === 0x27 && prev !== 0x5c)\n                inSingle = false;\n        }\n        else if (inDouble) {\n            if (c === 0x22 && prev !== 0x5c)\n                inDouble = false;\n        }\n        else if (inTemplateString) {\n            if (c === 0x60 && prev !== 0x5c)\n                inTemplateString = false;\n        }\n        else if (inRegex) {\n            if (c === 0x2f && prev !== 0x5c)\n                inRegex = false;\n        }\n        else if (c === 0x7c && // pipe\n            exp.charCodeAt(i + 1) !== 0x7c &&\n            exp.charCodeAt(i - 1) !== 0x7c &&\n            !curly &&\n            !square &&\n            !paren) {\n            if (expression === undefined) {\n                // first filter, end of expression\n                lastFilterIndex = i + 1;\n                expression = exp.slice(0, i).trim();\n            }\n            else {\n                pushFilter();\n            }\n        }\n        else {\n            switch (c) {\n                case 0x22:\n                    inDouble = true;\n                    break; // \"\n                case 0x27:\n                    inSingle = true;\n                    break; // '\n                case 0x60:\n                    inTemplateString = true;\n                    break; // `\n                case 0x28:\n                    paren++;\n                    break; // (\n                case 0x29:\n                    paren--;\n                    break; // )\n                case 0x5b:\n                    square++;\n                    break; // [\n                case 0x5d:\n                    square--;\n                    break; // ]\n                case 0x7b:\n                    curly++;\n                    break; // {\n                case 0x7d:\n                    curly--;\n                    break; // }\n            }\n            if (c === 0x2f) {\n                // /\n                var j = i - 1;\n                var p \n                // find first non-whitespace prev char\n                = void 0;\n                // find first non-whitespace prev char\n                for (; j >= 0; j--) {\n                    p = exp.charAt(j);\n                    if (p !== ' ')\n                        break;\n                }\n                if (!p || !validDivisionCharRE.test(p)) {\n                    inRegex = true;\n                }\n            }\n        }\n    }\n    if (expression === undefined) {\n        expression = exp.slice(0, i).trim();\n    }\n    else if (lastFilterIndex !== 0) {\n        pushFilter();\n    }\n    function pushFilter() {\n        (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n        lastFilterIndex = i + 1;\n    }\n    if (filters) {\n        for (i = 0; i < filters.length; i++) {\n            expression = wrapFilter(expression, filters[i]);\n        }\n    }\n    return expression;\n}\nfunction wrapFilter(exp, filter) {\n    var i = filter.indexOf('(');\n    if (i < 0) {\n        // _f: resolveFilter\n        return \"_f(\\\"\".concat(filter, \"\\\")(\").concat(exp, \")\");\n    }\n    else {\n        var name_1 = filter.slice(0, i);\n        var args = filter.slice(i + 1);\n        return \"_f(\\\"\".concat(name_1, \"\\\")(\").concat(exp).concat(args !== ')' ? ',' + args : args);\n    }\n}\n\n/* eslint-disable no-unused-vars */\nfunction baseWarn(msg, range) {\n    console.error(\"[Vue compiler]: \".concat(msg));\n}\n/* eslint-enable no-unused-vars */\nfunction pluckModuleFunction(modules, key) {\n    return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];\n}\nfunction addProp(el, name, value, range, dynamic) {\n    (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));\n    el.plain = false;\n}\nfunction addAttr(el, name, value, range, dynamic) {\n    var attrs = dynamic\n        ? el.dynamicAttrs || (el.dynamicAttrs = [])\n        : el.attrs || (el.attrs = []);\n    attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));\n    el.plain = false;\n}\n// add a raw attr (use this in preTransforms)\nfunction addRawAttr(el, name, value, range) {\n    el.attrsMap[name] = value;\n    el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n}\nfunction addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {\n    (el.directives || (el.directives = [])).push(rangeSetItem({\n        name: name,\n        rawName: rawName,\n        value: value,\n        arg: arg,\n        isDynamicArg: isDynamicArg,\n        modifiers: modifiers\n    }, range));\n    el.plain = false;\n}\nfunction prependModifierMarker(symbol, name, dynamic) {\n    return dynamic ? \"_p(\".concat(name, \",\\\"\").concat(symbol, \"\\\")\") : symbol + name; // mark the event as captured\n}\nfunction addHandler(el, name, value, modifiers, important, warn, range, dynamic) {\n    modifiers = modifiers || emptyObject;\n    // warn prevent and passive modifier\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && warn && modifiers.prevent && modifiers.passive) {\n        warn(\"passive and prevent can't be used together. \" +\n            \"Passive handler can't prevent default event.\", range);\n    }\n    // normalize click.right and click.middle since they don't actually fire\n    // this is technically browser-specific, but at least for now browsers are\n    // the only target envs that have right/middle clicks.\n    if (modifiers.right) {\n        if (dynamic) {\n            name = \"(\".concat(name, \")==='click'?'contextmenu':(\").concat(name, \")\");\n        }\n        else if (name === 'click') {\n            name = 'contextmenu';\n            delete modifiers.right;\n        }\n    }\n    else if (modifiers.middle) {\n        if (dynamic) {\n            name = \"(\".concat(name, \")==='click'?'mouseup':(\").concat(name, \")\");\n        }\n        else if (name === 'click') {\n            name = 'mouseup';\n        }\n    }\n    // check capture modifier\n    if (modifiers.capture) {\n        delete modifiers.capture;\n        name = prependModifierMarker('!', name, dynamic);\n    }\n    if (modifiers.once) {\n        delete modifiers.once;\n        name = prependModifierMarker('~', name, dynamic);\n    }\n    /* istanbul ignore if */\n    if (modifiers.passive) {\n        delete modifiers.passive;\n        name = prependModifierMarker('&', name, dynamic);\n    }\n    var events;\n    if (modifiers.native) {\n        delete modifiers.native;\n        events = el.nativeEvents || (el.nativeEvents = {});\n    }\n    else {\n        events = el.events || (el.events = {});\n    }\n    var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);\n    if (modifiers !== emptyObject) {\n        newHandler.modifiers = modifiers;\n    }\n    var handlers = events[name];\n    /* istanbul ignore if */\n    if (Array.isArray(handlers)) {\n        important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n    }\n    else if (handlers) {\n        events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n    }\n    else {\n        events[name] = newHandler;\n    }\n    el.plain = false;\n}\nfunction getRawBindingAttr(el, name) {\n    return (el.rawAttrsMap[':' + name] ||\n        el.rawAttrsMap['v-bind:' + name] ||\n        el.rawAttrsMap[name]);\n}\nfunction getBindingAttr(el, name, getStatic) {\n    var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);\n    if (dynamicValue != null) {\n        return parseFilters(dynamicValue);\n    }\n    else if (getStatic !== false) {\n        var staticValue = getAndRemoveAttr(el, name);\n        if (staticValue != null) {\n            return JSON.stringify(staticValue);\n        }\n    }\n}\n// note: this only removes the attr from the Array (attrsList) so that it\n// doesn't get processed by processAttrs.\n// By default it does NOT remove it from the map (attrsMap) because the map is\n// needed during codegen.\nfunction getAndRemoveAttr(el, name, removeFromMap) {\n    var val;\n    if ((val = el.attrsMap[name]) != null) {\n        var list = el.attrsList;\n        for (var i = 0, l = list.length; i < l; i++) {\n            if (list[i].name === name) {\n                list.splice(i, 1);\n                break;\n            }\n        }\n    }\n    if (removeFromMap) {\n        delete el.attrsMap[name];\n    }\n    return val;\n}\nfunction getAndRemoveAttrByRegex(el, name) {\n    var list = el.attrsList;\n    for (var i = 0, l = list.length; i < l; i++) {\n        var attr = list[i];\n        if (name.test(attr.name)) {\n            list.splice(i, 1);\n            return attr;\n        }\n    }\n}\nfunction rangeSetItem(item, range) {\n    if (range) {\n        if (range.start != null) {\n            item.start = range.start;\n        }\n        if (range.end != null) {\n            item.end = range.end;\n        }\n    }\n    return item;\n}\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel(el, value, modifiers) {\n    var _a = modifiers || {}, number = _a.number, trim = _a.trim;\n    var baseValueExpression = '$$v';\n    var valueExpression = baseValueExpression;\n    if (trim) {\n        valueExpression =\n            \"(typeof \".concat(baseValueExpression, \" === 'string'\") +\n                \"? \".concat(baseValueExpression, \".trim()\") +\n                \": \".concat(baseValueExpression, \")\");\n    }\n    if (number) {\n        valueExpression = \"_n(\".concat(valueExpression, \")\");\n    }\n    var assignment = genAssignmentCode(value, valueExpression);\n    el.model = {\n        value: \"(\".concat(value, \")\"),\n        expression: JSON.stringify(value),\n        callback: \"function (\".concat(baseValueExpression, \") {\").concat(assignment, \"}\")\n    };\n}\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode(value, assignment) {\n    var res = parseModel(value);\n    if (res.key === null) {\n        return \"\".concat(value, \"=\").concat(assignment);\n    }\n    else {\n        return \"$set(\".concat(res.exp, \", \").concat(res.key, \", \").concat(assignment, \")\");\n    }\n}\n/**\n * Parse a v-model expression into a base path and a final key segment.\n * Handles both dot-path and possible square brackets.\n *\n * Possible cases:\n *\n * - test\n * - test[key]\n * - test[test1[key]]\n * - test[\"a\"][key]\n * - xxx.test[a[a].test1[key]]\n * - test.xxx.a[\"asa\"][test1[key]]\n *\n */\nvar len, str, chr, index, expressionPos, expressionEndPos;\nfunction parseModel(val) {\n    // Fix https://github.com/vuejs/vue/pull/7730\n    // allow v-model=\"obj.val \" (trailing whitespace)\n    val = val.trim();\n    len = val.length;\n    if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n        index = val.lastIndexOf('.');\n        if (index > -1) {\n            return {\n                exp: val.slice(0, index),\n                key: '\"' + val.slice(index + 1) + '\"'\n            };\n        }\n        else {\n            return {\n                exp: val,\n                key: null\n            };\n        }\n    }\n    str = val;\n    index = expressionPos = expressionEndPos = 0;\n    while (!eof()) {\n        chr = next();\n        /* istanbul ignore if */\n        if (isStringStart(chr)) {\n            parseString(chr);\n        }\n        else if (chr === 0x5b) {\n            parseBracket(chr);\n        }\n    }\n    return {\n        exp: val.slice(0, expressionPos),\n        key: val.slice(expressionPos + 1, expressionEndPos)\n    };\n}\nfunction next() {\n    return str.charCodeAt(++index);\n}\nfunction eof() {\n    return index >= len;\n}\nfunction isStringStart(chr) {\n    return chr === 0x22 || chr === 0x27;\n}\nfunction parseBracket(chr) {\n    var inBracket = 1;\n    expressionPos = index;\n    while (!eof()) {\n        chr = next();\n        if (isStringStart(chr)) {\n            parseString(chr);\n            continue;\n        }\n        if (chr === 0x5b)\n            inBracket++;\n        if (chr === 0x5d)\n            inBracket--;\n        if (inBracket === 0) {\n            expressionEndPos = index;\n            break;\n        }\n    }\n}\nfunction parseString(chr) {\n    var stringQuote = chr;\n    while (!eof()) {\n        chr = next();\n        if (chr === stringQuote) {\n            break;\n        }\n    }\n}\n\nvar warn$1;\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\nfunction model$1(el, dir, _warn) {\n    warn$1 = _warn;\n    var value = dir.value;\n    var modifiers = dir.modifiers;\n    var tag = el.tag;\n    var type = el.attrsMap.type;\n    if (process.env.NODE_ENV !== 'production') {\n        // inputs with type=\"file\" are read only and setting the input's\n        // value will throw an error.\n        if (tag === 'input' && type === 'file') {\n            warn$1(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\" type=\\\"file\\\">:\\n\") +\n                \"File inputs are read only. Use a v-on:change listener instead.\", el.rawAttrsMap['v-model']);\n        }\n    }\n    if (el.component) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else if (tag === 'select') {\n        genSelect(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'checkbox') {\n        genCheckboxModel(el, value, modifiers);\n    }\n    else if (tag === 'input' && type === 'radio') {\n        genRadioModel(el, value, modifiers);\n    }\n    else if (tag === 'input' || tag === 'textarea') {\n        genDefaultModel(el, value, modifiers);\n    }\n    else if (!config.isReservedTag(tag)) {\n        genComponentModel(el, value, modifiers);\n        // component v-model doesn't need extra runtime\n        return false;\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn$1(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\">: \") +\n            \"v-model is not supported on this element type. \" +\n            \"If you are working with contenteditable, it's recommended to \" +\n            'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);\n    }\n    // ensure runtime directive metadata\n    return true;\n}\nfunction genCheckboxModel(el, value, modifiers) {\n    var number = modifiers && modifiers.number;\n    var valueBinding = getBindingAttr(el, 'value') || 'null';\n    var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n    var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n    addProp(el, 'checked', \"Array.isArray(\".concat(value, \")\") +\n        \"?_i(\".concat(value, \",\").concat(valueBinding, \")>-1\") +\n        (trueValueBinding === 'true'\n            ? \":(\".concat(value, \")\")\n            : \":_q(\".concat(value, \",\").concat(trueValueBinding, \")\")));\n    addHandler(el, 'change', \"var $$a=\".concat(value, \",\") +\n        '$$el=$event.target,' +\n        \"$$c=$$el.checked?(\".concat(trueValueBinding, \"):(\").concat(falseValueBinding, \");\") +\n        'if(Array.isArray($$a)){' +\n        \"var $$v=\".concat(number ? '_n(' + valueBinding + ')' : valueBinding, \",\") +\n        '$$i=_i($$a,$$v);' +\n        \"if($$el.checked){$$i<0&&(\".concat(genAssignmentCode(value, '$$a.concat([$$v])'), \")}\") +\n        \"else{$$i>-1&&(\".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), \")}\") +\n        \"}else{\".concat(genAssignmentCode(value, '$$c'), \"}\"), null, true);\n}\nfunction genRadioModel(el, value, modifiers) {\n    var number = modifiers && modifiers.number;\n    var valueBinding = getBindingAttr(el, 'value') || 'null';\n    valueBinding = number ? \"_n(\".concat(valueBinding, \")\") : valueBinding;\n    addProp(el, 'checked', \"_q(\".concat(value, \",\").concat(valueBinding, \")\"));\n    addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\n}\nfunction genSelect(el, value, modifiers) {\n    var number = modifiers && modifiers.number;\n    var selectedVal = \"Array.prototype.filter\" +\n        \".call($event.target.options,function(o){return o.selected})\" +\n        \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n        \"return \".concat(number ? '_n(val)' : 'val', \"})\");\n    var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n    var code = \"var $$selectedVal = \".concat(selectedVal, \";\");\n    code = \"\".concat(code, \" \").concat(genAssignmentCode(value, assignment));\n    addHandler(el, 'change', code, null, true);\n}\nfunction genDefaultModel(el, value, modifiers) {\n    var type = el.attrsMap.type;\n    // warn if v-bind:value conflicts with v-model\n    // except for inputs with v-bind:type\n    if (process.env.NODE_ENV !== 'production') {\n        var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];\n        var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n        if (value_1 && !typeBinding) {\n            var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';\n            warn$1(\"\".concat(binding, \"=\\\"\").concat(value_1, \"\\\" conflicts with v-model on the same element \") +\n                'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);\n        }\n    }\n    var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;\n    var needCompositionGuard = !lazy && type !== 'range';\n    var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';\n    var valueExpression = '$event.target.value';\n    if (trim) {\n        valueExpression = \"$event.target.value.trim()\";\n    }\n    if (number) {\n        valueExpression = \"_n(\".concat(valueExpression, \")\");\n    }\n    var code = genAssignmentCode(value, valueExpression);\n    if (needCompositionGuard) {\n        code = \"if($event.target.composing)return;\".concat(code);\n    }\n    addProp(el, 'value', \"(\".concat(value, \")\"));\n    addHandler(el, event, code, null, true);\n    if (trim || number) {\n        addHandler(el, 'blur', '$forceUpdate()');\n    }\n}\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents(on) {\n    /* istanbul ignore if */\n    if (isDef(on[RANGE_TOKEN])) {\n        // IE input[type=range] only supports `change` event\n        var event_1 = isIE ? 'change' : 'input';\n        on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);\n        delete on[RANGE_TOKEN];\n    }\n    // This was originally intended to fix #4521 but no longer necessary\n    // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n    /* istanbul ignore if */\n    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n        delete on[CHECKBOX_RADIO_TOKEN];\n    }\n}\nvar target;\nfunction createOnceHandler(event, handler, capture) {\n    var _target = target; // save current target element in closure\n    return function onceHandler() {\n        var res = handler.apply(null, arguments);\n        if (res !== null) {\n            remove(event, onceHandler, capture, _target);\n        }\n    };\n}\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nvar useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\nfunction add(name, handler, capture, passive) {\n    // async edge case #6566: inner click event triggers patch, event handler\n    // attached to outer element during patch, and triggered again. This\n    // happens because browsers fire microtask ticks between event propagation.\n    // the solution is simple: we save the timestamp when a handler is attached,\n    // and the handler would only fire if the event passed to it was fired\n    // AFTER it was attached.\n    if (useMicrotaskFix) {\n        var attachedTimestamp_1 = currentFlushTimestamp;\n        var original_1 = handler;\n        //@ts-expect-error\n        handler = original_1._wrapper = function (e) {\n            if (\n            // no bubbling, should always fire.\n            // this is just a safety net in case event.timeStamp is unreliable in\n            // certain weird environments...\n            e.target === e.currentTarget ||\n                // event is fired after handler attachment\n                e.timeStamp >= attachedTimestamp_1 ||\n                // bail for environments that have buggy event.timeStamp implementations\n                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                // #9681 QtWebEngine event.timeStamp is negative value\n                e.timeStamp <= 0 ||\n                // #9448 bail if event is fired in another document in a multi-page\n                // electron/nw.js app, since event.timeStamp will be using a different\n                // starting reference\n                e.target.ownerDocument !== document) {\n                return original_1.apply(this, arguments);\n            }\n        };\n    }\n    target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);\n}\nfunction remove(name, handler, capture, _target) {\n    (_target || target).removeEventListener(name, \n    //@ts-expect-error\n    handler._wrapper || handler, capture);\n}\nfunction updateDOMListeners(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n        return;\n    }\n    var on = vnode.data.on || {};\n    var oldOn = oldVnode.data.on || {};\n    // vnode is empty when removing all listeners,\n    // and use old vnode dom element\n    target = vnode.elm || oldVnode.elm;\n    normalizeEvents(on);\n    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n    target = undefined;\n}\nvar events = {\n    create: updateDOMListeners,\n    update: updateDOMListeners,\n    // @ts-expect-error emptyNode has actually data\n    destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }\n};\n\nvar svgContainer;\nfunction updateDOMProps(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n        return;\n    }\n    var key, cur;\n    var elm = vnode.elm;\n    var oldProps = oldVnode.data.domProps || {};\n    var props = vnode.data.domProps || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n        props = vnode.data.domProps = extend({}, props);\n    }\n    for (key in oldProps) {\n        if (!(key in props)) {\n            elm[key] = '';\n        }\n    }\n    for (key in props) {\n        cur = props[key];\n        // ignore children if the node has textContent or innerHTML,\n        // as these will throw away existing DOM nodes and cause removal errors\n        // on subsequent patches (#3360)\n        if (key === 'textContent' || key === 'innerHTML') {\n            if (vnode.children)\n                vnode.children.length = 0;\n            if (cur === oldProps[key])\n                continue;\n            // #6601 work around Chrome version <= 55 bug where single textNode\n            // replaced by innerHTML/textContent retains its parentNode property\n            if (elm.childNodes.length === 1) {\n                elm.removeChild(elm.childNodes[0]);\n            }\n        }\n        if (key === 'value' && elm.tagName !== 'PROGRESS') {\n            // store value as _value as well since\n            // non-string values will be stringified\n            elm._value = cur;\n            // avoid resetting cursor position when value is the same\n            var strCur = isUndef(cur) ? '' : String(cur);\n            if (shouldUpdateValue(elm, strCur)) {\n                elm.value = strCur;\n            }\n        }\n        else if (key === 'innerHTML' &&\n            isSVG(elm.tagName) &&\n            isUndef(elm.innerHTML)) {\n            // IE doesn't support innerHTML for SVG elements\n            svgContainer = svgContainer || document.createElement('div');\n            svgContainer.innerHTML = \"<svg>\".concat(cur, \"</svg>\");\n            var svg = svgContainer.firstChild;\n            while (elm.firstChild) {\n                elm.removeChild(elm.firstChild);\n            }\n            while (svg.firstChild) {\n                elm.appendChild(svg.firstChild);\n            }\n        }\n        else if (\n        // skip the update if old and new VDOM state is the same.\n        // `value` is handled separately because the DOM value may be temporarily\n        // out of sync with VDOM state due to focus, composition and modifiers.\n        // This  #4521 by skipping the unnecessary `checked` update.\n        cur !== oldProps[key]) {\n            // some property updates can throw\n            // e.g. `value` on <progress> w/ non-finite value\n            try {\n                elm[key] = cur;\n            }\n            catch (e) { }\n        }\n    }\n}\nfunction shouldUpdateValue(elm, checkVal) {\n    return (\n    //@ts-expect-error\n    !elm.composing &&\n        (elm.tagName === 'OPTION' ||\n            isNotInFocusAndDirty(elm, checkVal) ||\n            isDirtyWithModifiers(elm, checkVal)));\n}\nfunction isNotInFocusAndDirty(elm, checkVal) {\n    // return true when textbox (.number and .trim) loses focus and its value is\n    // not equal to the updated value\n    var notInFocus = true;\n    // #6157\n    // work around IE bug when accessing document.activeElement in an iframe\n    try {\n        notInFocus = document.activeElement !== elm;\n    }\n    catch (e) { }\n    return notInFocus && elm.value !== checkVal;\n}\nfunction isDirtyWithModifiers(elm, newVal) {\n    var value = elm.value;\n    var modifiers = elm._vModifiers; // injected by v-model runtime\n    if (isDef(modifiers)) {\n        if (modifiers.number) {\n            return toNumber(value) !== toNumber(newVal);\n        }\n        if (modifiers.trim) {\n            return value.trim() !== newVal.trim();\n        }\n    }\n    return value !== newVal;\n}\nvar domProps = {\n    create: updateDOMProps,\n    update: updateDOMProps\n};\n\nvar parseStyleText = cached(function (cssText) {\n    var res = {};\n    var listDelimiter = /;(?![^(]*\\))/g;\n    var propertyDelimiter = /:(.+)/;\n    cssText.split(listDelimiter).forEach(function (item) {\n        if (item) {\n            var tmp = item.split(propertyDelimiter);\n            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n        }\n    });\n    return res;\n});\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData(data) {\n    var style = normalizeStyleBinding(data.style);\n    // static style is pre-processed into an object during compilation\n    // and is always a fresh object, so it's safe to merge into it\n    return data.staticStyle ? extend(data.staticStyle, style) : style;\n}\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding(bindingStyle) {\n    if (Array.isArray(bindingStyle)) {\n        return toObject(bindingStyle);\n    }\n    if (typeof bindingStyle === 'string') {\n        return parseStyleText(bindingStyle);\n    }\n    return bindingStyle;\n}\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle(vnode, checkChild) {\n    var res = {};\n    var styleData;\n    if (checkChild) {\n        var childNode = vnode;\n        while (childNode.componentInstance) {\n            childNode = childNode.componentInstance._vnode;\n            if (childNode &&\n                childNode.data &&\n                (styleData = normalizeStyleData(childNode.data))) {\n                extend(res, styleData);\n            }\n        }\n    }\n    if ((styleData = normalizeStyleData(vnode.data))) {\n        extend(res, styleData);\n    }\n    var parentNode = vnode;\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while ((parentNode = parentNode.parent)) {\n        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n            extend(res, styleData);\n        }\n    }\n    return res;\n}\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n    /* istanbul ignore if */\n    if (cssVarRE.test(name)) {\n        el.style.setProperty(name, val);\n    }\n    else if (importantRE.test(val)) {\n        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n    }\n    else {\n        var normalizedName = normalize(name);\n        if (Array.isArray(val)) {\n            // Support values array created by autoprefixer, e.g.\n            // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n            // Set them one by one, and the browser will only set those it can recognize\n            for (var i = 0, len = val.length; i < len; i++) {\n                el.style[normalizedName] = val[i];\n            }\n        }\n        else {\n            el.style[normalizedName] = val;\n        }\n    }\n};\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n    emptyStyle = emptyStyle || document.createElement('div').style;\n    prop = camelize(prop);\n    if (prop !== 'filter' && prop in emptyStyle) {\n        return prop;\n    }\n    var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n    for (var i = 0; i < vendorNames.length; i++) {\n        var name_1 = vendorNames[i] + capName;\n        if (name_1 in emptyStyle) {\n            return name_1;\n        }\n    }\n});\nfunction updateStyle(oldVnode, vnode) {\n    var data = vnode.data;\n    var oldData = oldVnode.data;\n    if (isUndef(data.staticStyle) &&\n        isUndef(data.style) &&\n        isUndef(oldData.staticStyle) &&\n        isUndef(oldData.style)) {\n        return;\n    }\n    var cur, name;\n    var el = vnode.elm;\n    var oldStaticStyle = oldData.staticStyle;\n    var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n    // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n    var oldStyle = oldStaticStyle || oldStyleBinding;\n    var style = normalizeStyleBinding(vnode.data.style) || {};\n    // store normalized style under a different key for next diff\n    // make sure to clone it if it's reactive, since the user likely wants\n    // to mutate it.\n    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n    var newStyle = getStyle(vnode, true);\n    for (name in oldStyle) {\n        if (isUndef(newStyle[name])) {\n            setProp(el, name, '');\n        }\n    }\n    for (name in newStyle) {\n        cur = newStyle[name];\n        // ie9 setting to null has no effect, must use empty string\n        setProp(el, name, cur == null ? '' : cur);\n    }\n}\nvar style$1 = {\n    create: updateStyle,\n    update: updateStyle\n};\n\nvar whitespaceRE$1 = /\\s+/;\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });\n        }\n        else {\n            el.classList.add(cls);\n        }\n    }\n    else {\n        var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n        if (cur.indexOf(' ' + cls + ' ') < 0) {\n            el.setAttribute('class', (cur + cls).trim());\n        }\n    }\n}\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });\n        }\n        else {\n            el.classList.remove(cls);\n        }\n        if (!el.classList.length) {\n            el.removeAttribute('class');\n        }\n    }\n    else {\n        var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n        var tar = ' ' + cls + ' ';\n        while (cur.indexOf(tar) >= 0) {\n            cur = cur.replace(tar, ' ');\n        }\n        cur = cur.trim();\n        if (cur) {\n            el.setAttribute('class', cur);\n        }\n        else {\n            el.removeAttribute('class');\n        }\n    }\n}\n\nfunction resolveTransition(def) {\n    if (!def) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (typeof def === 'object') {\n        var res = {};\n        if (def.css !== false) {\n            extend(res, autoCssTransition(def.name || 'v'));\n        }\n        extend(res, def);\n        return res;\n    }\n    else if (typeof def === 'string') {\n        return autoCssTransition(def);\n    }\n}\nvar autoCssTransition = cached(function (name) {\n    return {\n        enterClass: \"\".concat(name, \"-enter\"),\n        enterToClass: \"\".concat(name, \"-enter-to\"),\n        enterActiveClass: \"\".concat(name, \"-enter-active\"),\n        leaveClass: \"\".concat(name, \"-leave\"),\n        leaveToClass: \"\".concat(name, \"-leave-to\"),\n        leaveActiveClass: \"\".concat(name, \"-leave-active\")\n    };\n});\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n    /* istanbul ignore if */\n    if (window.ontransitionend === undefined &&\n        window.onwebkittransitionend !== undefined) {\n        transitionProp = 'WebkitTransition';\n        transitionEndEvent = 'webkitTransitionEnd';\n    }\n    if (window.onanimationend === undefined &&\n        window.onwebkitanimationend !== undefined) {\n        animationProp = 'WebkitAnimation';\n        animationEndEvent = 'webkitAnimationEnd';\n    }\n}\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n    ? window.requestAnimationFrame\n        ? window.requestAnimationFrame.bind(window)\n        : setTimeout\n    : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };\nfunction nextFrame(fn) {\n    raf(function () {\n        // @ts-expect-error\n        raf(fn);\n    });\n}\nfunction addTransitionClass(el, cls) {\n    var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n    if (transitionClasses.indexOf(cls) < 0) {\n        transitionClasses.push(cls);\n        addClass(el, cls);\n    }\n}\nfunction removeTransitionClass(el, cls) {\n    if (el._transitionClasses) {\n        remove$2(el._transitionClasses, cls);\n    }\n    removeClass(el, cls);\n}\nfunction whenTransitionEnds(el, expectedType, cb) {\n    var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;\n    if (!type)\n        return cb();\n    var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n    var ended = 0;\n    var end = function () {\n        el.removeEventListener(event, onEnd);\n        cb();\n    };\n    var onEnd = function (e) {\n        if (e.target === el) {\n            if (++ended >= propCount) {\n                end();\n            }\n        }\n    };\n    setTimeout(function () {\n        if (ended < propCount) {\n            end();\n        }\n    }, timeout + 1);\n    el.addEventListener(event, onEnd);\n}\nvar transformRE = /\\b(transform|all)(,|$)/;\nfunction getTransitionInfo(el, expectedType) {\n    var styles = window.getComputedStyle(el);\n    // JSDOM may return undefined for transition properties\n    var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n    var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n    var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n    var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n    var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n    var animationTimeout = getTimeout(animationDelays, animationDurations);\n    var type;\n    var timeout = 0;\n    var propCount = 0;\n    /* istanbul ignore if */\n    if (expectedType === TRANSITION) {\n        if (transitionTimeout > 0) {\n            type = TRANSITION;\n            timeout = transitionTimeout;\n            propCount = transitionDurations.length;\n        }\n    }\n    else if (expectedType === ANIMATION) {\n        if (animationTimeout > 0) {\n            type = ANIMATION;\n            timeout = animationTimeout;\n            propCount = animationDurations.length;\n        }\n    }\n    else {\n        timeout = Math.max(transitionTimeout, animationTimeout);\n        type =\n            timeout > 0\n                ? transitionTimeout > animationTimeout\n                    ? TRANSITION\n                    : ANIMATION\n                : null;\n        propCount = type\n            ? type === TRANSITION\n                ? transitionDurations.length\n                : animationDurations.length\n            : 0;\n    }\n    var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n    return {\n        type: type,\n        timeout: timeout,\n        propCount: propCount,\n        hasTransform: hasTransform\n    };\n}\nfunction getTimeout(delays, durations) {\n    /* istanbul ignore next */\n    while (delays.length < durations.length) {\n        delays = delays.concat(delays);\n    }\n    return Math.max.apply(null, durations.map(function (d, i) {\n        return toMs(d) + toMs(delays[i]);\n    }));\n}\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs(s) {\n    return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n}\n\nfunction enter(vnode, toggleDisplay) {\n    var el = vnode.elm;\n    // call leave callback now\n    if (isDef(el._leaveCb)) {\n        el._leaveCb.cancelled = true;\n        el._leaveCb();\n    }\n    var data = resolveTransition(vnode.data.transition);\n    if (isUndef(data)) {\n        return;\n    }\n    /* istanbul ignore if */\n    if (isDef(el._enterCb) || el.nodeType !== 1) {\n        return;\n    }\n    var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;\n    // activeInstance will always be the <transition> component managing this\n    // transition. One edge case to check is when the <transition> is placed\n    // as the root node of a child component. In that case we need to check\n    // <transition>'s parent for appear check.\n    var context = activeInstance;\n    var transitionNode = activeInstance.$vnode;\n    while (transitionNode && transitionNode.parent) {\n        context = transitionNode.context;\n        transitionNode = transitionNode.parent;\n    }\n    var isAppear = !context._isMounted || !vnode.isRootInsert;\n    if (isAppear && !appear && appear !== '') {\n        return;\n    }\n    var startClass = isAppear && appearClass ? appearClass : enterClass;\n    var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n    var toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n    var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n    var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n    var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n    var enterCancelledHook = isAppear\n        ? appearCancelled || enterCancelled\n        : enterCancelled;\n    var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n    if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n        checkDuration(explicitEnterDuration, 'enter', vnode);\n    }\n    var expectsCSS = css !== false && !isIE9;\n    var userWantsControl = getHookArgumentsLength(enterHook);\n    var cb = (el._enterCb = once(function () {\n        if (expectsCSS) {\n            removeTransitionClass(el, toClass);\n            removeTransitionClass(el, activeClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, startClass);\n            }\n            enterCancelledHook && enterCancelledHook(el);\n        }\n        else {\n            afterEnterHook && afterEnterHook(el);\n        }\n        el._enterCb = null;\n    }));\n    if (!vnode.data.show) {\n        // remove pending leave element on enter by injecting an insert hook\n        mergeVNodeHook(vnode, 'insert', function () {\n            var parent = el.parentNode;\n            var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n            if (pendingNode &&\n                pendingNode.tag === vnode.tag &&\n                pendingNode.elm._leaveCb) {\n                pendingNode.elm._leaveCb();\n            }\n            enterHook && enterHook(el, cb);\n        });\n    }\n    // start enter transition\n    beforeEnterHook && beforeEnterHook(el);\n    if (expectsCSS) {\n        addTransitionClass(el, startClass);\n        addTransitionClass(el, activeClass);\n        nextFrame(function () {\n            removeTransitionClass(el, startClass);\n            // @ts-expect-error\n            if (!cb.cancelled) {\n                addTransitionClass(el, toClass);\n                if (!userWantsControl) {\n                    if (isValidDuration(explicitEnterDuration)) {\n                        setTimeout(cb, explicitEnterDuration);\n                    }\n                    else {\n                        whenTransitionEnds(el, type, cb);\n                    }\n                }\n            }\n        });\n    }\n    if (vnode.data.show) {\n        toggleDisplay && toggleDisplay();\n        enterHook && enterHook(el, cb);\n    }\n    if (!expectsCSS && !userWantsControl) {\n        cb();\n    }\n}\nfunction leave(vnode, rm) {\n    var el = vnode.elm;\n    // call enter callback now\n    if (isDef(el._enterCb)) {\n        el._enterCb.cancelled = true;\n        el._enterCb();\n    }\n    var data = resolveTransition(vnode.data.transition);\n    if (isUndef(data) || el.nodeType !== 1) {\n        return rm();\n    }\n    /* istanbul ignore if */\n    if (isDef(el._leaveCb)) {\n        return;\n    }\n    var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;\n    var expectsCSS = css !== false && !isIE9;\n    var userWantsControl = getHookArgumentsLength(leave);\n    var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n    if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {\n        checkDuration(explicitLeaveDuration, 'leave', vnode);\n    }\n    var cb = (el._leaveCb = once(function () {\n        if (el.parentNode && el.parentNode._pending) {\n            el.parentNode._pending[vnode.key] = null;\n        }\n        if (expectsCSS) {\n            removeTransitionClass(el, leaveToClass);\n            removeTransitionClass(el, leaveActiveClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, leaveClass);\n            }\n            leaveCancelled && leaveCancelled(el);\n        }\n        else {\n            rm();\n            afterLeave && afterLeave(el);\n        }\n        el._leaveCb = null;\n    }));\n    if (delayLeave) {\n        delayLeave(performLeave);\n    }\n    else {\n        performLeave();\n    }\n    function performLeave() {\n        // the delayed leave may have already been cancelled\n        // @ts-expect-error\n        if (cb.cancelled) {\n            return;\n        }\n        // record leaving element\n        if (!vnode.data.show && el.parentNode) {\n            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                vnode;\n        }\n        beforeLeave && beforeLeave(el);\n        if (expectsCSS) {\n            addTransitionClass(el, leaveClass);\n            addTransitionClass(el, leaveActiveClass);\n            nextFrame(function () {\n                removeTransitionClass(el, leaveClass);\n                // @ts-expect-error\n                if (!cb.cancelled) {\n                    addTransitionClass(el, leaveToClass);\n                    if (!userWantsControl) {\n                        if (isValidDuration(explicitLeaveDuration)) {\n                            setTimeout(cb, explicitLeaveDuration);\n                        }\n                        else {\n                            whenTransitionEnds(el, type, cb);\n                        }\n                    }\n                }\n            });\n        }\n        leave && leave(el, cb);\n        if (!expectsCSS && !userWantsControl) {\n            cb();\n        }\n    }\n}\n// only used in dev mode\nfunction checkDuration(val, name, vnode) {\n    if (typeof val !== 'number') {\n        warn$2(\"<transition> explicit \".concat(name, \" duration is not a valid number - \") +\n            \"got \".concat(JSON.stringify(val), \".\"), vnode.context);\n    }\n    else if (isNaN(val)) {\n        warn$2(\"<transition> explicit \".concat(name, \" duration is NaN - \") +\n            'the duration expression might be incorrect.', vnode.context);\n    }\n}\nfunction isValidDuration(val) {\n    return typeof val === 'number' && !isNaN(val);\n}\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength(fn) {\n    if (isUndef(fn)) {\n        return false;\n    }\n    // @ts-expect-error\n    var invokerFns = fn.fns;\n    if (isDef(invokerFns)) {\n        // invoker\n        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n    }\n    else {\n        // @ts-expect-error\n        return (fn._length || fn.length) > 1;\n    }\n}\nfunction _enter(_, vnode) {\n    if (vnode.data.show !== true) {\n        enter(vnode);\n    }\n}\nvar transition = inBrowser\n    ? {\n        create: _enter,\n        activate: _enter,\n        remove: function (vnode, rm) {\n            /* istanbul ignore else */\n            if (vnode.data.show !== true) {\n                // @ts-expect-error\n                leave(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n    }\n    : {};\n\nvar platformModules = [attrs, klass$1, events, domProps, style$1, transition];\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules$1 = platformModules.concat(baseModules);\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules$1 });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n/* istanbul ignore if */\nif (isIE9) {\n    // http://www.matts411.com/post/internet-explorer-9-oninput/\n    document.addEventListener('selectionchange', function () {\n        var el = document.activeElement;\n        // @ts-expect-error\n        if (el && el.vmodel) {\n            trigger(el, 'input');\n        }\n    });\n}\nvar directive = {\n    inserted: function (el, binding, vnode, oldVnode) {\n        if (vnode.tag === 'select') {\n            // #6903\n            if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                mergeVNodeHook(vnode, 'postpatch', function () {\n                    directive.componentUpdated(el, binding, vnode);\n                });\n            }\n            else {\n                setSelected(el, binding, vnode.context);\n            }\n            el._vOptions = [].map.call(el.options, getValue);\n        }\n        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n            el._vModifiers = binding.modifiers;\n            if (!binding.modifiers.lazy) {\n                el.addEventListener('compositionstart', onCompositionStart);\n                el.addEventListener('compositionend', onCompositionEnd);\n                // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                // switching focus before confirming composition choice\n                // this also fixes the issue where some browsers e.g. iOS Chrome\n                // fires \"change\" instead of \"input\" on autocomplete.\n                el.addEventListener('change', onCompositionEnd);\n                /* istanbul ignore if */\n                if (isIE9) {\n                    el.vmodel = true;\n                }\n            }\n        }\n    },\n    componentUpdated: function (el, binding, vnode) {\n        if (vnode.tag === 'select') {\n            setSelected(el, binding, vnode.context);\n            // in case the options rendered by v-for have changed,\n            // it's possible that the value is out-of-sync with the rendered options.\n            // detect such cases and filter out values that no longer has a matching\n            // option in the DOM.\n            var prevOptions_1 = el._vOptions;\n            var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));\n            if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {\n                // trigger change event if\n                // no matching option found for at least one value\n                var needReset = el.multiple\n                    ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })\n                    : binding.value !== binding.oldValue &&\n                        hasNoMatchingOption(binding.value, curOptions_1);\n                if (needReset) {\n                    trigger(el, 'change');\n                }\n            }\n        }\n    }\n};\nfunction setSelected(el, binding, vm) {\n    actuallySetSelected(el, binding, vm);\n    /* istanbul ignore if */\n    if (isIE || isEdge) {\n        setTimeout(function () {\n            actuallySetSelected(el, binding, vm);\n        }, 0);\n    }\n}\nfunction actuallySetSelected(el, binding, vm) {\n    var value = binding.value;\n    var isMultiple = el.multiple;\n    if (isMultiple && !Array.isArray(value)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"<select multiple v-model=\\\"\".concat(binding.expression, \"\\\"> \") +\n                \"expects an Array value for its binding, but got \".concat(Object.prototype.toString\n                    .call(value)\n                    .slice(8, -1)), vm);\n        return;\n    }\n    var selected, option;\n    for (var i = 0, l = el.options.length; i < l; i++) {\n        option = el.options[i];\n        if (isMultiple) {\n            selected = looseIndexOf(value, getValue(option)) > -1;\n            if (option.selected !== selected) {\n                option.selected = selected;\n            }\n        }\n        else {\n            if (looseEqual(getValue(option), value)) {\n                if (el.selectedIndex !== i) {\n                    el.selectedIndex = i;\n                }\n                return;\n            }\n        }\n    }\n    if (!isMultiple) {\n        el.selectedIndex = -1;\n    }\n}\nfunction hasNoMatchingOption(value, options) {\n    return options.every(function (o) { return !looseEqual(o, value); });\n}\nfunction getValue(option) {\n    return '_value' in option ? option._value : option.value;\n}\nfunction onCompositionStart(e) {\n    e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n    // prevent triggering an input event for no reason\n    if (!e.target.composing)\n        return;\n    e.target.composing = false;\n    trigger(e.target, 'input');\n}\nfunction trigger(el, type) {\n    var e = document.createEvent('HTMLEvents');\n    e.initEvent(type, true, true);\n    el.dispatchEvent(e);\n}\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode(vnode) {\n    // @ts-expect-error\n    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n        ? locateNode(vnode.componentInstance._vnode)\n        : vnode;\n}\nvar show = {\n    bind: function (el, _a, vnode) {\n        var value = _a.value;\n        vnode = locateNode(vnode);\n        var transition = vnode.data && vnode.data.transition;\n        var originalDisplay = (el.__vOriginalDisplay =\n            el.style.display === 'none' ? '' : el.style.display);\n        if (value && transition) {\n            vnode.data.show = true;\n            enter(vnode, function () {\n                el.style.display = originalDisplay;\n            });\n        }\n        else {\n            el.style.display = value ? originalDisplay : 'none';\n        }\n    },\n    update: function (el, _a, vnode) {\n        var value = _a.value, oldValue = _a.oldValue;\n        /* istanbul ignore if */\n        if (!value === !oldValue)\n            return;\n        vnode = locateNode(vnode);\n        var transition = vnode.data && vnode.data.transition;\n        if (transition) {\n            vnode.data.show = true;\n            if (value) {\n                enter(vnode, function () {\n                    el.style.display = el.__vOriginalDisplay;\n                });\n            }\n            else {\n                leave(vnode, function () {\n                    el.style.display = 'none';\n                });\n            }\n        }\n        else {\n            el.style.display = value ? el.__vOriginalDisplay : 'none';\n        }\n    },\n    unbind: function (el, binding, vnode, oldVnode, isDestroy) {\n        if (!isDestroy) {\n            el.style.display = el.__vOriginalDisplay;\n        }\n    }\n};\n\nvar platformDirectives = {\n    model: directive,\n    show: show\n};\n\n// Provides transition support for a single element/component.\nvar transitionProps = {\n    name: String,\n    appear: Boolean,\n    css: Boolean,\n    mode: String,\n    type: String,\n    enterClass: String,\n    leaveClass: String,\n    enterToClass: String,\n    leaveToClass: String,\n    enterActiveClass: String,\n    leaveActiveClass: String,\n    appearClass: String,\n    appearActiveClass: String,\n    appearToClass: String,\n    duration: [Number, String, Object]\n};\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild(vnode) {\n    var compOptions = vnode && vnode.componentOptions;\n    if (compOptions && compOptions.Ctor.options.abstract) {\n        return getRealChild(getFirstComponentChild(compOptions.children));\n    }\n    else {\n        return vnode;\n    }\n}\nfunction extractTransitionData(comp) {\n    var data = {};\n    var options = comp.$options;\n    // props\n    for (var key in options.propsData) {\n        data[key] = comp[key];\n    }\n    // events.\n    // extract listeners and pass them directly to the transition methods\n    var listeners = options._parentListeners;\n    for (var key in listeners) {\n        data[camelize(key)] = listeners[key];\n    }\n    return data;\n}\nfunction placeholder(h, rawChild) {\n    // @ts-expect-error\n    if (/\\d-keep-alive$/.test(rawChild.tag)) {\n        return h('keep-alive', {\n            props: rawChild.componentOptions.propsData\n        });\n    }\n}\nfunction hasParentTransition(vnode) {\n    while ((vnode = vnode.parent)) {\n        if (vnode.data.transition) {\n            return true;\n        }\n    }\n}\nfunction isSameChild(child, oldChild) {\n    return oldChild.key === child.key && oldChild.tag === child.tag;\n}\nvar isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\nvar isVShowDirective = function (d) { return d.name === 'show'; };\nvar Transition = {\n    name: 'transition',\n    props: transitionProps,\n    abstract: true,\n    render: function (h) {\n        var _this = this;\n        var children = this.$slots.default;\n        if (!children) {\n            return;\n        }\n        // filter out text nodes (possible whitespaces)\n        children = children.filter(isNotTextNode);\n        /* istanbul ignore if */\n        if (!children.length) {\n            return;\n        }\n        // warn multiple elements\n        if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n            warn$2('<transition> can only be used on a single element. Use ' +\n                '<transition-group> for lists.', this.$parent);\n        }\n        var mode = this.mode;\n        // warn invalid mode\n        if (process.env.NODE_ENV !== 'production' && mode && mode !== 'in-out' && mode !== 'out-in') {\n            warn$2('invalid <transition> mode: ' + mode, this.$parent);\n        }\n        var rawChild = children[0];\n        // if this is a component root node and the component's\n        // parent container node also has transition, skip.\n        if (hasParentTransition(this.$vnode)) {\n            return rawChild;\n        }\n        // apply transition data to child\n        // use getRealChild() to ignore abstract components e.g. keep-alive\n        var child = getRealChild(rawChild);\n        /* istanbul ignore if */\n        if (!child) {\n            return rawChild;\n        }\n        if (this._leaving) {\n            return placeholder(h, rawChild);\n        }\n        // ensure a key that is unique to the vnode type and to this transition\n        // component instance. This key will be used to remove pending leaving nodes\n        // during entering.\n        var id = \"__transition-\".concat(this._uid, \"-\");\n        child.key =\n            child.key == null\n                ? child.isComment\n                    ? id + 'comment'\n                    : id + child.tag\n                : isPrimitive(child.key)\n                    ? String(child.key).indexOf(id) === 0\n                        ? child.key\n                        : id + child.key\n                    : child.key;\n        var data = ((child.data || (child.data = {})).transition =\n            extractTransitionData(this));\n        var oldRawChild = this._vnode;\n        var oldChild = getRealChild(oldRawChild);\n        // mark v-show\n        // so that the transition module can hand over the control to the directive\n        if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n            child.data.show = true;\n        }\n        if (oldChild &&\n            oldChild.data &&\n            !isSameChild(child, oldChild) &&\n            !isAsyncPlaceholder(oldChild) &&\n            // #6687 component root is a comment node\n            !(oldChild.componentInstance &&\n                oldChild.componentInstance._vnode.isComment)) {\n            // replace old child transition data with fresh one\n            // important for dynamic transitions!\n            var oldData = (oldChild.data.transition = extend({}, data));\n            // handle transition mode\n            if (mode === 'out-in') {\n                // return placeholder node and queue update when leave finishes\n                this._leaving = true;\n                mergeVNodeHook(oldData, 'afterLeave', function () {\n                    _this._leaving = false;\n                    _this.$forceUpdate();\n                });\n                return placeholder(h, rawChild);\n            }\n            else if (mode === 'in-out') {\n                if (isAsyncPlaceholder(child)) {\n                    return oldRawChild;\n                }\n                var delayedLeave_1;\n                var performLeave = function () {\n                    delayedLeave_1();\n                };\n                mergeVNodeHook(data, 'afterEnter', performLeave);\n                mergeVNodeHook(data, 'enterCancelled', performLeave);\n                mergeVNodeHook(oldData, 'delayLeave', function (leave) {\n                    delayedLeave_1 = leave;\n                });\n            }\n        }\n        return rawChild;\n    }\n};\n\n// Provides transition support for list items.\nvar props = extend({\n    tag: String,\n    moveClass: String\n}, transitionProps);\ndelete props.mode;\nvar TransitionGroup = {\n    props: props,\n    beforeMount: function () {\n        var _this = this;\n        var update = this._update;\n        this._update = function (vnode, hydrating) {\n            var restoreActiveInstance = setActiveInstance(_this);\n            // force removing pass\n            _this.__patch__(_this._vnode, _this.kept, false, // hydrating\n            true // removeOnly (!important, avoids unnecessary moves)\n            );\n            _this._vnode = _this.kept;\n            restoreActiveInstance();\n            update.call(_this, vnode, hydrating);\n        };\n    },\n    render: function (h) {\n        var tag = this.tag || this.$vnode.data.tag || 'span';\n        var map = Object.create(null);\n        var prevChildren = (this.prevChildren = this.children);\n        var rawChildren = this.$slots.default || [];\n        var children = (this.children = []);\n        var transitionData = extractTransitionData(this);\n        for (var i = 0; i < rawChildren.length; i++) {\n            var c = rawChildren[i];\n            if (c.tag) {\n                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                    children.push(c);\n                    map[c.key] = c;\n                    (c.data || (c.data = {})).transition = transitionData;\n                }\n                else if (process.env.NODE_ENV !== 'production') {\n                    var opts = c.componentOptions;\n                    var name_1 = opts\n                        ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                        : c.tag;\n                    warn$2(\"<transition-group> children must be keyed: <\".concat(name_1, \">\"));\n                }\n            }\n        }\n        if (prevChildren) {\n            var kept = [];\n            var removed = [];\n            for (var i = 0; i < prevChildren.length; i++) {\n                var c = prevChildren[i];\n                c.data.transition = transitionData;\n                // @ts-expect-error .getBoundingClientRect is not typed in Node\n                c.data.pos = c.elm.getBoundingClientRect();\n                if (map[c.key]) {\n                    kept.push(c);\n                }\n                else {\n                    removed.push(c);\n                }\n            }\n            this.kept = h(tag, null, kept);\n            this.removed = removed;\n        }\n        return h(tag, null, children);\n    },\n    updated: function () {\n        var children = this.prevChildren;\n        var moveClass = this.moveClass || (this.name || 'v') + '-move';\n        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n            return;\n        }\n        // we divide the work into three loops to avoid mixing DOM reads and writes\n        // in each iteration - which helps prevent layout thrashing.\n        children.forEach(callPendingCbs);\n        children.forEach(recordPosition);\n        children.forEach(applyTranslation);\n        // force reflow to put everything in position\n        // assign to this to avoid being removed in tree-shaking\n        // $flow-disable-line\n        this._reflow = document.body.offsetHeight;\n        children.forEach(function (c) {\n            if (c.data.moved) {\n                var el_1 = c.elm;\n                var s = el_1.style;\n                addTransitionClass(el_1, moveClass);\n                s.transform = s.WebkitTransform = s.transitionDuration = '';\n                el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {\n                    if (e && e.target !== el_1) {\n                        return;\n                    }\n                    if (!e || /transform$/.test(e.propertyName)) {\n                        el_1.removeEventListener(transitionEndEvent, cb);\n                        el_1._moveCb = null;\n                        removeTransitionClass(el_1, moveClass);\n                    }\n                }));\n            }\n        });\n    },\n    methods: {\n        hasMove: function (el, moveClass) {\n            /* istanbul ignore if */\n            if (!hasTransition) {\n                return false;\n            }\n            /* istanbul ignore if */\n            if (this._hasMove) {\n                return this._hasMove;\n            }\n            // Detect whether an element with the move class applied has\n            // CSS transitions. Since the element may be inside an entering\n            // transition at this very moment, we make a clone of it and remove\n            // all other transition classes applied to ensure only the move class\n            // is applied.\n            var clone = el.cloneNode();\n            if (el._transitionClasses) {\n                el._transitionClasses.forEach(function (cls) {\n                    removeClass(clone, cls);\n                });\n            }\n            addClass(clone, moveClass);\n            clone.style.display = 'none';\n            this.$el.appendChild(clone);\n            var info = getTransitionInfo(clone);\n            this.$el.removeChild(clone);\n            return (this._hasMove = info.hasTransform);\n        }\n    }\n};\nfunction callPendingCbs(c) {\n    /* istanbul ignore if */\n    if (c.elm._moveCb) {\n        c.elm._moveCb();\n    }\n    /* istanbul ignore if */\n    if (c.elm._enterCb) {\n        c.elm._enterCb();\n    }\n}\nfunction recordPosition(c) {\n    c.data.newPos = c.elm.getBoundingClientRect();\n}\nfunction applyTranslation(c) {\n    var oldPos = c.data.pos;\n    var newPos = c.data.newPos;\n    var dx = oldPos.left - newPos.left;\n    var dy = oldPos.top - newPos.top;\n    if (dx || dy) {\n        c.data.moved = true;\n        var s = c.elm.style;\n        s.transform = s.WebkitTransform = \"translate(\".concat(dx, \"px,\").concat(dy, \"px)\");\n        s.transitionDuration = '0s';\n    }\n}\n\nvar platformComponents = {\n    Transition: Transition,\n    TransitionGroup: TransitionGroup\n};\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n// public mount method\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && inBrowser ? query(el) : undefined;\n    return mountComponent(this, el, hydrating);\n};\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n    setTimeout(function () {\n        if (config.devtools) {\n            if (devtools) {\n                devtools.emit('init', Vue);\n            }\n            else if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n                // @ts-expect-error\n                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                    'https://github.com/vuejs/vue-devtools');\n            }\n        }\n        if (process.env.NODE_ENV !== 'production' &&\n            process.env.NODE_ENV !== 'test' &&\n            config.productionTip !== false &&\n            typeof console !== 'undefined') {\n            // @ts-expect-error\n            console[console.info ? 'info' : 'log'](\"You are running Vue in development mode.\\n\" +\n                \"Make sure to turn on production mode when deploying for production.\\n\" +\n                \"See more tips at https://vuejs.org/guide/deployment.html\");\n        }\n    }, 0);\n}\n\nvar defaultTagRE = /\\{\\{((?:.|\\r?\\n)+?)\\}\\}/g;\nvar regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\nvar buildRegex = cached(function (delimiters) {\n    var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n    var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n    return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g');\n});\nfunction parseText(text, delimiters) {\n    //@ts-expect-error\n    var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n    if (!tagRE.test(text)) {\n        return;\n    }\n    var tokens = [];\n    var rawTokens = [];\n    var lastIndex = (tagRE.lastIndex = 0);\n    var match, index, tokenValue;\n    while ((match = tagRE.exec(text))) {\n        index = match.index;\n        // push text token\n        if (index > lastIndex) {\n            rawTokens.push((tokenValue = text.slice(lastIndex, index)));\n            tokens.push(JSON.stringify(tokenValue));\n        }\n        // tag token\n        var exp = parseFilters(match[1].trim());\n        tokens.push(\"_s(\".concat(exp, \")\"));\n        rawTokens.push({ '@binding': exp });\n        lastIndex = index + match[0].length;\n    }\n    if (lastIndex < text.length) {\n        rawTokens.push((tokenValue = text.slice(lastIndex)));\n        tokens.push(JSON.stringify(tokenValue));\n    }\n    return {\n        expression: tokens.join('+'),\n        tokens: rawTokens\n    };\n}\n\nfunction transformNode$1(el, options) {\n    var warn = options.warn || baseWarn;\n    var staticClass = getAndRemoveAttr(el, 'class');\n    if (process.env.NODE_ENV !== 'production' && staticClass) {\n        var res = parseText(staticClass, options.delimiters);\n        if (res) {\n            warn(\"class=\\\"\".concat(staticClass, \"\\\": \") +\n                'Interpolation inside attributes has been removed. ' +\n                'Use v-bind or the colon shorthand instead. For example, ' +\n                'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.', el.rawAttrsMap['class']);\n        }\n    }\n    if (staticClass) {\n        el.staticClass = JSON.stringify(staticClass.replace(/\\s+/g, ' ').trim());\n    }\n    var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n    if (classBinding) {\n        el.classBinding = classBinding;\n    }\n}\nfunction genData$2(el) {\n    var data = '';\n    if (el.staticClass) {\n        data += \"staticClass:\".concat(el.staticClass, \",\");\n    }\n    if (el.classBinding) {\n        data += \"class:\".concat(el.classBinding, \",\");\n    }\n    return data;\n}\nvar klass = {\n    staticKeys: ['staticClass'],\n    transformNode: transformNode$1,\n    genData: genData$2\n};\n\nfunction transformNode(el, options) {\n    var warn = options.warn || baseWarn;\n    var staticStyle = getAndRemoveAttr(el, 'style');\n    if (staticStyle) {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n            var res = parseText(staticStyle, options.delimiters);\n            if (res) {\n                warn(\"style=\\\"\".concat(staticStyle, \"\\\": \") +\n                    'Interpolation inside attributes has been removed. ' +\n                    'Use v-bind or the colon shorthand instead. For example, ' +\n                    'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.', el.rawAttrsMap['style']);\n            }\n        }\n        el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n    }\n    var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n    if (styleBinding) {\n        el.styleBinding = styleBinding;\n    }\n}\nfunction genData$1(el) {\n    var data = '';\n    if (el.staticStyle) {\n        data += \"staticStyle:\".concat(el.staticStyle, \",\");\n    }\n    if (el.styleBinding) {\n        data += \"style:(\".concat(el.styleBinding, \"),\");\n    }\n    return data;\n}\nvar style = {\n    staticKeys: ['staticStyle'],\n    transformNode: transformNode,\n    genData: genData$1\n};\n\nvar decoder;\nvar he = {\n    decode: function (html) {\n        decoder = decoder || document.createElement('div');\n        decoder.innerHTML = html;\n        return decoder.textContent;\n    }\n};\n\nvar isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n    'link,meta,param,source,track,wbr');\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n    'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n    'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n    'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n    'title,tr,track');\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n// Regular Expressions for parsing tags and attributes\nvar attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nvar dynamicArgAttribute = /^\\s*((?:v-[\\w-]+:|@|:|#)\\[[^=]+?\\][^\\s\"'<>\\/=]*)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\nvar ncname = \"[a-zA-Z_][\\\\-\\\\.0-9_a-zA-Z\".concat(unicodeRegExp.source, \"]*\");\nvar qnameCapture = \"((?:\".concat(ncname, \"\\\\:)?\").concat(ncname, \")\");\nvar startTagOpen = new RegExp(\"^<\".concat(qnameCapture));\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp(\"^<\\\\/\".concat(qnameCapture, \"[^>]*>\"));\nvar doctype = /^<!DOCTYPE [^>]+>/i;\n// #7298: escape - to avoid being passed as HTML comment when inlined in page\nvar comment = /^<!\\--/;\nvar conditionalComment = /^<!\\[/;\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\nvar decodingMap = {\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&amp;': '&',\n    '&#10;': '\\n',\n    '&#9;': '\\t',\n    '&#39;': \"'\"\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;\n// #5992\nvar isIgnoreNewlineTag = makeMap('pre,textarea', true);\nvar shouldIgnoreFirstNewline = function (tag, html) {\n    return tag && isIgnoreNewlineTag(tag) && html[0] === '\\n';\n};\nfunction decodeAttr(value, shouldDecodeNewlines) {\n    var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n    return value.replace(re, function (match) { return decodingMap[match]; });\n}\nfunction parseHTML(html, options) {\n    var stack = [];\n    var expectHTML = options.expectHTML;\n    var isUnaryTag = options.isUnaryTag || no;\n    var canBeLeftOpenTag = options.canBeLeftOpenTag || no;\n    var index = 0;\n    var last, lastTag;\n    var _loop_1 = function () {\n        last = html;\n        // Make sure we're not in a plaintext content element like script/style\n        if (!lastTag || !isPlainTextElement(lastTag)) {\n            var textEnd = html.indexOf('<');\n            if (textEnd === 0) {\n                // Comment:\n                if (comment.test(html)) {\n                    var commentEnd = html.indexOf('-->');\n                    if (commentEnd >= 0) {\n                        if (options.shouldKeepComment && options.comment) {\n                            options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);\n                        }\n                        advance(commentEnd + 3);\n                        return \"continue\";\n                    }\n                }\n                // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n                if (conditionalComment.test(html)) {\n                    var conditionalEnd = html.indexOf(']>');\n                    if (conditionalEnd >= 0) {\n                        advance(conditionalEnd + 2);\n                        return \"continue\";\n                    }\n                }\n                // Doctype:\n                var doctypeMatch = html.match(doctype);\n                if (doctypeMatch) {\n                    advance(doctypeMatch[0].length);\n                    return \"continue\";\n                }\n                // End tag:\n                var endTagMatch = html.match(endTag);\n                if (endTagMatch) {\n                    var curIndex = index;\n                    advance(endTagMatch[0].length);\n                    parseEndTag(endTagMatch[1], curIndex, index);\n                    return \"continue\";\n                }\n                // Start tag:\n                var startTagMatch = parseStartTag();\n                if (startTagMatch) {\n                    handleStartTag(startTagMatch);\n                    if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {\n                        advance(1);\n                    }\n                    return \"continue\";\n                }\n            }\n            var text = void 0, rest = void 0, next = void 0;\n            if (textEnd >= 0) {\n                rest = html.slice(textEnd);\n                while (!endTag.test(rest) &&\n                    !startTagOpen.test(rest) &&\n                    !comment.test(rest) &&\n                    !conditionalComment.test(rest)) {\n                    // < in plain text, be forgiving and treat it as text\n                    next = rest.indexOf('<', 1);\n                    if (next < 0)\n                        break;\n                    textEnd += next;\n                    rest = html.slice(textEnd);\n                }\n                text = html.substring(0, textEnd);\n            }\n            if (textEnd < 0) {\n                text = html;\n            }\n            if (text) {\n                advance(text.length);\n            }\n            if (options.chars && text) {\n                options.chars(text, index - text.length, index);\n            }\n        }\n        else {\n            var endTagLength_1 = 0;\n            var stackedTag_1 = lastTag.toLowerCase();\n            var reStackedTag = reCache[stackedTag_1] ||\n                (reCache[stackedTag_1] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));\n            var rest = html.replace(reStackedTag, function (all, text, endTag) {\n                endTagLength_1 = endTag.length;\n                if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {\n                    text = text\n                        .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n                        .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n                }\n                if (shouldIgnoreFirstNewline(stackedTag_1, text)) {\n                    text = text.slice(1);\n                }\n                if (options.chars) {\n                    options.chars(text);\n                }\n                return '';\n            });\n            index += html.length - rest.length;\n            html = rest;\n            parseEndTag(stackedTag_1, index - endTagLength_1, index);\n        }\n        if (html === last) {\n            options.chars && options.chars(html);\n            if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {\n                options.warn(\"Mal-formatted tag at end of template: \\\"\".concat(html, \"\\\"\"), {\n                    start: index + html.length\n                });\n            }\n            return \"break\";\n        }\n    };\n    while (html) {\n        var state_1 = _loop_1();\n        if (state_1 === \"break\")\n            break;\n    }\n    // Clean up any remaining tags\n    parseEndTag();\n    function advance(n) {\n        index += n;\n        html = html.substring(n);\n    }\n    function parseStartTag() {\n        var start = html.match(startTagOpen);\n        if (start) {\n            var match = {\n                tagName: start[1],\n                attrs: [],\n                start: index\n            };\n            advance(start[0].length);\n            var end = void 0, attr = void 0;\n            while (!(end = html.match(startTagClose)) &&\n                (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {\n                attr.start = index;\n                advance(attr[0].length);\n                attr.end = index;\n                match.attrs.push(attr);\n            }\n            if (end) {\n                match.unarySlash = end[1];\n                advance(end[0].length);\n                match.end = index;\n                return match;\n            }\n        }\n    }\n    function handleStartTag(match) {\n        var tagName = match.tagName;\n        var unarySlash = match.unarySlash;\n        if (expectHTML) {\n            if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n                parseEndTag(lastTag);\n            }\n            if (canBeLeftOpenTag(tagName) && lastTag === tagName) {\n                parseEndTag(tagName);\n            }\n        }\n        var unary = isUnaryTag(tagName) || !!unarySlash;\n        var l = match.attrs.length;\n        var attrs = new Array(l);\n        for (var i = 0; i < l; i++) {\n            var args = match.attrs[i];\n            var value = args[3] || args[4] || args[5] || '';\n            var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n                ? options.shouldDecodeNewlinesForHref\n                : options.shouldDecodeNewlines;\n            attrs[i] = {\n                name: args[1],\n                value: decodeAttr(value, shouldDecodeNewlines)\n            };\n            if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) {\n                attrs[i].start = args.start + args[0].match(/^\\s*/).length;\n                attrs[i].end = args.end;\n            }\n        }\n        if (!unary) {\n            stack.push({\n                tag: tagName,\n                lowerCasedTag: tagName.toLowerCase(),\n                attrs: attrs,\n                start: match.start,\n                end: match.end\n            });\n            lastTag = tagName;\n        }\n        if (options.start) {\n            options.start(tagName, attrs, unary, match.start, match.end);\n        }\n    }\n    function parseEndTag(tagName, start, end) {\n        var pos, lowerCasedTagName;\n        if (start == null)\n            start = index;\n        if (end == null)\n            end = index;\n        // Find the closest opened tag of the same type\n        if (tagName) {\n            lowerCasedTagName = tagName.toLowerCase();\n            for (pos = stack.length - 1; pos >= 0; pos--) {\n                if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n                    break;\n                }\n            }\n        }\n        else {\n            // If no tag name is provided, clean shop\n            pos = 0;\n        }\n        if (pos >= 0) {\n            // Close all the open elements, up the stack\n            for (var i = stack.length - 1; i >= pos; i--) {\n                if (process.env.NODE_ENV !== 'production' && (i > pos || !tagName) && options.warn) {\n                    options.warn(\"tag <\".concat(stack[i].tag, \"> has no matching end tag.\"), {\n                        start: stack[i].start,\n                        end: stack[i].end\n                    });\n                }\n                if (options.end) {\n                    options.end(stack[i].tag, start, end);\n                }\n            }\n            // Remove the open elements from the stack\n            stack.length = pos;\n            lastTag = pos && stack[pos - 1].tag;\n        }\n        else if (lowerCasedTagName === 'br') {\n            if (options.start) {\n                options.start(tagName, [], true, start, end);\n            }\n        }\n        else if (lowerCasedTagName === 'p') {\n            if (options.start) {\n                options.start(tagName, [], false, start, end);\n            }\n            if (options.end) {\n                options.end(tagName, start, end);\n            }\n        }\n    }\n}\n\nvar onRE = /^@|^v-on:/;\nvar dirRE = /^v-|^@|^:|^#/;\nvar forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\nvar forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\nvar stripParensRE = /^\\(|\\)$/g;\nvar dynamicArgRE = /^\\[.*\\]$/;\nvar argRE = /:(.*)$/;\nvar bindRE = /^:|^\\.|^v-bind:/;\nvar modifierRE = /\\.[^.\\]]+(?=[^\\]]*$)/g;\nvar slotRE = /^v-slot(:|$)|^#/;\nvar lineBreakRE = /[\\r\\n]/;\nvar whitespaceRE = /[ \\f\\t\\r\\n]+/g;\nvar invalidAttributeRE = /[\\s\"'<>\\/=]/;\nvar decodeHTMLCached = cached(he.decode);\nvar emptySlotScopeToken = \"_empty_\";\n// configurable state\nvar warn;\nvar delimiters;\nvar transforms;\nvar preTransforms;\nvar postTransforms;\nvar platformIsPreTag;\nvar platformMustUseProp;\nvar platformGetTagNamespace;\nvar maybeComponent;\nfunction createASTElement(tag, attrs, parent) {\n    return {\n        type: 1,\n        tag: tag,\n        attrsList: attrs,\n        attrsMap: makeAttrsMap(attrs),\n        rawAttrsMap: {},\n        parent: parent,\n        children: []\n    };\n}\n/**\n * Convert HTML string to AST.\n */\nfunction parse(template, options) {\n    warn = options.warn || baseWarn;\n    platformIsPreTag = options.isPreTag || no;\n    platformMustUseProp = options.mustUseProp || no;\n    platformGetTagNamespace = options.getTagNamespace || no;\n    var isReservedTag = options.isReservedTag || no;\n    maybeComponent = function (el) {\n        return !!(el.component ||\n            el.attrsMap[':is'] ||\n            el.attrsMap['v-bind:is'] ||\n            !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));\n    };\n    transforms = pluckModuleFunction(options.modules, 'transformNode');\n    preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n    postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n    delimiters = options.delimiters;\n    var stack = [];\n    var preserveWhitespace = options.preserveWhitespace !== false;\n    var whitespaceOption = options.whitespace;\n    var root;\n    var currentParent;\n    var inVPre = false;\n    var inPre = false;\n    var warned = false;\n    function warnOnce(msg, range) {\n        if (!warned) {\n            warned = true;\n            warn(msg, range);\n        }\n    }\n    function closeElement(element) {\n        trimEndingWhitespace(element);\n        if (!inVPre && !element.processed) {\n            element = processElement(element, options);\n        }\n        // tree management\n        if (!stack.length && element !== root) {\n            // allow root elements with v-if, v-else-if and v-else\n            if (root.if && (element.elseif || element.else)) {\n                if (process.env.NODE_ENV !== 'production') {\n                    checkRootConstraints(element);\n                }\n                addIfCondition(root, {\n                    exp: element.elseif,\n                    block: element\n                });\n            }\n            else if (process.env.NODE_ENV !== 'production') {\n                warnOnce(\"Component template should contain exactly one root element. \" +\n                    \"If you are using v-if on multiple elements, \" +\n                    \"use v-else-if to chain them instead.\", { start: element.start });\n            }\n        }\n        if (currentParent && !element.forbidden) {\n            if (element.elseif || element.else) {\n                processIfConditions(element, currentParent);\n            }\n            else {\n                if (element.slotScope) {\n                    // scoped slot\n                    // keep it in the children list so that v-else(-if) conditions can\n                    // find it as the prev node.\n                    var name_1 = element.slotTarget || '\"default\"';\n                    (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;\n                }\n                currentParent.children.push(element);\n                element.parent = currentParent;\n            }\n        }\n        // final children cleanup\n        // filter out scoped slots\n        element.children = element.children.filter(function (c) { return !c.slotScope; });\n        // remove trailing whitespace node again\n        trimEndingWhitespace(element);\n        // check pre state\n        if (element.pre) {\n            inVPre = false;\n        }\n        if (platformIsPreTag(element.tag)) {\n            inPre = false;\n        }\n        // apply post-transforms\n        for (var i = 0; i < postTransforms.length; i++) {\n            postTransforms[i](element, options);\n        }\n    }\n    function trimEndingWhitespace(el) {\n        // remove trailing whitespace node\n        if (!inPre) {\n            var lastNode = void 0;\n            while ((lastNode = el.children[el.children.length - 1]) &&\n                lastNode.type === 3 &&\n                lastNode.text === ' ') {\n                el.children.pop();\n            }\n        }\n    }\n    function checkRootConstraints(el) {\n        if (el.tag === 'slot' || el.tag === 'template') {\n            warnOnce(\"Cannot use <\".concat(el.tag, \"> as component root element because it may \") +\n                'contain multiple nodes.', { start: el.start });\n        }\n        if (el.attrsMap.hasOwnProperty('v-for')) {\n            warnOnce('Cannot use v-for on stateful component root element because ' +\n                'it renders multiple elements.', el.rawAttrsMap['v-for']);\n        }\n    }\n    parseHTML(template, {\n        warn: warn,\n        expectHTML: options.expectHTML,\n        isUnaryTag: options.isUnaryTag,\n        canBeLeftOpenTag: options.canBeLeftOpenTag,\n        shouldDecodeNewlines: options.shouldDecodeNewlines,\n        shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,\n        shouldKeepComment: options.comments,\n        outputSourceRange: options.outputSourceRange,\n        start: function (tag, attrs, unary, start, end) {\n            // check namespace.\n            // inherit parent ns if there is one\n            var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n            // handle IE svg bug\n            /* istanbul ignore if */\n            if (isIE && ns === 'svg') {\n                attrs = guardIESVGBug(attrs);\n            }\n            var element = createASTElement(tag, attrs, currentParent);\n            if (ns) {\n                element.ns = ns;\n            }\n            if (process.env.NODE_ENV !== 'production') {\n                if (options.outputSourceRange) {\n                    element.start = start;\n                    element.end = end;\n                    element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {\n                        cumulated[attr.name] = attr;\n                        return cumulated;\n                    }, {});\n                }\n                attrs.forEach(function (attr) {\n                    if (invalidAttributeRE.test(attr.name)) {\n                        warn(\"Invalid dynamic argument expression: attribute names cannot contain \" +\n                            \"spaces, quotes, <, >, / or =.\", options.outputSourceRange\n                            ? {\n                                start: attr.start + attr.name.indexOf(\"[\"),\n                                end: attr.start + attr.name.length\n                            }\n                            : undefined);\n                    }\n                });\n            }\n            if (isForbiddenTag(element) && !isServerRendering()) {\n                element.forbidden = true;\n                process.env.NODE_ENV !== 'production' &&\n                    warn('Templates should only be responsible for mapping the state to the ' +\n                        'UI. Avoid placing tags with side-effects in your templates, such as ' +\n                        \"<\".concat(tag, \">\") +\n                        ', as they will not be parsed.', { start: element.start });\n            }\n            // apply pre-transforms\n            for (var i = 0; i < preTransforms.length; i++) {\n                element = preTransforms[i](element, options) || element;\n            }\n            if (!inVPre) {\n                processPre(element);\n                if (element.pre) {\n                    inVPre = true;\n                }\n            }\n            if (platformIsPreTag(element.tag)) {\n                inPre = true;\n            }\n            if (inVPre) {\n                processRawAttrs(element);\n            }\n            else if (!element.processed) {\n                // structural directives\n                processFor(element);\n                processIf(element);\n                processOnce(element);\n            }\n            if (!root) {\n                root = element;\n                if (process.env.NODE_ENV !== 'production') {\n                    checkRootConstraints(root);\n                }\n            }\n            if (!unary) {\n                currentParent = element;\n                stack.push(element);\n            }\n            else {\n                closeElement(element);\n            }\n        },\n        end: function (tag, start, end) {\n            var element = stack[stack.length - 1];\n            // pop stack\n            stack.length -= 1;\n            currentParent = stack[stack.length - 1];\n            if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) {\n                element.end = end;\n            }\n            closeElement(element);\n        },\n        chars: function (text, start, end) {\n            if (!currentParent) {\n                if (process.env.NODE_ENV !== 'production') {\n                    if (text === template) {\n                        warnOnce('Component template requires a root element, rather than just text.', { start: start });\n                    }\n                    else if ((text = text.trim())) {\n                        warnOnce(\"text \\\"\".concat(text, \"\\\" outside root element will be ignored.\"), {\n                            start: start\n                        });\n                    }\n                }\n                return;\n            }\n            // IE textarea placeholder bug\n            /* istanbul ignore if */\n            if (isIE &&\n                currentParent.tag === 'textarea' &&\n                currentParent.attrsMap.placeholder === text) {\n                return;\n            }\n            var children = currentParent.children;\n            if (inPre || text.trim()) {\n                text = isTextTag(currentParent)\n                    ? text\n                    : decodeHTMLCached(text);\n            }\n            else if (!children.length) {\n                // remove the whitespace-only node right after an opening tag\n                text = '';\n            }\n            else if (whitespaceOption) {\n                if (whitespaceOption === 'condense') {\n                    // in condense mode, remove the whitespace node if it contains\n                    // line break, otherwise condense to a single space\n                    text = lineBreakRE.test(text) ? '' : ' ';\n                }\n                else {\n                    text = ' ';\n                }\n            }\n            else {\n                text = preserveWhitespace ? ' ' : '';\n            }\n            if (text) {\n                if (!inPre && whitespaceOption === 'condense') {\n                    // condense consecutive whitespaces into single space\n                    text = text.replace(whitespaceRE, ' ');\n                }\n                var res = void 0;\n                var child = void 0;\n                if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {\n                    child = {\n                        type: 2,\n                        expression: res.expression,\n                        tokens: res.tokens,\n                        text: text\n                    };\n                }\n                else if (text !== ' ' ||\n                    !children.length ||\n                    children[children.length - 1].text !== ' ') {\n                    child = {\n                        type: 3,\n                        text: text\n                    };\n                }\n                if (child) {\n                    if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) {\n                        child.start = start;\n                        child.end = end;\n                    }\n                    children.push(child);\n                }\n            }\n        },\n        comment: function (text, start, end) {\n            // adding anything as a sibling to the root node is forbidden\n            // comments should still be allowed, but ignored\n            if (currentParent) {\n                var child = {\n                    type: 3,\n                    text: text,\n                    isComment: true\n                };\n                if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) {\n                    child.start = start;\n                    child.end = end;\n                }\n                currentParent.children.push(child);\n            }\n        }\n    });\n    return root;\n}\nfunction processPre(el) {\n    if (getAndRemoveAttr(el, 'v-pre') != null) {\n        el.pre = true;\n    }\n}\nfunction processRawAttrs(el) {\n    var list = el.attrsList;\n    var len = list.length;\n    if (len) {\n        var attrs = (el.attrs = new Array(len));\n        for (var i = 0; i < len; i++) {\n            attrs[i] = {\n                name: list[i].name,\n                value: JSON.stringify(list[i].value)\n            };\n            if (list[i].start != null) {\n                attrs[i].start = list[i].start;\n                attrs[i].end = list[i].end;\n            }\n        }\n    }\n    else if (!el.pre) {\n        // non root node in pre blocks with no attributes\n        el.plain = true;\n    }\n}\nfunction processElement(element, options) {\n    processKey(element);\n    // determine whether this is a plain element after\n    // removing structural attributes\n    element.plain =\n        !element.key && !element.scopedSlots && !element.attrsList.length;\n    processRef(element);\n    processSlotContent(element);\n    processSlotOutlet(element);\n    processComponent(element);\n    for (var i = 0; i < transforms.length; i++) {\n        element = transforms[i](element, options) || element;\n    }\n    processAttrs(element);\n    return element;\n}\nfunction processKey(el) {\n    var exp = getBindingAttr(el, 'key');\n    if (exp) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (el.tag === 'template') {\n                warn(\"<template> cannot be keyed. Place the key on real elements instead.\", getRawBindingAttr(el, 'key'));\n            }\n            if (el.for) {\n                var iterator = el.iterator2 || el.iterator1;\n                var parent_1 = el.parent;\n                if (iterator &&\n                    iterator === exp &&\n                    parent_1 &&\n                    parent_1.tag === 'transition-group') {\n                    warn(\"Do not use v-for index as key on <transition-group> children, \" +\n                        \"this is the same as not using keys.\", getRawBindingAttr(el, 'key'), true /* tip */);\n                }\n            }\n        }\n        el.key = exp;\n    }\n}\nfunction processRef(el) {\n    var ref = getBindingAttr(el, 'ref');\n    if (ref) {\n        el.ref = ref;\n        el.refInFor = checkInFor(el);\n    }\n}\nfunction processFor(el) {\n    var exp;\n    if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n        var res = parseFor(exp);\n        if (res) {\n            extend(el, res);\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"Invalid v-for expression: \".concat(exp), el.rawAttrsMap['v-for']);\n        }\n    }\n}\nfunction parseFor(exp) {\n    var inMatch = exp.match(forAliasRE);\n    if (!inMatch)\n        return;\n    var res = {};\n    res.for = inMatch[2].trim();\n    var alias = inMatch[1].trim().replace(stripParensRE, '');\n    var iteratorMatch = alias.match(forIteratorRE);\n    if (iteratorMatch) {\n        res.alias = alias.replace(forIteratorRE, '').trim();\n        res.iterator1 = iteratorMatch[1].trim();\n        if (iteratorMatch[2]) {\n            res.iterator2 = iteratorMatch[2].trim();\n        }\n    }\n    else {\n        res.alias = alias;\n    }\n    return res;\n}\nfunction processIf(el) {\n    var exp = getAndRemoveAttr(el, 'v-if');\n    if (exp) {\n        el.if = exp;\n        addIfCondition(el, {\n            exp: exp,\n            block: el\n        });\n    }\n    else {\n        if (getAndRemoveAttr(el, 'v-else') != null) {\n            el.else = true;\n        }\n        var elseif = getAndRemoveAttr(el, 'v-else-if');\n        if (elseif) {\n            el.elseif = elseif;\n        }\n    }\n}\nfunction processIfConditions(el, parent) {\n    var prev = findPrevElement(parent.children);\n    if (prev && prev.if) {\n        addIfCondition(prev, {\n            exp: el.elseif,\n            block: el\n        });\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn(\"v-\".concat(el.elseif ? 'else-if=\"' + el.elseif + '\"' : 'else', \" \") +\n            \"used on element <\".concat(el.tag, \"> without corresponding v-if.\"), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);\n    }\n}\nfunction findPrevElement(children) {\n    var i = children.length;\n    while (i--) {\n        if (children[i].type === 1) {\n            return children[i];\n        }\n        else {\n            if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {\n                warn(\"text \\\"\".concat(children[i].text.trim(), \"\\\" between v-if and v-else(-if) \") +\n                    \"will be ignored.\", children[i]);\n            }\n            children.pop();\n        }\n    }\n}\nfunction addIfCondition(el, condition) {\n    if (!el.ifConditions) {\n        el.ifConditions = [];\n    }\n    el.ifConditions.push(condition);\n}\nfunction processOnce(el) {\n    var once = getAndRemoveAttr(el, 'v-once');\n    if (once != null) {\n        el.once = true;\n    }\n}\n// handle content being passed to a component as slot,\n// e.g. <template slot=\"xxx\">, <div slot-scope=\"xxx\">\nfunction processSlotContent(el) {\n    var slotScope;\n    if (el.tag === 'template') {\n        slotScope = getAndRemoveAttr(el, 'scope');\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && slotScope) {\n            warn(\"the \\\"scope\\\" attribute for scoped slots have been deprecated and \" +\n                \"replaced by \\\"slot-scope\\\" since 2.5. The new \\\"slot-scope\\\" attribute \" +\n                \"can also be used on plain elements in addition to <template> to \" +\n                \"denote scoped slots.\", el.rawAttrsMap['scope'], true);\n        }\n        el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');\n    }\n    else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && el.attrsMap['v-for']) {\n            warn(\"Ambiguous combined usage of slot-scope and v-for on <\".concat(el.tag, \"> \") +\n                \"(v-for takes higher priority). Use a wrapper <template> for the \" +\n                \"scoped slot to make it clearer.\", el.rawAttrsMap['slot-scope'], true);\n        }\n        el.slotScope = slotScope;\n    }\n    // slot=\"xxx\"\n    var slotTarget = getBindingAttr(el, 'slot');\n    if (slotTarget) {\n        el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n        el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);\n        // preserve slot as an attribute for native shadow DOM compat\n        // only for non-scoped slots.\n        if (el.tag !== 'template' && !el.slotScope) {\n            addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));\n        }\n    }\n    // 2.6 v-slot syntax\n    {\n        if (el.tag === 'template') {\n            // v-slot on <template>\n            var slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                if (process.env.NODE_ENV !== 'production') {\n                    if (el.slotTarget || el.slotScope) {\n                        warn(\"Unexpected mixed usage of different slot syntaxes.\", el);\n                    }\n                    if (el.parent && !maybeComponent(el.parent)) {\n                        warn(\"<template v-slot> can only appear at the root level inside \" +\n                            \"the receiving component\", el);\n                    }\n                }\n                var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;\n                el.slotTarget = name_2;\n                el.slotTargetDynamic = dynamic;\n                el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf\n            }\n        }\n        else {\n            // v-slot on component, denotes default slot\n            var slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n            if (slotBinding) {\n                if (process.env.NODE_ENV !== 'production') {\n                    if (!maybeComponent(el)) {\n                        warn(\"v-slot can only be used on components or <template>.\", slotBinding);\n                    }\n                    if (el.slotScope || el.slotTarget) {\n                        warn(\"Unexpected mixed usage of different slot syntaxes.\", el);\n                    }\n                    if (el.scopedSlots) {\n                        warn(\"To avoid scope ambiguity, the default slot should also use \" +\n                            \"<template> syntax when there are other named slots.\", slotBinding);\n                    }\n                }\n                // add the component's children to its default slot\n                var slots = el.scopedSlots || (el.scopedSlots = {});\n                var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;\n                var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));\n                slotContainer_1.slotTarget = name_3;\n                slotContainer_1.slotTargetDynamic = dynamic;\n                slotContainer_1.children = el.children.filter(function (c) {\n                    if (!c.slotScope) {\n                        c.parent = slotContainer_1;\n                        return true;\n                    }\n                });\n                slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;\n                // remove children as they are returned from scopedSlots now\n                el.children = [];\n                // mark el non-plain so data gets generated\n                el.plain = false;\n            }\n        }\n    }\n}\nfunction getSlotName(binding) {\n    var name = binding.name.replace(slotRE, '');\n    if (!name) {\n        if (binding.name[0] !== '#') {\n            name = 'default';\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"v-slot shorthand syntax requires a slot name.\", binding);\n        }\n    }\n    return dynamicArgRE.test(name)\n        ? // dynamic [name]\n            { name: name.slice(1, -1), dynamic: true }\n        : // static name\n            { name: \"\\\"\".concat(name, \"\\\"\"), dynamic: false };\n}\n// handle <slot/> outlets\nfunction processSlotOutlet(el) {\n    if (el.tag === 'slot') {\n        el.slotName = getBindingAttr(el, 'name');\n        if (process.env.NODE_ENV !== 'production' && el.key) {\n            warn(\"`key` does not work on <slot> because slots are abstract outlets \" +\n                \"and can possibly expand into multiple elements. \" +\n                \"Use the key on a wrapping element instead.\", getRawBindingAttr(el, 'key'));\n        }\n    }\n}\nfunction processComponent(el) {\n    var binding;\n    if ((binding = getBindingAttr(el, 'is'))) {\n        el.component = binding;\n    }\n    if (getAndRemoveAttr(el, 'inline-template') != null) {\n        el.inlineTemplate = true;\n    }\n}\nfunction processAttrs(el) {\n    var list = el.attrsList;\n    var i, l, name, rawName, value, modifiers, syncGen, isDynamic;\n    for (i = 0, l = list.length; i < l; i++) {\n        name = rawName = list[i].name;\n        value = list[i].value;\n        if (dirRE.test(name)) {\n            // mark element as dynamic\n            el.hasBindings = true;\n            // modifiers\n            modifiers = parseModifiers(name.replace(dirRE, ''));\n            // support .foo shorthand syntax for the .prop modifier\n            if (modifiers) {\n                name = name.replace(modifierRE, '');\n            }\n            if (bindRE.test(name)) {\n                // v-bind\n                name = name.replace(bindRE, '');\n                value = parseFilters(value);\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                if (process.env.NODE_ENV !== 'production' && value.trim().length === 0) {\n                    warn(\"The value for a v-bind expression cannot be empty. Found in \\\"v-bind:\".concat(name, \"\\\"\"));\n                }\n                if (modifiers) {\n                    if (modifiers.prop && !isDynamic) {\n                        name = camelize(name);\n                        if (name === 'innerHtml')\n                            name = 'innerHTML';\n                    }\n                    if (modifiers.camel && !isDynamic) {\n                        name = camelize(name);\n                    }\n                    if (modifiers.sync) {\n                        syncGen = genAssignmentCode(value, \"$event\");\n                        if (!isDynamic) {\n                            addHandler(el, \"update:\".concat(camelize(name)), syncGen, null, false, warn, list[i]);\n                            if (hyphenate(name) !== camelize(name)) {\n                                addHandler(el, \"update:\".concat(hyphenate(name)), syncGen, null, false, warn, list[i]);\n                            }\n                        }\n                        else {\n                            // handler w/ dynamic event name\n                            addHandler(el, \"\\\"update:\\\"+(\".concat(name, \")\"), syncGen, null, false, warn, list[i], true // dynamic\n                            );\n                        }\n                    }\n                }\n                if ((modifiers && modifiers.prop) ||\n                    (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {\n                    addProp(el, name, value, list[i], isDynamic);\n                }\n                else {\n                    addAttr(el, name, value, list[i], isDynamic);\n                }\n            }\n            else if (onRE.test(name)) {\n                // v-on\n                name = name.replace(onRE, '');\n                isDynamic = dynamicArgRE.test(name);\n                if (isDynamic) {\n                    name = name.slice(1, -1);\n                }\n                addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);\n            }\n            else {\n                // normal directives\n                name = name.replace(dirRE, '');\n                // parse arg\n                var argMatch = name.match(argRE);\n                var arg = argMatch && argMatch[1];\n                isDynamic = false;\n                if (arg) {\n                    name = name.slice(0, -(arg.length + 1));\n                    if (dynamicArgRE.test(arg)) {\n                        arg = arg.slice(1, -1);\n                        isDynamic = true;\n                    }\n                }\n                addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);\n                if (process.env.NODE_ENV !== 'production' && name === 'model') {\n                    checkForAliasModel(el, value);\n                }\n            }\n        }\n        else {\n            // literal attribute\n            if (process.env.NODE_ENV !== 'production') {\n                var res = parseText(value, delimiters);\n                if (res) {\n                    warn(\"\".concat(name, \"=\\\"\").concat(value, \"\\\": \") +\n                        'Interpolation inside attributes has been removed. ' +\n                        'Use v-bind or the colon shorthand instead. For example, ' +\n                        'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.', list[i]);\n                }\n            }\n            addAttr(el, name, JSON.stringify(value), list[i]);\n            // #6887 firefox doesn't update muted state if set via attribute\n            // even immediately after element creation\n            if (!el.component &&\n                name === 'muted' &&\n                platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n                addProp(el, name, 'true', list[i]);\n            }\n        }\n    }\n}\nfunction checkInFor(el) {\n    var parent = el;\n    while (parent) {\n        if (parent.for !== undefined) {\n            return true;\n        }\n        parent = parent.parent;\n    }\n    return false;\n}\nfunction parseModifiers(name) {\n    var match = name.match(modifierRE);\n    if (match) {\n        var ret_1 = {};\n        match.forEach(function (m) {\n            ret_1[m.slice(1)] = true;\n        });\n        return ret_1;\n    }\n}\nfunction makeAttrsMap(attrs) {\n    var map = {};\n    for (var i = 0, l = attrs.length; i < l; i++) {\n        if (process.env.NODE_ENV !== 'production' && map[attrs[i].name] && !isIE && !isEdge) {\n            warn('duplicate attribute: ' + attrs[i].name, attrs[i]);\n        }\n        map[attrs[i].name] = attrs[i].value;\n    }\n    return map;\n}\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag(el) {\n    return el.tag === 'script' || el.tag === 'style';\n}\nfunction isForbiddenTag(el) {\n    return (el.tag === 'style' ||\n        (el.tag === 'script' &&\n            (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));\n}\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n/* istanbul ignore next */\nfunction guardIESVGBug(attrs) {\n    var res = [];\n    for (var i = 0; i < attrs.length; i++) {\n        var attr = attrs[i];\n        if (!ieNSBug.test(attr.name)) {\n            attr.name = attr.name.replace(ieNSPrefix, '');\n            res.push(attr);\n        }\n    }\n    return res;\n}\nfunction checkForAliasModel(el, value) {\n    var _el = el;\n    while (_el) {\n        if (_el.for && _el.alias === value) {\n            warn(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\">: \") +\n                \"You are binding v-model directly to a v-for iteration alias. \" +\n                \"This will not be able to modify the v-for source array because \" +\n                \"writing to the alias is like modifying a function local variable. \" +\n                \"Consider using an array of objects and use v-model on an object property instead.\", el.rawAttrsMap['v-model']);\n        }\n        _el = _el.parent;\n    }\n}\n\n/**\n * Expand input[v-model] with dynamic type bindings into v-if-else chains\n * Turn this:\n *   <input v-model=\"data[type]\" :type=\"type\">\n * into this:\n *   <input v-if=\"type === 'checkbox'\" type=\"checkbox\" v-model=\"data[type]\">\n *   <input v-else-if=\"type === 'radio'\" type=\"radio\" v-model=\"data[type]\">\n *   <input v-else :type=\"type\" v-model=\"data[type]\">\n */\nfunction preTransformNode(el, options) {\n    if (el.tag === 'input') {\n        var map = el.attrsMap;\n        if (!map['v-model']) {\n            return;\n        }\n        var typeBinding = void 0;\n        if (map[':type'] || map['v-bind:type']) {\n            typeBinding = getBindingAttr(el, 'type');\n        }\n        if (!map.type && !typeBinding && map['v-bind']) {\n            typeBinding = \"(\".concat(map['v-bind'], \").type\");\n        }\n        if (typeBinding) {\n            var ifCondition = getAndRemoveAttr(el, 'v-if', true);\n            var ifConditionExtra = ifCondition ? \"&&(\".concat(ifCondition, \")\") : \"\";\n            var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n            var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n            // 1. checkbox\n            var branch0 = cloneASTElement(el);\n            // process for on the main node\n            processFor(branch0);\n            addRawAttr(branch0, 'type', 'checkbox');\n            processElement(branch0, options);\n            branch0.processed = true; // prevent it from double-processed\n            branch0.if = \"(\".concat(typeBinding, \")==='checkbox'\") + ifConditionExtra;\n            addIfCondition(branch0, {\n                exp: branch0.if,\n                block: branch0\n            });\n            // 2. add radio else-if condition\n            var branch1 = cloneASTElement(el);\n            getAndRemoveAttr(branch1, 'v-for', true);\n            addRawAttr(branch1, 'type', 'radio');\n            processElement(branch1, options);\n            addIfCondition(branch0, {\n                exp: \"(\".concat(typeBinding, \")==='radio'\") + ifConditionExtra,\n                block: branch1\n            });\n            // 3. other\n            var branch2 = cloneASTElement(el);\n            getAndRemoveAttr(branch2, 'v-for', true);\n            addRawAttr(branch2, ':type', typeBinding);\n            processElement(branch2, options);\n            addIfCondition(branch0, {\n                exp: ifCondition,\n                block: branch2\n            });\n            if (hasElse) {\n                branch0.else = true;\n            }\n            else if (elseIfCondition) {\n                branch0.elseif = elseIfCondition;\n            }\n            return branch0;\n        }\n    }\n}\nfunction cloneASTElement(el) {\n    return createASTElement(el.tag, el.attrsList.slice(), el.parent);\n}\nvar model = {\n    preTransformNode: preTransformNode\n};\n\nvar modules = [klass, style, model];\n\nfunction text(el, dir) {\n    if (dir.value) {\n        addProp(el, 'textContent', \"_s(\".concat(dir.value, \")\"), dir);\n    }\n}\n\nfunction html(el, dir) {\n    if (dir.value) {\n        addProp(el, 'innerHTML', \"_s(\".concat(dir.value, \")\"), dir);\n    }\n}\n\nvar directives = {\n    model: model$1,\n    text: text,\n    html: html\n};\n\nvar baseOptions = {\n    expectHTML: true,\n    modules: modules,\n    directives: directives,\n    isPreTag: isPreTag,\n    isUnaryTag: isUnaryTag,\n    mustUseProp: mustUseProp,\n    canBeLeftOpenTag: canBeLeftOpenTag,\n    isReservedTag: isReservedTag,\n    getTagNamespace: getTagNamespace,\n    staticKeys: genStaticKeys$1(modules)\n};\n\nvar isStaticKey;\nvar isPlatformReservedTag;\nvar genStaticKeysCached = cached(genStaticKeys);\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n *    create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize(root, options) {\n    if (!root)\n        return;\n    isStaticKey = genStaticKeysCached(options.staticKeys || '');\n    isPlatformReservedTag = options.isReservedTag || no;\n    // first pass: mark all non-static nodes.\n    markStatic(root);\n    // second pass: mark static roots.\n    markStaticRoots(root, false);\n}\nfunction genStaticKeys(keys) {\n    return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +\n        (keys ? ',' + keys : ''));\n}\nfunction markStatic(node) {\n    node.static = isStatic(node);\n    if (node.type === 1) {\n        // do not make component slot content static. this avoids\n        // 1. components not able to mutate slot nodes\n        // 2. static slot content fails for hot-reloading\n        if (!isPlatformReservedTag(node.tag) &&\n            node.tag !== 'slot' &&\n            node.attrsMap['inline-template'] == null) {\n            return;\n        }\n        for (var i = 0, l = node.children.length; i < l; i++) {\n            var child = node.children[i];\n            markStatic(child);\n            if (!child.static) {\n                node.static = false;\n            }\n        }\n        if (node.ifConditions) {\n            for (var i = 1, l = node.ifConditions.length; i < l; i++) {\n                var block = node.ifConditions[i].block;\n                markStatic(block);\n                if (!block.static) {\n                    node.static = false;\n                }\n            }\n        }\n    }\n}\nfunction markStaticRoots(node, isInFor) {\n    if (node.type === 1) {\n        if (node.static || node.once) {\n            node.staticInFor = isInFor;\n        }\n        // For a node to qualify as a static root, it should have children that\n        // are not just static text. Otherwise the cost of hoisting out will\n        // outweigh the benefits and it's better off to just always render it fresh.\n        if (node.static &&\n            node.children.length &&\n            !(node.children.length === 1 && node.children[0].type === 3)) {\n            node.staticRoot = true;\n            return;\n        }\n        else {\n            node.staticRoot = false;\n        }\n        if (node.children) {\n            for (var i = 0, l = node.children.length; i < l; i++) {\n                markStaticRoots(node.children[i], isInFor || !!node.for);\n            }\n        }\n        if (node.ifConditions) {\n            for (var i = 1, l = node.ifConditions.length; i < l; i++) {\n                markStaticRoots(node.ifConditions[i].block, isInFor);\n            }\n        }\n    }\n}\nfunction isStatic(node) {\n    if (node.type === 2) {\n        // expression\n        return false;\n    }\n    if (node.type === 3) {\n        // text\n        return true;\n    }\n    return !!(node.pre ||\n        (!node.hasBindings && // no dynamic bindings\n            !node.if &&\n            !node.for && // not v-if or v-for or v-else\n            !isBuiltInTag(node.tag) && // not a built-in\n            isPlatformReservedTag(node.tag) && // not a component\n            !isDirectChildOfTemplateFor(node) &&\n            Object.keys(node).every(isStaticKey)));\n}\nfunction isDirectChildOfTemplateFor(node) {\n    while (node.parent) {\n        node = node.parent;\n        if (node.tag !== 'template') {\n            return false;\n        }\n        if (node.for) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvar fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/;\nvar fnInvokeRE = /\\([^)]*?\\);*$/;\nvar simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n// KeyboardEvent.keyCode aliases\nvar keyCodes = {\n    esc: 27,\n    tab: 9,\n    enter: 13,\n    space: 32,\n    up: 38,\n    left: 37,\n    right: 39,\n    down: 40,\n    delete: [8, 46]\n};\n// KeyboardEvent.key aliases\nvar keyNames = {\n    // #7880: IE11 and Edge use `Esc` for Escape key name.\n    esc: ['Esc', 'Escape'],\n    tab: 'Tab',\n    enter: 'Enter',\n    // #9112: IE11 uses `Spacebar` for Space key name.\n    space: [' ', 'Spacebar'],\n    // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n    up: ['Up', 'ArrowUp'],\n    left: ['Left', 'ArrowLeft'],\n    right: ['Right', 'ArrowRight'],\n    down: ['Down', 'ArrowDown'],\n    // #9112: IE11 uses `Del` for Delete key name.\n    delete: ['Backspace', 'Delete', 'Del']\n};\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return \"if(\".concat(condition, \")return null;\"); };\nvar modifierCode = {\n    stop: '$event.stopPropagation();',\n    prevent: '$event.preventDefault();',\n    self: genGuard(\"$event.target !== $event.currentTarget\"),\n    ctrl: genGuard(\"!$event.ctrlKey\"),\n    shift: genGuard(\"!$event.shiftKey\"),\n    alt: genGuard(\"!$event.altKey\"),\n    meta: genGuard(\"!$event.metaKey\"),\n    left: genGuard(\"'button' in $event && $event.button !== 0\"),\n    middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n    right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\nfunction genHandlers(events, isNative) {\n    var prefix = isNative ? 'nativeOn:' : 'on:';\n    var staticHandlers = \"\";\n    var dynamicHandlers = \"\";\n    for (var name_1 in events) {\n        var handlerCode = genHandler(events[name_1]);\n        //@ts-expect-error\n        if (events[name_1] && events[name_1].dynamic) {\n            dynamicHandlers += \"\".concat(name_1, \",\").concat(handlerCode, \",\");\n        }\n        else {\n            staticHandlers += \"\\\"\".concat(name_1, \"\\\":\").concat(handlerCode, \",\");\n        }\n    }\n    staticHandlers = \"{\".concat(staticHandlers.slice(0, -1), \"}\");\n    if (dynamicHandlers) {\n        return prefix + \"_d(\".concat(staticHandlers, \",[\").concat(dynamicHandlers.slice(0, -1), \"])\");\n    }\n    else {\n        return prefix + staticHandlers;\n    }\n}\nfunction genHandler(handler) {\n    if (!handler) {\n        return 'function(){}';\n    }\n    if (Array.isArray(handler)) {\n        return \"[\".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), \"]\");\n    }\n    var isMethodPath = simplePathRE.test(handler.value);\n    var isFunctionExpression = fnExpRE.test(handler.value);\n    var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));\n    if (!handler.modifiers) {\n        if (isMethodPath || isFunctionExpression) {\n            return handler.value;\n        }\n        return \"function($event){\".concat(isFunctionInvocation ? \"return \".concat(handler.value) : handler.value, \"}\"); // inline statement\n    }\n    else {\n        var code = '';\n        var genModifierCode = '';\n        var keys = [];\n        var _loop_1 = function (key) {\n            if (modifierCode[key]) {\n                genModifierCode += modifierCode[key];\n                // left/right\n                if (keyCodes[key]) {\n                    keys.push(key);\n                }\n            }\n            else if (key === 'exact') {\n                var modifiers_1 = handler.modifiers;\n                genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']\n                    .filter(function (keyModifier) { return !modifiers_1[keyModifier]; })\n                    .map(function (keyModifier) { return \"$event.\".concat(keyModifier, \"Key\"); })\n                    .join('||'));\n            }\n            else {\n                keys.push(key);\n            }\n        };\n        for (var key in handler.modifiers) {\n            _loop_1(key);\n        }\n        if (keys.length) {\n            code += genKeyFilter(keys);\n        }\n        // Make sure modifiers like prevent and stop get executed after key filtering\n        if (genModifierCode) {\n            code += genModifierCode;\n        }\n        var handlerCode = isMethodPath\n            ? \"return \".concat(handler.value, \".apply(null, arguments)\")\n            : isFunctionExpression\n                ? \"return (\".concat(handler.value, \").apply(null, arguments)\")\n                : isFunctionInvocation\n                    ? \"return \".concat(handler.value)\n                    : handler.value;\n        return \"function($event){\".concat(code).concat(handlerCode, \"}\");\n    }\n}\nfunction genKeyFilter(keys) {\n    return (\n    // make sure the key filters only apply to KeyboardEvents\n    // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake\n    // key events that do not have keyCode property...\n    \"if(!$event.type.indexOf('key')&&\" +\n        \"\".concat(keys.map(genFilterCode).join('&&'), \")return null;\"));\n}\nfunction genFilterCode(key) {\n    var keyVal = parseInt(key, 10);\n    if (keyVal) {\n        return \"$event.keyCode!==\".concat(keyVal);\n    }\n    var keyCode = keyCodes[key];\n    var keyName = keyNames[key];\n    return (\"_k($event.keyCode,\" +\n        \"\".concat(JSON.stringify(key), \",\") +\n        \"\".concat(JSON.stringify(keyCode), \",\") +\n        \"$event.key,\" +\n        \"\".concat(JSON.stringify(keyName)) +\n        \")\");\n}\n\nfunction on(el, dir) {\n    if (process.env.NODE_ENV !== 'production' && dir.modifiers) {\n        warn$2(\"v-on without argument does not support modifiers.\");\n    }\n    el.wrapListeners = function (code) { return \"_g(\".concat(code, \",\").concat(dir.value, \")\"); };\n}\n\nfunction bind(el, dir) {\n    el.wrapData = function (code) {\n        return \"_b(\".concat(code, \",'\").concat(el.tag, \"',\").concat(dir.value, \",\").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', \")\");\n    };\n}\n\nvar baseDirectives = {\n    on: on,\n    bind: bind,\n    cloak: noop\n};\n\nvar CodegenState = /** @class */ (function () {\n    function CodegenState(options) {\n        this.options = options;\n        this.warn = options.warn || baseWarn;\n        this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n        this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n        this.directives = extend(extend({}, baseDirectives), options.directives);\n        var isReservedTag = options.isReservedTag || no;\n        this.maybeComponent = function (el) {\n            return !!el.component || !isReservedTag(el.tag);\n        };\n        this.onceId = 0;\n        this.staticRenderFns = [];\n        this.pre = false;\n    }\n    return CodegenState;\n}());\nfunction generate(ast, options) {\n    var state = new CodegenState(options);\n    // fix #11483, Root level <script> tags should not be rendered.\n    var code = ast\n        ? ast.tag === 'script'\n            ? 'null'\n            : genElement(ast, state)\n        : '_c(\"div\")';\n    return {\n        render: \"with(this){return \".concat(code, \"}\"),\n        staticRenderFns: state.staticRenderFns\n    };\n}\nfunction genElement(el, state) {\n    if (el.parent) {\n        el.pre = el.pre || el.parent.pre;\n    }\n    if (el.staticRoot && !el.staticProcessed) {\n        return genStatic(el, state);\n    }\n    else if (el.once && !el.onceProcessed) {\n        return genOnce(el, state);\n    }\n    else if (el.for && !el.forProcessed) {\n        return genFor(el, state);\n    }\n    else if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.tag === 'template' && !el.slotTarget && !state.pre) {\n        return genChildren(el, state) || 'void 0';\n    }\n    else if (el.tag === 'slot') {\n        return genSlot(el, state);\n    }\n    else {\n        // component or element\n        var code = void 0;\n        if (el.component) {\n            code = genComponent(el.component, el, state);\n        }\n        else {\n            var data = void 0;\n            var maybeComponent = state.maybeComponent(el);\n            if (!el.plain || (el.pre && maybeComponent)) {\n                data = genData(el, state);\n            }\n            var tag \n            // check if this is a component in <script setup>\n            = void 0;\n            // check if this is a component in <script setup>\n            var bindings = state.options.bindings;\n            if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {\n                tag = checkBindingType(bindings, el.tag);\n            }\n            if (!tag)\n                tag = \"'\".concat(el.tag, \"'\");\n            var children = el.inlineTemplate ? null : genChildren(el, state, true);\n            code = \"_c(\".concat(tag).concat(data ? \",\".concat(data) : '' // data\n            ).concat(children ? \",\".concat(children) : '' // children\n            , \")\");\n        }\n        // module transforms\n        for (var i = 0; i < state.transforms.length; i++) {\n            code = state.transforms[i](el, code);\n        }\n        return code;\n    }\n}\nfunction checkBindingType(bindings, key) {\n    var camelName = camelize(key);\n    var PascalName = capitalize(camelName);\n    var checkType = function (type) {\n        if (bindings[key] === type) {\n            return key;\n        }\n        if (bindings[camelName] === type) {\n            return camelName;\n        }\n        if (bindings[PascalName] === type) {\n            return PascalName;\n        }\n    };\n    var fromConst = checkType(\"setup-const\" /* BindingTypes.SETUP_CONST */) ||\n        checkType(\"setup-reactive-const\" /* BindingTypes.SETUP_REACTIVE_CONST */);\n    if (fromConst) {\n        return fromConst;\n    }\n    var fromMaybeRef = checkType(\"setup-let\" /* BindingTypes.SETUP_LET */) ||\n        checkType(\"setup-ref\" /* BindingTypes.SETUP_REF */) ||\n        checkType(\"setup-maybe-ref\" /* BindingTypes.SETUP_MAYBE_REF */);\n    if (fromMaybeRef) {\n        return fromMaybeRef;\n    }\n}\n// hoist static sub-trees out\nfunction genStatic(el, state) {\n    el.staticProcessed = true;\n    // Some elements (templates) need to behave differently inside of a v-pre\n    // node.  All pre nodes are static roots, so we can use this as a location to\n    // wrap a state change and reset it upon exiting the pre node.\n    var originalPreState = state.pre;\n    if (el.pre) {\n        state.pre = el.pre;\n    }\n    state.staticRenderFns.push(\"with(this){return \".concat(genElement(el, state), \"}\"));\n    state.pre = originalPreState;\n    return \"_m(\".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', \")\");\n}\n// v-once\nfunction genOnce(el, state) {\n    el.onceProcessed = true;\n    if (el.if && !el.ifProcessed) {\n        return genIf(el, state);\n    }\n    else if (el.staticInFor) {\n        var key = '';\n        var parent_1 = el.parent;\n        while (parent_1) {\n            if (parent_1.for) {\n                key = parent_1.key;\n                break;\n            }\n            parent_1 = parent_1.parent;\n        }\n        if (!key) {\n            process.env.NODE_ENV !== 'production' &&\n                state.warn(\"v-once can only be used inside v-for that is keyed. \", el.rawAttrsMap['v-once']);\n            return genElement(el, state);\n        }\n        return \"_o(\".concat(genElement(el, state), \",\").concat(state.onceId++, \",\").concat(key, \")\");\n    }\n    else {\n        return genStatic(el, state);\n    }\n}\nfunction genIf(el, state, altGen, altEmpty) {\n    el.ifProcessed = true; // avoid recursion\n    return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);\n}\nfunction genIfConditions(conditions, state, altGen, altEmpty) {\n    if (!conditions.length) {\n        return altEmpty || '_e()';\n    }\n    var condition = conditions.shift();\n    if (condition.exp) {\n        return \"(\".concat(condition.exp, \")?\").concat(genTernaryExp(condition.block), \":\").concat(genIfConditions(conditions, state, altGen, altEmpty));\n    }\n    else {\n        return \"\".concat(genTernaryExp(condition.block));\n    }\n    // v-if with v-once should generate code like (a)?_m(0):_m(1)\n    function genTernaryExp(el) {\n        return altGen\n            ? altGen(el, state)\n            : el.once\n                ? genOnce(el, state)\n                : genElement(el, state);\n    }\n}\nfunction genFor(el, state, altGen, altHelper) {\n    var exp = el.for;\n    var alias = el.alias;\n    var iterator1 = el.iterator1 ? \",\".concat(el.iterator1) : '';\n    var iterator2 = el.iterator2 ? \",\".concat(el.iterator2) : '';\n    if (process.env.NODE_ENV !== 'production' &&\n        state.maybeComponent(el) &&\n        el.tag !== 'slot' &&\n        el.tag !== 'template' &&\n        !el.key) {\n        state.warn(\"<\".concat(el.tag, \" v-for=\\\"\").concat(alias, \" in \").concat(exp, \"\\\">: component lists rendered with \") +\n            \"v-for should have explicit keys. \" +\n            \"See https://v2.vuejs.org/v2/guide/list.html#key for more info.\", el.rawAttrsMap['v-for'], true /* tip */);\n    }\n    el.forProcessed = true; // avoid recursion\n    return (\"\".concat(altHelper || '_l', \"((\").concat(exp, \"),\") +\n        \"function(\".concat(alias).concat(iterator1).concat(iterator2, \"){\") +\n        \"return \".concat((altGen || genElement)(el, state)) +\n        '})');\n}\nfunction genData(el, state) {\n    var data = '{';\n    // directives first.\n    // directives may mutate the el's other properties before they are generated.\n    var dirs = genDirectives(el, state);\n    if (dirs)\n        data += dirs + ',';\n    // key\n    if (el.key) {\n        data += \"key:\".concat(el.key, \",\");\n    }\n    // ref\n    if (el.ref) {\n        data += \"ref:\".concat(el.ref, \",\");\n    }\n    if (el.refInFor) {\n        data += \"refInFor:true,\";\n    }\n    // pre\n    if (el.pre) {\n        data += \"pre:true,\";\n    }\n    // record original tag name for components using \"is\" attribute\n    if (el.component) {\n        data += \"tag:\\\"\".concat(el.tag, \"\\\",\");\n    }\n    // module data generation functions\n    for (var i = 0; i < state.dataGenFns.length; i++) {\n        data += state.dataGenFns[i](el);\n    }\n    // attributes\n    if (el.attrs) {\n        data += \"attrs:\".concat(genProps(el.attrs), \",\");\n    }\n    // DOM props\n    if (el.props) {\n        data += \"domProps:\".concat(genProps(el.props), \",\");\n    }\n    // event handlers\n    if (el.events) {\n        data += \"\".concat(genHandlers(el.events, false), \",\");\n    }\n    if (el.nativeEvents) {\n        data += \"\".concat(genHandlers(el.nativeEvents, true), \",\");\n    }\n    // slot target\n    // only for non-scoped slots\n    if (el.slotTarget && !el.slotScope) {\n        data += \"slot:\".concat(el.slotTarget, \",\");\n    }\n    // scoped slots\n    if (el.scopedSlots) {\n        data += \"\".concat(genScopedSlots(el, el.scopedSlots, state), \",\");\n    }\n    // component v-model\n    if (el.model) {\n        data += \"model:{value:\".concat(el.model.value, \",callback:\").concat(el.model.callback, \",expression:\").concat(el.model.expression, \"},\");\n    }\n    // inline-template\n    if (el.inlineTemplate) {\n        var inlineTemplate = genInlineTemplate(el, state);\n        if (inlineTemplate) {\n            data += \"\".concat(inlineTemplate, \",\");\n        }\n    }\n    data = data.replace(/,$/, '') + '}';\n    // v-bind dynamic argument wrap\n    // v-bind with dynamic arguments must be applied using the same v-bind object\n    // merge helper so that class/style/mustUseProp attrs are handled correctly.\n    if (el.dynamicAttrs) {\n        data = \"_b(\".concat(data, \",\\\"\").concat(el.tag, \"\\\",\").concat(genProps(el.dynamicAttrs), \")\");\n    }\n    // v-bind data wrap\n    if (el.wrapData) {\n        data = el.wrapData(data);\n    }\n    // v-on data wrap\n    if (el.wrapListeners) {\n        data = el.wrapListeners(data);\n    }\n    return data;\n}\nfunction genDirectives(el, state) {\n    var dirs = el.directives;\n    if (!dirs)\n        return;\n    var res = 'directives:[';\n    var hasRuntime = false;\n    var i, l, dir, needRuntime;\n    for (i = 0, l = dirs.length; i < l; i++) {\n        dir = dirs[i];\n        needRuntime = true;\n        var gen = state.directives[dir.name];\n        if (gen) {\n            // compile-time directive that manipulates AST.\n            // returns true if it also needs a runtime counterpart.\n            needRuntime = !!gen(el, dir, state.warn);\n        }\n        if (needRuntime) {\n            hasRuntime = true;\n            res += \"{name:\\\"\".concat(dir.name, \"\\\",rawName:\\\"\").concat(dir.rawName, \"\\\"\").concat(dir.value\n                ? \",value:(\".concat(dir.value, \"),expression:\").concat(JSON.stringify(dir.value))\n                : '').concat(dir.arg ? \",arg:\".concat(dir.isDynamicArg ? dir.arg : \"\\\"\".concat(dir.arg, \"\\\"\")) : '').concat(dir.modifiers ? \",modifiers:\".concat(JSON.stringify(dir.modifiers)) : '', \"},\");\n        }\n    }\n    if (hasRuntime) {\n        return res.slice(0, -1) + ']';\n    }\n}\nfunction genInlineTemplate(el, state) {\n    var ast = el.children[0];\n    if (process.env.NODE_ENV !== 'production' && (el.children.length !== 1 || ast.type !== 1)) {\n        state.warn('Inline-template components must have exactly one child element.', { start: el.start });\n    }\n    if (ast && ast.type === 1) {\n        var inlineRenderFns = generate(ast, state.options);\n        return \"inlineTemplate:{render:function(){\".concat(inlineRenderFns.render, \"},staticRenderFns:[\").concat(inlineRenderFns.staticRenderFns\n            .map(function (code) { return \"function(){\".concat(code, \"}\"); })\n            .join(','), \"]}\");\n    }\n}\nfunction genScopedSlots(el, slots, state) {\n    // by default scoped slots are considered \"stable\", this allows child\n    // components with only scoped slots to skip forced updates from parent.\n    // but in some cases we have to bail-out of this optimization\n    // for example if the slot contains dynamic names, has v-if or v-for on them...\n    var needsForceUpdate = el.for ||\n        Object.keys(slots).some(function (key) {\n            var slot = slots[key];\n            return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic\n            );\n        });\n    // #9534: if a component with scoped slots is inside a conditional branch,\n    // it's possible for the same component to be reused but with different\n    // compiled slot content. To avoid that, we generate a unique key based on\n    // the generated code of all the slot contents.\n    var needsKey = !!el.if;\n    // OR when it is inside another scoped slot or v-for (the reactivity may be\n    // disconnected due to the intermediate scope variable)\n    // #9438, #9506\n    // TODO: this can be further optimized by properly analyzing in-scope bindings\n    // and skip force updating ones that do not actually use scope variables.\n    if (!needsForceUpdate) {\n        var parent_2 = el.parent;\n        while (parent_2) {\n            if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||\n                parent_2.for) {\n                needsForceUpdate = true;\n                break;\n            }\n            if (parent_2.if) {\n                needsKey = true;\n            }\n            parent_2 = parent_2.parent;\n        }\n    }\n    var generatedSlots = Object.keys(slots)\n        .map(function (key) { return genScopedSlot(slots[key], state); })\n        .join(',');\n    return \"scopedSlots:_u([\".concat(generatedSlots, \"]\").concat(needsForceUpdate ? \",null,true\" : \"\").concat(!needsForceUpdate && needsKey ? \",null,false,\".concat(hash(generatedSlots)) : \"\", \")\");\n}\nfunction hash(str) {\n    var hash = 5381;\n    var i = str.length;\n    while (i) {\n        hash = (hash * 33) ^ str.charCodeAt(--i);\n    }\n    return hash >>> 0;\n}\nfunction containsSlotChild(el) {\n    if (el.type === 1) {\n        if (el.tag === 'slot') {\n            return true;\n        }\n        return el.children.some(containsSlotChild);\n    }\n    return false;\n}\nfunction genScopedSlot(el, state) {\n    var isLegacySyntax = el.attrsMap['slot-scope'];\n    if (el.if && !el.ifProcessed && !isLegacySyntax) {\n        return genIf(el, state, genScopedSlot, \"null\");\n    }\n    if (el.for && !el.forProcessed) {\n        return genFor(el, state, genScopedSlot);\n    }\n    var slotScope = el.slotScope === emptySlotScopeToken ? \"\" : String(el.slotScope);\n    var fn = \"function(\".concat(slotScope, \"){\") +\n        \"return \".concat(el.tag === 'template'\n            ? el.if && isLegacySyntax\n                ? \"(\".concat(el.if, \")?\").concat(genChildren(el, state) || 'undefined', \":undefined\")\n                : genChildren(el, state) || 'undefined'\n            : genElement(el, state), \"}\");\n    // reverse proxy v-slot without scope on this.$slots\n    var reverseProxy = slotScope ? \"\" : \",proxy:true\";\n    return \"{key:\".concat(el.slotTarget || \"\\\"default\\\"\", \",fn:\").concat(fn).concat(reverseProxy, \"}\");\n}\nfunction genChildren(el, state, checkSkip, altGenElement, altGenNode) {\n    var children = el.children;\n    if (children.length) {\n        var el_1 = children[0];\n        // optimize single v-for\n        if (children.length === 1 &&\n            el_1.for &&\n            el_1.tag !== 'template' &&\n            el_1.tag !== 'slot') {\n            var normalizationType_1 = checkSkip\n                ? state.maybeComponent(el_1)\n                    ? \",1\"\n                    : \",0\"\n                : \"\";\n            return \"\".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);\n        }\n        var normalizationType = checkSkip\n            ? getNormalizationType(children, state.maybeComponent)\n            : 0;\n        var gen_1 = altGenNode || genNode;\n        return \"[\".concat(children.map(function (c) { return gen_1(c, state); }).join(','), \"]\").concat(normalizationType ? \",\".concat(normalizationType) : '');\n    }\n}\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType(children, maybeComponent) {\n    var res = 0;\n    for (var i = 0; i < children.length; i++) {\n        var el = children[i];\n        if (el.type !== 1) {\n            continue;\n        }\n        if (needsNormalization(el) ||\n            (el.ifConditions &&\n                el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n            res = 2;\n            break;\n        }\n        if (maybeComponent(el) ||\n            (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n            res = 1;\n        }\n    }\n    return res;\n}\nfunction needsNormalization(el) {\n    return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';\n}\nfunction genNode(node, state) {\n    if (node.type === 1) {\n        return genElement(node, state);\n    }\n    else if (node.type === 3 && node.isComment) {\n        return genComment(node);\n    }\n    else {\n        return genText(node);\n    }\n}\nfunction genText(text) {\n    return \"_v(\".concat(text.type === 2\n        ? text.expression // no need for () because already wrapped in _s()\n        : transformSpecialNewlines(JSON.stringify(text.text)), \")\");\n}\nfunction genComment(comment) {\n    return \"_e(\".concat(JSON.stringify(comment.text), \")\");\n}\nfunction genSlot(el, state) {\n    var slotName = el.slotName || '\"default\"';\n    var children = genChildren(el, state);\n    var res = \"_t(\".concat(slotName).concat(children ? \",function(){return \".concat(children, \"}\") : '');\n    var attrs = el.attrs || el.dynamicAttrs\n        ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({\n            // slot props are camelized\n            name: camelize(attr.name),\n            value: attr.value,\n            dynamic: attr.dynamic\n        }); }))\n        : null;\n    var bind = el.attrsMap['v-bind'];\n    if ((attrs || bind) && !children) {\n        res += \",null\";\n    }\n    if (attrs) {\n        res += \",\".concat(attrs);\n    }\n    if (bind) {\n        res += \"\".concat(attrs ? '' : ',null', \",\").concat(bind);\n    }\n    return res + ')';\n}\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent(componentName, el, state) {\n    var children = el.inlineTemplate ? null : genChildren(el, state, true);\n    return \"_c(\".concat(componentName, \",\").concat(genData(el, state)).concat(children ? \",\".concat(children) : '', \")\");\n}\nfunction genProps(props) {\n    var staticProps = \"\";\n    var dynamicProps = \"\";\n    for (var i = 0; i < props.length; i++) {\n        var prop = props[i];\n        var value = transformSpecialNewlines(prop.value);\n        if (prop.dynamic) {\n            dynamicProps += \"\".concat(prop.name, \",\").concat(value, \",\");\n        }\n        else {\n            staticProps += \"\\\"\".concat(prop.name, \"\\\":\").concat(value, \",\");\n        }\n    }\n    staticProps = \"{\".concat(staticProps.slice(0, -1), \"}\");\n    if (dynamicProps) {\n        return \"_d(\".concat(staticProps, \",[\").concat(dynamicProps.slice(0, -1), \"])\");\n    }\n    else {\n        return staticProps;\n    }\n}\n// #3895, #4268\nfunction transformSpecialNewlines(text) {\n    return text.replace(/\\u2028/g, '\\\\u2028').replace(/\\u2029/g, '\\\\u2029');\n}\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' +\n    ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n        'super,throw,while,yield,delete,export,import,return,switch,default,' +\n        'extends,finally,continue,debugger,function,arguments')\n        .split(',')\n        .join('\\\\b|\\\\b') +\n    '\\\\b');\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' +\n    'delete,typeof,void'.split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') +\n    '\\\\s*\\\\([^\\\\)]*\\\\)');\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n// detect problematic expressions in a template\nfunction detectErrors(ast, warn) {\n    if (ast) {\n        checkNode(ast, warn);\n    }\n}\nfunction checkNode(node, warn) {\n    if (node.type === 1) {\n        for (var name_1 in node.attrsMap) {\n            if (dirRE.test(name_1)) {\n                var value = node.attrsMap[name_1];\n                if (value) {\n                    var range = node.rawAttrsMap[name_1];\n                    if (name_1 === 'v-for') {\n                        checkFor(node, \"v-for=\\\"\".concat(value, \"\\\"\"), warn, range);\n                    }\n                    else if (name_1 === 'v-slot' || name_1[0] === '#') {\n                        checkFunctionParameterExpression(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                    }\n                    else if (onRE.test(name_1)) {\n                        checkEvent(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                    }\n                    else {\n                        checkExpression(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                    }\n                }\n            }\n        }\n        if (node.children) {\n            for (var i = 0; i < node.children.length; i++) {\n                checkNode(node.children[i], warn);\n            }\n        }\n    }\n    else if (node.type === 2) {\n        checkExpression(node.expression, node.text, warn, node);\n    }\n}\nfunction checkEvent(exp, text, warn, range) {\n    var stripped = exp.replace(stripStringRE, '');\n    var keywordMatch = stripped.match(unaryOperatorsRE);\n    if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {\n        warn(\"avoid using JavaScript unary operator as property name: \" +\n            \"\\\"\".concat(keywordMatch[0], \"\\\" in expression \").concat(text.trim()), range);\n    }\n    checkExpression(exp, text, warn, range);\n}\nfunction checkFor(node, text, warn, range) {\n    checkExpression(node.for || '', text, warn, range);\n    checkIdentifier(node.alias, 'v-for alias', text, warn, range);\n    checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);\n    checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);\n}\nfunction checkIdentifier(ident, type, text, warn, range) {\n    if (typeof ident === 'string') {\n        try {\n            new Function(\"var \".concat(ident, \"=_\"));\n        }\n        catch (e) {\n            warn(\"invalid \".concat(type, \" \\\"\").concat(ident, \"\\\" in expression: \").concat(text.trim()), range);\n        }\n    }\n}\nfunction checkExpression(exp, text, warn, range) {\n    try {\n        new Function(\"return \".concat(exp));\n    }\n    catch (e) {\n        var keywordMatch = exp\n            .replace(stripStringRE, '')\n            .match(prohibitedKeywordRE);\n        if (keywordMatch) {\n            warn(\"avoid using JavaScript keyword as property name: \" +\n                \"\\\"\".concat(keywordMatch[0], \"\\\"\\n  Raw expression: \").concat(text.trim()), range);\n        }\n        else {\n            warn(\"invalid expression: \".concat(e.message, \" in\\n\\n\") +\n                \"    \".concat(exp, \"\\n\\n\") +\n                \"  Raw expression: \".concat(text.trim(), \"\\n\"), range);\n        }\n    }\n}\nfunction checkFunctionParameterExpression(exp, text, warn, range) {\n    try {\n        new Function(exp, '');\n    }\n    catch (e) {\n        warn(\"invalid function parameter expression: \".concat(e.message, \" in\\n\\n\") +\n            \"    \".concat(exp, \"\\n\\n\") +\n            \"  Raw expression: \".concat(text.trim(), \"\\n\"), range);\n    }\n}\n\nvar range = 2;\nfunction generateCodeFrame(source, start, end) {\n    if (start === void 0) { start = 0; }\n    if (end === void 0) { end = source.length; }\n    var lines = source.split(/\\r?\\n/);\n    var count = 0;\n    var res = [];\n    for (var i = 0; i < lines.length; i++) {\n        count += lines[i].length + 1;\n        if (count >= start) {\n            for (var j = i - range; j <= i + range || end > count; j++) {\n                if (j < 0 || j >= lines.length)\n                    continue;\n                res.push(\"\".concat(j + 1).concat(repeat(\" \", 3 - String(j + 1).length), \"|  \").concat(lines[j]));\n                var lineLength = lines[j].length;\n                if (j === i) {\n                    // push underline\n                    var pad = start - (count - lineLength) + 1;\n                    var length_1 = end > count ? lineLength - pad : end - start;\n                    res.push(\"   |  \" + repeat(\" \", pad) + repeat(\"^\", length_1));\n                }\n                else if (j > i) {\n                    if (end > count) {\n                        var length_2 = Math.min(end - count, lineLength);\n                        res.push(\"   |  \" + repeat(\"^\", length_2));\n                    }\n                    count += lineLength + 1;\n                }\n            }\n            break;\n        }\n    }\n    return res.join('\\n');\n}\nfunction repeat(str, n) {\n    var result = '';\n    if (n > 0) {\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            // eslint-disable-line\n            if (n & 1)\n                result += str;\n            n >>>= 1;\n            if (n <= 0)\n                break;\n            str += str;\n        }\n    }\n    return result;\n}\n\nfunction createFunction(code, errors) {\n    try {\n        return new Function(code);\n    }\n    catch (err) {\n        errors.push({ err: err, code: code });\n        return noop;\n    }\n}\nfunction createCompileToFunctionFn(compile) {\n    var cache = Object.create(null);\n    return function compileToFunctions(template, options, vm) {\n        options = extend({}, options);\n        var warn = options.warn || warn$2;\n        delete options.warn;\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n            // detect possible CSP restriction\n            try {\n                new Function('return 1');\n            }\n            catch (e) {\n                if (e.toString().match(/unsafe-eval|CSP/)) {\n                    warn('It seems you are using the standalone build of Vue.js in an ' +\n                        'environment with Content Security Policy that prohibits unsafe-eval. ' +\n                        'The template compiler cannot work in this environment. Consider ' +\n                        'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n                        'templates into render functions.');\n                }\n            }\n        }\n        // check cache\n        var key = options.delimiters\n            ? String(options.delimiters) + template\n            : template;\n        if (cache[key]) {\n            return cache[key];\n        }\n        // compile\n        var compiled = compile(template, options);\n        // check compilation errors/tips\n        if (process.env.NODE_ENV !== 'production') {\n            if (compiled.errors && compiled.errors.length) {\n                if (options.outputSourceRange) {\n                    compiled.errors.forEach(function (e) {\n                        warn(\"Error compiling template:\\n\\n\".concat(e.msg, \"\\n\\n\") +\n                            generateCodeFrame(template, e.start, e.end), vm);\n                    });\n                }\n                else {\n                    warn(\"Error compiling template:\\n\\n\".concat(template, \"\\n\\n\") +\n                        compiled.errors.map(function (e) { return \"- \".concat(e); }).join('\\n') +\n                        '\\n', vm);\n                }\n            }\n            if (compiled.tips && compiled.tips.length) {\n                if (options.outputSourceRange) {\n                    compiled.tips.forEach(function (e) { return tip(e.msg, vm); });\n                }\n                else {\n                    compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n                }\n            }\n        }\n        // turn code into functions\n        var res = {};\n        var fnGenErrors = [];\n        res.render = createFunction(compiled.render, fnGenErrors);\n        res.staticRenderFns = compiled.staticRenderFns.map(function (code) {\n            return createFunction(code, fnGenErrors);\n        });\n        // check function generation errors.\n        // this should only happen if there is a bug in the compiler itself.\n        // mostly for codegen development use\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production') {\n            if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n                warn(\"Failed to generate render function:\\n\\n\" +\n                    fnGenErrors\n                        .map(function (_a) {\n                        var err = _a.err, code = _a.code;\n                        return \"\".concat(err.toString(), \" in\\n\\n\").concat(code, \"\\n\");\n                    })\n                        .join('\\n'), vm);\n            }\n        }\n        return (cache[key] = res);\n    };\n}\n\nfunction createCompilerCreator(baseCompile) {\n    return function createCompiler(baseOptions) {\n        function compile(template, options) {\n            var finalOptions = Object.create(baseOptions);\n            var errors = [];\n            var tips = [];\n            var warn = function (msg, range, tip) {\n                (tip ? tips : errors).push(msg);\n            };\n            if (options) {\n                if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) {\n                    // $flow-disable-line\n                    var leadingSpaceLength_1 = template.match(/^\\s*/)[0].length;\n                    warn = function (msg, range, tip) {\n                        var data = typeof msg === 'string' ? { msg: msg } : msg;\n                        if (range) {\n                            if (range.start != null) {\n                                data.start = range.start + leadingSpaceLength_1;\n                            }\n                            if (range.end != null) {\n                                data.end = range.end + leadingSpaceLength_1;\n                            }\n                        }\n                        (tip ? tips : errors).push(data);\n                    };\n                }\n                // merge custom modules\n                if (options.modules) {\n                    finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n                }\n                // merge custom directives\n                if (options.directives) {\n                    finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);\n                }\n                // copy other options\n                for (var key in options) {\n                    if (key !== 'modules' && key !== 'directives') {\n                        finalOptions[key] = options[key];\n                    }\n                }\n            }\n            finalOptions.warn = warn;\n            var compiled = baseCompile(template.trim(), finalOptions);\n            if (process.env.NODE_ENV !== 'production') {\n                detectErrors(compiled.ast, warn);\n            }\n            compiled.errors = errors;\n            compiled.tips = tips;\n            return compiled;\n        }\n        return {\n            compile: compile,\n            compileToFunctions: createCompileToFunctionFn(compile)\n        };\n    };\n}\n\n// `createCompilerCreator` allows creating compilers that use alternative\n// parser/optimizer/codegen, e.g the SSR optimizing compiler.\n// Here we just export a default compiler using the default parts.\nvar createCompiler = createCompilerCreator(function baseCompile(template, options) {\n    var ast = parse(template.trim(), options);\n    if (options.optimize !== false) {\n        optimize(ast, options);\n    }\n    var code = generate(ast, options);\n    return {\n        ast: ast,\n        render: code.render,\n        staticRenderFns: code.staticRenderFns\n    };\n});\n\nvar _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;\n\n// check whether current browser encodes a char inside attribute values\nvar div;\nfunction getShouldDecode(href) {\n    div = div || document.createElement('div');\n    div.innerHTML = href ? \"<a href=\\\"\\n\\\"/>\" : \"<div a=\\\"\\n\\\"/>\";\n    return div.innerHTML.indexOf('&#10;') > 0;\n}\n// #3663: IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n// #6828: chrome encodes content in a[href]\nvar shouldDecodeNewlinesForHref = inBrowser\n    ? getShouldDecode(true)\n    : false;\n\nvar idToTemplate = cached(function (id) {\n    var el = query(id);\n    return el && el.innerHTML;\n});\nvar mount = Vue.prototype.$mount;\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && query(el);\n    /* istanbul ignore if */\n    if (el === document.body || el === document.documentElement) {\n        process.env.NODE_ENV !== 'production' &&\n            warn$2(\"Do not mount Vue to <html> or <body> - mount to normal elements instead.\");\n        return this;\n    }\n    var options = this.$options;\n    // resolve template/el and convert to render function\n    if (!options.render) {\n        var template = options.template;\n        if (template) {\n            if (typeof template === 'string') {\n                if (template.charAt(0) === '#') {\n                    template = idToTemplate(template);\n                    /* istanbul ignore if */\n                    if (process.env.NODE_ENV !== 'production' && !template) {\n                        warn$2(\"Template element not found or is empty: \".concat(options.template), this);\n                    }\n                }\n            }\n            else if (template.nodeType) {\n                template = template.innerHTML;\n            }\n            else {\n                if (process.env.NODE_ENV !== 'production') {\n                    warn$2('invalid template option:' + template, this);\n                }\n                return this;\n            }\n        }\n        else if (el) {\n            // @ts-expect-error\n            template = getOuterHTML(el);\n        }\n        if (template) {\n            /* istanbul ignore if */\n            if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n                mark('compile');\n            }\n            var _a = compileToFunctions(template, {\n                outputSourceRange: process.env.NODE_ENV !== 'production',\n                shouldDecodeNewlines: shouldDecodeNewlines,\n                shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,\n                delimiters: options.delimiters,\n                comments: options.comments\n            }, this), render = _a.render, staticRenderFns = _a.staticRenderFns;\n            options.render = render;\n            options.staticRenderFns = staticRenderFns;\n            /* istanbul ignore if */\n            if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n                mark('compile end');\n                measure(\"vue \".concat(this._name, \" compile\"), 'compile', 'compile end');\n            }\n        }\n    }\n    return mount.call(this, el, hydrating);\n};\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML(el) {\n    if (el.outerHTML) {\n        return el.outerHTML;\n    }\n    else {\n        var container = document.createElement('div');\n        container.appendChild(el.cloneNode(true));\n        return container.innerHTML;\n    }\n}\nVue.compile = compileToFunctions;\n\nexport { EffectScope, computed, customRef, Vue as default, defineAsyncComponent, defineComponent, del, effectScope, getCurrentInstance, getCurrentScope, h, inject, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, mergeDefaults, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref$1 as ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useListeners, useSlots, version, watch, watchEffect, watchPostEffect, watchSyncEffect };\n"
  },
  {
    "path": "web/assets/vue/vue.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vue = factory());\n})(this, (function () { 'use strict';\n\n  var emptyObject = Object.freeze({});\n  var isArray = Array.isArray;\n  // These helpers produce better VM code in JS engines due to their\n  // explicitness and function inlining.\n  function isUndef(v) {\n      return v === undefined || v === null;\n  }\n  function isDef(v) {\n      return v !== undefined && v !== null;\n  }\n  function isTrue(v) {\n      return v === true;\n  }\n  function isFalse(v) {\n      return v === false;\n  }\n  /**\n   * Check if value is primitive.\n   */\n  function isPrimitive(value) {\n      return (typeof value === 'string' ||\n          typeof value === 'number' ||\n          // $flow-disable-line\n          typeof value === 'symbol' ||\n          typeof value === 'boolean');\n  }\n  function isFunction(value) {\n      return typeof value === 'function';\n  }\n  /**\n   * Quick object check - this is primarily used to tell\n   * objects from primitive values when we know the value\n   * is a JSON-compliant type.\n   */\n  function isObject(obj) {\n      return obj !== null && typeof obj === 'object';\n  }\n  /**\n   * Get the raw type string of a value, e.g., [object Object].\n   */\n  var _toString = Object.prototype.toString;\n  function toRawType(value) {\n      return _toString.call(value).slice(8, -1);\n  }\n  /**\n   * Strict object type check. Only returns true\n   * for plain JavaScript objects.\n   */\n  function isPlainObject(obj) {\n      return _toString.call(obj) === '[object Object]';\n  }\n  function isRegExp(v) {\n      return _toString.call(v) === '[object RegExp]';\n  }\n  /**\n   * Check if val is a valid array index.\n   */\n  function isValidArrayIndex(val) {\n      var n = parseFloat(String(val));\n      return n >= 0 && Math.floor(n) === n && isFinite(val);\n  }\n  function isPromise(val) {\n      return (isDef(val) &&\n          typeof val.then === 'function' &&\n          typeof val.catch === 'function');\n  }\n  /**\n   * Convert a value to a string that is actually rendered.\n   */\n  function toString(val) {\n      return val == null\n          ? ''\n          : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n              ? JSON.stringify(val, replacer, 2)\n              : String(val);\n  }\n  function replacer(_key, val) {\n      // avoid circular deps from v3\n      if (val && val.__v_isRef) {\n          return val.value;\n      }\n      return val;\n  }\n  /**\n   * Convert an input value to a number for persistence.\n   * If the conversion fails, return original string.\n   */\n  function toNumber(val) {\n      var n = parseFloat(val);\n      return isNaN(n) ? val : n;\n  }\n  /**\n   * Make a map and return a function for checking if a key\n   * is in that map.\n   */\n  function makeMap(str, expectsLowerCase) {\n      var map = Object.create(null);\n      var list = str.split(',');\n      for (var i = 0; i < list.length; i++) {\n          map[list[i]] = true;\n      }\n      return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };\n  }\n  /**\n   * Check if a tag is a built-in tag.\n   */\n  var isBuiltInTag = makeMap('slot,component', true);\n  /**\n   * Check if an attribute is a reserved attribute.\n   */\n  var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n  /**\n   * Remove an item from an array.\n   */\n  function remove$2(arr, item) {\n      var len = arr.length;\n      if (len) {\n          // fast path for the only / last item\n          if (item === arr[len - 1]) {\n              arr.length = len - 1;\n              return;\n          }\n          var index = arr.indexOf(item);\n          if (index > -1) {\n              return arr.splice(index, 1);\n          }\n      }\n  }\n  /**\n   * Check whether an object has the property.\n   */\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  function hasOwn(obj, key) {\n      return hasOwnProperty.call(obj, key);\n  }\n  /**\n   * Create a cached version of a pure function.\n   */\n  function cached(fn) {\n      var cache = Object.create(null);\n      return function cachedFn(str) {\n          var hit = cache[str];\n          return hit || (cache[str] = fn(str));\n      };\n  }\n  /**\n   * Camelize a hyphen-delimited string.\n   */\n  var camelizeRE = /-(\\w)/g;\n  var camelize = cached(function (str) {\n      return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n  });\n  /**\n   * Capitalize a string.\n   */\n  var capitalize = cached(function (str) {\n      return str.charAt(0).toUpperCase() + str.slice(1);\n  });\n  /**\n   * Hyphenate a camelCase string.\n   */\n  var hyphenateRE = /\\B([A-Z])/g;\n  var hyphenate = cached(function (str) {\n      return str.replace(hyphenateRE, '-$1').toLowerCase();\n  });\n  /**\n   * Simple bind polyfill for environments that do not support it,\n   * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n   * since native bind is now performant enough in most browsers.\n   * But removing it would mean breaking code that was able to run in\n   * PhantomJS 1.x, so this must be kept for backward compatibility.\n   */\n  /* istanbul ignore next */\n  function polyfillBind(fn, ctx) {\n      function boundFn(a) {\n          var l = arguments.length;\n          return l\n              ? l > 1\n                  ? fn.apply(ctx, arguments)\n                  : fn.call(ctx, a)\n              : fn.call(ctx);\n      }\n      boundFn._length = fn.length;\n      return boundFn;\n  }\n  function nativeBind(fn, ctx) {\n      return fn.bind(ctx);\n  }\n  // @ts-expect-error bind cannot be `undefined`\n  var bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;\n  /**\n   * Convert an Array-like object to a real Array.\n   */\n  function toArray(list, start) {\n      start = start || 0;\n      var i = list.length - start;\n      var ret = new Array(i);\n      while (i--) {\n          ret[i] = list[i + start];\n      }\n      return ret;\n  }\n  /**\n   * Mix properties into target object.\n   */\n  function extend(to, _from) {\n      for (var key in _from) {\n          to[key] = _from[key];\n      }\n      return to;\n  }\n  /**\n   * Merge an Array of Objects into a single Object.\n   */\n  function toObject(arr) {\n      var res = {};\n      for (var i = 0; i < arr.length; i++) {\n          if (arr[i]) {\n              extend(res, arr[i]);\n          }\n      }\n      return res;\n  }\n  /* eslint-disable no-unused-vars */\n  /**\n   * Perform no operation.\n   * Stubbing args to make Flow happy without leaving useless transpiled code\n   * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n   */\n  function noop(a, b, c) { }\n  /**\n   * Always return false.\n   */\n  var no = function (a, b, c) { return false; };\n  /* eslint-enable no-unused-vars */\n  /**\n   * Return the same value.\n   */\n  var identity = function (_) { return _; };\n  /**\n   * Generate a string containing static keys from compiler modules.\n   */\n  function genStaticKeys$1(modules) {\n      return modules\n          .reduce(function (keys, m) { return keys.concat(m.staticKeys || []); }, [])\n          .join(',');\n  }\n  /**\n   * Check if two values are loosely equal - that is,\n   * if they are plain objects, do they have the same shape?\n   */\n  function looseEqual(a, b) {\n      if (a === b)\n          return true;\n      var isObjectA = isObject(a);\n      var isObjectB = isObject(b);\n      if (isObjectA && isObjectB) {\n          try {\n              var isArrayA = Array.isArray(a);\n              var isArrayB = Array.isArray(b);\n              if (isArrayA && isArrayB) {\n                  return (a.length === b.length &&\n                      a.every(function (e, i) {\n                          return looseEqual(e, b[i]);\n                      }));\n              }\n              else if (a instanceof Date && b instanceof Date) {\n                  return a.getTime() === b.getTime();\n              }\n              else if (!isArrayA && !isArrayB) {\n                  var keysA = Object.keys(a);\n                  var keysB = Object.keys(b);\n                  return (keysA.length === keysB.length &&\n                      keysA.every(function (key) {\n                          return looseEqual(a[key], b[key]);\n                      }));\n              }\n              else {\n                  /* istanbul ignore next */\n                  return false;\n              }\n          }\n          catch (e) {\n              /* istanbul ignore next */\n              return false;\n          }\n      }\n      else if (!isObjectA && !isObjectB) {\n          return String(a) === String(b);\n      }\n      else {\n          return false;\n      }\n  }\n  /**\n   * Return the first index at which a loosely equal value can be\n   * found in the array (if value is a plain object, the array must\n   * contain an object of the same shape), or -1 if it is not present.\n   */\n  function looseIndexOf(arr, val) {\n      for (var i = 0; i < arr.length; i++) {\n          if (looseEqual(arr[i], val))\n              return i;\n      }\n      return -1;\n  }\n  /**\n   * Ensure a function is called only once.\n   */\n  function once(fn) {\n      var called = false;\n      return function () {\n          if (!called) {\n              called = true;\n              fn.apply(this, arguments);\n          }\n      };\n  }\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\n  function hasChanged(x, y) {\n      if (x === y) {\n          return x === 0 && 1 / x !== 1 / y;\n      }\n      else {\n          return x === x || y === y;\n      }\n  }\n\n  var SSR_ATTR = 'data-server-rendered';\n  var ASSET_TYPES = ['component', 'directive', 'filter'];\n  var LIFECYCLE_HOOKS = [\n      'beforeCreate',\n      'created',\n      'beforeMount',\n      'mounted',\n      'beforeUpdate',\n      'updated',\n      'beforeDestroy',\n      'destroyed',\n      'activated',\n      'deactivated',\n      'errorCaptured',\n      'serverPrefetch',\n      'renderTracked',\n      'renderTriggered'\n  ];\n\n  var config = {\n      /**\n       * Option merge strategies (used in core/util/options)\n       */\n      // $flow-disable-line\n      optionMergeStrategies: Object.create(null),\n      /**\n       * Whether to suppress warnings.\n       */\n      silent: false,\n      /**\n       * Show production mode tip message on boot?\n       */\n      productionTip: true,\n      /**\n       * Whether to enable devtools\n       */\n      devtools: true,\n      /**\n       * Whether to record perf\n       */\n      performance: false,\n      /**\n       * Error handler for watcher errors\n       */\n      errorHandler: null,\n      /**\n       * Warn handler for watcher warns\n       */\n      warnHandler: null,\n      /**\n       * Ignore certain custom elements\n       */\n      ignoredElements: [],\n      /**\n       * Custom user key aliases for v-on\n       */\n      // $flow-disable-line\n      keyCodes: Object.create(null),\n      /**\n       * Check if a tag is reserved so that it cannot be registered as a\n       * component. This is platform-dependent and may be overwritten.\n       */\n      isReservedTag: no,\n      /**\n       * Check if an attribute is reserved so that it cannot be used as a component\n       * prop. This is platform-dependent and may be overwritten.\n       */\n      isReservedAttr: no,\n      /**\n       * Check if a tag is an unknown element.\n       * Platform-dependent.\n       */\n      isUnknownElement: no,\n      /**\n       * Get the namespace of an element\n       */\n      getTagNamespace: noop,\n      /**\n       * Parse the real tag name for the specific platform.\n       */\n      parsePlatformTagName: identity,\n      /**\n       * Check if an attribute must be bound using property, e.g. value\n       * Platform-dependent.\n       */\n      mustUseProp: no,\n      /**\n       * Perform updates asynchronously. Intended to be used by Vue Test Utils\n       * This will significantly reduce performance if set to false.\n       */\n      async: true,\n      /**\n       * Exposed for legacy reasons\n       */\n      _lifecycleHooks: LIFECYCLE_HOOKS\n  };\n\n  /**\n   * unicode letters used for parsing html tags, component names and property paths.\n   * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n   * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n   */\n  var unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n  /**\n   * Check if a string starts with $ or _\n   */\n  function isReserved(str) {\n      var c = (str + '').charCodeAt(0);\n      return c === 0x24 || c === 0x5f;\n  }\n  /**\n   * Define a property.\n   */\n  function def(obj, key, val, enumerable) {\n      Object.defineProperty(obj, key, {\n          value: val,\n          enumerable: !!enumerable,\n          writable: true,\n          configurable: true\n      });\n  }\n  /**\n   * Parse simple path.\n   */\n  var bailRE = new RegExp(\"[^\".concat(unicodeRegExp.source, \".$_\\\\d]\"));\n  function parsePath(path) {\n      if (bailRE.test(path)) {\n          return;\n      }\n      var segments = path.split('.');\n      return function (obj) {\n          for (var i = 0; i < segments.length; i++) {\n              if (!obj)\n                  return;\n              obj = obj[segments[i]];\n          }\n          return obj;\n      };\n  }\n\n  // can we use __proto__?\n  var hasProto = '__proto__' in {};\n  // Browser environment sniffing\n  var inBrowser = typeof window !== 'undefined';\n  var UA = inBrowser && window.navigator.userAgent.toLowerCase();\n  var isIE = UA && /msie|trident/.test(UA);\n  var isIE9 = UA && UA.indexOf('msie 9.0') > 0;\n  var isEdge = UA && UA.indexOf('edge/') > 0;\n  UA && UA.indexOf('android') > 0;\n  var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\n  UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n  UA && /phantomjs/.test(UA);\n  var isFF = UA && UA.match(/firefox\\/(\\d+)/);\n  // Firefox has a \"watch\" function on Object.prototype...\n  // @ts-expect-error firebox support\n  var nativeWatch = {}.watch;\n  var supportsPassive = false;\n  if (inBrowser) {\n      try {\n          var opts = {};\n          Object.defineProperty(opts, 'passive', {\n              get: function () {\n                  /* istanbul ignore next */\n                  supportsPassive = true;\n              }\n          }); // https://github.com/facebook/flow/issues/285\n          window.addEventListener('test-passive', null, opts);\n      }\n      catch (e) { }\n  }\n  // this needs to be lazy-evaled because vue may be required before\n  // vue-server-renderer can set VUE_ENV\n  var _isServer;\n  var isServerRendering = function () {\n      if (_isServer === undefined) {\n          /* istanbul ignore if */\n          if (!inBrowser && typeof global !== 'undefined') {\n              // detect presence of vue-server-renderer and avoid\n              // Webpack shimming the process\n              _isServer =\n                  global['process'] && global['process'].env.VUE_ENV === 'server';\n          }\n          else {\n              _isServer = false;\n          }\n      }\n      return _isServer;\n  };\n  // detect devtools\n  var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n  /* istanbul ignore next */\n  function isNative(Ctor) {\n      return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n  }\n  var hasSymbol = typeof Symbol !== 'undefined' &&\n      isNative(Symbol) &&\n      typeof Reflect !== 'undefined' &&\n      isNative(Reflect.ownKeys);\n  var _Set; // $flow-disable-line\n  /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n      // use native Set when available.\n      _Set = Set;\n  }\n  else {\n      // a non-standard Set polyfill that only works with primitive keys.\n      _Set = /** @class */ (function () {\n          function Set() {\n              this.set = Object.create(null);\n          }\n          Set.prototype.has = function (key) {\n              return this.set[key] === true;\n          };\n          Set.prototype.add = function (key) {\n              this.set[key] = true;\n          };\n          Set.prototype.clear = function () {\n              this.set = Object.create(null);\n          };\n          return Set;\n      }());\n  }\n\n  var currentInstance = null;\n  /**\n   * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n   * relies on it). Do not use this internally, just use `currentInstance`.\n   *\n   * @internal this function needs manual type declaration because it relies\n   * on previously manually authored types from Vue 2\n   */\n  function getCurrentInstance() {\n      return currentInstance && { proxy: currentInstance };\n  }\n  /**\n   * @internal\n   */\n  function setCurrentInstance(vm) {\n      if (vm === void 0) { vm = null; }\n      if (!vm)\n          currentInstance && currentInstance._scope.off();\n      currentInstance = vm;\n      vm && vm._scope.on();\n  }\n\n  /**\n   * @internal\n   */\n  var VNode = /** @class */ (function () {\n      function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n          this.tag = tag;\n          this.data = data;\n          this.children = children;\n          this.text = text;\n          this.elm = elm;\n          this.ns = undefined;\n          this.context = context;\n          this.fnContext = undefined;\n          this.fnOptions = undefined;\n          this.fnScopeId = undefined;\n          this.key = data && data.key;\n          this.componentOptions = componentOptions;\n          this.componentInstance = undefined;\n          this.parent = undefined;\n          this.raw = false;\n          this.isStatic = false;\n          this.isRootInsert = true;\n          this.isComment = false;\n          this.isCloned = false;\n          this.isOnce = false;\n          this.asyncFactory = asyncFactory;\n          this.asyncMeta = undefined;\n          this.isAsyncPlaceholder = false;\n      }\n      Object.defineProperty(VNode.prototype, \"child\", {\n          // DEPRECATED: alias for componentInstance for backwards compat.\n          /* istanbul ignore next */\n          get: function () {\n              return this.componentInstance;\n          },\n          enumerable: false,\n          configurable: true\n      });\n      return VNode;\n  }());\n  var createEmptyVNode = function (text) {\n      if (text === void 0) { text = ''; }\n      var node = new VNode();\n      node.text = text;\n      node.isComment = true;\n      return node;\n  };\n  function createTextVNode(val) {\n      return new VNode(undefined, undefined, undefined, String(val));\n  }\n  // optimized shallow clone\n  // used for static nodes and slot nodes because they may be reused across\n  // multiple renders, cloning them avoids errors when DOM manipulations rely\n  // on their elm reference.\n  function cloneVNode(vnode) {\n      var cloned = new VNode(vnode.tag, vnode.data, \n      // #7975\n      // clone children array to avoid mutating original in case of cloning\n      // a child.\n      vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n      cloned.ns = vnode.ns;\n      cloned.isStatic = vnode.isStatic;\n      cloned.key = vnode.key;\n      cloned.isComment = vnode.isComment;\n      cloned.fnContext = vnode.fnContext;\n      cloned.fnOptions = vnode.fnOptions;\n      cloned.fnScopeId = vnode.fnScopeId;\n      cloned.asyncMeta = vnode.asyncMeta;\n      cloned.isCloned = true;\n      return cloned;\n  }\n\n  /* not type checking this file because flow doesn't play well with Proxy */\n  var initProxy;\n  {\n      var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n          'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n          'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n          'require' // for Webpack/Browserify\n      );\n      var warnNonPresent_1 = function (target, key) {\n          warn$2(\"Property or method \\\"\".concat(key, \"\\\" is not defined on the instance but \") +\n              'referenced during render. Make sure that this property is reactive, ' +\n              'either in the data option, or for class-based components, by ' +\n              'initializing the property. ' +\n              'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n      };\n      var warnReservedPrefix_1 = function (target, key) {\n          warn$2(\"Property \\\"\".concat(key, \"\\\" must be accessed with \\\"$data.\").concat(key, \"\\\" because \") +\n              'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n              'prevent conflicts with Vue internals. ' +\n              'See: https://v2.vuejs.org/v2/api/#data', target);\n      };\n      var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);\n      if (hasProxy_1) {\n          var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n          config.keyCodes = new Proxy(config.keyCodes, {\n              set: function (target, key, value) {\n                  if (isBuiltInModifier_1(key)) {\n                      warn$2(\"Avoid overwriting built-in modifier in config.keyCodes: .\".concat(key));\n                      return false;\n                  }\n                  else {\n                      target[key] = value;\n                      return true;\n                  }\n              }\n          });\n      }\n      var hasHandler_1 = {\n          has: function (target, key) {\n              var has = key in target;\n              var isAllowed = allowedGlobals_1(key) ||\n                  (typeof key === 'string' &&\n                      key.charAt(0) === '_' &&\n                      !(key in target.$data));\n              if (!has && !isAllowed) {\n                  if (key in target.$data)\n                      warnReservedPrefix_1(target, key);\n                  else\n                      warnNonPresent_1(target, key);\n              }\n              return has || !isAllowed;\n          }\n      };\n      var getHandler_1 = {\n          get: function (target, key) {\n              if (typeof key === 'string' && !(key in target)) {\n                  if (key in target.$data)\n                      warnReservedPrefix_1(target, key);\n                  else\n                      warnNonPresent_1(target, key);\n              }\n              return target[key];\n          }\n      };\n      initProxy = function initProxy(vm) {\n          if (hasProxy_1) {\n              // determine which proxy handler to use\n              var options = vm.$options;\n              var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;\n              vm._renderProxy = new Proxy(vm, handlers);\n          }\n          else {\n              vm._renderProxy = vm;\n          }\n      };\n  }\n\n  /******************************************************************************\n  Copyright (c) Microsoft Corporation.\n\n  Permission to use, copy, modify, and/or distribute this software for any\n  purpose with or without fee is hereby granted.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n  PERFORMANCE OF THIS SOFTWARE.\n  ***************************************************************************** */\n\n  var __assign = function() {\n      __assign = Object.assign || function __assign(t) {\n          for (var s, i = 1, n = arguments.length; i < n; i++) {\n              s = arguments[i];\n              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n          }\n          return t;\n      };\n      return __assign.apply(this, arguments);\n  };\n\n  typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n      var e = new Error(message);\n      return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n  };\n\n  var uid$2 = 0;\n  var pendingCleanupDeps = [];\n  var cleanupDeps = function () {\n      for (var i = 0; i < pendingCleanupDeps.length; i++) {\n          var dep = pendingCleanupDeps[i];\n          dep.subs = dep.subs.filter(function (s) { return s; });\n          dep._pending = false;\n      }\n      pendingCleanupDeps.length = 0;\n  };\n  /**\n   * A dep is an observable that can have multiple\n   * directives subscribing to it.\n   * @internal\n   */\n  var Dep = /** @class */ (function () {\n      function Dep() {\n          // pending subs cleanup\n          this._pending = false;\n          this.id = uid$2++;\n          this.subs = [];\n      }\n      Dep.prototype.addSub = function (sub) {\n          this.subs.push(sub);\n      };\n      Dep.prototype.removeSub = function (sub) {\n          // #12696 deps with massive amount of subscribers are extremely slow to\n          // clean up in Chromium\n          // to workaround this, we unset the sub for now, and clear them on\n          // next scheduler flush.\n          this.subs[this.subs.indexOf(sub)] = null;\n          if (!this._pending) {\n              this._pending = true;\n              pendingCleanupDeps.push(this);\n          }\n      };\n      Dep.prototype.depend = function (info) {\n          if (Dep.target) {\n              Dep.target.addDep(this);\n              if (info && Dep.target.onTrack) {\n                  Dep.target.onTrack(__assign({ effect: Dep.target }, info));\n              }\n          }\n      };\n      Dep.prototype.notify = function (info) {\n          // stabilize the subscriber list first\n          var subs = this.subs.filter(function (s) { return s; });\n          if (!config.async) {\n              // subs aren't sorted in scheduler if not running async\n              // we need to sort them now to make sure they fire in correct\n              // order\n              subs.sort(function (a, b) { return a.id - b.id; });\n          }\n          for (var i = 0, l = subs.length; i < l; i++) {\n              var sub = subs[i];\n              if (info) {\n                  sub.onTrigger &&\n                      sub.onTrigger(__assign({ effect: subs[i] }, info));\n              }\n              sub.update();\n          }\n      };\n      return Dep;\n  }());\n  // The current target watcher being evaluated.\n  // This is globally unique because only one watcher\n  // can be evaluated at a time.\n  Dep.target = null;\n  var targetStack = [];\n  function pushTarget(target) {\n      targetStack.push(target);\n      Dep.target = target;\n  }\n  function popTarget() {\n      targetStack.pop();\n      Dep.target = targetStack[targetStack.length - 1];\n  }\n\n  /*\n   * not type checking this file because flow doesn't play well with\n   * dynamically accessing methods on Array prototype\n   */\n  var arrayProto = Array.prototype;\n  var arrayMethods = Object.create(arrayProto);\n  var methodsToPatch = [\n      'push',\n      'pop',\n      'shift',\n      'unshift',\n      'splice',\n      'sort',\n      'reverse'\n  ];\n  /**\n   * Intercept mutating methods and emit events\n   */\n  methodsToPatch.forEach(function (method) {\n      // cache original method\n      var original = arrayProto[method];\n      def(arrayMethods, method, function mutator() {\n          var args = [];\n          for (var _i = 0; _i < arguments.length; _i++) {\n              args[_i] = arguments[_i];\n          }\n          var result = original.apply(this, args);\n          var ob = this.__ob__;\n          var inserted;\n          switch (method) {\n              case 'push':\n              case 'unshift':\n                  inserted = args;\n                  break;\n              case 'splice':\n                  inserted = args.slice(2);\n                  break;\n          }\n          if (inserted)\n              ob.observeArray(inserted);\n          // notify change\n          {\n              ob.dep.notify({\n                  type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                  target: this,\n                  key: method\n              });\n          }\n          return result;\n      });\n  });\n\n  var arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n  var NO_INITIAL_VALUE = {};\n  /**\n   * In some cases we may want to disable observation inside a component's\n   * update computation.\n   */\n  var shouldObserve = true;\n  function toggleObserving(value) {\n      shouldObserve = value;\n  }\n  // ssr mock dep\n  var mockDep = {\n      notify: noop,\n      depend: noop,\n      addSub: noop,\n      removeSub: noop\n  };\n  /**\n   * Observer class that is attached to each observed\n   * object. Once attached, the observer converts the target\n   * object's property keys into getter/setters that\n   * collect dependencies and dispatch updates.\n   */\n  var Observer = /** @class */ (function () {\n      function Observer(value, shallow, mock) {\n          if (shallow === void 0) { shallow = false; }\n          if (mock === void 0) { mock = false; }\n          this.value = value;\n          this.shallow = shallow;\n          this.mock = mock;\n          // this.value = value\n          this.dep = mock ? mockDep : new Dep();\n          this.vmCount = 0;\n          def(value, '__ob__', this);\n          if (isArray(value)) {\n              if (!mock) {\n                  if (hasProto) {\n                      value.__proto__ = arrayMethods;\n                      /* eslint-enable no-proto */\n                  }\n                  else {\n                      for (var i = 0, l = arrayKeys.length; i < l; i++) {\n                          var key = arrayKeys[i];\n                          def(value, key, arrayMethods[key]);\n                      }\n                  }\n              }\n              if (!shallow) {\n                  this.observeArray(value);\n              }\n          }\n          else {\n              /**\n               * Walk through all properties and convert them into\n               * getter/setters. This method should only be called when\n               * value type is Object.\n               */\n              var keys = Object.keys(value);\n              for (var i = 0; i < keys.length; i++) {\n                  var key = keys[i];\n                  defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n              }\n          }\n      }\n      /**\n       * Observe a list of Array items.\n       */\n      Observer.prototype.observeArray = function (value) {\n          for (var i = 0, l = value.length; i < l; i++) {\n              observe(value[i], false, this.mock);\n          }\n      };\n      return Observer;\n  }());\n  // helpers\n  /**\n   * Attempt to create an observer instance for a value,\n   * returns the new observer if successfully observed,\n   * or the existing observer if the value already has one.\n   */\n  function observe(value, shallow, ssrMockReactivity) {\n      if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n          return value.__ob__;\n      }\n      if (shouldObserve &&\n          (ssrMockReactivity || !isServerRendering()) &&\n          (isArray(value) || isPlainObject(value)) &&\n          Object.isExtensible(value) &&\n          !value.__v_skip /* ReactiveFlags.SKIP */ &&\n          !isRef(value) &&\n          !(value instanceof VNode)) {\n          return new Observer(value, shallow, ssrMockReactivity);\n      }\n  }\n  /**\n   * Define a reactive property on an Object.\n   */\n  function defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {\n      if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }\n      var dep = new Dep();\n      var property = Object.getOwnPropertyDescriptor(obj, key);\n      if (property && property.configurable === false) {\n          return;\n      }\n      // cater for pre-defined getter/setters\n      var getter = property && property.get;\n      var setter = property && property.set;\n      if ((!getter || setter) &&\n          (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n          val = obj[key];\n      }\n      var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n      Object.defineProperty(obj, key, {\n          enumerable: true,\n          configurable: true,\n          get: function reactiveGetter() {\n              var value = getter ? getter.call(obj) : val;\n              if (Dep.target) {\n                  {\n                      dep.depend({\n                          target: obj,\n                          type: \"get\" /* TrackOpTypes.GET */,\n                          key: key\n                      });\n                  }\n                  if (childOb) {\n                      childOb.dep.depend();\n                      if (isArray(value)) {\n                          dependArray(value);\n                      }\n                  }\n              }\n              return isRef(value) && !shallow ? value.value : value;\n          },\n          set: function reactiveSetter(newVal) {\n              var value = getter ? getter.call(obj) : val;\n              if (!hasChanged(value, newVal)) {\n                  return;\n              }\n              if (customSetter) {\n                  customSetter();\n              }\n              if (setter) {\n                  setter.call(obj, newVal);\n              }\n              else if (getter) {\n                  // #7981: for accessor properties without setter\n                  return;\n              }\n              else if (!shallow && isRef(value) && !isRef(newVal)) {\n                  value.value = newVal;\n                  return;\n              }\n              else {\n                  val = newVal;\n              }\n              childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n              {\n                  dep.notify({\n                      type: \"set\" /* TriggerOpTypes.SET */,\n                      target: obj,\n                      key: key,\n                      newValue: newVal,\n                      oldValue: value\n                  });\n              }\n          }\n      });\n      return dep;\n  }\n  function set(target, key, val) {\n      if ((isUndef(target) || isPrimitive(target))) {\n          warn$2(\"Cannot set reactive property on undefined, null, or primitive value: \".concat(target));\n      }\n      if (isReadonly(target)) {\n          warn$2(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          return;\n      }\n      var ob = target.__ob__;\n      if (isArray(target) && isValidArrayIndex(key)) {\n          target.length = Math.max(target.length, key);\n          target.splice(key, 1, val);\n          // when mocking for SSR, array methods are not hijacked\n          if (ob && !ob.shallow && ob.mock) {\n              observe(val, false, true);\n          }\n          return val;\n      }\n      if (key in target && !(key in Object.prototype)) {\n          target[key] = val;\n          return val;\n      }\n      if (target._isVue || (ob && ob.vmCount)) {\n          warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                  'at runtime - declare it upfront in the data option.');\n          return val;\n      }\n      if (!ob) {\n          target[key] = val;\n          return val;\n      }\n      defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n      {\n          ob.dep.notify({\n              type: \"add\" /* TriggerOpTypes.ADD */,\n              target: target,\n              key: key,\n              newValue: val,\n              oldValue: undefined\n          });\n      }\n      return val;\n  }\n  function del(target, key) {\n      if ((isUndef(target) || isPrimitive(target))) {\n          warn$2(\"Cannot delete reactive property on undefined, null, or primitive value: \".concat(target));\n      }\n      if (isArray(target) && isValidArrayIndex(key)) {\n          target.splice(key, 1);\n          return;\n      }\n      var ob = target.__ob__;\n      if (target._isVue || (ob && ob.vmCount)) {\n          warn$2('Avoid deleting properties on a Vue instance or its root $data ' +\n                  '- just set it to null.');\n          return;\n      }\n      if (isReadonly(target)) {\n          warn$2(\"Delete operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          return;\n      }\n      if (!hasOwn(target, key)) {\n          return;\n      }\n      delete target[key];\n      if (!ob) {\n          return;\n      }\n      {\n          ob.dep.notify({\n              type: \"delete\" /* TriggerOpTypes.DELETE */,\n              target: target,\n              key: key\n          });\n      }\n  }\n  /**\n   * Collect dependencies on array elements when the array is touched, since\n   * we cannot intercept array element access like property getters.\n   */\n  function dependArray(value) {\n      for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n          e = value[i];\n          if (e && e.__ob__) {\n              e.__ob__.dep.depend();\n          }\n          if (isArray(e)) {\n              dependArray(e);\n          }\n      }\n  }\n\n  function reactive(target) {\n      makeReactive(target, false);\n      return target;\n  }\n  /**\n   * Return a shallowly-reactive copy of the original object, where only the root\n   * level properties are reactive. It also does not auto-unwrap refs (even at the\n   * root level).\n   */\n  function shallowReactive(target) {\n      makeReactive(target, true);\n      def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n      return target;\n  }\n  function makeReactive(target, shallow) {\n      // if trying to observe a readonly proxy, return the readonly version.\n      if (!isReadonly(target)) {\n          {\n              if (isArray(target)) {\n                  warn$2(\"Avoid using Array as root value for \".concat(shallow ? \"shallowReactive()\" : \"reactive()\", \" as it cannot be tracked in watch() or watchEffect(). Use \").concat(shallow ? \"shallowRef()\" : \"ref()\", \" instead. This is a Vue-2-only limitation.\"));\n              }\n              var existingOb = target && target.__ob__;\n              if (existingOb && existingOb.shallow !== shallow) {\n                  warn$2(\"Target is already a \".concat(existingOb.shallow ? \"\" : \"non-\", \"shallow reactive object, and cannot be converted to \").concat(shallow ? \"\" : \"non-\", \"shallow.\"));\n              }\n          }\n          var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n          if (!ob) {\n              if (target == null || isPrimitive(target)) {\n                  warn$2(\"value cannot be made reactive: \".concat(String(target)));\n              }\n              if (isCollectionType(target)) {\n                  warn$2(\"Vue 2 does not support reactive collection types such as Map or Set.\");\n              }\n          }\n      }\n  }\n  function isReactive(value) {\n      if (isReadonly(value)) {\n          return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n      }\n      return !!(value && value.__ob__);\n  }\n  function isShallow(value) {\n      return !!(value && value.__v_isShallow);\n  }\n  function isReadonly(value) {\n      return !!(value && value.__v_isReadonly);\n  }\n  function isProxy(value) {\n      return isReactive(value) || isReadonly(value);\n  }\n  function toRaw(observed) {\n      var raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n      return raw ? toRaw(raw) : observed;\n  }\n  function markRaw(value) {\n      // non-extensible objects won't be observed anyway\n      if (Object.isExtensible(value)) {\n          def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n      }\n      return value;\n  }\n  /**\n   * @internal\n   */\n  function isCollectionType(value) {\n      var type = toRawType(value);\n      return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n  }\n\n  /**\n   * @internal\n   */\n  var RefFlag = \"__v_isRef\";\n  function isRef(r) {\n      return !!(r && r.__v_isRef === true);\n  }\n  function ref$1(value) {\n      return createRef(value, false);\n  }\n  function shallowRef(value) {\n      return createRef(value, true);\n  }\n  function createRef(rawValue, shallow) {\n      if (isRef(rawValue)) {\n          return rawValue;\n      }\n      var ref = {};\n      def(ref, RefFlag, true);\n      def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n      def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n      return ref;\n  }\n  function triggerRef(ref) {\n      if (!ref.dep) {\n          warn$2(\"received object is not a triggerable ref.\");\n      }\n      {\n          ref.dep &&\n              ref.dep.notify({\n                  type: \"set\" /* TriggerOpTypes.SET */,\n                  target: ref,\n                  key: 'value'\n              });\n      }\n  }\n  function unref(ref) {\n      return isRef(ref) ? ref.value : ref;\n  }\n  function proxyRefs(objectWithRefs) {\n      if (isReactive(objectWithRefs)) {\n          return objectWithRefs;\n      }\n      var proxy = {};\n      var keys = Object.keys(objectWithRefs);\n      for (var i = 0; i < keys.length; i++) {\n          proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n      }\n      return proxy;\n  }\n  function proxyWithRefUnwrap(target, source, key) {\n      Object.defineProperty(target, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              var val = source[key];\n              if (isRef(val)) {\n                  return val.value;\n              }\n              else {\n                  var ob = val && val.__ob__;\n                  if (ob)\n                      ob.dep.depend();\n                  return val;\n              }\n          },\n          set: function (value) {\n              var oldValue = source[key];\n              if (isRef(oldValue) && !isRef(value)) {\n                  oldValue.value = value;\n              }\n              else {\n                  source[key] = value;\n              }\n          }\n      });\n  }\n  function customRef(factory) {\n      var dep = new Dep();\n      var _a = factory(function () {\n          {\n              dep.depend({\n                  target: ref,\n                  type: \"get\" /* TrackOpTypes.GET */,\n                  key: 'value'\n              });\n          }\n      }, function () {\n          {\n              dep.notify({\n                  target: ref,\n                  type: \"set\" /* TriggerOpTypes.SET */,\n                  key: 'value'\n              });\n          }\n      }), get = _a.get, set = _a.set;\n      var ref = {\n          get value() {\n              return get();\n          },\n          set value(newVal) {\n              set(newVal);\n          }\n      };\n      def(ref, RefFlag, true);\n      return ref;\n  }\n  function toRefs(object) {\n      if (!isReactive(object)) {\n          warn$2(\"toRefs() expects a reactive object but received a plain one.\");\n      }\n      var ret = isArray(object) ? new Array(object.length) : {};\n      for (var key in object) {\n          ret[key] = toRef(object, key);\n      }\n      return ret;\n  }\n  function toRef(object, key, defaultValue) {\n      var val = object[key];\n      if (isRef(val)) {\n          return val;\n      }\n      var ref = {\n          get value() {\n              var val = object[key];\n              return val === undefined ? defaultValue : val;\n          },\n          set value(newVal) {\n              object[key] = newVal;\n          }\n      };\n      def(ref, RefFlag, true);\n      return ref;\n  }\n\n  var rawToReadonlyFlag = \"__v_rawToReadonly\";\n  var rawToShallowReadonlyFlag = \"__v_rawToShallowReadonly\";\n  function readonly(target) {\n      return createReadonly(target, false);\n  }\n  function createReadonly(target, shallow) {\n      if (!isPlainObject(target)) {\n          {\n              if (isArray(target)) {\n                  warn$2(\"Vue 2 does not support readonly arrays.\");\n              }\n              else if (isCollectionType(target)) {\n                  warn$2(\"Vue 2 does not support readonly collection types such as Map or Set.\");\n              }\n              else {\n                  warn$2(\"value cannot be made readonly: \".concat(typeof target));\n              }\n          }\n          return target;\n      }\n      if (!Object.isExtensible(target)) {\n          warn$2(\"Vue 2 does not support creating readonly proxy for non-extensible object.\");\n      }\n      // already a readonly object\n      if (isReadonly(target)) {\n          return target;\n      }\n      // already has a readonly proxy\n      var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n      var existingProxy = target[existingFlag];\n      if (existingProxy) {\n          return existingProxy;\n      }\n      var proxy = Object.create(Object.getPrototypeOf(target));\n      def(target, existingFlag, proxy);\n      def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n      def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n      if (isRef(target)) {\n          def(proxy, RefFlag, true);\n      }\n      if (shallow || isShallow(target)) {\n          def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n      }\n      var keys = Object.keys(target);\n      for (var i = 0; i < keys.length; i++) {\n          defineReadonlyProperty(proxy, target, keys[i], shallow);\n      }\n      return proxy;\n  }\n  function defineReadonlyProperty(proxy, target, key, shallow) {\n      Object.defineProperty(proxy, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              var val = target[key];\n              return shallow || !isPlainObject(val) ? val : readonly(val);\n          },\n          set: function () {\n              warn$2(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          }\n      });\n  }\n  /**\n   * Returns a reactive-copy of the original object, where only the root level\n   * properties are readonly, and does NOT unwrap refs nor recursively convert\n   * returned properties.\n   * This is used for creating the props proxy object for stateful components.\n   */\n  function shallowReadonly(target) {\n      return createReadonly(target, true);\n  }\n\n  function computed(getterOrOptions, debugOptions) {\n      var getter;\n      var setter;\n      var onlyGetter = isFunction(getterOrOptions);\n      if (onlyGetter) {\n          getter = getterOrOptions;\n          setter = function () {\n                  warn$2('Write operation failed: computed value is readonly');\n              }\n              ;\n      }\n      else {\n          getter = getterOrOptions.get;\n          setter = getterOrOptions.set;\n      }\n      var watcher = isServerRendering()\n          ? null\n          : new Watcher(currentInstance, getter, noop, { lazy: true });\n      if (watcher && debugOptions) {\n          watcher.onTrack = debugOptions.onTrack;\n          watcher.onTrigger = debugOptions.onTrigger;\n      }\n      var ref = {\n          // some libs rely on the presence effect for checking computed refs\n          // from normal refs, but the implementation doesn't matter\n          effect: watcher,\n          get value() {\n              if (watcher) {\n                  if (watcher.dirty) {\n                      watcher.evaluate();\n                  }\n                  if (Dep.target) {\n                      if (Dep.target.onTrack) {\n                          Dep.target.onTrack({\n                              effect: Dep.target,\n                              target: ref,\n                              type: \"get\" /* TrackOpTypes.GET */,\n                              key: 'value'\n                          });\n                      }\n                      watcher.depend();\n                  }\n                  return watcher.value;\n              }\n              else {\n                  return getter();\n              }\n          },\n          set value(newVal) {\n              setter(newVal);\n          }\n      };\n      def(ref, RefFlag, true);\n      def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n      return ref;\n  }\n\n  var mark;\n  var measure;\n  {\n      var perf_1 = inBrowser && window.performance;\n      /* istanbul ignore if */\n      if (perf_1 &&\n          // @ts-ignore\n          perf_1.mark &&\n          // @ts-ignore\n          perf_1.measure &&\n          // @ts-ignore\n          perf_1.clearMarks &&\n          // @ts-ignore\n          perf_1.clearMeasures) {\n          mark = function (tag) { return perf_1.mark(tag); };\n          measure = function (name, startTag, endTag) {\n              perf_1.measure(name, startTag, endTag);\n              perf_1.clearMarks(startTag);\n              perf_1.clearMarks(endTag);\n              // perf.clearMeasures(name)\n          };\n      }\n  }\n\n  var normalizeEvent = cached(function (name) {\n      var passive = name.charAt(0) === '&';\n      name = passive ? name.slice(1) : name;\n      var once = name.charAt(0) === '~'; // Prefixed last, checked first\n      name = once ? name.slice(1) : name;\n      var capture = name.charAt(0) === '!';\n      name = capture ? name.slice(1) : name;\n      return {\n          name: name,\n          once: once,\n          capture: capture,\n          passive: passive\n      };\n  });\n  function createFnInvoker(fns, vm) {\n      function invoker() {\n          var fns = invoker.fns;\n          if (isArray(fns)) {\n              var cloned = fns.slice();\n              for (var i = 0; i < cloned.length; i++) {\n                  invokeWithErrorHandling(cloned[i], null, arguments, vm, \"v-on handler\");\n              }\n          }\n          else {\n              // return handler return value for single handlers\n              return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n          }\n      }\n      invoker.fns = fns;\n      return invoker;\n  }\n  function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n      var name, cur, old, event;\n      for (name in on) {\n          cur = on[name];\n          old = oldOn[name];\n          event = normalizeEvent(name);\n          if (isUndef(cur)) {\n              warn$2(\"Invalid handler for event \\\"\".concat(event.name, \"\\\": got \") + String(cur), vm);\n          }\n          else if (isUndef(old)) {\n              if (isUndef(cur.fns)) {\n                  cur = on[name] = createFnInvoker(cur, vm);\n              }\n              if (isTrue(event.once)) {\n                  cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n              }\n              add(event.name, cur, event.capture, event.passive, event.params);\n          }\n          else if (cur !== old) {\n              old.fns = cur;\n              on[name] = old;\n          }\n      }\n      for (name in oldOn) {\n          if (isUndef(on[name])) {\n              event = normalizeEvent(name);\n              remove(event.name, oldOn[name], event.capture);\n          }\n      }\n  }\n\n  function mergeVNodeHook(def, hookKey, hook) {\n      if (def instanceof VNode) {\n          def = def.data.hook || (def.data.hook = {});\n      }\n      var invoker;\n      var oldHook = def[hookKey];\n      function wrappedHook() {\n          hook.apply(this, arguments);\n          // important: remove merged hook to ensure it's called only once\n          // and prevent memory leak\n          remove$2(invoker.fns, wrappedHook);\n      }\n      if (isUndef(oldHook)) {\n          // no existing hook\n          invoker = createFnInvoker([wrappedHook]);\n      }\n      else {\n          /* istanbul ignore if */\n          if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n              // already a merged invoker\n              invoker = oldHook;\n              invoker.fns.push(wrappedHook);\n          }\n          else {\n              // existing plain hook\n              invoker = createFnInvoker([oldHook, wrappedHook]);\n          }\n      }\n      invoker.merged = true;\n      def[hookKey] = invoker;\n  }\n\n  function extractPropsFromVNodeData(data, Ctor, tag) {\n      // we are only extracting raw values here.\n      // validation and default values are handled in the child\n      // component itself.\n      var propOptions = Ctor.options.props;\n      if (isUndef(propOptions)) {\n          return;\n      }\n      var res = {};\n      var attrs = data.attrs, props = data.props;\n      if (isDef(attrs) || isDef(props)) {\n          for (var key in propOptions) {\n              var altKey = hyphenate(key);\n              {\n                  var keyInLowerCase = key.toLowerCase();\n                  if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                      tip(\"Prop \\\"\".concat(keyInLowerCase, \"\\\" is passed to component \") +\n                          \"\".concat(formatComponentName(\n                          // @ts-expect-error tag is string\n                          tag || Ctor), \", but the declared prop name is\") +\n                          \" \\\"\".concat(key, \"\\\". \") +\n                          \"Note that HTML attributes are case-insensitive and camelCased \" +\n                          \"props need to use their kebab-case equivalents when using in-DOM \" +\n                          \"templates. You should probably use \\\"\".concat(altKey, \"\\\" instead of \\\"\").concat(key, \"\\\".\"));\n                  }\n              }\n              checkProp(res, props, key, altKey, true) ||\n                  checkProp(res, attrs, key, altKey, false);\n          }\n      }\n      return res;\n  }\n  function checkProp(res, hash, key, altKey, preserve) {\n      if (isDef(hash)) {\n          if (hasOwn(hash, key)) {\n              res[key] = hash[key];\n              if (!preserve) {\n                  delete hash[key];\n              }\n              return true;\n          }\n          else if (hasOwn(hash, altKey)) {\n              res[key] = hash[altKey];\n              if (!preserve) {\n                  delete hash[altKey];\n              }\n              return true;\n          }\n      }\n      return false;\n  }\n\n  // The template compiler attempts to minimize the need for normalization by\n  // statically analyzing the template at compile time.\n  //\n  // For plain HTML markup, normalization can be completely skipped because the\n  // generated render function is guaranteed to return Array<VNode>. There are\n  // two cases where extra normalization is needed:\n  // 1. When the children contains components - because a functional component\n  // may return an Array instead of a single root. In this case, just a simple\n  // normalization is needed - if any child is an Array, we flatten the whole\n  // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n  // because functional components already normalize their own children.\n  function simpleNormalizeChildren(children) {\n      for (var i = 0; i < children.length; i++) {\n          if (isArray(children[i])) {\n              return Array.prototype.concat.apply([], children);\n          }\n      }\n      return children;\n  }\n  // 2. When the children contains constructs that always generated nested Arrays,\n  // e.g. <template>, <slot>, v-for, or when the children is provided by user\n  // with hand-written render functions / JSX. In such cases a full normalization\n  // is needed to cater to all possible types of children values.\n  function normalizeChildren(children) {\n      return isPrimitive(children)\n          ? [createTextVNode(children)]\n          : isArray(children)\n              ? normalizeArrayChildren(children)\n              : undefined;\n  }\n  function isTextNode(node) {\n      return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n  }\n  function normalizeArrayChildren(children, nestedIndex) {\n      var res = [];\n      var i, c, lastIndex, last;\n      for (i = 0; i < children.length; i++) {\n          c = children[i];\n          if (isUndef(c) || typeof c === 'boolean')\n              continue;\n          lastIndex = res.length - 1;\n          last = res[lastIndex];\n          //  nested\n          if (isArray(c)) {\n              if (c.length > 0) {\n                  c = normalizeArrayChildren(c, \"\".concat(nestedIndex || '', \"_\").concat(i));\n                  // merge adjacent text nodes\n                  if (isTextNode(c[0]) && isTextNode(last)) {\n                      res[lastIndex] = createTextVNode(last.text + c[0].text);\n                      c.shift();\n                  }\n                  res.push.apply(res, c);\n              }\n          }\n          else if (isPrimitive(c)) {\n              if (isTextNode(last)) {\n                  // merge adjacent text nodes\n                  // this is necessary for SSR hydration because text nodes are\n                  // essentially merged when rendered to HTML strings\n                  res[lastIndex] = createTextVNode(last.text + c);\n              }\n              else if (c !== '') {\n                  // convert primitive to vnode\n                  res.push(createTextVNode(c));\n              }\n          }\n          else {\n              if (isTextNode(c) && isTextNode(last)) {\n                  // merge adjacent text nodes\n                  res[lastIndex] = createTextVNode(last.text + c.text);\n              }\n              else {\n                  // default key for nested array children (likely generated by v-for)\n                  if (isTrue(children._isVList) &&\n                      isDef(c.tag) &&\n                      isUndef(c.key) &&\n                      isDef(nestedIndex)) {\n                      c.key = \"__vlist\".concat(nestedIndex, \"_\").concat(i, \"__\");\n                  }\n                  res.push(c);\n              }\n          }\n      }\n      return res;\n  }\n\n  var SIMPLE_NORMALIZE = 1;\n  var ALWAYS_NORMALIZE = 2;\n  // wrapper function for providing a more flexible interface\n  // without getting yelled at by flow\n  function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n      if (isArray(data) || isPrimitive(data)) {\n          normalizationType = children;\n          children = data;\n          data = undefined;\n      }\n      if (isTrue(alwaysNormalize)) {\n          normalizationType = ALWAYS_NORMALIZE;\n      }\n      return _createElement(context, tag, data, children, normalizationType);\n  }\n  function _createElement(context, tag, data, children, normalizationType) {\n      if (isDef(data) && isDef(data.__ob__)) {\n          warn$2(\"Avoid using observed data object as vnode data: \".concat(JSON.stringify(data), \"\\n\") + 'Always create fresh vnode data objects in each render!', context);\n          return createEmptyVNode();\n      }\n      // object syntax in v-bind\n      if (isDef(data) && isDef(data.is)) {\n          tag = data.is;\n      }\n      if (!tag) {\n          // in case of component :is set to falsy value\n          return createEmptyVNode();\n      }\n      // warn against non-primitive key\n      if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n          warn$2('Avoid using non-primitive value as key, ' +\n              'use string/number value instead.', context);\n      }\n      // support single function children as default scoped slot\n      if (isArray(children) && isFunction(children[0])) {\n          data = data || {};\n          data.scopedSlots = { default: children[0] };\n          children.length = 0;\n      }\n      if (normalizationType === ALWAYS_NORMALIZE) {\n          children = normalizeChildren(children);\n      }\n      else if (normalizationType === SIMPLE_NORMALIZE) {\n          children = simpleNormalizeChildren(children);\n      }\n      var vnode, ns;\n      if (typeof tag === 'string') {\n          var Ctor = void 0;\n          ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n          if (config.isReservedTag(tag)) {\n              // platform built-in elements\n              if (isDef(data) &&\n                  isDef(data.nativeOn) &&\n                  data.tag !== 'component') {\n                  warn$2(\"The .native modifier for v-on is only valid on components but it was used on <\".concat(tag, \">.\"), context);\n              }\n              vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n          }\n          else if ((!data || !data.pre) &&\n              isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n              // component\n              vnode = createComponent(Ctor, data, context, children, tag);\n          }\n          else {\n              // unknown or unlisted namespaced elements\n              // check at runtime because it may get assigned a namespace when its\n              // parent normalizes children\n              vnode = new VNode(tag, data, children, undefined, undefined, context);\n          }\n      }\n      else {\n          // direct component options / constructor\n          vnode = createComponent(tag, data, context, children);\n      }\n      if (isArray(vnode)) {\n          return vnode;\n      }\n      else if (isDef(vnode)) {\n          if (isDef(ns))\n              applyNS(vnode, ns);\n          if (isDef(data))\n              registerDeepBindings(data);\n          return vnode;\n      }\n      else {\n          return createEmptyVNode();\n      }\n  }\n  function applyNS(vnode, ns, force) {\n      vnode.ns = ns;\n      if (vnode.tag === 'foreignObject') {\n          // use default namespace inside foreignObject\n          ns = undefined;\n          force = true;\n      }\n      if (isDef(vnode.children)) {\n          for (var i = 0, l = vnode.children.length; i < l; i++) {\n              var child = vnode.children[i];\n              if (isDef(child.tag) &&\n                  (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                  applyNS(child, ns, force);\n              }\n          }\n      }\n  }\n  // ref #5318\n  // necessary to ensure parent re-render when deep bindings like :style and\n  // :class are used on slot nodes\n  function registerDeepBindings(data) {\n      if (isObject(data.style)) {\n          traverse(data.style);\n      }\n      if (isObject(data.class)) {\n          traverse(data.class);\n      }\n  }\n\n  /**\n   * Runtime helper for rendering v-for lists.\n   */\n  function renderList(val, render) {\n      var ret = null, i, l, keys, key;\n      if (isArray(val) || typeof val === 'string') {\n          ret = new Array(val.length);\n          for (i = 0, l = val.length; i < l; i++) {\n              ret[i] = render(val[i], i);\n          }\n      }\n      else if (typeof val === 'number') {\n          ret = new Array(val);\n          for (i = 0; i < val; i++) {\n              ret[i] = render(i + 1, i);\n          }\n      }\n      else if (isObject(val)) {\n          if (hasSymbol && val[Symbol.iterator]) {\n              ret = [];\n              var iterator = val[Symbol.iterator]();\n              var result = iterator.next();\n              while (!result.done) {\n                  ret.push(render(result.value, ret.length));\n                  result = iterator.next();\n              }\n          }\n          else {\n              keys = Object.keys(val);\n              ret = new Array(keys.length);\n              for (i = 0, l = keys.length; i < l; i++) {\n                  key = keys[i];\n                  ret[i] = render(val[key], key, i);\n              }\n          }\n      }\n      if (!isDef(ret)) {\n          ret = [];\n      }\n      ret._isVList = true;\n      return ret;\n  }\n\n  /**\n   * Runtime helper for rendering <slot>\n   */\n  function renderSlot(name, fallbackRender, props, bindObject) {\n      var scopedSlotFn = this.$scopedSlots[name];\n      var nodes;\n      if (scopedSlotFn) {\n          // scoped slot\n          props = props || {};\n          if (bindObject) {\n              if (!isObject(bindObject)) {\n                  warn$2('slot v-bind without argument expects an Object', this);\n              }\n              props = extend(extend({}, bindObject), props);\n          }\n          nodes =\n              scopedSlotFn(props) ||\n                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n      }\n      else {\n          nodes =\n              this.$slots[name] ||\n                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n      }\n      var target = props && props.slot;\n      if (target) {\n          return this.$createElement('template', { slot: target }, nodes);\n      }\n      else {\n          return nodes;\n      }\n  }\n\n  /**\n   * Runtime helper for resolving filters\n   */\n  function resolveFilter(id) {\n      return resolveAsset(this.$options, 'filters', id, true) || identity;\n  }\n\n  function isKeyNotMatch(expect, actual) {\n      if (isArray(expect)) {\n          return expect.indexOf(actual) === -1;\n      }\n      else {\n          return expect !== actual;\n      }\n  }\n  /**\n   * Runtime helper for checking keyCodes from config.\n   * exposed as Vue.prototype._k\n   * passing in eventKeyName as last argument separately for backwards compat\n   */\n  function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n      var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n      if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n          return isKeyNotMatch(builtInKeyName, eventKeyName);\n      }\n      else if (mappedKeyCode) {\n          return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n      }\n      else if (eventKeyName) {\n          return hyphenate(eventKeyName) !== key;\n      }\n      return eventKeyCode === undefined;\n  }\n\n  /**\n   * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n   */\n  function bindObjectProps(data, tag, value, asProp, isSync) {\n      if (value) {\n          if (!isObject(value)) {\n              warn$2('v-bind without argument expects an Object or Array value', this);\n          }\n          else {\n              if (isArray(value)) {\n                  value = toObject(value);\n              }\n              var hash = void 0;\n              var _loop_1 = function (key) {\n                  if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                      hash = data;\n                  }\n                  else {\n                      var type = data.attrs && data.attrs.type;\n                      hash =\n                          asProp || config.mustUseProp(tag, type, key)\n                              ? data.domProps || (data.domProps = {})\n                              : data.attrs || (data.attrs = {});\n                  }\n                  var camelizedKey = camelize(key);\n                  var hyphenatedKey = hyphenate(key);\n                  if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                      hash[key] = value[key];\n                      if (isSync) {\n                          var on = data.on || (data.on = {});\n                          on[\"update:\".concat(key)] = function ($event) {\n                              value[key] = $event;\n                          };\n                      }\n                  }\n              };\n              for (var key in value) {\n                  _loop_1(key);\n              }\n          }\n      }\n      return data;\n  }\n\n  /**\n   * Runtime helper for rendering static trees.\n   */\n  function renderStatic(index, isInFor) {\n      var cached = this._staticTrees || (this._staticTrees = []);\n      var tree = cached[index];\n      // if has already-rendered static tree and not inside v-for,\n      // we can reuse the same tree.\n      if (tree && !isInFor) {\n          return tree;\n      }\n      // otherwise, render a fresh tree.\n      tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n      );\n      markStatic$1(tree, \"__static__\".concat(index), false);\n      return tree;\n  }\n  /**\n   * Runtime helper for v-once.\n   * Effectively it means marking the node as static with a unique key.\n   */\n  function markOnce(tree, index, key) {\n      markStatic$1(tree, \"__once__\".concat(index).concat(key ? \"_\".concat(key) : \"\"), true);\n      return tree;\n  }\n  function markStatic$1(tree, key, isOnce) {\n      if (isArray(tree)) {\n          for (var i = 0; i < tree.length; i++) {\n              if (tree[i] && typeof tree[i] !== 'string') {\n                  markStaticNode(tree[i], \"\".concat(key, \"_\").concat(i), isOnce);\n              }\n          }\n      }\n      else {\n          markStaticNode(tree, key, isOnce);\n      }\n  }\n  function markStaticNode(node, key, isOnce) {\n      node.isStatic = true;\n      node.key = key;\n      node.isOnce = isOnce;\n  }\n\n  function bindObjectListeners(data, value) {\n      if (value) {\n          if (!isPlainObject(value)) {\n              warn$2('v-on without argument expects an Object value', this);\n          }\n          else {\n              var on = (data.on = data.on ? extend({}, data.on) : {});\n              for (var key in value) {\n                  var existing = on[key];\n                  var ours = value[key];\n                  on[key] = existing ? [].concat(existing, ours) : ours;\n              }\n          }\n      }\n      return data;\n  }\n\n  function resolveScopedSlots(fns, res, \n  // the following are added in 2.6\n  hasDynamicKeys, contentHashKey) {\n      res = res || { $stable: !hasDynamicKeys };\n      for (var i = 0; i < fns.length; i++) {\n          var slot = fns[i];\n          if (isArray(slot)) {\n              resolveScopedSlots(slot, res, hasDynamicKeys);\n          }\n          else if (slot) {\n              // marker for reverse proxying v-slot without scope on this.$slots\n              // @ts-expect-error\n              if (slot.proxy) {\n                  // @ts-expect-error\n                  slot.fn.proxy = true;\n              }\n              res[slot.key] = slot.fn;\n          }\n      }\n      if (contentHashKey) {\n          res.$key = contentHashKey;\n      }\n      return res;\n  }\n\n  // helper to process dynamic keys for dynamic arguments in v-bind and v-on.\n  function bindDynamicKeys(baseObj, values) {\n      for (var i = 0; i < values.length; i += 2) {\n          var key = values[i];\n          if (typeof key === 'string' && key) {\n              baseObj[values[i]] = values[i + 1];\n          }\n          else if (key !== '' && key !== null) {\n              // null is a special value for explicitly removing a binding\n              warn$2(\"Invalid value for dynamic directive argument (expected string or null): \".concat(key), this);\n          }\n      }\n      return baseObj;\n  }\n  // helper to dynamically append modifier runtime markers to event names.\n  // ensure only append when value is already string, otherwise it will be cast\n  // to string and cause the type check to miss.\n  function prependModifier(value, symbol) {\n      return typeof value === 'string' ? symbol + value : value;\n  }\n\n  function installRenderHelpers(target) {\n      target._o = markOnce;\n      target._n = toNumber;\n      target._s = toString;\n      target._l = renderList;\n      target._t = renderSlot;\n      target._q = looseEqual;\n      target._i = looseIndexOf;\n      target._m = renderStatic;\n      target._f = resolveFilter;\n      target._k = checkKeyCodes;\n      target._b = bindObjectProps;\n      target._v = createTextVNode;\n      target._e = createEmptyVNode;\n      target._u = resolveScopedSlots;\n      target._g = bindObjectListeners;\n      target._d = bindDynamicKeys;\n      target._p = prependModifier;\n  }\n\n  /**\n   * Runtime helper for resolving raw children VNodes into a slot object.\n   */\n  function resolveSlots(children, context) {\n      if (!children || !children.length) {\n          return {};\n      }\n      var slots = {};\n      for (var i = 0, l = children.length; i < l; i++) {\n          var child = children[i];\n          var data = child.data;\n          // remove slot attribute if the node is resolved as a Vue slot node\n          if (data && data.attrs && data.attrs.slot) {\n              delete data.attrs.slot;\n          }\n          // named slots should only be respected if the vnode was rendered in the\n          // same context.\n          if ((child.context === context || child.fnContext === context) &&\n              data &&\n              data.slot != null) {\n              var name_1 = data.slot;\n              var slot = slots[name_1] || (slots[name_1] = []);\n              if (child.tag === 'template') {\n                  slot.push.apply(slot, child.children || []);\n              }\n              else {\n                  slot.push(child);\n              }\n          }\n          else {\n              (slots.default || (slots.default = [])).push(child);\n          }\n      }\n      // ignore slots that contains only whitespace\n      for (var name_2 in slots) {\n          if (slots[name_2].every(isWhitespace)) {\n              delete slots[name_2];\n          }\n      }\n      return slots;\n  }\n  function isWhitespace(node) {\n      return (node.isComment && !node.asyncFactory) || node.text === ' ';\n  }\n\n  function isAsyncPlaceholder(node) {\n      // @ts-expect-error not really boolean type\n      return node.isComment && node.asyncFactory;\n  }\n\n  function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n      var res;\n      var hasNormalSlots = Object.keys(normalSlots).length > 0;\n      var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n      var key = scopedSlots && scopedSlots.$key;\n      if (!scopedSlots) {\n          res = {};\n      }\n      else if (scopedSlots._normalized) {\n          // fast path 1: child component re-render only, parent did not change\n          return scopedSlots._normalized;\n      }\n      else if (isStable &&\n          prevScopedSlots &&\n          prevScopedSlots !== emptyObject &&\n          key === prevScopedSlots.$key &&\n          !hasNormalSlots &&\n          !prevScopedSlots.$hasNormal) {\n          // fast path 2: stable scoped slots w/ no normal slots to proxy,\n          // only need to normalize once\n          return prevScopedSlots;\n      }\n      else {\n          res = {};\n          for (var key_1 in scopedSlots) {\n              if (scopedSlots[key_1] && key_1[0] !== '$') {\n                  res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);\n              }\n          }\n      }\n      // expose normal slots on scopedSlots\n      for (var key_2 in normalSlots) {\n          if (!(key_2 in res)) {\n              res[key_2] = proxyNormalSlot(normalSlots, key_2);\n          }\n      }\n      // avoriaz seems to mock a non-extensible $scopedSlots object\n      // and when that is passed down this would cause an error\n      if (scopedSlots && Object.isExtensible(scopedSlots)) {\n          scopedSlots._normalized = res;\n      }\n      def(res, '$stable', isStable);\n      def(res, '$key', key);\n      def(res, '$hasNormal', hasNormalSlots);\n      return res;\n  }\n  function normalizeScopedSlot(vm, normalSlots, key, fn) {\n      var normalized = function () {\n          var cur = currentInstance;\n          setCurrentInstance(vm);\n          var res = arguments.length ? fn.apply(null, arguments) : fn({});\n          res =\n              res && typeof res === 'object' && !isArray(res)\n                  ? [res] // single vnode\n                  : normalizeChildren(res);\n          var vnode = res && res[0];\n          setCurrentInstance(cur);\n          return res &&\n              (!vnode ||\n                  (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n              ? undefined\n              : res;\n      };\n      // this is a slot using the new v-slot syntax without scope. although it is\n      // compiled as a scoped slot, render fn users would expect it to be present\n      // on this.$slots because the usage is semantically a normal slot.\n      if (fn.proxy) {\n          Object.defineProperty(normalSlots, key, {\n              get: normalized,\n              enumerable: true,\n              configurable: true\n          });\n      }\n      return normalized;\n  }\n  function proxyNormalSlot(slots, key) {\n      return function () { return slots[key]; };\n  }\n\n  function initSetup(vm) {\n      var options = vm.$options;\n      var setup = options.setup;\n      if (setup) {\n          var ctx = (vm._setupContext = createSetupContext(vm));\n          setCurrentInstance(vm);\n          pushTarget();\n          var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, \"setup\");\n          popTarget();\n          setCurrentInstance();\n          if (isFunction(setupResult)) {\n              // render function\n              // @ts-ignore\n              options.render = setupResult;\n          }\n          else if (isObject(setupResult)) {\n              // bindings\n              if (setupResult instanceof VNode) {\n                  warn$2(\"setup() should not return VNodes directly - \" +\n                      \"return a render function instead.\");\n              }\n              vm._setupState = setupResult;\n              // __sfc indicates compiled bindings from <script setup>\n              if (!setupResult.__sfc) {\n                  for (var key in setupResult) {\n                      if (!isReserved(key)) {\n                          proxyWithRefUnwrap(vm, setupResult, key);\n                      }\n                      else {\n                          warn$2(\"Avoid using variables that start with _ or $ in setup().\");\n                      }\n                  }\n              }\n              else {\n                  // exposed for compiled render fn\n                  var proxy = (vm._setupProxy = {});\n                  for (var key in setupResult) {\n                      if (key !== '__sfc') {\n                          proxyWithRefUnwrap(proxy, setupResult, key);\n                      }\n                  }\n              }\n          }\n          else if (setupResult !== undefined) {\n              warn$2(\"setup() should return an object. Received: \".concat(setupResult === null ? 'null' : typeof setupResult));\n          }\n      }\n  }\n  function createSetupContext(vm) {\n      var exposeCalled = false;\n      return {\n          get attrs() {\n              if (!vm._attrsProxy) {\n                  var proxy = (vm._attrsProxy = {});\n                  def(proxy, '_v_attr_proxy', true);\n                  syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n              }\n              return vm._attrsProxy;\n          },\n          get listeners() {\n              if (!vm._listenersProxy) {\n                  var proxy = (vm._listenersProxy = {});\n                  syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n              }\n              return vm._listenersProxy;\n          },\n          get slots() {\n              return initSlotsProxy(vm);\n          },\n          emit: bind$1(vm.$emit, vm),\n          expose: function (exposed) {\n              {\n                  if (exposeCalled) {\n                      warn$2(\"expose() should be called only once per setup().\", vm);\n                  }\n                  exposeCalled = true;\n              }\n              if (exposed) {\n                  Object.keys(exposed).forEach(function (key) {\n                      return proxyWithRefUnwrap(vm, exposed, key);\n                  });\n              }\n          }\n      };\n  }\n  function syncSetupProxy(to, from, prev, instance, type) {\n      var changed = false;\n      for (var key in from) {\n          if (!(key in to)) {\n              changed = true;\n              defineProxyAttr(to, key, instance, type);\n          }\n          else if (from[key] !== prev[key]) {\n              changed = true;\n          }\n      }\n      for (var key in to) {\n          if (!(key in from)) {\n              changed = true;\n              delete to[key];\n          }\n      }\n      return changed;\n  }\n  function defineProxyAttr(proxy, key, instance, type) {\n      Object.defineProperty(proxy, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              return instance[type][key];\n          }\n      });\n  }\n  function initSlotsProxy(vm) {\n      if (!vm._slotsProxy) {\n          syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n      }\n      return vm._slotsProxy;\n  }\n  function syncSetupSlots(to, from) {\n      for (var key in from) {\n          to[key] = from[key];\n      }\n      for (var key in to) {\n          if (!(key in from)) {\n              delete to[key];\n          }\n      }\n  }\n  /**\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useSlots() {\n      return getContext().slots;\n  }\n  /**\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useAttrs() {\n      return getContext().attrs;\n  }\n  /**\n   * Vue 2 only\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useListeners() {\n      return getContext().listeners;\n  }\n  function getContext() {\n      if (!currentInstance) {\n          warn$2(\"useContext() called without active instance.\");\n      }\n      var vm = currentInstance;\n      return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n  }\n  /**\n   * Runtime helper for merging default declarations. Imported by compiled code\n   * only.\n   * @internal\n   */\n  function mergeDefaults(raw, defaults) {\n      var props = isArray(raw)\n          ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})\n          : raw;\n      for (var key in defaults) {\n          var opt = props[key];\n          if (opt) {\n              if (isArray(opt) || isFunction(opt)) {\n                  props[key] = { type: opt, default: defaults[key] };\n              }\n              else {\n                  opt.default = defaults[key];\n              }\n          }\n          else if (opt === null) {\n              props[key] = { default: defaults[key] };\n          }\n          else {\n              warn$2(\"props default key \\\"\".concat(key, \"\\\" has no corresponding declaration.\"));\n          }\n      }\n      return props;\n  }\n\n  function initRender(vm) {\n      vm._vnode = null; // the root of the child tree\n      vm._staticTrees = null; // v-once cached trees\n      var options = vm.$options;\n      var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n      var renderContext = parentVnode && parentVnode.context;\n      vm.$slots = resolveSlots(options._renderChildren, renderContext);\n      vm.$scopedSlots = parentVnode\n          ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n          : emptyObject;\n      // bind the createElement fn to this instance\n      // so that we get proper render context inside it.\n      // args order: tag, data, children, normalizationType, alwaysNormalize\n      // internal version is used by render functions compiled from templates\n      // @ts-expect-error\n      vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };\n      // normalization is always applied for the public version, used in\n      // user-written render functions.\n      // @ts-expect-error\n      vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };\n      // $attrs & $listeners are exposed for easier HOC creation.\n      // they need to be reactive so that HOCs using them are always updated\n      var parentData = parentVnode && parentVnode.data;\n      /* istanbul ignore else */\n      {\n          defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {\n              !isUpdatingChildComponent && warn$2(\"$attrs is readonly.\", vm);\n          }, true);\n          defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {\n              !isUpdatingChildComponent && warn$2(\"$listeners is readonly.\", vm);\n          }, true);\n      }\n  }\n  var currentRenderingInstance = null;\n  function renderMixin(Vue) {\n      // install runtime convenience helpers\n      installRenderHelpers(Vue.prototype);\n      Vue.prototype.$nextTick = function (fn) {\n          return nextTick(fn, this);\n      };\n      Vue.prototype._render = function () {\n          var vm = this;\n          var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;\n          if (_parentVnode && vm._isMounted) {\n              vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n              if (vm._slotsProxy) {\n                  syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n              }\n          }\n          // set parent vnode. this allows render functions to have access\n          // to the data on the placeholder node.\n          vm.$vnode = _parentVnode;\n          // render self\n          var prevInst = currentInstance;\n          var prevRenderInst = currentRenderingInstance;\n          var vnode;\n          try {\n              setCurrentInstance(vm);\n              currentRenderingInstance = vm;\n              vnode = render.call(vm._renderProxy, vm.$createElement);\n          }\n          catch (e) {\n              handleError(e, vm, \"render\");\n              // return error render result,\n              // or previous vnode to prevent render error causing blank component\n              /* istanbul ignore else */\n              if (vm.$options.renderError) {\n                  try {\n                      vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                  }\n                  catch (e) {\n                      handleError(e, vm, \"renderError\");\n                      vnode = vm._vnode;\n                  }\n              }\n              else {\n                  vnode = vm._vnode;\n              }\n          }\n          finally {\n              currentRenderingInstance = prevRenderInst;\n              setCurrentInstance(prevInst);\n          }\n          // if the returned array contains only a single node, allow it\n          if (isArray(vnode) && vnode.length === 1) {\n              vnode = vnode[0];\n          }\n          // return empty vnode in case the render function errored out\n          if (!(vnode instanceof VNode)) {\n              if (isArray(vnode)) {\n                  warn$2('Multiple root nodes returned from render function. Render function ' +\n                      'should return a single root node.', vm);\n              }\n              vnode = createEmptyVNode();\n          }\n          // set parent\n          vnode.parent = _parentVnode;\n          return vnode;\n      };\n  }\n\n  function ensureCtor(comp, base) {\n      if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n          comp = comp.default;\n      }\n      return isObject(comp) ? base.extend(comp) : comp;\n  }\n  function createAsyncPlaceholder(factory, data, context, children, tag) {\n      var node = createEmptyVNode();\n      node.asyncFactory = factory;\n      node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n      return node;\n  }\n  function resolveAsyncComponent(factory, baseCtor) {\n      if (isTrue(factory.error) && isDef(factory.errorComp)) {\n          return factory.errorComp;\n      }\n      if (isDef(factory.resolved)) {\n          return factory.resolved;\n      }\n      var owner = currentRenderingInstance;\n      if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n          // already pending\n          factory.owners.push(owner);\n      }\n      if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n          return factory.loadingComp;\n      }\n      if (owner && !isDef(factory.owners)) {\n          var owners_1 = (factory.owners = [owner]);\n          var sync_1 = true;\n          var timerLoading_1 = null;\n          var timerTimeout_1 = null;\n          owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });\n          var forceRender_1 = function (renderCompleted) {\n              for (var i = 0, l = owners_1.length; i < l; i++) {\n                  owners_1[i].$forceUpdate();\n              }\n              if (renderCompleted) {\n                  owners_1.length = 0;\n                  if (timerLoading_1 !== null) {\n                      clearTimeout(timerLoading_1);\n                      timerLoading_1 = null;\n                  }\n                  if (timerTimeout_1 !== null) {\n                      clearTimeout(timerTimeout_1);\n                      timerTimeout_1 = null;\n                  }\n              }\n          };\n          var resolve = once(function (res) {\n              // cache resolved\n              factory.resolved = ensureCtor(res, baseCtor);\n              // invoke callbacks only if this is not a synchronous resolve\n              // (async resolves are shimmed as synchronous during SSR)\n              if (!sync_1) {\n                  forceRender_1(true);\n              }\n              else {\n                  owners_1.length = 0;\n              }\n          });\n          var reject_1 = once(function (reason) {\n              warn$2(\"Failed to resolve async component: \".concat(String(factory)) +\n                      (reason ? \"\\nReason: \".concat(reason) : ''));\n              if (isDef(factory.errorComp)) {\n                  factory.error = true;\n                  forceRender_1(true);\n              }\n          });\n          var res_1 = factory(resolve, reject_1);\n          if (isObject(res_1)) {\n              if (isPromise(res_1)) {\n                  // () => Promise\n                  if (isUndef(factory.resolved)) {\n                      res_1.then(resolve, reject_1);\n                  }\n              }\n              else if (isPromise(res_1.component)) {\n                  res_1.component.then(resolve, reject_1);\n                  if (isDef(res_1.error)) {\n                      factory.errorComp = ensureCtor(res_1.error, baseCtor);\n                  }\n                  if (isDef(res_1.loading)) {\n                      factory.loadingComp = ensureCtor(res_1.loading, baseCtor);\n                      if (res_1.delay === 0) {\n                          factory.loading = true;\n                      }\n                      else {\n                          // @ts-expect-error NodeJS timeout type\n                          timerLoading_1 = setTimeout(function () {\n                              timerLoading_1 = null;\n                              if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                  factory.loading = true;\n                                  forceRender_1(false);\n                              }\n                          }, res_1.delay || 200);\n                      }\n                  }\n                  if (isDef(res_1.timeout)) {\n                      // @ts-expect-error NodeJS timeout type\n                      timerTimeout_1 = setTimeout(function () {\n                          timerTimeout_1 = null;\n                          if (isUndef(factory.resolved)) {\n                              reject_1(\"timeout (\".concat(res_1.timeout, \"ms)\") );\n                          }\n                      }, res_1.timeout);\n                  }\n              }\n          }\n          sync_1 = false;\n          // return in case resolved synchronously\n          return factory.loading ? factory.loadingComp : factory.resolved;\n      }\n  }\n\n  function getFirstComponentChild(children) {\n      if (isArray(children)) {\n          for (var i = 0; i < children.length; i++) {\n              var c = children[i];\n              if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                  return c;\n              }\n          }\n      }\n  }\n\n  function initEvents(vm) {\n      vm._events = Object.create(null);\n      vm._hasHookEvent = false;\n      // init parent attached events\n      var listeners = vm.$options._parentListeners;\n      if (listeners) {\n          updateComponentListeners(vm, listeners);\n      }\n  }\n  var target$1;\n  function add$1(event, fn) {\n      target$1.$on(event, fn);\n  }\n  function remove$1(event, fn) {\n      target$1.$off(event, fn);\n  }\n  function createOnceHandler$1(event, fn) {\n      var _target = target$1;\n      return function onceHandler() {\n          var res = fn.apply(null, arguments);\n          if (res !== null) {\n              _target.$off(event, onceHandler);\n          }\n      };\n  }\n  function updateComponentListeners(vm, listeners, oldListeners) {\n      target$1 = vm;\n      updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n      target$1 = undefined;\n  }\n  function eventsMixin(Vue) {\n      var hookRE = /^hook:/;\n      Vue.prototype.$on = function (event, fn) {\n          var vm = this;\n          if (isArray(event)) {\n              for (var i = 0, l = event.length; i < l; i++) {\n                  vm.$on(event[i], fn);\n              }\n          }\n          else {\n              (vm._events[event] || (vm._events[event] = [])).push(fn);\n              // optimize hook:event cost by using a boolean flag marked at registration\n              // instead of a hash lookup\n              if (hookRE.test(event)) {\n                  vm._hasHookEvent = true;\n              }\n          }\n          return vm;\n      };\n      Vue.prototype.$once = function (event, fn) {\n          var vm = this;\n          function on() {\n              vm.$off(event, on);\n              fn.apply(vm, arguments);\n          }\n          on.fn = fn;\n          vm.$on(event, on);\n          return vm;\n      };\n      Vue.prototype.$off = function (event, fn) {\n          var vm = this;\n          // all\n          if (!arguments.length) {\n              vm._events = Object.create(null);\n              return vm;\n          }\n          // array of events\n          if (isArray(event)) {\n              for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {\n                  vm.$off(event[i_1], fn);\n              }\n              return vm;\n          }\n          // specific event\n          var cbs = vm._events[event];\n          if (!cbs) {\n              return vm;\n          }\n          if (!fn) {\n              vm._events[event] = null;\n              return vm;\n          }\n          // specific handler\n          var cb;\n          var i = cbs.length;\n          while (i--) {\n              cb = cbs[i];\n              if (cb === fn || cb.fn === fn) {\n                  cbs.splice(i, 1);\n                  break;\n              }\n          }\n          return vm;\n      };\n      Vue.prototype.$emit = function (event) {\n          var vm = this;\n          {\n              var lowerCaseEvent = event.toLowerCase();\n              if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                  tip(\"Event \\\"\".concat(lowerCaseEvent, \"\\\" is emitted in component \") +\n                      \"\".concat(formatComponentName(vm), \" but the handler is registered for \\\"\").concat(event, \"\\\". \") +\n                      \"Note that HTML attributes are case-insensitive and you cannot use \" +\n                      \"v-on to listen to camelCase events when using in-DOM templates. \" +\n                      \"You should probably use \\\"\".concat(hyphenate(event), \"\\\" instead of \\\"\").concat(event, \"\\\".\"));\n              }\n          }\n          var cbs = vm._events[event];\n          if (cbs) {\n              cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n              var args = toArray(arguments, 1);\n              var info = \"event handler for \\\"\".concat(event, \"\\\"\");\n              for (var i = 0, l = cbs.length; i < l; i++) {\n                  invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n              }\n          }\n          return vm;\n      };\n  }\n\n  var activeEffectScope;\n  var EffectScope = /** @class */ (function () {\n      function EffectScope(detached) {\n          if (detached === void 0) { detached = false; }\n          this.detached = detached;\n          /**\n           * @internal\n           */\n          this.active = true;\n          /**\n           * @internal\n           */\n          this.effects = [];\n          /**\n           * @internal\n           */\n          this.cleanups = [];\n          this.parent = activeEffectScope;\n          if (!detached && activeEffectScope) {\n              this.index =\n                  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n          }\n      }\n      EffectScope.prototype.run = function (fn) {\n          if (this.active) {\n              var currentEffectScope = activeEffectScope;\n              try {\n                  activeEffectScope = this;\n                  return fn();\n              }\n              finally {\n                  activeEffectScope = currentEffectScope;\n              }\n          }\n          else {\n              warn$2(\"cannot run an inactive effect scope.\");\n          }\n      };\n      /**\n       * This should only be called on non-detached scopes\n       * @internal\n       */\n      EffectScope.prototype.on = function () {\n          activeEffectScope = this;\n      };\n      /**\n       * This should only be called on non-detached scopes\n       * @internal\n       */\n      EffectScope.prototype.off = function () {\n          activeEffectScope = this.parent;\n      };\n      EffectScope.prototype.stop = function (fromParent) {\n          if (this.active) {\n              var i = void 0, l = void 0;\n              for (i = 0, l = this.effects.length; i < l; i++) {\n                  this.effects[i].teardown();\n              }\n              for (i = 0, l = this.cleanups.length; i < l; i++) {\n                  this.cleanups[i]();\n              }\n              if (this.scopes) {\n                  for (i = 0, l = this.scopes.length; i < l; i++) {\n                      this.scopes[i].stop(true);\n                  }\n              }\n              // nested scope, dereference from parent to avoid memory leaks\n              if (!this.detached && this.parent && !fromParent) {\n                  // optimized O(1) removal\n                  var last = this.parent.scopes.pop();\n                  if (last && last !== this) {\n                      this.parent.scopes[this.index] = last;\n                      last.index = this.index;\n                  }\n              }\n              this.parent = undefined;\n              this.active = false;\n          }\n      };\n      return EffectScope;\n  }());\n  function effectScope(detached) {\n      return new EffectScope(detached);\n  }\n  /**\n   * @internal\n   */\n  function recordEffectScope(effect, scope) {\n      if (scope === void 0) { scope = activeEffectScope; }\n      if (scope && scope.active) {\n          scope.effects.push(effect);\n      }\n  }\n  function getCurrentScope() {\n      return activeEffectScope;\n  }\n  function onScopeDispose(fn) {\n      if (activeEffectScope) {\n          activeEffectScope.cleanups.push(fn);\n      }\n      else {\n          warn$2(\"onScopeDispose() is called when there is no active effect scope\" +\n              \" to be associated with.\");\n      }\n  }\n\n  var activeInstance = null;\n  var isUpdatingChildComponent = false;\n  function setActiveInstance(vm) {\n      var prevActiveInstance = activeInstance;\n      activeInstance = vm;\n      return function () {\n          activeInstance = prevActiveInstance;\n      };\n  }\n  function initLifecycle(vm) {\n      var options = vm.$options;\n      // locate first non-abstract parent\n      var parent = options.parent;\n      if (parent && !options.abstract) {\n          while (parent.$options.abstract && parent.$parent) {\n              parent = parent.$parent;\n          }\n          parent.$children.push(vm);\n      }\n      vm.$parent = parent;\n      vm.$root = parent ? parent.$root : vm;\n      vm.$children = [];\n      vm.$refs = {};\n      vm._provided = parent ? parent._provided : Object.create(null);\n      vm._watcher = null;\n      vm._inactive = null;\n      vm._directInactive = false;\n      vm._isMounted = false;\n      vm._isDestroyed = false;\n      vm._isBeingDestroyed = false;\n  }\n  function lifecycleMixin(Vue) {\n      Vue.prototype._update = function (vnode, hydrating) {\n          var vm = this;\n          var prevEl = vm.$el;\n          var prevVnode = vm._vnode;\n          var restoreActiveInstance = setActiveInstance(vm);\n          vm._vnode = vnode;\n          // Vue.prototype.__patch__ is injected in entry points\n          // based on the rendering backend used.\n          if (!prevVnode) {\n              // initial render\n              vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n          }\n          else {\n              // updates\n              vm.$el = vm.__patch__(prevVnode, vnode);\n          }\n          restoreActiveInstance();\n          // update __vue__ reference\n          if (prevEl) {\n              prevEl.__vue__ = null;\n          }\n          if (vm.$el) {\n              vm.$el.__vue__ = vm;\n          }\n          // if parent is an HOC, update its $el as well\n          var wrapper = vm;\n          while (wrapper &&\n              wrapper.$vnode &&\n              wrapper.$parent &&\n              wrapper.$vnode === wrapper.$parent._vnode) {\n              wrapper.$parent.$el = wrapper.$el;\n              wrapper = wrapper.$parent;\n          }\n          // updated hook is called by the scheduler to ensure that children are\n          // updated in a parent's updated hook.\n      };\n      Vue.prototype.$forceUpdate = function () {\n          var vm = this;\n          if (vm._watcher) {\n              vm._watcher.update();\n          }\n      };\n      Vue.prototype.$destroy = function () {\n          var vm = this;\n          if (vm._isBeingDestroyed) {\n              return;\n          }\n          callHook$1(vm, 'beforeDestroy');\n          vm._isBeingDestroyed = true;\n          // remove self from parent\n          var parent = vm.$parent;\n          if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n              remove$2(parent.$children, vm);\n          }\n          // teardown scope. this includes both the render watcher and other\n          // watchers created\n          vm._scope.stop();\n          // remove reference from data ob\n          // frozen object may not have observer.\n          if (vm._data.__ob__) {\n              vm._data.__ob__.vmCount--;\n          }\n          // call the last hook...\n          vm._isDestroyed = true;\n          // invoke destroy hooks on current rendered tree\n          vm.__patch__(vm._vnode, null);\n          // fire destroyed hook\n          callHook$1(vm, 'destroyed');\n          // turn off all instance listeners.\n          vm.$off();\n          // remove __vue__ reference\n          if (vm.$el) {\n              vm.$el.__vue__ = null;\n          }\n          // release circular reference (#6759)\n          if (vm.$vnode) {\n              vm.$vnode.parent = null;\n          }\n      };\n  }\n  function mountComponent(vm, el, hydrating) {\n      vm.$el = el;\n      if (!vm.$options.render) {\n          // @ts-expect-error invalid type\n          vm.$options.render = createEmptyVNode;\n          {\n              /* istanbul ignore if */\n              if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                  vm.$options.el ||\n                  el) {\n                  warn$2('You are using the runtime-only build of Vue where the template ' +\n                      'compiler is not available. Either pre-compile the templates into ' +\n                      'render functions, or use the compiler-included build.', vm);\n              }\n              else {\n                  warn$2('Failed to mount component: template or render function not defined.', vm);\n              }\n          }\n      }\n      callHook$1(vm, 'beforeMount');\n      var updateComponent;\n      /* istanbul ignore if */\n      if (config.performance && mark) {\n          updateComponent = function () {\n              var name = vm._name;\n              var id = vm._uid;\n              var startTag = \"vue-perf-start:\".concat(id);\n              var endTag = \"vue-perf-end:\".concat(id);\n              mark(startTag);\n              var vnode = vm._render();\n              mark(endTag);\n              measure(\"vue \".concat(name, \" render\"), startTag, endTag);\n              mark(startTag);\n              vm._update(vnode, hydrating);\n              mark(endTag);\n              measure(\"vue \".concat(name, \" patch\"), startTag, endTag);\n          };\n      }\n      else {\n          updateComponent = function () {\n              vm._update(vm._render(), hydrating);\n          };\n      }\n      var watcherOptions = {\n          before: function () {\n              if (vm._isMounted && !vm._isDestroyed) {\n                  callHook$1(vm, 'beforeUpdate');\n              }\n          }\n      };\n      {\n          watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };\n          watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };\n      }\n      // we set this to vm._watcher inside the watcher's constructor\n      // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n      // component's mounted hook), which relies on vm._watcher being already defined\n      new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n      hydrating = false;\n      // flush buffer for flush: \"pre\" watchers queued in setup()\n      var preWatchers = vm._preWatchers;\n      if (preWatchers) {\n          for (var i = 0; i < preWatchers.length; i++) {\n              preWatchers[i].run();\n          }\n      }\n      // manually mounted instance, call mounted on self\n      // mounted is called for render-created child components in its inserted hook\n      if (vm.$vnode == null) {\n          vm._isMounted = true;\n          callHook$1(vm, 'mounted');\n      }\n      return vm;\n  }\n  function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n      {\n          isUpdatingChildComponent = true;\n      }\n      // determine whether component has slot children\n      // we need to do this before overwriting $options._renderChildren.\n      // check if there are dynamic scopedSlots (hand-written or compiled but with\n      // dynamic slot names). Static scoped slots compiled from template has the\n      // \"$stable\" marker.\n      var newScopedSlots = parentVnode.data.scopedSlots;\n      var oldScopedSlots = vm.$scopedSlots;\n      var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n          (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n          (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n          (!newScopedSlots && vm.$scopedSlots.$key));\n      // Any static slot children from the parent may have changed during parent's\n      // update. Dynamic scoped slots may also have changed. In such cases, a forced\n      // update is necessary to ensure correctness.\n      var needsForceUpdate = !!(renderChildren || // has new static slots\n          vm.$options._renderChildren || // has old static slots\n          hasDynamicScopedSlot);\n      var prevVNode = vm.$vnode;\n      vm.$options._parentVnode = parentVnode;\n      vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n      if (vm._vnode) {\n          // update child tree's parent\n          vm._vnode.parent = parentVnode;\n      }\n      vm.$options._renderChildren = renderChildren;\n      // update $attrs and $listeners hash\n      // these are also reactive so they may trigger child update if the child\n      // used them during render\n      var attrs = parentVnode.data.attrs || emptyObject;\n      if (vm._attrsProxy) {\n          // force update if attrs are accessed and has changed since it may be\n          // passed to a child component.\n          if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n              needsForceUpdate = true;\n          }\n      }\n      vm.$attrs = attrs;\n      // update listeners\n      listeners = listeners || emptyObject;\n      var prevListeners = vm.$options._parentListeners;\n      if (vm._listenersProxy) {\n          syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n      }\n      vm.$listeners = vm.$options._parentListeners = listeners;\n      updateComponentListeners(vm, listeners, prevListeners);\n      // update props\n      if (propsData && vm.$options.props) {\n          toggleObserving(false);\n          var props = vm._props;\n          var propKeys = vm.$options._propKeys || [];\n          for (var i = 0; i < propKeys.length; i++) {\n              var key = propKeys[i];\n              var propOptions = vm.$options.props; // wtf flow?\n              props[key] = validateProp(key, propOptions, propsData, vm);\n          }\n          toggleObserving(true);\n          // keep a copy of raw propsData\n          vm.$options.propsData = propsData;\n      }\n      // resolve slots + force update if has children\n      if (needsForceUpdate) {\n          vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n          vm.$forceUpdate();\n      }\n      {\n          isUpdatingChildComponent = false;\n      }\n  }\n  function isInInactiveTree(vm) {\n      while (vm && (vm = vm.$parent)) {\n          if (vm._inactive)\n              return true;\n      }\n      return false;\n  }\n  function activateChildComponent(vm, direct) {\n      if (direct) {\n          vm._directInactive = false;\n          if (isInInactiveTree(vm)) {\n              return;\n          }\n      }\n      else if (vm._directInactive) {\n          return;\n      }\n      if (vm._inactive || vm._inactive === null) {\n          vm._inactive = false;\n          for (var i = 0; i < vm.$children.length; i++) {\n              activateChildComponent(vm.$children[i]);\n          }\n          callHook$1(vm, 'activated');\n      }\n  }\n  function deactivateChildComponent(vm, direct) {\n      if (direct) {\n          vm._directInactive = true;\n          if (isInInactiveTree(vm)) {\n              return;\n          }\n      }\n      if (!vm._inactive) {\n          vm._inactive = true;\n          for (var i = 0; i < vm.$children.length; i++) {\n              deactivateChildComponent(vm.$children[i]);\n          }\n          callHook$1(vm, 'deactivated');\n      }\n  }\n  function callHook$1(vm, hook, args, setContext) {\n      if (setContext === void 0) { setContext = true; }\n      // #7573 disable dep collection when invoking lifecycle hooks\n      pushTarget();\n      var prevInst = currentInstance;\n      var prevScope = getCurrentScope();\n      setContext && setCurrentInstance(vm);\n      var handlers = vm.$options[hook];\n      var info = \"\".concat(hook, \" hook\");\n      if (handlers) {\n          for (var i = 0, j = handlers.length; i < j; i++) {\n              invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n          }\n      }\n      if (vm._hasHookEvent) {\n          vm.$emit('hook:' + hook);\n      }\n      if (setContext) {\n          setCurrentInstance(prevInst);\n          prevScope && prevScope.on();\n      }\n      popTarget();\n  }\n\n  var MAX_UPDATE_COUNT = 100;\n  var queue = [];\n  var activatedChildren = [];\n  var has = {};\n  var circular = {};\n  var waiting = false;\n  var flushing = false;\n  var index$1 = 0;\n  /**\n   * Reset the scheduler's state.\n   */\n  function resetSchedulerState() {\n      index$1 = queue.length = activatedChildren.length = 0;\n      has = {};\n      {\n          circular = {};\n      }\n      waiting = flushing = false;\n  }\n  // Async edge case #6566 requires saving the timestamp when event listeners are\n  // attached. However, calling performance.now() has a perf overhead especially\n  // if the page has thousands of event listeners. Instead, we take a timestamp\n  // every time the scheduler flushes and use that for all event listeners\n  // attached during that flush.\n  var currentFlushTimestamp = 0;\n  // Async edge case fix requires storing an event listener's attach timestamp.\n  var getNow = Date.now;\n  // Determine what event timestamp the browser is using. Annoyingly, the\n  // timestamp can either be hi-res (relative to page load) or low-res\n  // (relative to UNIX epoch), so in order to compare time we have to use the\n  // same timestamp type when saving the flush timestamp.\n  // All IE versions use low-res event timestamps, and have problematic clock\n  // implementations (#9632)\n  if (inBrowser && !isIE) {\n      var performance_1 = window.performance;\n      if (performance_1 &&\n          typeof performance_1.now === 'function' &&\n          getNow() > document.createEvent('Event').timeStamp) {\n          // if the event timestamp, although evaluated AFTER the Date.now(), is\n          // smaller than it, it means the event is using a hi-res timestamp,\n          // and we need to use the hi-res version for event listener timestamps as\n          // well.\n          getNow = function () { return performance_1.now(); };\n      }\n  }\n  var sortCompareFn = function (a, b) {\n      if (a.post) {\n          if (!b.post)\n              return 1;\n      }\n      else if (b.post) {\n          return -1;\n      }\n      return a.id - b.id;\n  };\n  /**\n   * Flush both queues and run the watchers.\n   */\n  function flushSchedulerQueue() {\n      currentFlushTimestamp = getNow();\n      flushing = true;\n      var watcher, id;\n      // Sort queue before flush.\n      // This ensures that:\n      // 1. Components are updated from parent to child. (because parent is always\n      //    created before the child)\n      // 2. A component's user watchers are run before its render watcher (because\n      //    user watchers are created before the render watcher)\n      // 3. If a component is destroyed during a parent component's watcher run,\n      //    its watchers can be skipped.\n      queue.sort(sortCompareFn);\n      // do not cache length because more watchers might be pushed\n      // as we run existing watchers\n      for (index$1 = 0; index$1 < queue.length; index$1++) {\n          watcher = queue[index$1];\n          if (watcher.before) {\n              watcher.before();\n          }\n          id = watcher.id;\n          has[id] = null;\n          watcher.run();\n          // in dev build, check and stop circular updates.\n          if (has[id] != null) {\n              circular[id] = (circular[id] || 0) + 1;\n              if (circular[id] > MAX_UPDATE_COUNT) {\n                  warn$2('You may have an infinite update loop ' +\n                      (watcher.user\n                          ? \"in watcher with expression \\\"\".concat(watcher.expression, \"\\\"\")\n                          : \"in a component render function.\"), watcher.vm);\n                  break;\n              }\n          }\n      }\n      // keep copies of post queues before resetting state\n      var activatedQueue = activatedChildren.slice();\n      var updatedQueue = queue.slice();\n      resetSchedulerState();\n      // call component updated and activated hooks\n      callActivatedHooks(activatedQueue);\n      callUpdatedHooks(updatedQueue);\n      cleanupDeps();\n      // devtool hook\n      /* istanbul ignore if */\n      if (devtools && config.devtools) {\n          devtools.emit('flush');\n      }\n  }\n  function callUpdatedHooks(queue) {\n      var i = queue.length;\n      while (i--) {\n          var watcher = queue[i];\n          var vm = watcher.vm;\n          if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n              callHook$1(vm, 'updated');\n          }\n      }\n  }\n  /**\n   * Queue a kept-alive component that was activated during patch.\n   * The queue will be processed after the entire tree has been patched.\n   */\n  function queueActivatedComponent(vm) {\n      // setting _inactive to false here so that a render function can\n      // rely on checking whether it's in an inactive tree (e.g. router-view)\n      vm._inactive = false;\n      activatedChildren.push(vm);\n  }\n  function callActivatedHooks(queue) {\n      for (var i = 0; i < queue.length; i++) {\n          queue[i]._inactive = true;\n          activateChildComponent(queue[i], true /* true */);\n      }\n  }\n  /**\n   * Push a watcher into the watcher queue.\n   * Jobs with duplicate IDs will be skipped unless it's\n   * pushed when the queue is being flushed.\n   */\n  function queueWatcher(watcher) {\n      var id = watcher.id;\n      if (has[id] != null) {\n          return;\n      }\n      if (watcher === Dep.target && watcher.noRecurse) {\n          return;\n      }\n      has[id] = true;\n      if (!flushing) {\n          queue.push(watcher);\n      }\n      else {\n          // if already flushing, splice the watcher based on its id\n          // if already past its id, it will be run next immediately.\n          var i = queue.length - 1;\n          while (i > index$1 && queue[i].id > watcher.id) {\n              i--;\n          }\n          queue.splice(i + 1, 0, watcher);\n      }\n      // queue the flush\n      if (!waiting) {\n          waiting = true;\n          if (!config.async) {\n              flushSchedulerQueue();\n              return;\n          }\n          nextTick(flushSchedulerQueue);\n      }\n  }\n\n  var WATCHER = \"watcher\";\n  var WATCHER_CB = \"\".concat(WATCHER, \" callback\");\n  var WATCHER_GETTER = \"\".concat(WATCHER, \" getter\");\n  var WATCHER_CLEANUP = \"\".concat(WATCHER, \" cleanup\");\n  // Simple effect.\n  function watchEffect(effect, options) {\n      return doWatch(effect, null, options);\n  }\n  function watchPostEffect(effect, options) {\n      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'post' }) ));\n  }\n  function watchSyncEffect(effect, options) {\n      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'sync' }) ));\n  }\n  // initial value for watchers to trigger on undefined initial values\n  var INITIAL_WATCHER_VALUE = {};\n  // implementation\n  function watch(source, cb, options) {\n      if (typeof cb !== 'function') {\n          warn$2(\"`watch(fn, options?)` signature has been moved to a separate API. \" +\n              \"Use `watchEffect(fn, options?)` instead. `watch` now only \" +\n              \"supports `watch(source, cb, options?) signature.\");\n      }\n      return doWatch(source, cb, options);\n  }\n  function doWatch(source, cb, _a) {\n      var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;\n      if (!cb) {\n          if (immediate !== undefined) {\n              warn$2(\"watch() \\\"immediate\\\" option is only respected when using the \" +\n                  \"watch(source, callback, options?) signature.\");\n          }\n          if (deep !== undefined) {\n              warn$2(\"watch() \\\"deep\\\" option is only respected when using the \" +\n                  \"watch(source, callback, options?) signature.\");\n          }\n      }\n      var warnInvalidSource = function (s) {\n          warn$2(\"Invalid watch source: \".concat(s, \". A watch source can only be a getter/effect \") +\n              \"function, a ref, a reactive object, or an array of these types.\");\n      };\n      var instance = currentInstance;\n      var call = function (fn, type, args) {\n          if (args === void 0) { args = null; }\n          var res = invokeWithErrorHandling(fn, null, args, instance, type);\n          if (deep && res && res.__ob__)\n              res.__ob__.dep.depend();\n          return res;\n      };\n      var getter;\n      var forceTrigger = false;\n      var isMultiSource = false;\n      if (isRef(source)) {\n          getter = function () { return source.value; };\n          forceTrigger = isShallow(source);\n      }\n      else if (isReactive(source)) {\n          getter = function () {\n              source.__ob__.dep.depend();\n              return source;\n          };\n          deep = true;\n      }\n      else if (isArray(source)) {\n          isMultiSource = true;\n          forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });\n          getter = function () {\n              return source.map(function (s) {\n                  if (isRef(s)) {\n                      return s.value;\n                  }\n                  else if (isReactive(s)) {\n                      s.__ob__.dep.depend();\n                      return traverse(s);\n                  }\n                  else if (isFunction(s)) {\n                      return call(s, WATCHER_GETTER);\n                  }\n                  else {\n                      warnInvalidSource(s);\n                  }\n              });\n          };\n      }\n      else if (isFunction(source)) {\n          if (cb) {\n              // getter with cb\n              getter = function () { return call(source, WATCHER_GETTER); };\n          }\n          else {\n              // no cb -> simple effect\n              getter = function () {\n                  if (instance && instance._isDestroyed) {\n                      return;\n                  }\n                  if (cleanup) {\n                      cleanup();\n                  }\n                  return call(source, WATCHER, [onCleanup]);\n              };\n          }\n      }\n      else {\n          getter = noop;\n          warnInvalidSource(source);\n      }\n      if (cb && deep) {\n          var baseGetter_1 = getter;\n          getter = function () { return traverse(baseGetter_1()); };\n      }\n      var cleanup;\n      var onCleanup = function (fn) {\n          cleanup = watcher.onStop = function () {\n              call(fn, WATCHER_CLEANUP);\n          };\n      };\n      // in SSR there is no need to setup an actual effect, and it should be noop\n      // unless it's eager\n      if (isServerRendering()) {\n          // we will also not call the invalidate callback (+ runner is not set up)\n          onCleanup = noop;\n          if (!cb) {\n              getter();\n          }\n          else if (immediate) {\n              call(cb, WATCHER_CB, [\n                  getter(),\n                  isMultiSource ? [] : undefined,\n                  onCleanup\n              ]);\n          }\n          return noop;\n      }\n      var watcher = new Watcher(currentInstance, getter, noop, {\n          lazy: true\n      });\n      watcher.noRecurse = !cb;\n      var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n      // overwrite default run\n      watcher.run = function () {\n          if (!watcher.active) {\n              return;\n          }\n          if (cb) {\n              // watch(source, cb)\n              var newValue = watcher.get();\n              if (deep ||\n                  forceTrigger ||\n                  (isMultiSource\n                      ? newValue.some(function (v, i) {\n                          return hasChanged(v, oldValue[i]);\n                      })\n                      : hasChanged(newValue, oldValue))) {\n                  // cleanup before running cb again\n                  if (cleanup) {\n                      cleanup();\n                  }\n                  call(cb, WATCHER_CB, [\n                      newValue,\n                      // pass undefined as the old value when it's changed for the first time\n                      oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                      onCleanup\n                  ]);\n                  oldValue = newValue;\n              }\n          }\n          else {\n              // watchEffect\n              watcher.get();\n          }\n      };\n      if (flush === 'sync') {\n          watcher.update = watcher.run;\n      }\n      else if (flush === 'post') {\n          watcher.post = true;\n          watcher.update = function () { return queueWatcher(watcher); };\n      }\n      else {\n          // pre\n          watcher.update = function () {\n              if (instance && instance === currentInstance && !instance._isMounted) {\n                  // pre-watcher triggered before\n                  var buffer = instance._preWatchers || (instance._preWatchers = []);\n                  if (buffer.indexOf(watcher) < 0)\n                      buffer.push(watcher);\n              }\n              else {\n                  queueWatcher(watcher);\n              }\n          };\n      }\n      {\n          watcher.onTrack = onTrack;\n          watcher.onTrigger = onTrigger;\n      }\n      // initial run\n      if (cb) {\n          if (immediate) {\n              watcher.run();\n          }\n          else {\n              oldValue = watcher.get();\n          }\n      }\n      else if (flush === 'post' && instance) {\n          instance.$once('hook:mounted', function () { return watcher.get(); });\n      }\n      else {\n          watcher.get();\n      }\n      return function () {\n          watcher.teardown();\n      };\n  }\n\n  function provide(key, value) {\n      if (!currentInstance) {\n          {\n              warn$2(\"provide() can only be used inside setup().\");\n          }\n      }\n      else {\n          // TS doesn't allow symbol as index type\n          resolveProvided(currentInstance)[key] = value;\n      }\n  }\n  function resolveProvided(vm) {\n      // by default an instance inherits its parent's provides object\n      // but when it needs to provide values of its own, it creates its\n      // own provides object using parent provides object as prototype.\n      // this way in `inject` we can simply look up injections from direct\n      // parent and let the prototype chain do the work.\n      var existing = vm._provided;\n      var parentProvides = vm.$parent && vm.$parent._provided;\n      if (parentProvides === existing) {\n          return (vm._provided = Object.create(parentProvides));\n      }\n      else {\n          return existing;\n      }\n  }\n  function inject(key, defaultValue, treatDefaultAsFactory) {\n      if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }\n      // fallback to `currentRenderingInstance` so that this can be called in\n      // a functional component\n      var instance = currentInstance;\n      if (instance) {\n          // #2400\n          // to support `app.use` plugins,\n          // fallback to appContext's `provides` if the instance is at root\n          var provides = instance.$parent && instance.$parent._provided;\n          if (provides && key in provides) {\n              // TS doesn't allow symbol as index type\n              return provides[key];\n          }\n          else if (arguments.length > 1) {\n              return treatDefaultAsFactory && isFunction(defaultValue)\n                  ? defaultValue.call(instance)\n                  : defaultValue;\n          }\n          else {\n              warn$2(\"injection \\\"\".concat(String(key), \"\\\" not found.\"));\n          }\n      }\n      else {\n          warn$2(\"inject() can only be used inside setup() or functional components.\");\n      }\n  }\n\n  /**\n   * @internal this function needs manual public type declaration because it relies\n   * on previously manually authored types from Vue 2\n   */\n  function h(type, props, children) {\n      if (!currentInstance) {\n          warn$2(\"globally imported h() can only be invoked when there is an active \" +\n                  \"component instance, e.g. synchronously in a component's render or setup function.\");\n      }\n      return createElement$1(currentInstance, type, props, children, 2, true);\n  }\n\n  function handleError(err, vm, info) {\n      // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n      // See: https://github.com/vuejs/vuex/issues/1505\n      pushTarget();\n      try {\n          if (vm) {\n              var cur = vm;\n              while ((cur = cur.$parent)) {\n                  var hooks = cur.$options.errorCaptured;\n                  if (hooks) {\n                      for (var i = 0; i < hooks.length; i++) {\n                          try {\n                              var capture = hooks[i].call(cur, err, vm, info) === false;\n                              if (capture)\n                                  return;\n                          }\n                          catch (e) {\n                              globalHandleError(e, cur, 'errorCaptured hook');\n                          }\n                      }\n                  }\n              }\n          }\n          globalHandleError(err, vm, info);\n      }\n      finally {\n          popTarget();\n      }\n  }\n  function invokeWithErrorHandling(handler, context, args, vm, info) {\n      var res;\n      try {\n          res = args ? handler.apply(context, args) : handler.call(context);\n          if (res && !res._isVue && isPromise(res) && !res._handled) {\n              res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n              res._handled = true;\n          }\n      }\n      catch (e) {\n          handleError(e, vm, info);\n      }\n      return res;\n  }\n  function globalHandleError(err, vm, info) {\n      if (config.errorHandler) {\n          try {\n              return config.errorHandler.call(null, err, vm, info);\n          }\n          catch (e) {\n              // if the user intentionally throws the original error in the handler,\n              // do not log it twice\n              if (e !== err) {\n                  logError(e, null, 'config.errorHandler');\n              }\n          }\n      }\n      logError(err, vm, info);\n  }\n  function logError(err, vm, info) {\n      {\n          warn$2(\"Error in \".concat(info, \": \\\"\").concat(err.toString(), \"\\\"\"), vm);\n      }\n      /* istanbul ignore else */\n      if (inBrowser && typeof console !== 'undefined') {\n          console.error(err);\n      }\n      else {\n          throw err;\n      }\n  }\n\n  /* globals MutationObserver */\n  var isUsingMicroTask = false;\n  var callbacks = [];\n  var pending = false;\n  function flushCallbacks() {\n      pending = false;\n      var copies = callbacks.slice(0);\n      callbacks.length = 0;\n      for (var i = 0; i < copies.length; i++) {\n          copies[i]();\n      }\n  }\n  // Here we have async deferring wrappers using microtasks.\n  // In 2.5 we used (macro) tasks (in combination with microtasks).\n  // However, it has subtle problems when state is changed right before repaint\n  // (e.g. #6813, out-in transitions).\n  // Also, using (macro) tasks in event handler would cause some weird behaviors\n  // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n  // So we now use microtasks everywhere, again.\n  // A major drawback of this tradeoff is that there are some scenarios\n  // where microtasks have too high a priority and fire in between supposedly\n  // sequential events (e.g. #4521, #6690, which have workarounds)\n  // or even between bubbling of the same event (#6566).\n  var timerFunc;\n  // The nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore next, $flow-disable-line */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n      var p_1 = Promise.resolve();\n      timerFunc = function () {\n          p_1.then(flushCallbacks);\n          // In problematic UIWebViews, Promise.then doesn't completely break, but\n          // it can get stuck in a weird state where callbacks are pushed into the\n          // microtask queue but the queue isn't being flushed, until the browser\n          // needs to do some other work, e.g. handle a timer. Therefore we can\n          // \"force\" the microtask queue to be flushed by adding an empty timer.\n          if (isIOS)\n              setTimeout(noop);\n      };\n      isUsingMicroTask = true;\n  }\n  else if (!isIE &&\n      typeof MutationObserver !== 'undefined' &&\n      (isNative(MutationObserver) ||\n          // PhantomJS and iOS 7.x\n          MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n      // Use MutationObserver where native Promise is not available,\n      // e.g. PhantomJS, iOS7, Android 4.4\n      // (#6466 MutationObserver is unreliable in IE11)\n      var counter_1 = 1;\n      var observer = new MutationObserver(flushCallbacks);\n      var textNode_1 = document.createTextNode(String(counter_1));\n      observer.observe(textNode_1, {\n          characterData: true\n      });\n      timerFunc = function () {\n          counter_1 = (counter_1 + 1) % 2;\n          textNode_1.data = String(counter_1);\n      };\n      isUsingMicroTask = true;\n  }\n  else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n      // Fallback to setImmediate.\n      // Technically it leverages the (macro) task queue,\n      // but it is still a better choice than setTimeout.\n      timerFunc = function () {\n          setImmediate(flushCallbacks);\n      };\n  }\n  else {\n      // Fallback to setTimeout.\n      timerFunc = function () {\n          setTimeout(flushCallbacks, 0);\n      };\n  }\n  /**\n   * @internal\n   */\n  function nextTick(cb, ctx) {\n      var _resolve;\n      callbacks.push(function () {\n          if (cb) {\n              try {\n                  cb.call(ctx);\n              }\n              catch (e) {\n                  handleError(e, ctx, 'nextTick');\n              }\n          }\n          else if (_resolve) {\n              _resolve(ctx);\n          }\n      });\n      if (!pending) {\n          pending = true;\n          timerFunc();\n      }\n      // $flow-disable-line\n      if (!cb && typeof Promise !== 'undefined') {\n          return new Promise(function (resolve) {\n              _resolve = resolve;\n          });\n      }\n  }\n\n  function useCssModule(name) {\n      /* istanbul ignore else */\n      {\n          {\n              warn$2(\"useCssModule() is not supported in the global build.\");\n          }\n          return emptyObject;\n      }\n  }\n\n  /**\n   * Runtime helper for SFC's CSS variable injection feature.\n   * @private\n   */\n  function useCssVars(getter) {\n      if (!inBrowser && !false)\n          return;\n      var instance = currentInstance;\n      if (!instance) {\n          warn$2(\"useCssVars is called without current active component instance.\");\n          return;\n      }\n      watchPostEffect(function () {\n          var el = instance.$el;\n          var vars = getter(instance, instance._setupProxy);\n          if (el && el.nodeType === 1) {\n              var style = el.style;\n              for (var key in vars) {\n                  style.setProperty(\"--\".concat(key), vars[key]);\n              }\n          }\n      });\n  }\n\n  /**\n   * v3-compatible async component API.\n   * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n   * because it relies on existing manual types\n   */\n  function defineAsyncComponent(source) {\n      if (isFunction(source)) {\n          source = { loader: source };\n      }\n      var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out\n      _b = source.suspensible, // undefined = never times out\n      suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true\n      userOnError = source.onError;\n      if (suspensible) {\n          warn$2(\"The suspensible option for async components is not supported in Vue2. It is ignored.\");\n      }\n      var pendingRequest = null;\n      var retries = 0;\n      var retry = function () {\n          retries++;\n          pendingRequest = null;\n          return load();\n      };\n      var load = function () {\n          var thisRequest;\n          return (pendingRequest ||\n              (thisRequest = pendingRequest =\n                  loader()\n                      .catch(function (err) {\n                      err = err instanceof Error ? err : new Error(String(err));\n                      if (userOnError) {\n                          return new Promise(function (resolve, reject) {\n                              var userRetry = function () { return resolve(retry()); };\n                              var userFail = function () { return reject(err); };\n                              userOnError(err, userRetry, userFail, retries + 1);\n                          });\n                      }\n                      else {\n                          throw err;\n                      }\n                  })\n                      .then(function (comp) {\n                      if (thisRequest !== pendingRequest && pendingRequest) {\n                          return pendingRequest;\n                      }\n                      if (!comp) {\n                          warn$2(\"Async component loader resolved to undefined. \" +\n                              \"If you are using retry(), make sure to return its return value.\");\n                      }\n                      // interop module default\n                      if (comp &&\n                          (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                          comp = comp.default;\n                      }\n                      if (comp && !isObject(comp) && !isFunction(comp)) {\n                          throw new Error(\"Invalid async component load result: \".concat(comp));\n                      }\n                      return comp;\n                  })));\n      };\n      return function () {\n          var component = load();\n          return {\n              component: component,\n              delay: delay,\n              timeout: timeout,\n              error: errorComponent,\n              loading: loadingComponent\n          };\n      };\n  }\n\n  function createLifeCycle(hookName) {\n      return function (fn, target) {\n          if (target === void 0) { target = currentInstance; }\n          if (!target) {\n              warn$2(\"\".concat(formatName(hookName), \" is called when there is no active component instance to be \") +\n                      \"associated with. \" +\n                      \"Lifecycle injection APIs can only be used during execution of setup().\");\n              return;\n          }\n          return injectHook(target, hookName, fn);\n      };\n  }\n  function formatName(name) {\n      if (name === 'beforeDestroy') {\n          name = 'beforeUnmount';\n      }\n      else if (name === 'destroyed') {\n          name = 'unmounted';\n      }\n      return \"on\".concat(name[0].toUpperCase() + name.slice(1));\n  }\n  function injectHook(instance, hookName, fn) {\n      var options = instance.$options;\n      options[hookName] = mergeLifecycleHook(options[hookName], fn);\n  }\n  var onBeforeMount = createLifeCycle('beforeMount');\n  var onMounted = createLifeCycle('mounted');\n  var onBeforeUpdate = createLifeCycle('beforeUpdate');\n  var onUpdated = createLifeCycle('updated');\n  var onBeforeUnmount = createLifeCycle('beforeDestroy');\n  var onUnmounted = createLifeCycle('destroyed');\n  var onActivated = createLifeCycle('activated');\n  var onDeactivated = createLifeCycle('deactivated');\n  var onServerPrefetch = createLifeCycle('serverPrefetch');\n  var onRenderTracked = createLifeCycle('renderTracked');\n  var onRenderTriggered = createLifeCycle('renderTriggered');\n  var injectErrorCapturedHook = createLifeCycle('errorCaptured');\n  function onErrorCaptured(hook, target) {\n      if (target === void 0) { target = currentInstance; }\n      injectErrorCapturedHook(hook, target);\n  }\n\n  /**\n   * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n   */\n  var version = '2.7.16';\n  /**\n   * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n   */\n  function defineComponent(options) {\n      return options;\n  }\n\n  var vca = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    version: version,\n    defineComponent: defineComponent,\n    ref: ref$1,\n    shallowRef: shallowRef,\n    isRef: isRef,\n    toRef: toRef,\n    toRefs: toRefs,\n    unref: unref,\n    proxyRefs: proxyRefs,\n    customRef: customRef,\n    triggerRef: triggerRef,\n    reactive: reactive,\n    isReactive: isReactive,\n    isReadonly: isReadonly,\n    isShallow: isShallow,\n    isProxy: isProxy,\n    shallowReactive: shallowReactive,\n    markRaw: markRaw,\n    toRaw: toRaw,\n    readonly: readonly,\n    shallowReadonly: shallowReadonly,\n    computed: computed,\n    watch: watch,\n    watchEffect: watchEffect,\n    watchPostEffect: watchPostEffect,\n    watchSyncEffect: watchSyncEffect,\n    EffectScope: EffectScope,\n    effectScope: effectScope,\n    onScopeDispose: onScopeDispose,\n    getCurrentScope: getCurrentScope,\n    provide: provide,\n    inject: inject,\n    h: h,\n    getCurrentInstance: getCurrentInstance,\n    useSlots: useSlots,\n    useAttrs: useAttrs,\n    useListeners: useListeners,\n    mergeDefaults: mergeDefaults,\n    nextTick: nextTick,\n    set: set,\n    del: del,\n    useCssModule: useCssModule,\n    useCssVars: useCssVars,\n    defineAsyncComponent: defineAsyncComponent,\n    onBeforeMount: onBeforeMount,\n    onMounted: onMounted,\n    onBeforeUpdate: onBeforeUpdate,\n    onUpdated: onUpdated,\n    onBeforeUnmount: onBeforeUnmount,\n    onUnmounted: onUnmounted,\n    onActivated: onActivated,\n    onDeactivated: onDeactivated,\n    onServerPrefetch: onServerPrefetch,\n    onRenderTracked: onRenderTracked,\n    onRenderTriggered: onRenderTriggered,\n    onErrorCaptured: onErrorCaptured\n  });\n\n  var seenObjects = new _Set();\n  /**\n   * Recursively traverse an object to evoke all converted\n   * getters, so that every nested property inside the object\n   * is collected as a \"deep\" dependency.\n   */\n  function traverse(val) {\n      _traverse(val, seenObjects);\n      seenObjects.clear();\n      return val;\n  }\n  function _traverse(val, seen) {\n      var i, keys;\n      var isA = isArray(val);\n      if ((!isA && !isObject(val)) ||\n          val.__v_skip /* ReactiveFlags.SKIP */ ||\n          Object.isFrozen(val) ||\n          val instanceof VNode) {\n          return;\n      }\n      if (val.__ob__) {\n          var depId = val.__ob__.dep.id;\n          if (seen.has(depId)) {\n              return;\n          }\n          seen.add(depId);\n      }\n      if (isA) {\n          i = val.length;\n          while (i--)\n              _traverse(val[i], seen);\n      }\n      else if (isRef(val)) {\n          _traverse(val.value, seen);\n      }\n      else {\n          keys = Object.keys(val);\n          i = keys.length;\n          while (i--)\n              _traverse(val[keys[i]], seen);\n      }\n  }\n\n  var uid$1 = 0;\n  /**\n   * A watcher parses an expression, collects dependencies,\n   * and fires callback when the expression value changes.\n   * This is used for both the $watch() api and directives.\n   * @internal\n   */\n  var Watcher = /** @class */ (function () {\n      function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {\n          recordEffectScope(this, \n          // if the active effect scope is manually created (not a component scope),\n          // prioritize it\n          activeEffectScope && !activeEffectScope._vm\n              ? activeEffectScope\n              : vm\n                  ? vm._scope\n                  : undefined);\n          if ((this.vm = vm) && isRenderWatcher) {\n              vm._watcher = this;\n          }\n          // options\n          if (options) {\n              this.deep = !!options.deep;\n              this.user = !!options.user;\n              this.lazy = !!options.lazy;\n              this.sync = !!options.sync;\n              this.before = options.before;\n              {\n                  this.onTrack = options.onTrack;\n                  this.onTrigger = options.onTrigger;\n              }\n          }\n          else {\n              this.deep = this.user = this.lazy = this.sync = false;\n          }\n          this.cb = cb;\n          this.id = ++uid$1; // uid for batching\n          this.active = true;\n          this.post = false;\n          this.dirty = this.lazy; // for lazy watchers\n          this.deps = [];\n          this.newDeps = [];\n          this.depIds = new _Set();\n          this.newDepIds = new _Set();\n          this.expression = expOrFn.toString() ;\n          // parse expression for getter\n          if (isFunction(expOrFn)) {\n              this.getter = expOrFn;\n          }\n          else {\n              this.getter = parsePath(expOrFn);\n              if (!this.getter) {\n                  this.getter = noop;\n                  warn$2(\"Failed watching path: \\\"\".concat(expOrFn, \"\\\" \") +\n                          'Watcher only accepts simple dot-delimited paths. ' +\n                          'For full control, use a function instead.', vm);\n              }\n          }\n          this.value = this.lazy ? undefined : this.get();\n      }\n      /**\n       * Evaluate the getter, and re-collect dependencies.\n       */\n      Watcher.prototype.get = function () {\n          pushTarget(this);\n          var value;\n          var vm = this.vm;\n          try {\n              value = this.getter.call(vm, vm);\n          }\n          catch (e) {\n              if (this.user) {\n                  handleError(e, vm, \"getter for watcher \\\"\".concat(this.expression, \"\\\"\"));\n              }\n              else {\n                  throw e;\n              }\n          }\n          finally {\n              // \"touch\" every property so they are all tracked as\n              // dependencies for deep watching\n              if (this.deep) {\n                  traverse(value);\n              }\n              popTarget();\n              this.cleanupDeps();\n          }\n          return value;\n      };\n      /**\n       * Add a dependency to this directive.\n       */\n      Watcher.prototype.addDep = function (dep) {\n          var id = dep.id;\n          if (!this.newDepIds.has(id)) {\n              this.newDepIds.add(id);\n              this.newDeps.push(dep);\n              if (!this.depIds.has(id)) {\n                  dep.addSub(this);\n              }\n          }\n      };\n      /**\n       * Clean up for dependency collection.\n       */\n      Watcher.prototype.cleanupDeps = function () {\n          var i = this.deps.length;\n          while (i--) {\n              var dep = this.deps[i];\n              if (!this.newDepIds.has(dep.id)) {\n                  dep.removeSub(this);\n              }\n          }\n          var tmp = this.depIds;\n          this.depIds = this.newDepIds;\n          this.newDepIds = tmp;\n          this.newDepIds.clear();\n          tmp = this.deps;\n          this.deps = this.newDeps;\n          this.newDeps = tmp;\n          this.newDeps.length = 0;\n      };\n      /**\n       * Subscriber interface.\n       * Will be called when a dependency changes.\n       */\n      Watcher.prototype.update = function () {\n          /* istanbul ignore else */\n          if (this.lazy) {\n              this.dirty = true;\n          }\n          else if (this.sync) {\n              this.run();\n          }\n          else {\n              queueWatcher(this);\n          }\n      };\n      /**\n       * Scheduler job interface.\n       * Will be called by the scheduler.\n       */\n      Watcher.prototype.run = function () {\n          if (this.active) {\n              var value = this.get();\n              if (value !== this.value ||\n                  // Deep watchers and watchers on Object/Arrays should fire even\n                  // when the value is the same, because the value may\n                  // have mutated.\n                  isObject(value) ||\n                  this.deep) {\n                  // set new value\n                  var oldValue = this.value;\n                  this.value = value;\n                  if (this.user) {\n                      var info = \"callback for watcher \\\"\".concat(this.expression, \"\\\"\");\n                      invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                  }\n                  else {\n                      this.cb.call(this.vm, value, oldValue);\n                  }\n              }\n          }\n      };\n      /**\n       * Evaluate the value of the watcher.\n       * This only gets called for lazy watchers.\n       */\n      Watcher.prototype.evaluate = function () {\n          this.value = this.get();\n          this.dirty = false;\n      };\n      /**\n       * Depend on all deps collected by this watcher.\n       */\n      Watcher.prototype.depend = function () {\n          var i = this.deps.length;\n          while (i--) {\n              this.deps[i].depend();\n          }\n      };\n      /**\n       * Remove self from all dependencies' subscriber list.\n       */\n      Watcher.prototype.teardown = function () {\n          if (this.vm && !this.vm._isBeingDestroyed) {\n              remove$2(this.vm._scope.effects, this);\n          }\n          if (this.active) {\n              var i = this.deps.length;\n              while (i--) {\n                  this.deps[i].removeSub(this);\n              }\n              this.active = false;\n              if (this.onStop) {\n                  this.onStop();\n              }\n          }\n      };\n      return Watcher;\n  }());\n\n  var sharedPropertyDefinition = {\n      enumerable: true,\n      configurable: true,\n      get: noop,\n      set: noop\n  };\n  function proxy(target, sourceKey, key) {\n      sharedPropertyDefinition.get = function proxyGetter() {\n          return this[sourceKey][key];\n      };\n      sharedPropertyDefinition.set = function proxySetter(val) {\n          this[sourceKey][key] = val;\n      };\n      Object.defineProperty(target, key, sharedPropertyDefinition);\n  }\n  function initState(vm) {\n      var opts = vm.$options;\n      if (opts.props)\n          initProps$1(vm, opts.props);\n      // Composition API\n      initSetup(vm);\n      if (opts.methods)\n          initMethods(vm, opts.methods);\n      if (opts.data) {\n          initData(vm);\n      }\n      else {\n          var ob = observe((vm._data = {}));\n          ob && ob.vmCount++;\n      }\n      if (opts.computed)\n          initComputed$1(vm, opts.computed);\n      if (opts.watch && opts.watch !== nativeWatch) {\n          initWatch(vm, opts.watch);\n      }\n  }\n  function initProps$1(vm, propsOptions) {\n      var propsData = vm.$options.propsData || {};\n      var props = (vm._props = shallowReactive({}));\n      // cache prop keys so that future props updates can iterate using Array\n      // instead of dynamic object key enumeration.\n      var keys = (vm.$options._propKeys = []);\n      var isRoot = !vm.$parent;\n      // root instance props should be converted\n      if (!isRoot) {\n          toggleObserving(false);\n      }\n      var _loop_1 = function (key) {\n          keys.push(key);\n          var value = validateProp(key, propsOptions, propsData, vm);\n          /* istanbul ignore else */\n          {\n              var hyphenatedKey = hyphenate(key);\n              if (isReservedAttribute(hyphenatedKey) ||\n                  config.isReservedAttr(hyphenatedKey)) {\n                  warn$2(\"\\\"\".concat(hyphenatedKey, \"\\\" is a reserved attribute and cannot be used as component prop.\"), vm);\n              }\n              defineReactive(props, key, value, function () {\n                  if (!isRoot && !isUpdatingChildComponent) {\n                      warn$2(\"Avoid mutating a prop directly since the value will be \" +\n                          \"overwritten whenever the parent component re-renders. \" +\n                          \"Instead, use a data or computed property based on the prop's \" +\n                          \"value. Prop being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                  }\n              }, true /* shallow */);\n          }\n          // static props are already proxied on the component's prototype\n          // during Vue.extend(). We only need to proxy props defined at\n          // instantiation here.\n          if (!(key in vm)) {\n              proxy(vm, \"_props\", key);\n          }\n      };\n      for (var key in propsOptions) {\n          _loop_1(key);\n      }\n      toggleObserving(true);\n  }\n  function initData(vm) {\n      var data = vm.$options.data;\n      data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n      if (!isPlainObject(data)) {\n          data = {};\n          warn$2('data functions should return an object:\\n' +\n                  'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n      }\n      // proxy data on instance\n      var keys = Object.keys(data);\n      var props = vm.$options.props;\n      var methods = vm.$options.methods;\n      var i = keys.length;\n      while (i--) {\n          var key = keys[i];\n          {\n              if (methods && hasOwn(methods, key)) {\n                  warn$2(\"Method \\\"\".concat(key, \"\\\" has already been defined as a data property.\"), vm);\n              }\n          }\n          if (props && hasOwn(props, key)) {\n              warn$2(\"The data property \\\"\".concat(key, \"\\\" is already declared as a prop. \") +\n                      \"Use prop default value instead.\", vm);\n          }\n          else if (!isReserved(key)) {\n              proxy(vm, \"_data\", key);\n          }\n      }\n      // observe data\n      var ob = observe(data);\n      ob && ob.vmCount++;\n  }\n  function getData(data, vm) {\n      // #7573 disable dep collection when invoking data getters\n      pushTarget();\n      try {\n          return data.call(vm, vm);\n      }\n      catch (e) {\n          handleError(e, vm, \"data()\");\n          return {};\n      }\n      finally {\n          popTarget();\n      }\n  }\n  var computedWatcherOptions = { lazy: true };\n  function initComputed$1(vm, computed) {\n      // $flow-disable-line\n      var watchers = (vm._computedWatchers = Object.create(null));\n      // computed properties are just getters during SSR\n      var isSSR = isServerRendering();\n      for (var key in computed) {\n          var userDef = computed[key];\n          var getter = isFunction(userDef) ? userDef : userDef.get;\n          if (getter == null) {\n              warn$2(\"Getter is missing for computed property \\\"\".concat(key, \"\\\".\"), vm);\n          }\n          if (!isSSR) {\n              // create internal watcher for the computed property.\n              watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n          }\n          // component-defined computed properties are already defined on the\n          // component prototype. We only need to define computed properties defined\n          // at instantiation here.\n          if (!(key in vm)) {\n              defineComputed(vm, key, userDef);\n          }\n          else {\n              if (key in vm.$data) {\n                  warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined in data.\"), vm);\n              }\n              else if (vm.$options.props && key in vm.$options.props) {\n                  warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a prop.\"), vm);\n              }\n              else if (vm.$options.methods && key in vm.$options.methods) {\n                  warn$2(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a method.\"), vm);\n              }\n          }\n      }\n  }\n  function defineComputed(target, key, userDef) {\n      var shouldCache = !isServerRendering();\n      if (isFunction(userDef)) {\n          sharedPropertyDefinition.get = shouldCache\n              ? createComputedGetter(key)\n              : createGetterInvoker(userDef);\n          sharedPropertyDefinition.set = noop;\n      }\n      else {\n          sharedPropertyDefinition.get = userDef.get\n              ? shouldCache && userDef.cache !== false\n                  ? createComputedGetter(key)\n                  : createGetterInvoker(userDef.get)\n              : noop;\n          sharedPropertyDefinition.set = userDef.set || noop;\n      }\n      if (sharedPropertyDefinition.set === noop) {\n          sharedPropertyDefinition.set = function () {\n              warn$2(\"Computed property \\\"\".concat(key, \"\\\" was assigned to but it has no setter.\"), this);\n          };\n      }\n      Object.defineProperty(target, key, sharedPropertyDefinition);\n  }\n  function createComputedGetter(key) {\n      return function computedGetter() {\n          var watcher = this._computedWatchers && this._computedWatchers[key];\n          if (watcher) {\n              if (watcher.dirty) {\n                  watcher.evaluate();\n              }\n              if (Dep.target) {\n                  if (Dep.target.onTrack) {\n                      Dep.target.onTrack({\n                          effect: Dep.target,\n                          target: this,\n                          type: \"get\" /* TrackOpTypes.GET */,\n                          key: key\n                      });\n                  }\n                  watcher.depend();\n              }\n              return watcher.value;\n          }\n      };\n  }\n  function createGetterInvoker(fn) {\n      return function computedGetter() {\n          return fn.call(this, this);\n      };\n  }\n  function initMethods(vm, methods) {\n      var props = vm.$options.props;\n      for (var key in methods) {\n          {\n              if (typeof methods[key] !== 'function') {\n                  warn$2(\"Method \\\"\".concat(key, \"\\\" has type \\\"\").concat(typeof methods[key], \"\\\" in the component definition. \") +\n                      \"Did you reference the function correctly?\", vm);\n              }\n              if (props && hasOwn(props, key)) {\n                  warn$2(\"Method \\\"\".concat(key, \"\\\" has already been defined as a prop.\"), vm);\n              }\n              if (key in vm && isReserved(key)) {\n                  warn$2(\"Method \\\"\".concat(key, \"\\\" conflicts with an existing Vue instance method. \") +\n                      \"Avoid defining component methods that start with _ or $.\");\n              }\n          }\n          vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);\n      }\n  }\n  function initWatch(vm, watch) {\n      for (var key in watch) {\n          var handler = watch[key];\n          if (isArray(handler)) {\n              for (var i = 0; i < handler.length; i++) {\n                  createWatcher(vm, key, handler[i]);\n              }\n          }\n          else {\n              createWatcher(vm, key, handler);\n          }\n      }\n  }\n  function createWatcher(vm, expOrFn, handler, options) {\n      if (isPlainObject(handler)) {\n          options = handler;\n          handler = handler.handler;\n      }\n      if (typeof handler === 'string') {\n          handler = vm[handler];\n      }\n      return vm.$watch(expOrFn, handler, options);\n  }\n  function stateMixin(Vue) {\n      // flow somehow has problems with directly declared definition object\n      // when using Object.defineProperty, so we have to procedurally build up\n      // the object here.\n      var dataDef = {};\n      dataDef.get = function () {\n          return this._data;\n      };\n      var propsDef = {};\n      propsDef.get = function () {\n          return this._props;\n      };\n      {\n          dataDef.set = function () {\n              warn$2('Avoid replacing instance root $data. ' +\n                  'Use nested data properties instead.', this);\n          };\n          propsDef.set = function () {\n              warn$2(\"$props is readonly.\", this);\n          };\n      }\n      Object.defineProperty(Vue.prototype, '$data', dataDef);\n      Object.defineProperty(Vue.prototype, '$props', propsDef);\n      Vue.prototype.$set = set;\n      Vue.prototype.$delete = del;\n      Vue.prototype.$watch = function (expOrFn, cb, options) {\n          var vm = this;\n          if (isPlainObject(cb)) {\n              return createWatcher(vm, expOrFn, cb, options);\n          }\n          options = options || {};\n          options.user = true;\n          var watcher = new Watcher(vm, expOrFn, cb, options);\n          if (options.immediate) {\n              var info = \"callback for immediate watcher \\\"\".concat(watcher.expression, \"\\\"\");\n              pushTarget();\n              invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n              popTarget();\n          }\n          return function unwatchFn() {\n              watcher.teardown();\n          };\n      };\n  }\n\n  function initProvide(vm) {\n      var provideOption = vm.$options.provide;\n      if (provideOption) {\n          var provided = isFunction(provideOption)\n              ? provideOption.call(vm)\n              : provideOption;\n          if (!isObject(provided)) {\n              return;\n          }\n          var source = resolveProvided(vm);\n          // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n          // iterate the keys ourselves.\n          var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n          for (var i = 0; i < keys.length; i++) {\n              var key = keys[i];\n              Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n          }\n      }\n  }\n  function initInjections(vm) {\n      var result = resolveInject(vm.$options.inject, vm);\n      if (result) {\n          toggleObserving(false);\n          Object.keys(result).forEach(function (key) {\n              /* istanbul ignore else */\n              {\n                  defineReactive(vm, key, result[key], function () {\n                      warn$2(\"Avoid mutating an injected value directly since the changes will be \" +\n                          \"overwritten whenever the provided component re-renders. \" +\n                          \"injection being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                  });\n              }\n          });\n          toggleObserving(true);\n      }\n  }\n  function resolveInject(inject, vm) {\n      if (inject) {\n          // inject is :any because flow is not smart enough to figure out cached\n          var result = Object.create(null);\n          var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n          for (var i = 0; i < keys.length; i++) {\n              var key = keys[i];\n              // #6574 in case the inject object is observed...\n              if (key === '__ob__')\n                  continue;\n              var provideKey = inject[key].from;\n              if (provideKey in vm._provided) {\n                  result[key] = vm._provided[provideKey];\n              }\n              else if ('default' in inject[key]) {\n                  var provideDefault = inject[key].default;\n                  result[key] = isFunction(provideDefault)\n                      ? provideDefault.call(vm)\n                      : provideDefault;\n              }\n              else {\n                  warn$2(\"Injection \\\"\".concat(key, \"\\\" not found\"), vm);\n              }\n          }\n          return result;\n      }\n  }\n\n  var uid = 0;\n  function initMixin$1(Vue) {\n      Vue.prototype._init = function (options) {\n          var vm = this;\n          // a uid\n          vm._uid = uid++;\n          var startTag, endTag;\n          /* istanbul ignore if */\n          if (config.performance && mark) {\n              startTag = \"vue-perf-start:\".concat(vm._uid);\n              endTag = \"vue-perf-end:\".concat(vm._uid);\n              mark(startTag);\n          }\n          // a flag to mark this as a Vue instance without having to do instanceof\n          // check\n          vm._isVue = true;\n          // avoid instances from being observed\n          vm.__v_skip = true;\n          // effect scope\n          vm._scope = new EffectScope(true /* detached */);\n          // #13134 edge case where a child component is manually created during the\n          // render of a parent component\n          vm._scope.parent = undefined;\n          vm._scope._vm = true;\n          // merge options\n          if (options && options._isComponent) {\n              // optimize internal component instantiation\n              // since dynamic options merging is pretty slow, and none of the\n              // internal component options needs special treatment.\n              initInternalComponent(vm, options);\n          }\n          else {\n              vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n          }\n          /* istanbul ignore else */\n          {\n              initProxy(vm);\n          }\n          // expose real self\n          vm._self = vm;\n          initLifecycle(vm);\n          initEvents(vm);\n          initRender(vm);\n          callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n          initInjections(vm); // resolve injections before data/props\n          initState(vm);\n          initProvide(vm); // resolve provide after data/props\n          callHook$1(vm, 'created');\n          /* istanbul ignore if */\n          if (config.performance && mark) {\n              vm._name = formatComponentName(vm, false);\n              mark(endTag);\n              measure(\"vue \".concat(vm._name, \" init\"), startTag, endTag);\n          }\n          if (vm.$options.el) {\n              vm.$mount(vm.$options.el);\n          }\n      };\n  }\n  function initInternalComponent(vm, options) {\n      var opts = (vm.$options = Object.create(vm.constructor.options));\n      // doing this because it's faster than dynamic enumeration.\n      var parentVnode = options._parentVnode;\n      opts.parent = options.parent;\n      opts._parentVnode = parentVnode;\n      var vnodeComponentOptions = parentVnode.componentOptions;\n      opts.propsData = vnodeComponentOptions.propsData;\n      opts._parentListeners = vnodeComponentOptions.listeners;\n      opts._renderChildren = vnodeComponentOptions.children;\n      opts._componentTag = vnodeComponentOptions.tag;\n      if (options.render) {\n          opts.render = options.render;\n          opts.staticRenderFns = options.staticRenderFns;\n      }\n  }\n  function resolveConstructorOptions(Ctor) {\n      var options = Ctor.options;\n      if (Ctor.super) {\n          var superOptions = resolveConstructorOptions(Ctor.super);\n          var cachedSuperOptions = Ctor.superOptions;\n          if (superOptions !== cachedSuperOptions) {\n              // super option changed,\n              // need to resolve new options.\n              Ctor.superOptions = superOptions;\n              // check if there are any late-modified/attached options (#4976)\n              var modifiedOptions = resolveModifiedOptions(Ctor);\n              // update base extend options\n              if (modifiedOptions) {\n                  extend(Ctor.extendOptions, modifiedOptions);\n              }\n              options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n              if (options.name) {\n                  options.components[options.name] = Ctor;\n              }\n          }\n      }\n      return options;\n  }\n  function resolveModifiedOptions(Ctor) {\n      var modified;\n      var latest = Ctor.options;\n      var sealed = Ctor.sealedOptions;\n      for (var key in latest) {\n          if (latest[key] !== sealed[key]) {\n              if (!modified)\n                  modified = {};\n              modified[key] = latest[key];\n          }\n      }\n      return modified;\n  }\n\n  function FunctionalRenderContext(data, props, children, parent, Ctor) {\n      var _this = this;\n      var options = Ctor.options;\n      // ensure the createElement function in functional components\n      // gets a unique context - this is necessary for correct named slot check\n      var contextVm;\n      if (hasOwn(parent, '_uid')) {\n          contextVm = Object.create(parent);\n          contextVm._original = parent;\n      }\n      else {\n          // the context vm passed in is a functional context as well.\n          // in this case we want to make sure we are able to get a hold to the\n          // real context instance.\n          contextVm = parent;\n          // @ts-ignore\n          parent = parent._original;\n      }\n      var isCompiled = isTrue(options._compiled);\n      var needNormalization = !isCompiled;\n      this.data = data;\n      this.props = props;\n      this.children = children;\n      this.parent = parent;\n      this.listeners = data.on || emptyObject;\n      this.injections = resolveInject(options.inject, parent);\n      this.slots = function () {\n          if (!_this.$slots) {\n              normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));\n          }\n          return _this.$slots;\n      };\n      Object.defineProperty(this, 'scopedSlots', {\n          enumerable: true,\n          get: function () {\n              return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n          }\n      });\n      // support for compiled functional template\n      if (isCompiled) {\n          // exposing $options for renderStatic()\n          this.$options = options;\n          // pre-resolve slots for renderSlot()\n          this.$slots = this.slots();\n          this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n      }\n      if (options._scopeId) {\n          this._c = function (a, b, c, d) {\n              var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n              if (vnode && !isArray(vnode)) {\n                  vnode.fnScopeId = options._scopeId;\n                  vnode.fnContext = parent;\n              }\n              return vnode;\n          };\n      }\n      else {\n          this._c = function (a, b, c, d) {\n              return createElement$1(contextVm, a, b, c, d, needNormalization);\n          };\n      }\n  }\n  installRenderHelpers(FunctionalRenderContext.prototype);\n  function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n      var options = Ctor.options;\n      var props = {};\n      var propOptions = options.props;\n      if (isDef(propOptions)) {\n          for (var key in propOptions) {\n              props[key] = validateProp(key, propOptions, propsData || emptyObject);\n          }\n      }\n      else {\n          if (isDef(data.attrs))\n              mergeProps(props, data.attrs);\n          if (isDef(data.props))\n              mergeProps(props, data.props);\n      }\n      var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n      var vnode = options.render.call(null, renderContext._c, renderContext);\n      if (vnode instanceof VNode) {\n          return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n      }\n      else if (isArray(vnode)) {\n          var vnodes = normalizeChildren(vnode) || [];\n          var res = new Array(vnodes.length);\n          for (var i = 0; i < vnodes.length; i++) {\n              res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n          }\n          return res;\n      }\n  }\n  function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n      // #7817 clone node before setting fnContext, otherwise if the node is reused\n      // (e.g. it was from a cached normal slot) the fnContext causes named slots\n      // that should not be matched to match.\n      var clone = cloneVNode(vnode);\n      clone.fnContext = contextVm;\n      clone.fnOptions = options;\n      {\n          (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n              renderContext;\n      }\n      if (data.slot) {\n          (clone.data || (clone.data = {})).slot = data.slot;\n      }\n      return clone;\n  }\n  function mergeProps(to, from) {\n      for (var key in from) {\n          to[camelize(key)] = from[key];\n      }\n  }\n\n  function getComponentName(options) {\n      return options.name || options.__name || options._componentTag;\n  }\n  // inline hooks to be invoked on component VNodes during patch\n  var componentVNodeHooks = {\n      init: function (vnode, hydrating) {\n          if (vnode.componentInstance &&\n              !vnode.componentInstance._isDestroyed &&\n              vnode.data.keepAlive) {\n              // kept-alive components, treat as a patch\n              var mountedNode = vnode; // work around flow\n              componentVNodeHooks.prepatch(mountedNode, mountedNode);\n          }\n          else {\n              var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n              child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n          }\n      },\n      prepatch: function (oldVnode, vnode) {\n          var options = vnode.componentOptions;\n          var child = (vnode.componentInstance = oldVnode.componentInstance);\n          updateChildComponent(child, options.propsData, // updated props\n          options.listeners, // updated listeners\n          vnode, // new parent vnode\n          options.children // new children\n          );\n      },\n      insert: function (vnode) {\n          var context = vnode.context, componentInstance = vnode.componentInstance;\n          if (!componentInstance._isMounted) {\n              componentInstance._isMounted = true;\n              callHook$1(componentInstance, 'mounted');\n          }\n          if (vnode.data.keepAlive) {\n              if (context._isMounted) {\n                  // vue-router#1212\n                  // During updates, a kept-alive component's child components may\n                  // change, so directly walking the tree here may call activated hooks\n                  // on incorrect children. Instead we push them into a queue which will\n                  // be processed after the whole patch process ended.\n                  queueActivatedComponent(componentInstance);\n              }\n              else {\n                  activateChildComponent(componentInstance, true /* direct */);\n              }\n          }\n      },\n      destroy: function (vnode) {\n          var componentInstance = vnode.componentInstance;\n          if (!componentInstance._isDestroyed) {\n              if (!vnode.data.keepAlive) {\n                  componentInstance.$destroy();\n              }\n              else {\n                  deactivateChildComponent(componentInstance, true /* direct */);\n              }\n          }\n      }\n  };\n  var hooksToMerge = Object.keys(componentVNodeHooks);\n  function createComponent(Ctor, data, context, children, tag) {\n      if (isUndef(Ctor)) {\n          return;\n      }\n      var baseCtor = context.$options._base;\n      // plain options object: turn it into a constructor\n      if (isObject(Ctor)) {\n          Ctor = baseCtor.extend(Ctor);\n      }\n      // if at this stage it's not a constructor or an async component factory,\n      // reject.\n      if (typeof Ctor !== 'function') {\n          {\n              warn$2(\"Invalid Component definition: \".concat(String(Ctor)), context);\n          }\n          return;\n      }\n      // async component\n      var asyncFactory;\n      // @ts-expect-error\n      if (isUndef(Ctor.cid)) {\n          asyncFactory = Ctor;\n          Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n          if (Ctor === undefined) {\n              // return a placeholder node for async component, which is rendered\n              // as a comment node but preserves all the raw information for the node.\n              // the information will be used for async server-rendering and hydration.\n              return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n          }\n      }\n      data = data || {};\n      // resolve constructor options in case global mixins are applied after\n      // component constructor creation\n      resolveConstructorOptions(Ctor);\n      // transform component v-model data into props & events\n      if (isDef(data.model)) {\n          // @ts-expect-error\n          transformModel(Ctor.options, data);\n      }\n      // extract props\n      // @ts-expect-error\n      var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n      // functional component\n      // @ts-expect-error\n      if (isTrue(Ctor.options.functional)) {\n          return createFunctionalComponent(Ctor, propsData, data, context, children);\n      }\n      // extract listeners, since these needs to be treated as\n      // child component listeners instead of DOM listeners\n      var listeners = data.on;\n      // replace with listeners with .native modifier\n      // so it gets processed during parent component patch.\n      data.on = data.nativeOn;\n      // @ts-expect-error\n      if (isTrue(Ctor.options.abstract)) {\n          // abstract components do not keep anything\n          // other than props & listeners & slot\n          // work around flow\n          var slot = data.slot;\n          data = {};\n          if (slot) {\n              data.slot = slot;\n          }\n      }\n      // install component management hooks onto the placeholder node\n      installComponentHooks(data);\n      // return a placeholder vnode\n      // @ts-expect-error\n      var name = getComponentName(Ctor.options) || tag;\n      var vnode = new VNode(\n      // @ts-expect-error\n      \"vue-component-\".concat(Ctor.cid).concat(name ? \"-\".concat(name) : ''), data, undefined, undefined, undefined, context, \n      // @ts-expect-error\n      { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);\n      return vnode;\n  }\n  function createComponentInstanceForVnode(\n  // we know it's MountedComponentVNode but flow doesn't\n  vnode, \n  // activeInstance in lifecycle state\n  parent) {\n      var options = {\n          _isComponent: true,\n          _parentVnode: vnode,\n          parent: parent\n      };\n      // check inline-template render functions\n      var inlineTemplate = vnode.data.inlineTemplate;\n      if (isDef(inlineTemplate)) {\n          options.render = inlineTemplate.render;\n          options.staticRenderFns = inlineTemplate.staticRenderFns;\n      }\n      return new vnode.componentOptions.Ctor(options);\n  }\n  function installComponentHooks(data) {\n      var hooks = data.hook || (data.hook = {});\n      for (var i = 0; i < hooksToMerge.length; i++) {\n          var key = hooksToMerge[i];\n          var existing = hooks[key];\n          var toMerge = componentVNodeHooks[key];\n          // @ts-expect-error\n          if (existing !== toMerge && !(existing && existing._merged)) {\n              hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n          }\n      }\n  }\n  function mergeHook(f1, f2) {\n      var merged = function (a, b) {\n          // flow complains about extra args which is why we use any\n          f1(a, b);\n          f2(a, b);\n      };\n      merged._merged = true;\n      return merged;\n  }\n  // transform component v-model info (value and callback) into\n  // prop and event handler respectively.\n  function transformModel(options, data) {\n      var prop = (options.model && options.model.prop) || 'value';\n      var event = (options.model && options.model.event) || 'input';\n      (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n      var on = data.on || (data.on = {});\n      var existing = on[event];\n      var callback = data.model.callback;\n      if (isDef(existing)) {\n          if (isArray(existing)\n              ? existing.indexOf(callback) === -1\n              : existing !== callback) {\n              on[event] = [callback].concat(existing);\n          }\n      }\n      else {\n          on[event] = callback;\n      }\n  }\n\n  var warn$2 = noop;\n  var tip = noop;\n  var generateComponentTrace; // work around flow check\n  var formatComponentName;\n  {\n      var hasConsole_1 = typeof console !== 'undefined';\n      var classifyRE_1 = /(?:^|[-_])(\\w)/g;\n      var classify_1 = function (str) {\n          return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');\n      };\n      warn$2 = function (msg, vm) {\n          if (vm === void 0) { vm = currentInstance; }\n          var trace = vm ? generateComponentTrace(vm) : '';\n          if (config.warnHandler) {\n              config.warnHandler.call(null, msg, vm, trace);\n          }\n          else if (hasConsole_1 && !config.silent) {\n              console.error(\"[Vue warn]: \".concat(msg).concat(trace));\n          }\n      };\n      tip = function (msg, vm) {\n          if (hasConsole_1 && !config.silent) {\n              console.warn(\"[Vue tip]: \".concat(msg) + (vm ? generateComponentTrace(vm) : ''));\n          }\n      };\n      formatComponentName = function (vm, includeFile) {\n          if (vm.$root === vm) {\n              return '<Root>';\n          }\n          var options = isFunction(vm) && vm.cid != null\n              ? vm.options\n              : vm._isVue\n                  ? vm.$options || vm.constructor.options\n                  : vm;\n          var name = getComponentName(options);\n          var file = options.__file;\n          if (!name && file) {\n              var match = file.match(/([^/\\\\]+)\\.vue$/);\n              name = match && match[1];\n          }\n          return ((name ? \"<\".concat(classify_1(name), \">\") : \"<Anonymous>\") +\n              (file && includeFile !== false ? \" at \".concat(file) : ''));\n      };\n      var repeat_1 = function (str, n) {\n          var res = '';\n          while (n) {\n              if (n % 2 === 1)\n                  res += str;\n              if (n > 1)\n                  str += str;\n              n >>= 1;\n          }\n          return res;\n      };\n      generateComponentTrace = function (vm) {\n          if (vm._isVue && vm.$parent) {\n              var tree = [];\n              var currentRecursiveSequence = 0;\n              while (vm) {\n                  if (tree.length > 0) {\n                      var last = tree[tree.length - 1];\n                      if (last.constructor === vm.constructor) {\n                          currentRecursiveSequence++;\n                          vm = vm.$parent;\n                          continue;\n                      }\n                      else if (currentRecursiveSequence > 0) {\n                          tree[tree.length - 1] = [last, currentRecursiveSequence];\n                          currentRecursiveSequence = 0;\n                      }\n                  }\n                  tree.push(vm);\n                  vm = vm.$parent;\n              }\n              return ('\\n\\nfound in\\n\\n' +\n                  tree\n                      .map(function (vm, i) {\n                      return \"\".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)\n                          ? \"\".concat(formatComponentName(vm[0]), \"... (\").concat(vm[1], \" recursive calls)\")\n                          : formatComponentName(vm));\n                  })\n                      .join('\\n'));\n          }\n          else {\n              return \"\\n\\n(found in \".concat(formatComponentName(vm), \")\");\n          }\n      };\n  }\n\n  /**\n   * Option overwriting strategies are functions that handle\n   * how to merge a parent option value and a child option\n   * value into the final value.\n   */\n  var strats = config.optionMergeStrategies;\n  /**\n   * Options with restrictions\n   */\n  {\n      strats.el = strats.propsData = function (parent, child, vm, key) {\n          if (!vm) {\n              warn$2(\"option \\\"\".concat(key, \"\\\" can only be used during instance \") +\n                  'creation with the `new` keyword.');\n          }\n          return defaultStrat(parent, child);\n      };\n  }\n  /**\n   * Helper that recursively merges two data objects together.\n   */\n  function mergeData(to, from, recursive) {\n      if (recursive === void 0) { recursive = true; }\n      if (!from)\n          return to;\n      var key, toVal, fromVal;\n      var keys = hasSymbol\n          ? Reflect.ownKeys(from)\n          : Object.keys(from);\n      for (var i = 0; i < keys.length; i++) {\n          key = keys[i];\n          // in case the object is already observed...\n          if (key === '__ob__')\n              continue;\n          toVal = to[key];\n          fromVal = from[key];\n          if (!recursive || !hasOwn(to, key)) {\n              set(to, key, fromVal);\n          }\n          else if (toVal !== fromVal &&\n              isPlainObject(toVal) &&\n              isPlainObject(fromVal)) {\n              mergeData(toVal, fromVal);\n          }\n      }\n      return to;\n  }\n  /**\n   * Data\n   */\n  function mergeDataOrFn(parentVal, childVal, vm) {\n      if (!vm) {\n          // in a Vue.extend merge, both should be functions\n          if (!childVal) {\n              return parentVal;\n          }\n          if (!parentVal) {\n              return childVal;\n          }\n          // when parentVal & childVal are both present,\n          // we need to return a function that returns the\n          // merged result of both functions... no need to\n          // check if parentVal is a function here because\n          // it has to be a function to pass previous merges.\n          return function mergedDataFn() {\n              return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n          };\n      }\n      else {\n          return function mergedInstanceDataFn() {\n              // instance merge\n              var instanceData = isFunction(childVal)\n                  ? childVal.call(vm, vm)\n                  : childVal;\n              var defaultData = isFunction(parentVal)\n                  ? parentVal.call(vm, vm)\n                  : parentVal;\n              if (instanceData) {\n                  return mergeData(instanceData, defaultData);\n              }\n              else {\n                  return defaultData;\n              }\n          };\n      }\n  }\n  strats.data = function (parentVal, childVal, vm) {\n      if (!vm) {\n          if (childVal && typeof childVal !== 'function') {\n              warn$2('The \"data\" option should be a function ' +\n                      'that returns a per-instance value in component ' +\n                      'definitions.', vm);\n              return parentVal;\n          }\n          return mergeDataOrFn(parentVal, childVal);\n      }\n      return mergeDataOrFn(parentVal, childVal, vm);\n  };\n  /**\n   * Hooks and props are merged as arrays.\n   */\n  function mergeLifecycleHook(parentVal, childVal) {\n      var res = childVal\n          ? parentVal\n              ? parentVal.concat(childVal)\n              : isArray(childVal)\n                  ? childVal\n                  : [childVal]\n          : parentVal;\n      return res ? dedupeHooks(res) : res;\n  }\n  function dedupeHooks(hooks) {\n      var res = [];\n      for (var i = 0; i < hooks.length; i++) {\n          if (res.indexOf(hooks[i]) === -1) {\n              res.push(hooks[i]);\n          }\n      }\n      return res;\n  }\n  LIFECYCLE_HOOKS.forEach(function (hook) {\n      strats[hook] = mergeLifecycleHook;\n  });\n  /**\n   * Assets\n   *\n   * When a vm is present (instance creation), we need to do\n   * a three-way merge between constructor options, instance\n   * options and parent options.\n   */\n  function mergeAssets(parentVal, childVal, vm, key) {\n      var res = Object.create(parentVal || null);\n      if (childVal) {\n          assertObjectType(key, childVal, vm);\n          return extend(res, childVal);\n      }\n      else {\n          return res;\n      }\n  }\n  ASSET_TYPES.forEach(function (type) {\n      strats[type + 's'] = mergeAssets;\n  });\n  /**\n   * Watchers.\n   *\n   * Watchers hashes should not overwrite one\n   * another, so we merge them as arrays.\n   */\n  strats.watch = function (parentVal, childVal, vm, key) {\n      // work around Firefox's Object.prototype.watch...\n      //@ts-expect-error work around\n      if (parentVal === nativeWatch)\n          parentVal = undefined;\n      //@ts-expect-error work around\n      if (childVal === nativeWatch)\n          childVal = undefined;\n      /* istanbul ignore if */\n      if (!childVal)\n          return Object.create(parentVal || null);\n      {\n          assertObjectType(key, childVal, vm);\n      }\n      if (!parentVal)\n          return childVal;\n      var ret = {};\n      extend(ret, parentVal);\n      for (var key_1 in childVal) {\n          var parent_1 = ret[key_1];\n          var child = childVal[key_1];\n          if (parent_1 && !isArray(parent_1)) {\n              parent_1 = [parent_1];\n          }\n          ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];\n      }\n      return ret;\n  };\n  /**\n   * Other object hashes.\n   */\n  strats.props =\n      strats.methods =\n          strats.inject =\n              strats.computed =\n                  function (parentVal, childVal, vm, key) {\n                      if (childVal && true) {\n                          assertObjectType(key, childVal, vm);\n                      }\n                      if (!parentVal)\n                          return childVal;\n                      var ret = Object.create(null);\n                      extend(ret, parentVal);\n                      if (childVal)\n                          extend(ret, childVal);\n                      return ret;\n                  };\n  strats.provide = function (parentVal, childVal) {\n      if (!parentVal)\n          return childVal;\n      return function () {\n          var ret = Object.create(null);\n          mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n          if (childVal) {\n              mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n              );\n          }\n          return ret;\n      };\n  };\n  /**\n   * Default strategy.\n   */\n  var defaultStrat = function (parentVal, childVal) {\n      return childVal === undefined ? parentVal : childVal;\n  };\n  /**\n   * Validate component names\n   */\n  function checkComponents(options) {\n      for (var key in options.components) {\n          validateComponentName(key);\n      }\n  }\n  function validateComponentName(name) {\n      if (!new RegExp(\"^[a-zA-Z][\\\\-\\\\.0-9_\".concat(unicodeRegExp.source, \"]*$\")).test(name)) {\n          warn$2('Invalid component name: \"' +\n              name +\n              '\". Component names ' +\n              'should conform to valid custom element name in html5 specification.');\n      }\n      if (isBuiltInTag(name) || config.isReservedTag(name)) {\n          warn$2('Do not use built-in or reserved HTML elements as component ' +\n              'id: ' +\n              name);\n      }\n  }\n  /**\n   * Ensure all props option syntax are normalized into the\n   * Object-based format.\n   */\n  function normalizeProps(options, vm) {\n      var props = options.props;\n      if (!props)\n          return;\n      var res = {};\n      var i, val, name;\n      if (isArray(props)) {\n          i = props.length;\n          while (i--) {\n              val = props[i];\n              if (typeof val === 'string') {\n                  name = camelize(val);\n                  res[name] = { type: null };\n              }\n              else {\n                  warn$2('props must be strings when using array syntax.');\n              }\n          }\n      }\n      else if (isPlainObject(props)) {\n          for (var key in props) {\n              val = props[key];\n              name = camelize(key);\n              res[name] = isPlainObject(val) ? val : { type: val };\n          }\n      }\n      else {\n          warn$2(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n              \"but got \".concat(toRawType(props), \".\"), vm);\n      }\n      options.props = res;\n  }\n  /**\n   * Normalize all injections into Object-based format\n   */\n  function normalizeInject(options, vm) {\n      var inject = options.inject;\n      if (!inject)\n          return;\n      var normalized = (options.inject = {});\n      if (isArray(inject)) {\n          for (var i = 0; i < inject.length; i++) {\n              normalized[inject[i]] = { from: inject[i] };\n          }\n      }\n      else if (isPlainObject(inject)) {\n          for (var key in inject) {\n              var val = inject[key];\n              normalized[key] = isPlainObject(val)\n                  ? extend({ from: key }, val)\n                  : { from: val };\n          }\n      }\n      else {\n          warn$2(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n              \"but got \".concat(toRawType(inject), \".\"), vm);\n      }\n  }\n  /**\n   * Normalize raw function directives into object format.\n   */\n  function normalizeDirectives$1(options) {\n      var dirs = options.directives;\n      if (dirs) {\n          for (var key in dirs) {\n              var def = dirs[key];\n              if (isFunction(def)) {\n                  dirs[key] = { bind: def, update: def };\n              }\n          }\n      }\n  }\n  function assertObjectType(name, value, vm) {\n      if (!isPlainObject(value)) {\n          warn$2(\"Invalid value for option \\\"\".concat(name, \"\\\": expected an Object, \") +\n              \"but got \".concat(toRawType(value), \".\"), vm);\n      }\n  }\n  /**\n   * Merge two option objects into a new one.\n   * Core utility used in both instantiation and inheritance.\n   */\n  function mergeOptions(parent, child, vm) {\n      {\n          checkComponents(child);\n      }\n      if (isFunction(child)) {\n          // @ts-expect-error\n          child = child.options;\n      }\n      normalizeProps(child, vm);\n      normalizeInject(child, vm);\n      normalizeDirectives$1(child);\n      // Apply extends and mixins on the child options,\n      // but only if it is a raw options object that isn't\n      // the result of another mergeOptions call.\n      // Only merged options has the _base property.\n      if (!child._base) {\n          if (child.extends) {\n              parent = mergeOptions(parent, child.extends, vm);\n          }\n          if (child.mixins) {\n              for (var i = 0, l = child.mixins.length; i < l; i++) {\n                  parent = mergeOptions(parent, child.mixins[i], vm);\n              }\n          }\n      }\n      var options = {};\n      var key;\n      for (key in parent) {\n          mergeField(key);\n      }\n      for (key in child) {\n          if (!hasOwn(parent, key)) {\n              mergeField(key);\n          }\n      }\n      function mergeField(key) {\n          var strat = strats[key] || defaultStrat;\n          options[key] = strat(parent[key], child[key], vm, key);\n      }\n      return options;\n  }\n  /**\n   * Resolve an asset.\n   * This function is used because child instances need access\n   * to assets defined in its ancestor chain.\n   */\n  function resolveAsset(options, type, id, warnMissing) {\n      /* istanbul ignore if */\n      if (typeof id !== 'string') {\n          return;\n      }\n      var assets = options[type];\n      // check local registration variations first\n      if (hasOwn(assets, id))\n          return assets[id];\n      var camelizedId = camelize(id);\n      if (hasOwn(assets, camelizedId))\n          return assets[camelizedId];\n      var PascalCaseId = capitalize(camelizedId);\n      if (hasOwn(assets, PascalCaseId))\n          return assets[PascalCaseId];\n      // fallback to prototype chain\n      var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n      if (warnMissing && !res) {\n          warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n      }\n      return res;\n  }\n\n  function validateProp(key, propOptions, propsData, vm) {\n      var prop = propOptions[key];\n      var absent = !hasOwn(propsData, key);\n      var value = propsData[key];\n      // boolean casting\n      var booleanIndex = getTypeIndex(Boolean, prop.type);\n      if (booleanIndex > -1) {\n          if (absent && !hasOwn(prop, 'default')) {\n              value = false;\n          }\n          else if (value === '' || value === hyphenate(key)) {\n              // only cast empty string / same name to boolean if\n              // boolean has higher priority\n              var stringIndex = getTypeIndex(String, prop.type);\n              if (stringIndex < 0 || booleanIndex < stringIndex) {\n                  value = true;\n              }\n          }\n      }\n      // check default value\n      if (value === undefined) {\n          value = getPropDefaultValue(vm, prop, key);\n          // since the default value is a fresh copy,\n          // make sure to observe it.\n          var prevShouldObserve = shouldObserve;\n          toggleObserving(true);\n          observe(value);\n          toggleObserving(prevShouldObserve);\n      }\n      {\n          assertProp(prop, key, value, vm, absent);\n      }\n      return value;\n  }\n  /**\n   * Get the default value of a prop.\n   */\n  function getPropDefaultValue(vm, prop, key) {\n      // no default, return undefined\n      if (!hasOwn(prop, 'default')) {\n          return undefined;\n      }\n      var def = prop.default;\n      // warn against non-factory defaults for Object & Array\n      if (isObject(def)) {\n          warn$2('Invalid default value for prop \"' +\n              key +\n              '\": ' +\n              'Props with type Object/Array must use a factory function ' +\n              'to return the default value.', vm);\n      }\n      // the raw prop value was also undefined from previous render,\n      // return previous default value to avoid unnecessary watcher trigger\n      if (vm &&\n          vm.$options.propsData &&\n          vm.$options.propsData[key] === undefined &&\n          vm._props[key] !== undefined) {\n          return vm._props[key];\n      }\n      // call factory function for non-Function types\n      // a value is Function if its prototype is function even across different execution context\n      return isFunction(def) && getType(prop.type) !== 'Function'\n          ? def.call(vm)\n          : def;\n  }\n  /**\n   * Assert whether a prop is valid.\n   */\n  function assertProp(prop, name, value, vm, absent) {\n      if (prop.required && absent) {\n          warn$2('Missing required prop: \"' + name + '\"', vm);\n          return;\n      }\n      if (value == null && !prop.required) {\n          return;\n      }\n      var type = prop.type;\n      var valid = !type || type === true;\n      var expectedTypes = [];\n      if (type) {\n          if (!isArray(type)) {\n              type = [type];\n          }\n          for (var i = 0; i < type.length && !valid; i++) {\n              var assertedType = assertType(value, type[i], vm);\n              expectedTypes.push(assertedType.expectedType || '');\n              valid = assertedType.valid;\n          }\n      }\n      var haveExpectedTypes = expectedTypes.some(function (t) { return t; });\n      if (!valid && haveExpectedTypes) {\n          warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);\n          return;\n      }\n      var validator = prop.validator;\n      if (validator) {\n          if (!validator(value)) {\n              warn$2('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n          }\n      }\n  }\n  var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\n  function assertType(value, type, vm) {\n      var valid;\n      var expectedType = getType(type);\n      if (simpleCheckRE.test(expectedType)) {\n          var t = typeof value;\n          valid = t === expectedType.toLowerCase();\n          // for primitive wrapper objects\n          if (!valid && t === 'object') {\n              valid = value instanceof type;\n          }\n      }\n      else if (expectedType === 'Object') {\n          valid = isPlainObject(value);\n      }\n      else if (expectedType === 'Array') {\n          valid = isArray(value);\n      }\n      else {\n          try {\n              valid = value instanceof type;\n          }\n          catch (e) {\n              warn$2('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n              valid = false;\n          }\n      }\n      return {\n          valid: valid,\n          expectedType: expectedType\n      };\n  }\n  var functionTypeCheckRE = /^\\s*function (\\w+)/;\n  /**\n   * Use function string name to check built-in types,\n   * because a simple equality check will fail when running\n   * across different vms / iframes.\n   */\n  function getType(fn) {\n      var match = fn && fn.toString().match(functionTypeCheckRE);\n      return match ? match[1] : '';\n  }\n  function isSameType(a, b) {\n      return getType(a) === getType(b);\n  }\n  function getTypeIndex(type, expectedTypes) {\n      if (!isArray(expectedTypes)) {\n          return isSameType(expectedTypes, type) ? 0 : -1;\n      }\n      for (var i = 0, len = expectedTypes.length; i < len; i++) {\n          if (isSameType(expectedTypes[i], type)) {\n              return i;\n          }\n      }\n      return -1;\n  }\n  function getInvalidTypeMessage(name, value, expectedTypes) {\n      var message = \"Invalid prop: type check failed for prop \\\"\".concat(name, \"\\\".\") +\n          \" Expected \".concat(expectedTypes.map(capitalize).join(', '));\n      var expectedType = expectedTypes[0];\n      var receivedType = toRawType(value);\n      // check if we need to specify expected value\n      if (expectedTypes.length === 1 &&\n          isExplicable(expectedType) &&\n          isExplicable(typeof value) &&\n          !isBoolean(expectedType, receivedType)) {\n          message += \" with value \".concat(styleValue(value, expectedType));\n      }\n      message += \", got \".concat(receivedType, \" \");\n      // check if we need to specify received value\n      if (isExplicable(receivedType)) {\n          message += \"with value \".concat(styleValue(value, receivedType), \".\");\n      }\n      return message;\n  }\n  function styleValue(value, type) {\n      if (type === 'String') {\n          return \"\\\"\".concat(value, \"\\\"\");\n      }\n      else if (type === 'Number') {\n          return \"\".concat(Number(value));\n      }\n      else {\n          return \"\".concat(value);\n      }\n  }\n  var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\n  function isExplicable(value) {\n      return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });\n  }\n  function isBoolean() {\n      var args = [];\n      for (var _i = 0; _i < arguments.length; _i++) {\n          args[_i] = arguments[_i];\n      }\n      return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });\n  }\n\n  function Vue(options) {\n      if (!(this instanceof Vue)) {\n          warn$2('Vue is a constructor and should be called with the `new` keyword');\n      }\n      this._init(options);\n  }\n  //@ts-expect-error Vue has function type\n  initMixin$1(Vue);\n  //@ts-expect-error Vue has function type\n  stateMixin(Vue);\n  //@ts-expect-error Vue has function type\n  eventsMixin(Vue);\n  //@ts-expect-error Vue has function type\n  lifecycleMixin(Vue);\n  //@ts-expect-error Vue has function type\n  renderMixin(Vue);\n\n  function initUse(Vue) {\n      Vue.use = function (plugin) {\n          var installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n          if (installedPlugins.indexOf(plugin) > -1) {\n              return this;\n          }\n          // additional parameters\n          var args = toArray(arguments, 1);\n          args.unshift(this);\n          if (isFunction(plugin.install)) {\n              plugin.install.apply(plugin, args);\n          }\n          else if (isFunction(plugin)) {\n              plugin.apply(null, args);\n          }\n          installedPlugins.push(plugin);\n          return this;\n      };\n  }\n\n  function initMixin(Vue) {\n      Vue.mixin = function (mixin) {\n          this.options = mergeOptions(this.options, mixin);\n          return this;\n      };\n  }\n\n  function initExtend(Vue) {\n      /**\n       * Each instance constructor, including Vue, has a unique\n       * cid. This enables us to create wrapped \"child\n       * constructors\" for prototypal inheritance and cache them.\n       */\n      Vue.cid = 0;\n      var cid = 1;\n      /**\n       * Class inheritance\n       */\n      Vue.extend = function (extendOptions) {\n          extendOptions = extendOptions || {};\n          var Super = this;\n          var SuperId = Super.cid;\n          var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n          if (cachedCtors[SuperId]) {\n              return cachedCtors[SuperId];\n          }\n          var name = getComponentName(extendOptions) || getComponentName(Super.options);\n          if (name) {\n              validateComponentName(name);\n          }\n          var Sub = function VueComponent(options) {\n              this._init(options);\n          };\n          Sub.prototype = Object.create(Super.prototype);\n          Sub.prototype.constructor = Sub;\n          Sub.cid = cid++;\n          Sub.options = mergeOptions(Super.options, extendOptions);\n          Sub['super'] = Super;\n          // For props and computed properties, we define the proxy getters on\n          // the Vue instances at extension time, on the extended prototype. This\n          // avoids Object.defineProperty calls for each instance created.\n          if (Sub.options.props) {\n              initProps(Sub);\n          }\n          if (Sub.options.computed) {\n              initComputed(Sub);\n          }\n          // allow further extension/mixin/plugin usage\n          Sub.extend = Super.extend;\n          Sub.mixin = Super.mixin;\n          Sub.use = Super.use;\n          // create asset registers, so extended classes\n          // can have their private assets too.\n          ASSET_TYPES.forEach(function (type) {\n              Sub[type] = Super[type];\n          });\n          // enable recursive self-lookup\n          if (name) {\n              Sub.options.components[name] = Sub;\n          }\n          // keep a reference to the super options at extension time.\n          // later at instantiation we can check if Super's options have\n          // been updated.\n          Sub.superOptions = Super.options;\n          Sub.extendOptions = extendOptions;\n          Sub.sealedOptions = extend({}, Sub.options);\n          // cache constructor\n          cachedCtors[SuperId] = Sub;\n          return Sub;\n      };\n  }\n  function initProps(Comp) {\n      var props = Comp.options.props;\n      for (var key in props) {\n          proxy(Comp.prototype, \"_props\", key);\n      }\n  }\n  function initComputed(Comp) {\n      var computed = Comp.options.computed;\n      for (var key in computed) {\n          defineComputed(Comp.prototype, key, computed[key]);\n      }\n  }\n\n  function initAssetRegisters(Vue) {\n      /**\n       * Create asset registration methods.\n       */\n      ASSET_TYPES.forEach(function (type) {\n          // @ts-expect-error function is not exact same type\n          Vue[type] = function (id, definition) {\n              if (!definition) {\n                  return this.options[type + 's'][id];\n              }\n              else {\n                  /* istanbul ignore if */\n                  if (type === 'component') {\n                      validateComponentName(id);\n                  }\n                  if (type === 'component' && isPlainObject(definition)) {\n                      // @ts-expect-error\n                      definition.name = definition.name || id;\n                      definition = this.options._base.extend(definition);\n                  }\n                  if (type === 'directive' && isFunction(definition)) {\n                      definition = { bind: definition, update: definition };\n                  }\n                  this.options[type + 's'][id] = definition;\n                  return definition;\n              }\n          };\n      });\n  }\n\n  function _getComponentName(opts) {\n      return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n  }\n  function matches(pattern, name) {\n      if (isArray(pattern)) {\n          return pattern.indexOf(name) > -1;\n      }\n      else if (typeof pattern === 'string') {\n          return pattern.split(',').indexOf(name) > -1;\n      }\n      else if (isRegExp(pattern)) {\n          return pattern.test(name);\n      }\n      /* istanbul ignore next */\n      return false;\n  }\n  function pruneCache(keepAliveInstance, filter) {\n      var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode, $vnode = keepAliveInstance.$vnode;\n      for (var key in cache) {\n          var entry = cache[key];\n          if (entry) {\n              var name_1 = entry.name;\n              if (name_1 && !filter(name_1)) {\n                  pruneCacheEntry(cache, key, keys, _vnode);\n              }\n          }\n      }\n      $vnode.componentOptions.children = undefined;\n  }\n  function pruneCacheEntry(cache, key, keys, current) {\n      var entry = cache[key];\n      if (entry && (!current || entry.tag !== current.tag)) {\n          // @ts-expect-error can be undefined\n          entry.componentInstance.$destroy();\n      }\n      cache[key] = null;\n      remove$2(keys, key);\n  }\n  var patternTypes = [String, RegExp, Array];\n  // TODO defineComponent\n  var KeepAlive = {\n      name: 'keep-alive',\n      abstract: true,\n      props: {\n          include: patternTypes,\n          exclude: patternTypes,\n          max: [String, Number]\n      },\n      methods: {\n          cacheVNode: function () {\n              var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;\n              if (vnodeToCache) {\n                  var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;\n                  cache[keyToCache] = {\n                      name: _getComponentName(componentOptions),\n                      tag: tag,\n                      componentInstance: componentInstance\n                  };\n                  keys.push(keyToCache);\n                  // prune oldest entry\n                  if (this.max && keys.length > parseInt(this.max)) {\n                      pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                  }\n                  this.vnodeToCache = null;\n              }\n          }\n      },\n      created: function () {\n          this.cache = Object.create(null);\n          this.keys = [];\n      },\n      destroyed: function () {\n          for (var key in this.cache) {\n              pruneCacheEntry(this.cache, key, this.keys);\n          }\n      },\n      mounted: function () {\n          var _this = this;\n          this.cacheVNode();\n          this.$watch('include', function (val) {\n              pruneCache(_this, function (name) { return matches(val, name); });\n          });\n          this.$watch('exclude', function (val) {\n              pruneCache(_this, function (name) { return !matches(val, name); });\n          });\n      },\n      updated: function () {\n          this.cacheVNode();\n      },\n      render: function () {\n          var slot = this.$slots.default;\n          var vnode = getFirstComponentChild(slot);\n          var componentOptions = vnode && vnode.componentOptions;\n          if (componentOptions) {\n              // check pattern\n              var name_2 = _getComponentName(componentOptions);\n              var _a = this, include = _a.include, exclude = _a.exclude;\n              if (\n              // not included\n              (include && (!name_2 || !matches(include, name_2))) ||\n                  // excluded\n                  (exclude && name_2 && matches(exclude, name_2))) {\n                  return vnode;\n              }\n              var _b = this, cache = _b.cache, keys = _b.keys;\n              var key = vnode.key == null\n                  ? // same constructor may get registered as different local components\n                      // so cid alone is not enough (#3269)\n                      componentOptions.Ctor.cid +\n                          (componentOptions.tag ? \"::\".concat(componentOptions.tag) : '')\n                  : vnode.key;\n              if (cache[key]) {\n                  vnode.componentInstance = cache[key].componentInstance;\n                  // make current key freshest\n                  remove$2(keys, key);\n                  keys.push(key);\n              }\n              else {\n                  // delay setting the cache until update\n                  this.vnodeToCache = vnode;\n                  this.keyToCache = key;\n              }\n              // @ts-expect-error can vnode.data can be undefined\n              vnode.data.keepAlive = true;\n          }\n          return vnode || (slot && slot[0]);\n      }\n  };\n\n  var builtInComponents = {\n      KeepAlive: KeepAlive\n  };\n\n  function initGlobalAPI(Vue) {\n      // config\n      var configDef = {};\n      configDef.get = function () { return config; };\n      {\n          configDef.set = function () {\n              warn$2('Do not replace the Vue.config object, set individual fields instead.');\n          };\n      }\n      Object.defineProperty(Vue, 'config', configDef);\n      // exposed util methods.\n      // NOTE: these are not considered part of the public API - avoid relying on\n      // them unless you are aware of the risk.\n      Vue.util = {\n          warn: warn$2,\n          extend: extend,\n          mergeOptions: mergeOptions,\n          defineReactive: defineReactive\n      };\n      Vue.set = set;\n      Vue.delete = del;\n      Vue.nextTick = nextTick;\n      // 2.6 explicit observable API\n      Vue.observable = function (obj) {\n          observe(obj);\n          return obj;\n      };\n      Vue.options = Object.create(null);\n      ASSET_TYPES.forEach(function (type) {\n          Vue.options[type + 's'] = Object.create(null);\n      });\n      // this is used to identify the \"base\" constructor to extend all plain-object\n      // components with in Weex's multi-instance scenarios.\n      Vue.options._base = Vue;\n      extend(Vue.options.components, builtInComponents);\n      initUse(Vue);\n      initMixin(Vue);\n      initExtend(Vue);\n      initAssetRegisters(Vue);\n  }\n\n  initGlobalAPI(Vue);\n  Object.defineProperty(Vue.prototype, '$isServer', {\n      get: isServerRendering\n  });\n  Object.defineProperty(Vue.prototype, '$ssrContext', {\n      get: function () {\n          /* istanbul ignore next */\n          return this.$vnode && this.$vnode.ssrContext;\n      }\n  });\n  // expose FunctionalRenderContext for ssr runtime helper installation\n  Object.defineProperty(Vue, 'FunctionalRenderContext', {\n      value: FunctionalRenderContext\n  });\n  Vue.version = version;\n\n  // these are reserved for web because they are directly compiled away\n  // during template compilation\n  var isReservedAttr = makeMap('style,class');\n  // attributes that should be using props for binding\n  var acceptValue = makeMap('input,textarea,option,select,progress');\n  var mustUseProp = function (tag, type, attr) {\n      return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n          (attr === 'selected' && tag === 'option') ||\n          (attr === 'checked' && tag === 'input') ||\n          (attr === 'muted' && tag === 'video'));\n  };\n  var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n  var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\n  var convertEnumeratedValue = function (key, value) {\n      return isFalsyAttrValue(value) || value === 'false'\n          ? 'false'\n          : // allow arbitrary string value for contenteditable\n              key === 'contenteditable' && isValidContentEditableValue(value)\n                  ? value\n                  : 'true';\n  };\n  var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n      'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n      'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n      'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n      'required,reversed,scoped,seamless,selected,sortable,' +\n      'truespeed,typemustmatch,visible');\n  var xlinkNS = 'http://www.w3.org/1999/xlink';\n  var isXlink = function (name) {\n      return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n  };\n  var getXlinkProp = function (name) {\n      return isXlink(name) ? name.slice(6, name.length) : '';\n  };\n  var isFalsyAttrValue = function (val) {\n      return val == null || val === false;\n  };\n\n  function genClassForVnode(vnode) {\n      var data = vnode.data;\n      var parentNode = vnode;\n      var childNode = vnode;\n      while (isDef(childNode.componentInstance)) {\n          childNode = childNode.componentInstance._vnode;\n          if (childNode && childNode.data) {\n              data = mergeClassData(childNode.data, data);\n          }\n      }\n      // @ts-expect-error parentNode.parent not VNodeWithData\n      while (isDef((parentNode = parentNode.parent))) {\n          if (parentNode && parentNode.data) {\n              data = mergeClassData(data, parentNode.data);\n          }\n      }\n      return renderClass(data.staticClass, data.class);\n  }\n  function mergeClassData(child, parent) {\n      return {\n          staticClass: concat(child.staticClass, parent.staticClass),\n          class: isDef(child.class) ? [child.class, parent.class] : parent.class\n      };\n  }\n  function renderClass(staticClass, dynamicClass) {\n      if (isDef(staticClass) || isDef(dynamicClass)) {\n          return concat(staticClass, stringifyClass(dynamicClass));\n      }\n      /* istanbul ignore next */\n      return '';\n  }\n  function concat(a, b) {\n      return a ? (b ? a + ' ' + b : a) : b || '';\n  }\n  function stringifyClass(value) {\n      if (Array.isArray(value)) {\n          return stringifyArray(value);\n      }\n      if (isObject(value)) {\n          return stringifyObject(value);\n      }\n      if (typeof value === 'string') {\n          return value;\n      }\n      /* istanbul ignore next */\n      return '';\n  }\n  function stringifyArray(value) {\n      var res = '';\n      var stringified;\n      for (var i = 0, l = value.length; i < l; i++) {\n          if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n              if (res)\n                  res += ' ';\n              res += stringified;\n          }\n      }\n      return res;\n  }\n  function stringifyObject(value) {\n      var res = '';\n      for (var key in value) {\n          if (value[key]) {\n              if (res)\n                  res += ' ';\n              res += key;\n          }\n      }\n      return res;\n  }\n\n  var namespaceMap = {\n      svg: 'http://www.w3.org/2000/svg',\n      math: 'http://www.w3.org/1998/Math/MathML'\n  };\n  var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n      'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n      'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n      'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n      's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n      'embed,object,param,source,canvas,script,noscript,del,ins,' +\n      'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n      'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n      'output,progress,select,textarea,' +\n      'details,dialog,menu,menuitem,summary,' +\n      'content,element,shadow,template,blockquote,iframe,tfoot');\n  // this map is intentionally selective, only covering SVG elements that may\n  // contain child elements.\n  var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n      'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n      'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\n  var isPreTag = function (tag) { return tag === 'pre'; };\n  var isReservedTag = function (tag) {\n      return isHTMLTag(tag) || isSVG(tag);\n  };\n  function getTagNamespace(tag) {\n      if (isSVG(tag)) {\n          return 'svg';\n      }\n      // basic support for MathML\n      // note it doesn't support other MathML elements being component roots\n      if (tag === 'math') {\n          return 'math';\n      }\n  }\n  var unknownElementCache = Object.create(null);\n  function isUnknownElement(tag) {\n      /* istanbul ignore if */\n      if (!inBrowser) {\n          return true;\n      }\n      if (isReservedTag(tag)) {\n          return false;\n      }\n      tag = tag.toLowerCase();\n      /* istanbul ignore if */\n      if (unknownElementCache[tag] != null) {\n          return unknownElementCache[tag];\n      }\n      var el = document.createElement(tag);\n      if (tag.indexOf('-') > -1) {\n          // https://stackoverflow.com/a/28210364/1070244\n          return (unknownElementCache[tag] =\n              el.constructor === window.HTMLUnknownElement ||\n                  el.constructor === window.HTMLElement);\n      }\n      else {\n          return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n      }\n  }\n  var isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n  /**\n   * Query an element selector if it's not an element already.\n   */\n  function query(el) {\n      if (typeof el === 'string') {\n          var selected = document.querySelector(el);\n          if (!selected) {\n              warn$2('Cannot find element: ' + el);\n              return document.createElement('div');\n          }\n          return selected;\n      }\n      else {\n          return el;\n      }\n  }\n\n  function createElement(tagName, vnode) {\n      var elm = document.createElement(tagName);\n      if (tagName !== 'select') {\n          return elm;\n      }\n      // false or null will remove the attribute but undefined will not\n      if (vnode.data &&\n          vnode.data.attrs &&\n          vnode.data.attrs.multiple !== undefined) {\n          elm.setAttribute('multiple', 'multiple');\n      }\n      return elm;\n  }\n  function createElementNS(namespace, tagName) {\n      return document.createElementNS(namespaceMap[namespace], tagName);\n  }\n  function createTextNode(text) {\n      return document.createTextNode(text);\n  }\n  function createComment(text) {\n      return document.createComment(text);\n  }\n  function insertBefore(parentNode, newNode, referenceNode) {\n      parentNode.insertBefore(newNode, referenceNode);\n  }\n  function removeChild(node, child) {\n      node.removeChild(child);\n  }\n  function appendChild(node, child) {\n      node.appendChild(child);\n  }\n  function parentNode(node) {\n      return node.parentNode;\n  }\n  function nextSibling(node) {\n      return node.nextSibling;\n  }\n  function tagName(node) {\n      return node.tagName;\n  }\n  function setTextContent(node, text) {\n      node.textContent = text;\n  }\n  function setStyleScope(node, scopeId) {\n      node.setAttribute(scopeId, '');\n  }\n\n  var nodeOps = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    createElement: createElement,\n    createElementNS: createElementNS,\n    createTextNode: createTextNode,\n    createComment: createComment,\n    insertBefore: insertBefore,\n    removeChild: removeChild,\n    appendChild: appendChild,\n    parentNode: parentNode,\n    nextSibling: nextSibling,\n    tagName: tagName,\n    setTextContent: setTextContent,\n    setStyleScope: setStyleScope\n  });\n\n  var ref = {\n      create: function (_, vnode) {\n          registerRef(vnode);\n      },\n      update: function (oldVnode, vnode) {\n          if (oldVnode.data.ref !== vnode.data.ref) {\n              registerRef(oldVnode, true);\n              registerRef(vnode);\n          }\n      },\n      destroy: function (vnode) {\n          registerRef(vnode, true);\n      }\n  };\n  function registerRef(vnode, isRemoval) {\n      var ref = vnode.data.ref;\n      if (!isDef(ref))\n          return;\n      var vm = vnode.context;\n      var refValue = vnode.componentInstance || vnode.elm;\n      var value = isRemoval ? null : refValue;\n      var $refsValue = isRemoval ? undefined : refValue;\n      if (isFunction(ref)) {\n          invokeWithErrorHandling(ref, vm, [value], vm, \"template ref function\");\n          return;\n      }\n      var isFor = vnode.data.refInFor;\n      var _isString = typeof ref === 'string' || typeof ref === 'number';\n      var _isRef = isRef(ref);\n      var refs = vm.$refs;\n      if (_isString || _isRef) {\n          if (isFor) {\n              var existing = _isString ? refs[ref] : ref.value;\n              if (isRemoval) {\n                  isArray(existing) && remove$2(existing, refValue);\n              }\n              else {\n                  if (!isArray(existing)) {\n                      if (_isString) {\n                          refs[ref] = [refValue];\n                          setSetupRef(vm, ref, refs[ref]);\n                      }\n                      else {\n                          ref.value = [refValue];\n                      }\n                  }\n                  else if (!existing.includes(refValue)) {\n                      existing.push(refValue);\n                  }\n              }\n          }\n          else if (_isString) {\n              if (isRemoval && refs[ref] !== refValue) {\n                  return;\n              }\n              refs[ref] = $refsValue;\n              setSetupRef(vm, ref, value);\n          }\n          else if (_isRef) {\n              if (isRemoval && ref.value !== refValue) {\n                  return;\n              }\n              ref.value = value;\n          }\n          else {\n              warn$2(\"Invalid template ref type: \".concat(typeof ref));\n          }\n      }\n  }\n  function setSetupRef(_a, key, val) {\n      var _setupState = _a._setupState;\n      if (_setupState && hasOwn(_setupState, key)) {\n          if (isRef(_setupState[key])) {\n              _setupState[key].value = val;\n          }\n          else {\n              _setupState[key] = val;\n          }\n      }\n  }\n\n  /**\n   * Virtual DOM patching algorithm based on Snabbdom by\n   * Simon Friis Vindum (@paldepind)\n   * Licensed under the MIT License\n   * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n   *\n   * modified by Evan You (@yyx990803)\n   *\n   * Not type-checking this because this file is perf-critical and the cost\n   * of making flow understand it is not worth it.\n   */\n  var emptyNode = new VNode('', {}, []);\n  var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n  function sameVnode(a, b) {\n      return (a.key === b.key &&\n          a.asyncFactory === b.asyncFactory &&\n          ((a.tag === b.tag &&\n              a.isComment === b.isComment &&\n              isDef(a.data) === isDef(b.data) &&\n              sameInputType(a, b)) ||\n              (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n  }\n  function sameInputType(a, b) {\n      if (a.tag !== 'input')\n          return true;\n      var i;\n      var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n      var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n      return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n  }\n  function createKeyToOldIdx(children, beginIdx, endIdx) {\n      var i, key;\n      var map = {};\n      for (i = beginIdx; i <= endIdx; ++i) {\n          key = children[i].key;\n          if (isDef(key))\n              map[key] = i;\n      }\n      return map;\n  }\n  function createPatchFunction(backend) {\n      var i, j;\n      var cbs = {};\n      var modules = backend.modules, nodeOps = backend.nodeOps;\n      for (i = 0; i < hooks.length; ++i) {\n          cbs[hooks[i]] = [];\n          for (j = 0; j < modules.length; ++j) {\n              if (isDef(modules[j][hooks[i]])) {\n                  cbs[hooks[i]].push(modules[j][hooks[i]]);\n              }\n          }\n      }\n      function emptyNodeAt(elm) {\n          return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n      }\n      function createRmCb(childElm, listeners) {\n          function remove() {\n              if (--remove.listeners === 0) {\n                  removeNode(childElm);\n              }\n          }\n          remove.listeners = listeners;\n          return remove;\n      }\n      function removeNode(el) {\n          var parent = nodeOps.parentNode(el);\n          // element may have already been removed due to v-html / v-text\n          if (isDef(parent)) {\n              nodeOps.removeChild(parent, el);\n          }\n      }\n      function isUnknownElement(vnode, inVPre) {\n          return (!inVPre &&\n              !vnode.ns &&\n              !(config.ignoredElements.length &&\n                  config.ignoredElements.some(function (ignore) {\n                      return isRegExp(ignore)\n                          ? ignore.test(vnode.tag)\n                          : ignore === vnode.tag;\n                  })) &&\n              config.isUnknownElement(vnode.tag));\n      }\n      var creatingElmInVPre = 0;\n      function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n          if (isDef(vnode.elm) && isDef(ownerArray)) {\n              // This vnode was used in a previous render!\n              // now it's used as a new node, overwriting its elm would cause\n              // potential patch errors down the road when it's used as an insertion\n              // reference node. Instead, we clone the node on-demand before creating\n              // associated DOM element for it.\n              vnode = ownerArray[index] = cloneVNode(vnode);\n          }\n          vnode.isRootInsert = !nested; // for transition enter check\n          if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n              return;\n          }\n          var data = vnode.data;\n          var children = vnode.children;\n          var tag = vnode.tag;\n          if (isDef(tag)) {\n              {\n                  if (data && data.pre) {\n                      creatingElmInVPre++;\n                  }\n                  if (isUnknownElement(vnode, creatingElmInVPre)) {\n                      warn$2('Unknown custom element: <' +\n                          tag +\n                          '> - did you ' +\n                          'register the component correctly? For recursive components, ' +\n                          'make sure to provide the \"name\" option.', vnode.context);\n                  }\n              }\n              vnode.elm = vnode.ns\n                  ? nodeOps.createElementNS(vnode.ns, tag)\n                  : nodeOps.createElement(tag, vnode);\n              setScope(vnode);\n              createChildren(vnode, children, insertedVnodeQueue);\n              if (isDef(data)) {\n                  invokeCreateHooks(vnode, insertedVnodeQueue);\n              }\n              insert(parentElm, vnode.elm, refElm);\n              if (data && data.pre) {\n                  creatingElmInVPre--;\n              }\n          }\n          else if (isTrue(vnode.isComment)) {\n              vnode.elm = nodeOps.createComment(vnode.text);\n              insert(parentElm, vnode.elm, refElm);\n          }\n          else {\n              vnode.elm = nodeOps.createTextNode(vnode.text);\n              insert(parentElm, vnode.elm, refElm);\n          }\n      }\n      function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n          var i = vnode.data;\n          if (isDef(i)) {\n              var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n              if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                  i(vnode, false /* hydrating */);\n              }\n              // after calling the init hook, if the vnode is a child component\n              // it should've created a child instance and mounted it. the child\n              // component also has set the placeholder vnode's elm.\n              // in that case we can just return the element and be done.\n              if (isDef(vnode.componentInstance)) {\n                  initComponent(vnode, insertedVnodeQueue);\n                  insert(parentElm, vnode.elm, refElm);\n                  if (isTrue(isReactivated)) {\n                      reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                  }\n                  return true;\n              }\n          }\n      }\n      function initComponent(vnode, insertedVnodeQueue) {\n          if (isDef(vnode.data.pendingInsert)) {\n              insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n              vnode.data.pendingInsert = null;\n          }\n          vnode.elm = vnode.componentInstance.$el;\n          if (isPatchable(vnode)) {\n              invokeCreateHooks(vnode, insertedVnodeQueue);\n              setScope(vnode);\n          }\n          else {\n              // empty component root.\n              // skip all element-related modules except for ref (#3455)\n              registerRef(vnode);\n              // make sure to invoke the insert hook\n              insertedVnodeQueue.push(vnode);\n          }\n      }\n      function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n          var i;\n          // hack for #4339: a reactivated component with inner transition\n          // does not trigger because the inner node's created hooks are not called\n          // again. It's not ideal to involve module-specific logic in here but\n          // there doesn't seem to be a better way to do it.\n          var innerNode = vnode;\n          while (innerNode.componentInstance) {\n              innerNode = innerNode.componentInstance._vnode;\n              if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                  for (i = 0; i < cbs.activate.length; ++i) {\n                      cbs.activate[i](emptyNode, innerNode);\n                  }\n                  insertedVnodeQueue.push(innerNode);\n                  break;\n              }\n          }\n          // unlike a newly created component,\n          // a reactivated keep-alive component doesn't insert itself\n          insert(parentElm, vnode.elm, refElm);\n      }\n      function insert(parent, elm, ref) {\n          if (isDef(parent)) {\n              if (isDef(ref)) {\n                  if (nodeOps.parentNode(ref) === parent) {\n                      nodeOps.insertBefore(parent, elm, ref);\n                  }\n              }\n              else {\n                  nodeOps.appendChild(parent, elm);\n              }\n          }\n      }\n      function createChildren(vnode, children, insertedVnodeQueue) {\n          if (isArray(children)) {\n              {\n                  checkDuplicateKeys(children);\n              }\n              for (var i_1 = 0; i_1 < children.length; ++i_1) {\n                  createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);\n              }\n          }\n          else if (isPrimitive(vnode.text)) {\n              nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n          }\n      }\n      function isPatchable(vnode) {\n          while (vnode.componentInstance) {\n              vnode = vnode.componentInstance._vnode;\n          }\n          return isDef(vnode.tag);\n      }\n      function invokeCreateHooks(vnode, insertedVnodeQueue) {\n          for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {\n              cbs.create[i_2](emptyNode, vnode);\n          }\n          i = vnode.data.hook; // Reuse variable\n          if (isDef(i)) {\n              if (isDef(i.create))\n                  i.create(emptyNode, vnode);\n              if (isDef(i.insert))\n                  insertedVnodeQueue.push(vnode);\n          }\n      }\n      // set scope id attribute for scoped CSS.\n      // this is implemented as a special case to avoid the overhead\n      // of going through the normal attribute patching process.\n      function setScope(vnode) {\n          var i;\n          if (isDef((i = vnode.fnScopeId))) {\n              nodeOps.setStyleScope(vnode.elm, i);\n          }\n          else {\n              var ancestor = vnode;\n              while (ancestor) {\n                  if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                      nodeOps.setStyleScope(vnode.elm, i);\n                  }\n                  ancestor = ancestor.parent;\n              }\n          }\n          // for slot content they should also get the scopeId from the host instance.\n          if (isDef((i = activeInstance)) &&\n              i !== vnode.context &&\n              i !== vnode.fnContext &&\n              isDef((i = i.$options._scopeId))) {\n              nodeOps.setStyleScope(vnode.elm, i);\n          }\n      }\n      function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n          for (; startIdx <= endIdx; ++startIdx) {\n              createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n          }\n      }\n      function invokeDestroyHook(vnode) {\n          var i, j;\n          var data = vnode.data;\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                  i(vnode);\n              for (i = 0; i < cbs.destroy.length; ++i)\n                  cbs.destroy[i](vnode);\n          }\n          if (isDef((i = vnode.children))) {\n              for (j = 0; j < vnode.children.length; ++j) {\n                  invokeDestroyHook(vnode.children[j]);\n              }\n          }\n      }\n      function removeVnodes(vnodes, startIdx, endIdx) {\n          for (; startIdx <= endIdx; ++startIdx) {\n              var ch = vnodes[startIdx];\n              if (isDef(ch)) {\n                  if (isDef(ch.tag)) {\n                      removeAndInvokeRemoveHook(ch);\n                      invokeDestroyHook(ch);\n                  }\n                  else {\n                      // Text node\n                      removeNode(ch.elm);\n                  }\n              }\n          }\n      }\n      function removeAndInvokeRemoveHook(vnode, rm) {\n          if (isDef(rm) || isDef(vnode.data)) {\n              var i_3;\n              var listeners = cbs.remove.length + 1;\n              if (isDef(rm)) {\n                  // we have a recursively passed down rm callback\n                  // increase the listeners count\n                  rm.listeners += listeners;\n              }\n              else {\n                  // directly removing\n                  rm = createRmCb(vnode.elm, listeners);\n              }\n              // recursively invoke hooks on child component root node\n              if (isDef((i_3 = vnode.componentInstance)) &&\n                  isDef((i_3 = i_3._vnode)) &&\n                  isDef(i_3.data)) {\n                  removeAndInvokeRemoveHook(i_3, rm);\n              }\n              for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {\n                  cbs.remove[i_3](vnode, rm);\n              }\n              if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {\n                  i_3(vnode, rm);\n              }\n              else {\n                  rm();\n              }\n          }\n          else {\n              removeNode(vnode.elm);\n          }\n      }\n      function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n          var oldStartIdx = 0;\n          var newStartIdx = 0;\n          var oldEndIdx = oldCh.length - 1;\n          var oldStartVnode = oldCh[0];\n          var oldEndVnode = oldCh[oldEndIdx];\n          var newEndIdx = newCh.length - 1;\n          var newStartVnode = newCh[0];\n          var newEndVnode = newCh[newEndIdx];\n          var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n          // removeOnly is a special flag used only by <transition-group>\n          // to ensure removed elements stay in correct relative positions\n          // during leaving transitions\n          var canMove = !removeOnly;\n          {\n              checkDuplicateKeys(newCh);\n          }\n          while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n              if (isUndef(oldStartVnode)) {\n                  oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n              }\n              else if (isUndef(oldEndVnode)) {\n                  oldEndVnode = oldCh[--oldEndIdx];\n              }\n              else if (sameVnode(oldStartVnode, newStartVnode)) {\n                  patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                  oldStartVnode = oldCh[++oldStartIdx];\n                  newStartVnode = newCh[++newStartIdx];\n              }\n              else if (sameVnode(oldEndVnode, newEndVnode)) {\n                  patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                  oldEndVnode = oldCh[--oldEndIdx];\n                  newEndVnode = newCh[--newEndIdx];\n              }\n              else if (sameVnode(oldStartVnode, newEndVnode)) {\n                  // Vnode moved right\n                  patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                  canMove &&\n                      nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                  oldStartVnode = oldCh[++oldStartIdx];\n                  newEndVnode = newCh[--newEndIdx];\n              }\n              else if (sameVnode(oldEndVnode, newStartVnode)) {\n                  // Vnode moved left\n                  patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                  canMove &&\n                      nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                  oldEndVnode = oldCh[--oldEndIdx];\n                  newStartVnode = newCh[++newStartIdx];\n              }\n              else {\n                  if (isUndef(oldKeyToIdx))\n                      oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                  idxInOld = isDef(newStartVnode.key)\n                      ? oldKeyToIdx[newStartVnode.key]\n                      : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                  if (isUndef(idxInOld)) {\n                      // New element\n                      createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                  }\n                  else {\n                      vnodeToMove = oldCh[idxInOld];\n                      if (sameVnode(vnodeToMove, newStartVnode)) {\n                          patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                          oldCh[idxInOld] = undefined;\n                          canMove &&\n                              nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                      }\n                      else {\n                          // same key but different element. treat as new element\n                          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                      }\n                  }\n                  newStartVnode = newCh[++newStartIdx];\n              }\n          }\n          if (oldStartIdx > oldEndIdx) {\n              refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n              addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n          }\n          else if (newStartIdx > newEndIdx) {\n              removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n          }\n      }\n      function checkDuplicateKeys(children) {\n          var seenKeys = {};\n          for (var i_4 = 0; i_4 < children.length; i_4++) {\n              var vnode = children[i_4];\n              var key = vnode.key;\n              if (isDef(key)) {\n                  if (seenKeys[key]) {\n                      warn$2(\"Duplicate keys detected: '\".concat(key, \"'. This may cause an update error.\"), vnode.context);\n                  }\n                  else {\n                      seenKeys[key] = true;\n                  }\n              }\n          }\n      }\n      function findIdxInOld(node, oldCh, start, end) {\n          for (var i_5 = start; i_5 < end; i_5++) {\n              var c = oldCh[i_5];\n              if (isDef(c) && sameVnode(node, c))\n                  return i_5;\n          }\n      }\n      function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n          if (oldVnode === vnode) {\n              return;\n          }\n          if (isDef(vnode.elm) && isDef(ownerArray)) {\n              // clone reused vnode\n              vnode = ownerArray[index] = cloneVNode(vnode);\n          }\n          var elm = (vnode.elm = oldVnode.elm);\n          if (isTrue(oldVnode.isAsyncPlaceholder)) {\n              if (isDef(vnode.asyncFactory.resolved)) {\n                  hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n              }\n              else {\n                  vnode.isAsyncPlaceholder = true;\n              }\n              return;\n          }\n          // reuse element for static trees.\n          // note we only do this if the vnode is cloned -\n          // if the new node is not cloned it means the render functions have been\n          // reset by the hot-reload-api and we need to do a proper re-render.\n          if (isTrue(vnode.isStatic) &&\n              isTrue(oldVnode.isStatic) &&\n              vnode.key === oldVnode.key &&\n              (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n              vnode.componentInstance = oldVnode.componentInstance;\n              return;\n          }\n          var i;\n          var data = vnode.data;\n          if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n              i(oldVnode, vnode);\n          }\n          var oldCh = oldVnode.children;\n          var ch = vnode.children;\n          if (isDef(data) && isPatchable(vnode)) {\n              for (i = 0; i < cbs.update.length; ++i)\n                  cbs.update[i](oldVnode, vnode);\n              if (isDef((i = data.hook)) && isDef((i = i.update)))\n                  i(oldVnode, vnode);\n          }\n          if (isUndef(vnode.text)) {\n              if (isDef(oldCh) && isDef(ch)) {\n                  if (oldCh !== ch)\n                      updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n              }\n              else if (isDef(ch)) {\n                  {\n                      checkDuplicateKeys(ch);\n                  }\n                  if (isDef(oldVnode.text))\n                      nodeOps.setTextContent(elm, '');\n                  addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n              }\n              else if (isDef(oldCh)) {\n                  removeVnodes(oldCh, 0, oldCh.length - 1);\n              }\n              else if (isDef(oldVnode.text)) {\n                  nodeOps.setTextContent(elm, '');\n              }\n          }\n          else if (oldVnode.text !== vnode.text) {\n              nodeOps.setTextContent(elm, vnode.text);\n          }\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                  i(oldVnode, vnode);\n          }\n      }\n      function invokeInsertHook(vnode, queue, initial) {\n          // delay insert hooks for component root nodes, invoke them after the\n          // element is really inserted\n          if (isTrue(initial) && isDef(vnode.parent)) {\n              vnode.parent.data.pendingInsert = queue;\n          }\n          else {\n              for (var i_6 = 0; i_6 < queue.length; ++i_6) {\n                  queue[i_6].data.hook.insert(queue[i_6]);\n              }\n          }\n      }\n      var hydrationBailed = false;\n      // list of modules that can skip create hook during hydration because they\n      // are already rendered on the client or has no need for initialization\n      // Note: style is excluded because it relies on initial clone for future\n      // deep updates (#7063).\n      var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n      // Note: this is a browser-only function so we can assume elms are DOM nodes.\n      function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n          var i;\n          var tag = vnode.tag, data = vnode.data, children = vnode.children;\n          inVPre = inVPre || (data && data.pre);\n          vnode.elm = elm;\n          if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n              vnode.isAsyncPlaceholder = true;\n              return true;\n          }\n          // assert node match\n          {\n              if (!assertNodeMatch(elm, vnode, inVPre)) {\n                  return false;\n              }\n          }\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.init)))\n                  i(vnode, true /* hydrating */);\n              if (isDef((i = vnode.componentInstance))) {\n                  // child component. it should have hydrated its own tree.\n                  initComponent(vnode, insertedVnodeQueue);\n                  return true;\n              }\n          }\n          if (isDef(tag)) {\n              if (isDef(children)) {\n                  // empty element, allow client to pick up and populate children\n                  if (!elm.hasChildNodes()) {\n                      createChildren(vnode, children, insertedVnodeQueue);\n                  }\n                  else {\n                      // v-html and domProps: innerHTML\n                      if (isDef((i = data)) &&\n                          isDef((i = i.domProps)) &&\n                          isDef((i = i.innerHTML))) {\n                          if (i !== elm.innerHTML) {\n                              /* istanbul ignore if */\n                              if (typeof console !== 'undefined' &&\n                                  !hydrationBailed) {\n                                  hydrationBailed = true;\n                                  console.warn('Parent: ', elm);\n                                  console.warn('server innerHTML: ', i);\n                                  console.warn('client innerHTML: ', elm.innerHTML);\n                              }\n                              return false;\n                          }\n                      }\n                      else {\n                          // iterate and compare children lists\n                          var childrenMatch = true;\n                          var childNode = elm.firstChild;\n                          for (var i_7 = 0; i_7 < children.length; i_7++) {\n                              if (!childNode ||\n                                  !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {\n                                  childrenMatch = false;\n                                  break;\n                              }\n                              childNode = childNode.nextSibling;\n                          }\n                          // if childNode is not null, it means the actual childNodes list is\n                          // longer than the virtual children list.\n                          if (!childrenMatch || childNode) {\n                              /* istanbul ignore if */\n                              if (typeof console !== 'undefined' &&\n                                  !hydrationBailed) {\n                                  hydrationBailed = true;\n                                  console.warn('Parent: ', elm);\n                                  console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                              }\n                              return false;\n                          }\n                      }\n                  }\n              }\n              if (isDef(data)) {\n                  var fullInvoke = false;\n                  for (var key in data) {\n                      if (!isRenderedModule(key)) {\n                          fullInvoke = true;\n                          invokeCreateHooks(vnode, insertedVnodeQueue);\n                          break;\n                      }\n                  }\n                  if (!fullInvoke && data['class']) {\n                      // ensure collecting deps for deep class bindings for future updates\n                      traverse(data['class']);\n                  }\n              }\n          }\n          else if (elm.data !== vnode.text) {\n              elm.data = vnode.text;\n          }\n          return true;\n      }\n      function assertNodeMatch(node, vnode, inVPre) {\n          if (isDef(vnode.tag)) {\n              return (vnode.tag.indexOf('vue-component') === 0 ||\n                  (!isUnknownElement(vnode, inVPre) &&\n                      vnode.tag.toLowerCase() ===\n                          (node.tagName && node.tagName.toLowerCase())));\n          }\n          else {\n              return node.nodeType === (vnode.isComment ? 8 : 3);\n          }\n      }\n      return function patch(oldVnode, vnode, hydrating, removeOnly) {\n          if (isUndef(vnode)) {\n              if (isDef(oldVnode))\n                  invokeDestroyHook(oldVnode);\n              return;\n          }\n          var isInitialPatch = false;\n          var insertedVnodeQueue = [];\n          if (isUndef(oldVnode)) {\n              // empty mount (likely as component), create new root element\n              isInitialPatch = true;\n              createElm(vnode, insertedVnodeQueue);\n          }\n          else {\n              var isRealElement = isDef(oldVnode.nodeType);\n              if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                  // patch existing root node\n                  patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n              }\n              else {\n                  if (isRealElement) {\n                      // mounting to a real element\n                      // check if this is server-rendered content and if we can perform\n                      // a successful hydration.\n                      if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                          oldVnode.removeAttribute(SSR_ATTR);\n                          hydrating = true;\n                      }\n                      if (isTrue(hydrating)) {\n                          if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                              invokeInsertHook(vnode, insertedVnodeQueue, true);\n                              return oldVnode;\n                          }\n                          else {\n                              warn$2('The client-side rendered virtual DOM tree is not matching ' +\n                                  'server-rendered content. This is likely caused by incorrect ' +\n                                  'HTML markup, for example nesting block-level elements inside ' +\n                                  '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                  'full client-side render.');\n                          }\n                      }\n                      // either not server-rendered, or hydration failed.\n                      // create an empty node and replace it\n                      oldVnode = emptyNodeAt(oldVnode);\n                  }\n                  // replacing existing element\n                  var oldElm = oldVnode.elm;\n                  var parentElm = nodeOps.parentNode(oldElm);\n                  // create new node\n                  createElm(vnode, insertedVnodeQueue, \n                  // extremely rare edge case: do not insert if old element is in a\n                  // leaving transition. Only happens when combining transition +\n                  // keep-alive + HOCs. (#4590)\n                  oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                  // update parent placeholder node element, recursively\n                  if (isDef(vnode.parent)) {\n                      var ancestor = vnode.parent;\n                      var patchable = isPatchable(vnode);\n                      while (ancestor) {\n                          for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {\n                              cbs.destroy[i_8](ancestor);\n                          }\n                          ancestor.elm = vnode.elm;\n                          if (patchable) {\n                              for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {\n                                  cbs.create[i_9](emptyNode, ancestor);\n                              }\n                              // #6513\n                              // invoke insert hooks that may have been merged by create hooks.\n                              // e.g. for directives that uses the \"inserted\" hook.\n                              var insert_1 = ancestor.data.hook.insert;\n                              if (insert_1.merged) {\n                                  // start at index 1 to avoid re-invoking component mounted hook\n                                  // clone insert hooks to avoid being mutated during iteration.\n                                  // e.g. for customed directives under transition group.\n                                  var cloned = insert_1.fns.slice(1);\n                                  for (var i_10 = 0; i_10 < cloned.length; i_10++) {\n                                      cloned[i_10]();\n                                  }\n                              }\n                          }\n                          else {\n                              registerRef(ancestor);\n                          }\n                          ancestor = ancestor.parent;\n                      }\n                  }\n                  // destroy old node\n                  if (isDef(parentElm)) {\n                      removeVnodes([oldVnode], 0, 0);\n                  }\n                  else if (isDef(oldVnode.tag)) {\n                      invokeDestroyHook(oldVnode);\n                  }\n              }\n          }\n          invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n          return vnode.elm;\n      };\n  }\n\n  var directives$1 = {\n      create: updateDirectives,\n      update: updateDirectives,\n      destroy: function unbindDirectives(vnode) {\n          // @ts-expect-error emptyNode is not VNodeWithData\n          updateDirectives(vnode, emptyNode);\n      }\n  };\n  function updateDirectives(oldVnode, vnode) {\n      if (oldVnode.data.directives || vnode.data.directives) {\n          _update(oldVnode, vnode);\n      }\n  }\n  function _update(oldVnode, vnode) {\n      var isCreate = oldVnode === emptyNode;\n      var isDestroy = vnode === emptyNode;\n      var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n      var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n      var dirsWithInsert = [];\n      var dirsWithPostpatch = [];\n      var key, oldDir, dir;\n      for (key in newDirs) {\n          oldDir = oldDirs[key];\n          dir = newDirs[key];\n          if (!oldDir) {\n              // new directive, bind\n              callHook(dir, 'bind', vnode, oldVnode);\n              if (dir.def && dir.def.inserted) {\n                  dirsWithInsert.push(dir);\n              }\n          }\n          else {\n              // existing directive, update\n              dir.oldValue = oldDir.value;\n              dir.oldArg = oldDir.arg;\n              callHook(dir, 'update', vnode, oldVnode);\n              if (dir.def && dir.def.componentUpdated) {\n                  dirsWithPostpatch.push(dir);\n              }\n          }\n      }\n      if (dirsWithInsert.length) {\n          var callInsert = function () {\n              for (var i = 0; i < dirsWithInsert.length; i++) {\n                  callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n              }\n          };\n          if (isCreate) {\n              mergeVNodeHook(vnode, 'insert', callInsert);\n          }\n          else {\n              callInsert();\n          }\n      }\n      if (dirsWithPostpatch.length) {\n          mergeVNodeHook(vnode, 'postpatch', function () {\n              for (var i = 0; i < dirsWithPostpatch.length; i++) {\n                  callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n              }\n          });\n      }\n      if (!isCreate) {\n          for (key in oldDirs) {\n              if (!newDirs[key]) {\n                  // no longer present, unbind\n                  callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n              }\n          }\n      }\n  }\n  var emptyModifiers = Object.create(null);\n  function normalizeDirectives(dirs, vm) {\n      var res = Object.create(null);\n      if (!dirs) {\n          // $flow-disable-line\n          return res;\n      }\n      var i, dir;\n      for (i = 0; i < dirs.length; i++) {\n          dir = dirs[i];\n          if (!dir.modifiers) {\n              // $flow-disable-line\n              dir.modifiers = emptyModifiers;\n          }\n          res[getRawDirName(dir)] = dir;\n          if (vm._setupState && vm._setupState.__sfc) {\n              var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n              if (typeof setupDef === 'function') {\n                  dir.def = {\n                      bind: setupDef,\n                      update: setupDef,\n                  };\n              }\n              else {\n                  dir.def = setupDef;\n              }\n          }\n          dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n      }\n      // $flow-disable-line\n      return res;\n  }\n  function getRawDirName(dir) {\n      return (dir.rawName || \"\".concat(dir.name, \".\").concat(Object.keys(dir.modifiers || {}).join('.')));\n  }\n  function callHook(dir, hook, vnode, oldVnode, isDestroy) {\n      var fn = dir.def && dir.def[hook];\n      if (fn) {\n          try {\n              fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n          }\n          catch (e) {\n              handleError(e, vnode.context, \"directive \".concat(dir.name, \" \").concat(hook, \" hook\"));\n          }\n      }\n  }\n\n  var baseModules = [ref, directives$1];\n\n  function updateAttrs(oldVnode, vnode) {\n      var opts = vnode.componentOptions;\n      if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n          return;\n      }\n      if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n          return;\n      }\n      var key, cur, old;\n      var elm = vnode.elm;\n      var oldAttrs = oldVnode.data.attrs || {};\n      var attrs = vnode.data.attrs || {};\n      // clone observed objects, as the user probably wants to mutate it\n      if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n          attrs = vnode.data.attrs = extend({}, attrs);\n      }\n      for (key in attrs) {\n          cur = attrs[key];\n          old = oldAttrs[key];\n          if (old !== cur) {\n              setAttr(elm, key, cur, vnode.data.pre);\n          }\n      }\n      // #4391: in IE9, setting type can reset value for input[type=radio]\n      // #6666: IE/Edge forces progress value down to 1 before setting a max\n      /* istanbul ignore if */\n      if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n          setAttr(elm, 'value', attrs.value);\n      }\n      for (key in oldAttrs) {\n          if (isUndef(attrs[key])) {\n              if (isXlink(key)) {\n                  elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n              }\n              else if (!isEnumeratedAttr(key)) {\n                  elm.removeAttribute(key);\n              }\n          }\n      }\n  }\n  function setAttr(el, key, value, isInPre) {\n      if (isInPre || el.tagName.indexOf('-') > -1) {\n          baseSetAttr(el, key, value);\n      }\n      else if (isBooleanAttr(key)) {\n          // set attribute for blank value\n          // e.g. <option disabled>Select one</option>\n          if (isFalsyAttrValue(value)) {\n              el.removeAttribute(key);\n          }\n          else {\n              // technically allowfullscreen is a boolean attribute for <iframe>,\n              // but Flash expects a value of \"true\" when used on <embed> tag\n              value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n              el.setAttribute(key, value);\n          }\n      }\n      else if (isEnumeratedAttr(key)) {\n          el.setAttribute(key, convertEnumeratedValue(key, value));\n      }\n      else if (isXlink(key)) {\n          if (isFalsyAttrValue(value)) {\n              el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n          }\n          else {\n              el.setAttributeNS(xlinkNS, key, value);\n          }\n      }\n      else {\n          baseSetAttr(el, key, value);\n      }\n  }\n  function baseSetAttr(el, key, value) {\n      if (isFalsyAttrValue(value)) {\n          el.removeAttribute(key);\n      }\n      else {\n          // #7138: IE10 & 11 fires input event when setting placeholder on\n          // <textarea>... block the first input event and remove the blocker\n          // immediately.\n          /* istanbul ignore if */\n          if (isIE &&\n              !isIE9 &&\n              el.tagName === 'TEXTAREA' &&\n              key === 'placeholder' &&\n              value !== '' &&\n              !el.__ieph) {\n              var blocker_1 = function (e) {\n                  e.stopImmediatePropagation();\n                  el.removeEventListener('input', blocker_1);\n              };\n              el.addEventListener('input', blocker_1);\n              // $flow-disable-line\n              el.__ieph = true; /* IE placeholder patched */\n          }\n          el.setAttribute(key, value);\n      }\n  }\n  var attrs = {\n      create: updateAttrs,\n      update: updateAttrs\n  };\n\n  function updateClass(oldVnode, vnode) {\n      var el = vnode.elm;\n      var data = vnode.data;\n      var oldData = oldVnode.data;\n      if (isUndef(data.staticClass) &&\n          isUndef(data.class) &&\n          (isUndef(oldData) ||\n              (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n          return;\n      }\n      var cls = genClassForVnode(vnode);\n      // handle transition classes\n      var transitionClass = el._transitionClasses;\n      if (isDef(transitionClass)) {\n          cls = concat(cls, stringifyClass(transitionClass));\n      }\n      // set the class\n      if (cls !== el._prevClass) {\n          el.setAttribute('class', cls);\n          el._prevClass = cls;\n      }\n  }\n  var klass$1 = {\n      create: updateClass,\n      update: updateClass\n  };\n\n  var validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n  function parseFilters(exp) {\n      var inSingle = false;\n      var inDouble = false;\n      var inTemplateString = false;\n      var inRegex = false;\n      var curly = 0;\n      var square = 0;\n      var paren = 0;\n      var lastFilterIndex = 0;\n      var c, prev, i, expression, filters;\n      for (i = 0; i < exp.length; i++) {\n          prev = c;\n          c = exp.charCodeAt(i);\n          if (inSingle) {\n              if (c === 0x27 && prev !== 0x5c)\n                  inSingle = false;\n          }\n          else if (inDouble) {\n              if (c === 0x22 && prev !== 0x5c)\n                  inDouble = false;\n          }\n          else if (inTemplateString) {\n              if (c === 0x60 && prev !== 0x5c)\n                  inTemplateString = false;\n          }\n          else if (inRegex) {\n              if (c === 0x2f && prev !== 0x5c)\n                  inRegex = false;\n          }\n          else if (c === 0x7c && // pipe\n              exp.charCodeAt(i + 1) !== 0x7c &&\n              exp.charCodeAt(i - 1) !== 0x7c &&\n              !curly &&\n              !square &&\n              !paren) {\n              if (expression === undefined) {\n                  // first filter, end of expression\n                  lastFilterIndex = i + 1;\n                  expression = exp.slice(0, i).trim();\n              }\n              else {\n                  pushFilter();\n              }\n          }\n          else {\n              switch (c) {\n                  case 0x22:\n                      inDouble = true;\n                      break; // \"\n                  case 0x27:\n                      inSingle = true;\n                      break; // '\n                  case 0x60:\n                      inTemplateString = true;\n                      break; // `\n                  case 0x28:\n                      paren++;\n                      break; // (\n                  case 0x29:\n                      paren--;\n                      break; // )\n                  case 0x5b:\n                      square++;\n                      break; // [\n                  case 0x5d:\n                      square--;\n                      break; // ]\n                  case 0x7b:\n                      curly++;\n                      break; // {\n                  case 0x7d:\n                      curly--;\n                      break; // }\n              }\n              if (c === 0x2f) {\n                  // /\n                  var j = i - 1;\n                  var p \n                  // find first non-whitespace prev char\n                  = void 0;\n                  // find first non-whitespace prev char\n                  for (; j >= 0; j--) {\n                      p = exp.charAt(j);\n                      if (p !== ' ')\n                          break;\n                  }\n                  if (!p || !validDivisionCharRE.test(p)) {\n                      inRegex = true;\n                  }\n              }\n          }\n      }\n      if (expression === undefined) {\n          expression = exp.slice(0, i).trim();\n      }\n      else if (lastFilterIndex !== 0) {\n          pushFilter();\n      }\n      function pushFilter() {\n          (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n          lastFilterIndex = i + 1;\n      }\n      if (filters) {\n          for (i = 0; i < filters.length; i++) {\n              expression = wrapFilter(expression, filters[i]);\n          }\n      }\n      return expression;\n  }\n  function wrapFilter(exp, filter) {\n      var i = filter.indexOf('(');\n      if (i < 0) {\n          // _f: resolveFilter\n          return \"_f(\\\"\".concat(filter, \"\\\")(\").concat(exp, \")\");\n      }\n      else {\n          var name_1 = filter.slice(0, i);\n          var args = filter.slice(i + 1);\n          return \"_f(\\\"\".concat(name_1, \"\\\")(\").concat(exp).concat(args !== ')' ? ',' + args : args);\n      }\n  }\n\n  /* eslint-disable no-unused-vars */\n  function baseWarn(msg, range) {\n      console.error(\"[Vue compiler]: \".concat(msg));\n  }\n  /* eslint-enable no-unused-vars */\n  function pluckModuleFunction(modules, key) {\n      return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];\n  }\n  function addProp(el, name, value, range, dynamic) {\n      (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));\n      el.plain = false;\n  }\n  function addAttr(el, name, value, range, dynamic) {\n      var attrs = dynamic\n          ? el.dynamicAttrs || (el.dynamicAttrs = [])\n          : el.attrs || (el.attrs = []);\n      attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));\n      el.plain = false;\n  }\n  // add a raw attr (use this in preTransforms)\n  function addRawAttr(el, name, value, range) {\n      el.attrsMap[name] = value;\n      el.attrsList.push(rangeSetItem({ name: name, value: value }, range));\n  }\n  function addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {\n      (el.directives || (el.directives = [])).push(rangeSetItem({\n          name: name,\n          rawName: rawName,\n          value: value,\n          arg: arg,\n          isDynamicArg: isDynamicArg,\n          modifiers: modifiers\n      }, range));\n      el.plain = false;\n  }\n  function prependModifierMarker(symbol, name, dynamic) {\n      return dynamic ? \"_p(\".concat(name, \",\\\"\").concat(symbol, \"\\\")\") : symbol + name; // mark the event as captured\n  }\n  function addHandler(el, name, value, modifiers, important, warn, range, dynamic) {\n      modifiers = modifiers || emptyObject;\n      // warn prevent and passive modifier\n      /* istanbul ignore if */\n      if (warn && modifiers.prevent && modifiers.passive) {\n          warn(\"passive and prevent can't be used together. \" +\n              \"Passive handler can't prevent default event.\", range);\n      }\n      // normalize click.right and click.middle since they don't actually fire\n      // this is technically browser-specific, but at least for now browsers are\n      // the only target envs that have right/middle clicks.\n      if (modifiers.right) {\n          if (dynamic) {\n              name = \"(\".concat(name, \")==='click'?'contextmenu':(\").concat(name, \")\");\n          }\n          else if (name === 'click') {\n              name = 'contextmenu';\n              delete modifiers.right;\n          }\n      }\n      else if (modifiers.middle) {\n          if (dynamic) {\n              name = \"(\".concat(name, \")==='click'?'mouseup':(\").concat(name, \")\");\n          }\n          else if (name === 'click') {\n              name = 'mouseup';\n          }\n      }\n      // check capture modifier\n      if (modifiers.capture) {\n          delete modifiers.capture;\n          name = prependModifierMarker('!', name, dynamic);\n      }\n      if (modifiers.once) {\n          delete modifiers.once;\n          name = prependModifierMarker('~', name, dynamic);\n      }\n      /* istanbul ignore if */\n      if (modifiers.passive) {\n          delete modifiers.passive;\n          name = prependModifierMarker('&', name, dynamic);\n      }\n      var events;\n      if (modifiers.native) {\n          delete modifiers.native;\n          events = el.nativeEvents || (el.nativeEvents = {});\n      }\n      else {\n          events = el.events || (el.events = {});\n      }\n      var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);\n      if (modifiers !== emptyObject) {\n          newHandler.modifiers = modifiers;\n      }\n      var handlers = events[name];\n      /* istanbul ignore if */\n      if (Array.isArray(handlers)) {\n          important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n      }\n      else if (handlers) {\n          events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n      }\n      else {\n          events[name] = newHandler;\n      }\n      el.plain = false;\n  }\n  function getRawBindingAttr(el, name) {\n      return (el.rawAttrsMap[':' + name] ||\n          el.rawAttrsMap['v-bind:' + name] ||\n          el.rawAttrsMap[name]);\n  }\n  function getBindingAttr(el, name, getStatic) {\n      var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);\n      if (dynamicValue != null) {\n          return parseFilters(dynamicValue);\n      }\n      else if (getStatic !== false) {\n          var staticValue = getAndRemoveAttr(el, name);\n          if (staticValue != null) {\n              return JSON.stringify(staticValue);\n          }\n      }\n  }\n  // note: this only removes the attr from the Array (attrsList) so that it\n  // doesn't get processed by processAttrs.\n  // By default it does NOT remove it from the map (attrsMap) because the map is\n  // needed during codegen.\n  function getAndRemoveAttr(el, name, removeFromMap) {\n      var val;\n      if ((val = el.attrsMap[name]) != null) {\n          var list = el.attrsList;\n          for (var i = 0, l = list.length; i < l; i++) {\n              if (list[i].name === name) {\n                  list.splice(i, 1);\n                  break;\n              }\n          }\n      }\n      if (removeFromMap) {\n          delete el.attrsMap[name];\n      }\n      return val;\n  }\n  function getAndRemoveAttrByRegex(el, name) {\n      var list = el.attrsList;\n      for (var i = 0, l = list.length; i < l; i++) {\n          var attr = list[i];\n          if (name.test(attr.name)) {\n              list.splice(i, 1);\n              return attr;\n          }\n      }\n  }\n  function rangeSetItem(item, range) {\n      if (range) {\n          if (range.start != null) {\n              item.start = range.start;\n          }\n          if (range.end != null) {\n              item.end = range.end;\n          }\n      }\n      return item;\n  }\n\n  /**\n   * Cross-platform code generation for component v-model\n   */\n  function genComponentModel(el, value, modifiers) {\n      var _a = modifiers || {}, number = _a.number, trim = _a.trim;\n      var baseValueExpression = '$$v';\n      var valueExpression = baseValueExpression;\n      if (trim) {\n          valueExpression =\n              \"(typeof \".concat(baseValueExpression, \" === 'string'\") +\n                  \"? \".concat(baseValueExpression, \".trim()\") +\n                  \": \".concat(baseValueExpression, \")\");\n      }\n      if (number) {\n          valueExpression = \"_n(\".concat(valueExpression, \")\");\n      }\n      var assignment = genAssignmentCode(value, valueExpression);\n      el.model = {\n          value: \"(\".concat(value, \")\"),\n          expression: JSON.stringify(value),\n          callback: \"function (\".concat(baseValueExpression, \") {\").concat(assignment, \"}\")\n      };\n  }\n  /**\n   * Cross-platform codegen helper for generating v-model value assignment code.\n   */\n  function genAssignmentCode(value, assignment) {\n      var res = parseModel(value);\n      if (res.key === null) {\n          return \"\".concat(value, \"=\").concat(assignment);\n      }\n      else {\n          return \"$set(\".concat(res.exp, \", \").concat(res.key, \", \").concat(assignment, \")\");\n      }\n  }\n  /**\n   * Parse a v-model expression into a base path and a final key segment.\n   * Handles both dot-path and possible square brackets.\n   *\n   * Possible cases:\n   *\n   * - test\n   * - test[key]\n   * - test[test1[key]]\n   * - test[\"a\"][key]\n   * - xxx.test[a[a].test1[key]]\n   * - test.xxx.a[\"asa\"][test1[key]]\n   *\n   */\n  var len, str, chr, index, expressionPos, expressionEndPos;\n  function parseModel(val) {\n      // Fix https://github.com/vuejs/vue/pull/7730\n      // allow v-model=\"obj.val \" (trailing whitespace)\n      val = val.trim();\n      len = val.length;\n      if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n          index = val.lastIndexOf('.');\n          if (index > -1) {\n              return {\n                  exp: val.slice(0, index),\n                  key: '\"' + val.slice(index + 1) + '\"'\n              };\n          }\n          else {\n              return {\n                  exp: val,\n                  key: null\n              };\n          }\n      }\n      str = val;\n      index = expressionPos = expressionEndPos = 0;\n      while (!eof()) {\n          chr = next();\n          /* istanbul ignore if */\n          if (isStringStart(chr)) {\n              parseString(chr);\n          }\n          else if (chr === 0x5b) {\n              parseBracket(chr);\n          }\n      }\n      return {\n          exp: val.slice(0, expressionPos),\n          key: val.slice(expressionPos + 1, expressionEndPos)\n      };\n  }\n  function next() {\n      return str.charCodeAt(++index);\n  }\n  function eof() {\n      return index >= len;\n  }\n  function isStringStart(chr) {\n      return chr === 0x22 || chr === 0x27;\n  }\n  function parseBracket(chr) {\n      var inBracket = 1;\n      expressionPos = index;\n      while (!eof()) {\n          chr = next();\n          if (isStringStart(chr)) {\n              parseString(chr);\n              continue;\n          }\n          if (chr === 0x5b)\n              inBracket++;\n          if (chr === 0x5d)\n              inBracket--;\n          if (inBracket === 0) {\n              expressionEndPos = index;\n              break;\n          }\n      }\n  }\n  function parseString(chr) {\n      var stringQuote = chr;\n      while (!eof()) {\n          chr = next();\n          if (chr === stringQuote) {\n              break;\n          }\n      }\n  }\n\n  var warn$1;\n  // in some cases, the event used has to be determined at runtime\n  // so we used some reserved tokens during compile.\n  var RANGE_TOKEN = '__r';\n  var CHECKBOX_RADIO_TOKEN = '__c';\n  function model$1(el, dir, _warn) {\n      warn$1 = _warn;\n      var value = dir.value;\n      var modifiers = dir.modifiers;\n      var tag = el.tag;\n      var type = el.attrsMap.type;\n      {\n          // inputs with type=\"file\" are read only and setting the input's\n          // value will throw an error.\n          if (tag === 'input' && type === 'file') {\n              warn$1(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\" type=\\\"file\\\">:\\n\") +\n                  \"File inputs are read only. Use a v-on:change listener instead.\", el.rawAttrsMap['v-model']);\n          }\n      }\n      if (el.component) {\n          genComponentModel(el, value, modifiers);\n          // component v-model doesn't need extra runtime\n          return false;\n      }\n      else if (tag === 'select') {\n          genSelect(el, value, modifiers);\n      }\n      else if (tag === 'input' && type === 'checkbox') {\n          genCheckboxModel(el, value, modifiers);\n      }\n      else if (tag === 'input' && type === 'radio') {\n          genRadioModel(el, value, modifiers);\n      }\n      else if (tag === 'input' || tag === 'textarea') {\n          genDefaultModel(el, value, modifiers);\n      }\n      else if (!config.isReservedTag(tag)) {\n          genComponentModel(el, value, modifiers);\n          // component v-model doesn't need extra runtime\n          return false;\n      }\n      else {\n          warn$1(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\">: \") +\n              \"v-model is not supported on this element type. \" +\n              \"If you are working with contenteditable, it's recommended to \" +\n              'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);\n      }\n      // ensure runtime directive metadata\n      return true;\n  }\n  function genCheckboxModel(el, value, modifiers) {\n      var number = modifiers && modifiers.number;\n      var valueBinding = getBindingAttr(el, 'value') || 'null';\n      var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n      var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n      addProp(el, 'checked', \"Array.isArray(\".concat(value, \")\") +\n          \"?_i(\".concat(value, \",\").concat(valueBinding, \")>-1\") +\n          (trueValueBinding === 'true'\n              ? \":(\".concat(value, \")\")\n              : \":_q(\".concat(value, \",\").concat(trueValueBinding, \")\")));\n      addHandler(el, 'change', \"var $$a=\".concat(value, \",\") +\n          '$$el=$event.target,' +\n          \"$$c=$$el.checked?(\".concat(trueValueBinding, \"):(\").concat(falseValueBinding, \");\") +\n          'if(Array.isArray($$a)){' +\n          \"var $$v=\".concat(number ? '_n(' + valueBinding + ')' : valueBinding, \",\") +\n          '$$i=_i($$a,$$v);' +\n          \"if($$el.checked){$$i<0&&(\".concat(genAssignmentCode(value, '$$a.concat([$$v])'), \")}\") +\n          \"else{$$i>-1&&(\".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), \")}\") +\n          \"}else{\".concat(genAssignmentCode(value, '$$c'), \"}\"), null, true);\n  }\n  function genRadioModel(el, value, modifiers) {\n      var number = modifiers && modifiers.number;\n      var valueBinding = getBindingAttr(el, 'value') || 'null';\n      valueBinding = number ? \"_n(\".concat(valueBinding, \")\") : valueBinding;\n      addProp(el, 'checked', \"_q(\".concat(value, \",\").concat(valueBinding, \")\"));\n      addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\n  }\n  function genSelect(el, value, modifiers) {\n      var number = modifiers && modifiers.number;\n      var selectedVal = \"Array.prototype.filter\" +\n          \".call($event.target.options,function(o){return o.selected})\" +\n          \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n          \"return \".concat(number ? '_n(val)' : 'val', \"})\");\n      var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n      var code = \"var $$selectedVal = \".concat(selectedVal, \";\");\n      code = \"\".concat(code, \" \").concat(genAssignmentCode(value, assignment));\n      addHandler(el, 'change', code, null, true);\n  }\n  function genDefaultModel(el, value, modifiers) {\n      var type = el.attrsMap.type;\n      // warn if v-bind:value conflicts with v-model\n      // except for inputs with v-bind:type\n      {\n          var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];\n          var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n          if (value_1 && !typeBinding) {\n              var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';\n              warn$1(\"\".concat(binding, \"=\\\"\").concat(value_1, \"\\\" conflicts with v-model on the same element \") +\n                  'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);\n          }\n      }\n      var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;\n      var needCompositionGuard = !lazy && type !== 'range';\n      var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';\n      var valueExpression = '$event.target.value';\n      if (trim) {\n          valueExpression = \"$event.target.value.trim()\";\n      }\n      if (number) {\n          valueExpression = \"_n(\".concat(valueExpression, \")\");\n      }\n      var code = genAssignmentCode(value, valueExpression);\n      if (needCompositionGuard) {\n          code = \"if($event.target.composing)return;\".concat(code);\n      }\n      addProp(el, 'value', \"(\".concat(value, \")\"));\n      addHandler(el, event, code, null, true);\n      if (trim || number) {\n          addHandler(el, 'blur', '$forceUpdate()');\n      }\n  }\n\n  // normalize v-model event tokens that can only be determined at runtime.\n  // it's important to place the event as the first in the array because\n  // the whole point is ensuring the v-model callback gets called before\n  // user-attached handlers.\n  function normalizeEvents(on) {\n      /* istanbul ignore if */\n      if (isDef(on[RANGE_TOKEN])) {\n          // IE input[type=range] only supports `change` event\n          var event_1 = isIE ? 'change' : 'input';\n          on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);\n          delete on[RANGE_TOKEN];\n      }\n      // This was originally intended to fix #4521 but no longer necessary\n      // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n      /* istanbul ignore if */\n      if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n          on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n          delete on[CHECKBOX_RADIO_TOKEN];\n      }\n  }\n  var target;\n  function createOnceHandler(event, handler, capture) {\n      var _target = target; // save current target element in closure\n      return function onceHandler() {\n          var res = handler.apply(null, arguments);\n          if (res !== null) {\n              remove(event, onceHandler, capture, _target);\n          }\n      };\n  }\n  // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n  // implementation and does not fire microtasks in between event propagation, so\n  // safe to exclude.\n  var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\n  function add(name, handler, capture, passive) {\n      // async edge case #6566: inner click event triggers patch, event handler\n      // attached to outer element during patch, and triggered again. This\n      // happens because browsers fire microtask ticks between event propagation.\n      // the solution is simple: we save the timestamp when a handler is attached,\n      // and the handler would only fire if the event passed to it was fired\n      // AFTER it was attached.\n      if (useMicrotaskFix) {\n          var attachedTimestamp_1 = currentFlushTimestamp;\n          var original_1 = handler;\n          //@ts-expect-error\n          handler = original_1._wrapper = function (e) {\n              if (\n              // no bubbling, should always fire.\n              // this is just a safety net in case event.timeStamp is unreliable in\n              // certain weird environments...\n              e.target === e.currentTarget ||\n                  // event is fired after handler attachment\n                  e.timeStamp >= attachedTimestamp_1 ||\n                  // bail for environments that have buggy event.timeStamp implementations\n                  // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                  // #9681 QtWebEngine event.timeStamp is negative value\n                  e.timeStamp <= 0 ||\n                  // #9448 bail if event is fired in another document in a multi-page\n                  // electron/nw.js app, since event.timeStamp will be using a different\n                  // starting reference\n                  e.target.ownerDocument !== document) {\n                  return original_1.apply(this, arguments);\n              }\n          };\n      }\n      target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);\n  }\n  function remove(name, handler, capture, _target) {\n      (_target || target).removeEventListener(name, \n      //@ts-expect-error\n      handler._wrapper || handler, capture);\n  }\n  function updateDOMListeners(oldVnode, vnode) {\n      if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n          return;\n      }\n      var on = vnode.data.on || {};\n      var oldOn = oldVnode.data.on || {};\n      // vnode is empty when removing all listeners,\n      // and use old vnode dom element\n      target = vnode.elm || oldVnode.elm;\n      normalizeEvents(on);\n      updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n      target = undefined;\n  }\n  var events = {\n      create: updateDOMListeners,\n      update: updateDOMListeners,\n      // @ts-expect-error emptyNode has actually data\n      destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }\n  };\n\n  var svgContainer;\n  function updateDOMProps(oldVnode, vnode) {\n      if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n          return;\n      }\n      var key, cur;\n      var elm = vnode.elm;\n      var oldProps = oldVnode.data.domProps || {};\n      var props = vnode.data.domProps || {};\n      // clone observed objects, as the user probably wants to mutate it\n      if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n          props = vnode.data.domProps = extend({}, props);\n      }\n      for (key in oldProps) {\n          if (!(key in props)) {\n              elm[key] = '';\n          }\n      }\n      for (key in props) {\n          cur = props[key];\n          // ignore children if the node has textContent or innerHTML,\n          // as these will throw away existing DOM nodes and cause removal errors\n          // on subsequent patches (#3360)\n          if (key === 'textContent' || key === 'innerHTML') {\n              if (vnode.children)\n                  vnode.children.length = 0;\n              if (cur === oldProps[key])\n                  continue;\n              // #6601 work around Chrome version <= 55 bug where single textNode\n              // replaced by innerHTML/textContent retains its parentNode property\n              if (elm.childNodes.length === 1) {\n                  elm.removeChild(elm.childNodes[0]);\n              }\n          }\n          if (key === 'value' && elm.tagName !== 'PROGRESS') {\n              // store value as _value as well since\n              // non-string values will be stringified\n              elm._value = cur;\n              // avoid resetting cursor position when value is the same\n              var strCur = isUndef(cur) ? '' : String(cur);\n              if (shouldUpdateValue(elm, strCur)) {\n                  elm.value = strCur;\n              }\n          }\n          else if (key === 'innerHTML' &&\n              isSVG(elm.tagName) &&\n              isUndef(elm.innerHTML)) {\n              // IE doesn't support innerHTML for SVG elements\n              svgContainer = svgContainer || document.createElement('div');\n              svgContainer.innerHTML = \"<svg>\".concat(cur, \"</svg>\");\n              var svg = svgContainer.firstChild;\n              while (elm.firstChild) {\n                  elm.removeChild(elm.firstChild);\n              }\n              while (svg.firstChild) {\n                  elm.appendChild(svg.firstChild);\n              }\n          }\n          else if (\n          // skip the update if old and new VDOM state is the same.\n          // `value` is handled separately because the DOM value may be temporarily\n          // out of sync with VDOM state due to focus, composition and modifiers.\n          // This  #4521 by skipping the unnecessary `checked` update.\n          cur !== oldProps[key]) {\n              // some property updates can throw\n              // e.g. `value` on <progress> w/ non-finite value\n              try {\n                  elm[key] = cur;\n              }\n              catch (e) { }\n          }\n      }\n  }\n  function shouldUpdateValue(elm, checkVal) {\n      return (\n      //@ts-expect-error\n      !elm.composing &&\n          (elm.tagName === 'OPTION' ||\n              isNotInFocusAndDirty(elm, checkVal) ||\n              isDirtyWithModifiers(elm, checkVal)));\n  }\n  function isNotInFocusAndDirty(elm, checkVal) {\n      // return true when textbox (.number and .trim) loses focus and its value is\n      // not equal to the updated value\n      var notInFocus = true;\n      // #6157\n      // work around IE bug when accessing document.activeElement in an iframe\n      try {\n          notInFocus = document.activeElement !== elm;\n      }\n      catch (e) { }\n      return notInFocus && elm.value !== checkVal;\n  }\n  function isDirtyWithModifiers(elm, newVal) {\n      var value = elm.value;\n      var modifiers = elm._vModifiers; // injected by v-model runtime\n      if (isDef(modifiers)) {\n          if (modifiers.number) {\n              return toNumber(value) !== toNumber(newVal);\n          }\n          if (modifiers.trim) {\n              return value.trim() !== newVal.trim();\n          }\n      }\n      return value !== newVal;\n  }\n  var domProps = {\n      create: updateDOMProps,\n      update: updateDOMProps\n  };\n\n  var parseStyleText = cached(function (cssText) {\n      var res = {};\n      var listDelimiter = /;(?![^(]*\\))/g;\n      var propertyDelimiter = /:(.+)/;\n      cssText.split(listDelimiter).forEach(function (item) {\n          if (item) {\n              var tmp = item.split(propertyDelimiter);\n              tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n          }\n      });\n      return res;\n  });\n  // merge static and dynamic style data on the same vnode\n  function normalizeStyleData(data) {\n      var style = normalizeStyleBinding(data.style);\n      // static style is pre-processed into an object during compilation\n      // and is always a fresh object, so it's safe to merge into it\n      return data.staticStyle ? extend(data.staticStyle, style) : style;\n  }\n  // normalize possible array / string values into Object\n  function normalizeStyleBinding(bindingStyle) {\n      if (Array.isArray(bindingStyle)) {\n          return toObject(bindingStyle);\n      }\n      if (typeof bindingStyle === 'string') {\n          return parseStyleText(bindingStyle);\n      }\n      return bindingStyle;\n  }\n  /**\n   * parent component style should be after child's\n   * so that parent component's style could override it\n   */\n  function getStyle(vnode, checkChild) {\n      var res = {};\n      var styleData;\n      if (checkChild) {\n          var childNode = vnode;\n          while (childNode.componentInstance) {\n              childNode = childNode.componentInstance._vnode;\n              if (childNode &&\n                  childNode.data &&\n                  (styleData = normalizeStyleData(childNode.data))) {\n                  extend(res, styleData);\n              }\n          }\n      }\n      if ((styleData = normalizeStyleData(vnode.data))) {\n          extend(res, styleData);\n      }\n      var parentNode = vnode;\n      // @ts-expect-error parentNode.parent not VNodeWithData\n      while ((parentNode = parentNode.parent)) {\n          if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n              extend(res, styleData);\n          }\n      }\n      return res;\n  }\n\n  var cssVarRE = /^--/;\n  var importantRE = /\\s*!important$/;\n  var setProp = function (el, name, val) {\n      /* istanbul ignore if */\n      if (cssVarRE.test(name)) {\n          el.style.setProperty(name, val);\n      }\n      else if (importantRE.test(val)) {\n          el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n      }\n      else {\n          var normalizedName = normalize(name);\n          if (Array.isArray(val)) {\n              // Support values array created by autoprefixer, e.g.\n              // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n              // Set them one by one, and the browser will only set those it can recognize\n              for (var i = 0, len = val.length; i < len; i++) {\n                  el.style[normalizedName] = val[i];\n              }\n          }\n          else {\n              el.style[normalizedName] = val;\n          }\n      }\n  };\n  var vendorNames = ['Webkit', 'Moz', 'ms'];\n  var emptyStyle;\n  var normalize = cached(function (prop) {\n      emptyStyle = emptyStyle || document.createElement('div').style;\n      prop = camelize(prop);\n      if (prop !== 'filter' && prop in emptyStyle) {\n          return prop;\n      }\n      var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n      for (var i = 0; i < vendorNames.length; i++) {\n          var name_1 = vendorNames[i] + capName;\n          if (name_1 in emptyStyle) {\n              return name_1;\n          }\n      }\n  });\n  function updateStyle(oldVnode, vnode) {\n      var data = vnode.data;\n      var oldData = oldVnode.data;\n      if (isUndef(data.staticStyle) &&\n          isUndef(data.style) &&\n          isUndef(oldData.staticStyle) &&\n          isUndef(oldData.style)) {\n          return;\n      }\n      var cur, name;\n      var el = vnode.elm;\n      var oldStaticStyle = oldData.staticStyle;\n      var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n      // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n      var oldStyle = oldStaticStyle || oldStyleBinding;\n      var style = normalizeStyleBinding(vnode.data.style) || {};\n      // store normalized style under a different key for next diff\n      // make sure to clone it if it's reactive, since the user likely wants\n      // to mutate it.\n      vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n      var newStyle = getStyle(vnode, true);\n      for (name in oldStyle) {\n          if (isUndef(newStyle[name])) {\n              setProp(el, name, '');\n          }\n      }\n      for (name in newStyle) {\n          cur = newStyle[name];\n          // ie9 setting to null has no effect, must use empty string\n          setProp(el, name, cur == null ? '' : cur);\n      }\n  }\n  var style$1 = {\n      create: updateStyle,\n      update: updateStyle\n  };\n\n  var whitespaceRE$1 = /\\s+/;\n  /**\n   * Add class with compatibility for SVG since classList is not supported on\n   * SVG elements in IE\n   */\n  function addClass(el, cls) {\n      /* istanbul ignore if */\n      if (!cls || !(cls = cls.trim())) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (el.classList) {\n          if (cls.indexOf(' ') > -1) {\n              cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });\n          }\n          else {\n              el.classList.add(cls);\n          }\n      }\n      else {\n          var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n          if (cur.indexOf(' ' + cls + ' ') < 0) {\n              el.setAttribute('class', (cur + cls).trim());\n          }\n      }\n  }\n  /**\n   * Remove class with compatibility for SVG since classList is not supported on\n   * SVG elements in IE\n   */\n  function removeClass(el, cls) {\n      /* istanbul ignore if */\n      if (!cls || !(cls = cls.trim())) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (el.classList) {\n          if (cls.indexOf(' ') > -1) {\n              cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });\n          }\n          else {\n              el.classList.remove(cls);\n          }\n          if (!el.classList.length) {\n              el.removeAttribute('class');\n          }\n      }\n      else {\n          var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n          var tar = ' ' + cls + ' ';\n          while (cur.indexOf(tar) >= 0) {\n              cur = cur.replace(tar, ' ');\n          }\n          cur = cur.trim();\n          if (cur) {\n              el.setAttribute('class', cur);\n          }\n          else {\n              el.removeAttribute('class');\n          }\n      }\n  }\n\n  function resolveTransition(def) {\n      if (!def) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (typeof def === 'object') {\n          var res = {};\n          if (def.css !== false) {\n              extend(res, autoCssTransition(def.name || 'v'));\n          }\n          extend(res, def);\n          return res;\n      }\n      else if (typeof def === 'string') {\n          return autoCssTransition(def);\n      }\n  }\n  var autoCssTransition = cached(function (name) {\n      return {\n          enterClass: \"\".concat(name, \"-enter\"),\n          enterToClass: \"\".concat(name, \"-enter-to\"),\n          enterActiveClass: \"\".concat(name, \"-enter-active\"),\n          leaveClass: \"\".concat(name, \"-leave\"),\n          leaveToClass: \"\".concat(name, \"-leave-to\"),\n          leaveActiveClass: \"\".concat(name, \"-leave-active\")\n      };\n  });\n  var hasTransition = inBrowser && !isIE9;\n  var TRANSITION = 'transition';\n  var ANIMATION = 'animation';\n  // Transition property/event sniffing\n  var transitionProp = 'transition';\n  var transitionEndEvent = 'transitionend';\n  var animationProp = 'animation';\n  var animationEndEvent = 'animationend';\n  if (hasTransition) {\n      /* istanbul ignore if */\n      if (window.ontransitionend === undefined &&\n          window.onwebkittransitionend !== undefined) {\n          transitionProp = 'WebkitTransition';\n          transitionEndEvent = 'webkitTransitionEnd';\n      }\n      if (window.onanimationend === undefined &&\n          window.onwebkitanimationend !== undefined) {\n          animationProp = 'WebkitAnimation';\n          animationEndEvent = 'webkitAnimationEnd';\n      }\n  }\n  // binding to window is necessary to make hot reload work in IE in strict mode\n  var raf = inBrowser\n      ? window.requestAnimationFrame\n          ? window.requestAnimationFrame.bind(window)\n          : setTimeout\n      : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };\n  function nextFrame(fn) {\n      raf(function () {\n          // @ts-expect-error\n          raf(fn);\n      });\n  }\n  function addTransitionClass(el, cls) {\n      var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n      if (transitionClasses.indexOf(cls) < 0) {\n          transitionClasses.push(cls);\n          addClass(el, cls);\n      }\n  }\n  function removeTransitionClass(el, cls) {\n      if (el._transitionClasses) {\n          remove$2(el._transitionClasses, cls);\n      }\n      removeClass(el, cls);\n  }\n  function whenTransitionEnds(el, expectedType, cb) {\n      var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;\n      if (!type)\n          return cb();\n      var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n      var ended = 0;\n      var end = function () {\n          el.removeEventListener(event, onEnd);\n          cb();\n      };\n      var onEnd = function (e) {\n          if (e.target === el) {\n              if (++ended >= propCount) {\n                  end();\n              }\n          }\n      };\n      setTimeout(function () {\n          if (ended < propCount) {\n              end();\n          }\n      }, timeout + 1);\n      el.addEventListener(event, onEnd);\n  }\n  var transformRE = /\\b(transform|all)(,|$)/;\n  function getTransitionInfo(el, expectedType) {\n      var styles = window.getComputedStyle(el);\n      // JSDOM may return undefined for transition properties\n      var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n      var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n      var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n      var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n      var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n      var animationTimeout = getTimeout(animationDelays, animationDurations);\n      var type;\n      var timeout = 0;\n      var propCount = 0;\n      /* istanbul ignore if */\n      if (expectedType === TRANSITION) {\n          if (transitionTimeout > 0) {\n              type = TRANSITION;\n              timeout = transitionTimeout;\n              propCount = transitionDurations.length;\n          }\n      }\n      else if (expectedType === ANIMATION) {\n          if (animationTimeout > 0) {\n              type = ANIMATION;\n              timeout = animationTimeout;\n              propCount = animationDurations.length;\n          }\n      }\n      else {\n          timeout = Math.max(transitionTimeout, animationTimeout);\n          type =\n              timeout > 0\n                  ? transitionTimeout > animationTimeout\n                      ? TRANSITION\n                      : ANIMATION\n                  : null;\n          propCount = type\n              ? type === TRANSITION\n                  ? transitionDurations.length\n                  : animationDurations.length\n              : 0;\n      }\n      var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n      return {\n          type: type,\n          timeout: timeout,\n          propCount: propCount,\n          hasTransform: hasTransform\n      };\n  }\n  function getTimeout(delays, durations) {\n      /* istanbul ignore next */\n      while (delays.length < durations.length) {\n          delays = delays.concat(delays);\n      }\n      return Math.max.apply(null, durations.map(function (d, i) {\n          return toMs(d) + toMs(delays[i]);\n      }));\n  }\n  // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n  // in a locale-dependent way, using a comma instead of a dot.\n  // If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n  // as a floor function) causing unexpected behaviors\n  function toMs(s) {\n      return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n  }\n\n  function enter(vnode, toggleDisplay) {\n      var el = vnode.elm;\n      // call leave callback now\n      if (isDef(el._leaveCb)) {\n          el._leaveCb.cancelled = true;\n          el._leaveCb();\n      }\n      var data = resolveTransition(vnode.data.transition);\n      if (isUndef(data)) {\n          return;\n      }\n      /* istanbul ignore if */\n      if (isDef(el._enterCb) || el.nodeType !== 1) {\n          return;\n      }\n      var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;\n      // activeInstance will always be the <transition> component managing this\n      // transition. One edge case to check is when the <transition> is placed\n      // as the root node of a child component. In that case we need to check\n      // <transition>'s parent for appear check.\n      var context = activeInstance;\n      var transitionNode = activeInstance.$vnode;\n      while (transitionNode && transitionNode.parent) {\n          context = transitionNode.context;\n          transitionNode = transitionNode.parent;\n      }\n      var isAppear = !context._isMounted || !vnode.isRootInsert;\n      if (isAppear && !appear && appear !== '') {\n          return;\n      }\n      var startClass = isAppear && appearClass ? appearClass : enterClass;\n      var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n      var toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n      var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n      var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n      var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n      var enterCancelledHook = isAppear\n          ? appearCancelled || enterCancelled\n          : enterCancelled;\n      var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n      if (explicitEnterDuration != null) {\n          checkDuration(explicitEnterDuration, 'enter', vnode);\n      }\n      var expectsCSS = css !== false && !isIE9;\n      var userWantsControl = getHookArgumentsLength(enterHook);\n      var cb = (el._enterCb = once(function () {\n          if (expectsCSS) {\n              removeTransitionClass(el, toClass);\n              removeTransitionClass(el, activeClass);\n          }\n          // @ts-expect-error\n          if (cb.cancelled) {\n              if (expectsCSS) {\n                  removeTransitionClass(el, startClass);\n              }\n              enterCancelledHook && enterCancelledHook(el);\n          }\n          else {\n              afterEnterHook && afterEnterHook(el);\n          }\n          el._enterCb = null;\n      }));\n      if (!vnode.data.show) {\n          // remove pending leave element on enter by injecting an insert hook\n          mergeVNodeHook(vnode, 'insert', function () {\n              var parent = el.parentNode;\n              var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n              if (pendingNode &&\n                  pendingNode.tag === vnode.tag &&\n                  pendingNode.elm._leaveCb) {\n                  pendingNode.elm._leaveCb();\n              }\n              enterHook && enterHook(el, cb);\n          });\n      }\n      // start enter transition\n      beforeEnterHook && beforeEnterHook(el);\n      if (expectsCSS) {\n          addTransitionClass(el, startClass);\n          addTransitionClass(el, activeClass);\n          nextFrame(function () {\n              removeTransitionClass(el, startClass);\n              // @ts-expect-error\n              if (!cb.cancelled) {\n                  addTransitionClass(el, toClass);\n                  if (!userWantsControl) {\n                      if (isValidDuration(explicitEnterDuration)) {\n                          setTimeout(cb, explicitEnterDuration);\n                      }\n                      else {\n                          whenTransitionEnds(el, type, cb);\n                      }\n                  }\n              }\n          });\n      }\n      if (vnode.data.show) {\n          toggleDisplay && toggleDisplay();\n          enterHook && enterHook(el, cb);\n      }\n      if (!expectsCSS && !userWantsControl) {\n          cb();\n      }\n  }\n  function leave(vnode, rm) {\n      var el = vnode.elm;\n      // call enter callback now\n      if (isDef(el._enterCb)) {\n          el._enterCb.cancelled = true;\n          el._enterCb();\n      }\n      var data = resolveTransition(vnode.data.transition);\n      if (isUndef(data) || el.nodeType !== 1) {\n          return rm();\n      }\n      /* istanbul ignore if */\n      if (isDef(el._leaveCb)) {\n          return;\n      }\n      var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;\n      var expectsCSS = css !== false && !isIE9;\n      var userWantsControl = getHookArgumentsLength(leave);\n      var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n      if (isDef(explicitLeaveDuration)) {\n          checkDuration(explicitLeaveDuration, 'leave', vnode);\n      }\n      var cb = (el._leaveCb = once(function () {\n          if (el.parentNode && el.parentNode._pending) {\n              el.parentNode._pending[vnode.key] = null;\n          }\n          if (expectsCSS) {\n              removeTransitionClass(el, leaveToClass);\n              removeTransitionClass(el, leaveActiveClass);\n          }\n          // @ts-expect-error\n          if (cb.cancelled) {\n              if (expectsCSS) {\n                  removeTransitionClass(el, leaveClass);\n              }\n              leaveCancelled && leaveCancelled(el);\n          }\n          else {\n              rm();\n              afterLeave && afterLeave(el);\n          }\n          el._leaveCb = null;\n      }));\n      if (delayLeave) {\n          delayLeave(performLeave);\n      }\n      else {\n          performLeave();\n      }\n      function performLeave() {\n          // the delayed leave may have already been cancelled\n          // @ts-expect-error\n          if (cb.cancelled) {\n              return;\n          }\n          // record leaving element\n          if (!vnode.data.show && el.parentNode) {\n              (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                  vnode;\n          }\n          beforeLeave && beforeLeave(el);\n          if (expectsCSS) {\n              addTransitionClass(el, leaveClass);\n              addTransitionClass(el, leaveActiveClass);\n              nextFrame(function () {\n                  removeTransitionClass(el, leaveClass);\n                  // @ts-expect-error\n                  if (!cb.cancelled) {\n                      addTransitionClass(el, leaveToClass);\n                      if (!userWantsControl) {\n                          if (isValidDuration(explicitLeaveDuration)) {\n                              setTimeout(cb, explicitLeaveDuration);\n                          }\n                          else {\n                              whenTransitionEnds(el, type, cb);\n                          }\n                      }\n                  }\n              });\n          }\n          leave && leave(el, cb);\n          if (!expectsCSS && !userWantsControl) {\n              cb();\n          }\n      }\n  }\n  // only used in dev mode\n  function checkDuration(val, name, vnode) {\n      if (typeof val !== 'number') {\n          warn$2(\"<transition> explicit \".concat(name, \" duration is not a valid number - \") +\n              \"got \".concat(JSON.stringify(val), \".\"), vnode.context);\n      }\n      else if (isNaN(val)) {\n          warn$2(\"<transition> explicit \".concat(name, \" duration is NaN - \") +\n              'the duration expression might be incorrect.', vnode.context);\n      }\n  }\n  function isValidDuration(val) {\n      return typeof val === 'number' && !isNaN(val);\n  }\n  /**\n   * Normalize a transition hook's argument length. The hook may be:\n   * - a merged hook (invoker) with the original in .fns\n   * - a wrapped component method (check ._length)\n   * - a plain function (.length)\n   */\n  function getHookArgumentsLength(fn) {\n      if (isUndef(fn)) {\n          return false;\n      }\n      // @ts-expect-error\n      var invokerFns = fn.fns;\n      if (isDef(invokerFns)) {\n          // invoker\n          return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n      }\n      else {\n          // @ts-expect-error\n          return (fn._length || fn.length) > 1;\n      }\n  }\n  function _enter(_, vnode) {\n      if (vnode.data.show !== true) {\n          enter(vnode);\n      }\n  }\n  var transition = inBrowser\n      ? {\n          create: _enter,\n          activate: _enter,\n          remove: function (vnode, rm) {\n              /* istanbul ignore else */\n              if (vnode.data.show !== true) {\n                  // @ts-expect-error\n                  leave(vnode, rm);\n              }\n              else {\n                  rm();\n              }\n          }\n      }\n      : {};\n\n  var platformModules = [attrs, klass$1, events, domProps, style$1, transition];\n\n  // the directive module should be applied last, after all\n  // built-in modules have been applied.\n  var modules$1 = platformModules.concat(baseModules);\n  var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules$1 });\n\n  /**\n   * Not type checking this file because flow doesn't like attaching\n   * properties to Elements.\n   */\n  /* istanbul ignore if */\n  if (isIE9) {\n      // http://www.matts411.com/post/internet-explorer-9-oninput/\n      document.addEventListener('selectionchange', function () {\n          var el = document.activeElement;\n          // @ts-expect-error\n          if (el && el.vmodel) {\n              trigger(el, 'input');\n          }\n      });\n  }\n  var directive = {\n      inserted: function (el, binding, vnode, oldVnode) {\n          if (vnode.tag === 'select') {\n              // #6903\n              if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                  mergeVNodeHook(vnode, 'postpatch', function () {\n                      directive.componentUpdated(el, binding, vnode);\n                  });\n              }\n              else {\n                  setSelected(el, binding, vnode.context);\n              }\n              el._vOptions = [].map.call(el.options, getValue);\n          }\n          else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n              el._vModifiers = binding.modifiers;\n              if (!binding.modifiers.lazy) {\n                  el.addEventListener('compositionstart', onCompositionStart);\n                  el.addEventListener('compositionend', onCompositionEnd);\n                  // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                  // switching focus before confirming composition choice\n                  // this also fixes the issue where some browsers e.g. iOS Chrome\n                  // fires \"change\" instead of \"input\" on autocomplete.\n                  el.addEventListener('change', onCompositionEnd);\n                  /* istanbul ignore if */\n                  if (isIE9) {\n                      el.vmodel = true;\n                  }\n              }\n          }\n      },\n      componentUpdated: function (el, binding, vnode) {\n          if (vnode.tag === 'select') {\n              setSelected(el, binding, vnode.context);\n              // in case the options rendered by v-for have changed,\n              // it's possible that the value is out-of-sync with the rendered options.\n              // detect such cases and filter out values that no longer has a matching\n              // option in the DOM.\n              var prevOptions_1 = el._vOptions;\n              var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));\n              if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {\n                  // trigger change event if\n                  // no matching option found for at least one value\n                  var needReset = el.multiple\n                      ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })\n                      : binding.value !== binding.oldValue &&\n                          hasNoMatchingOption(binding.value, curOptions_1);\n                  if (needReset) {\n                      trigger(el, 'change');\n                  }\n              }\n          }\n      }\n  };\n  function setSelected(el, binding, vm) {\n      actuallySetSelected(el, binding, vm);\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n          setTimeout(function () {\n              actuallySetSelected(el, binding, vm);\n          }, 0);\n      }\n  }\n  function actuallySetSelected(el, binding, vm) {\n      var value = binding.value;\n      var isMultiple = el.multiple;\n      if (isMultiple && !Array.isArray(value)) {\n          warn$2(\"<select multiple v-model=\\\"\".concat(binding.expression, \"\\\"> \") +\n                  \"expects an Array value for its binding, but got \".concat(Object.prototype.toString\n                      .call(value)\n                      .slice(8, -1)), vm);\n          return;\n      }\n      var selected, option;\n      for (var i = 0, l = el.options.length; i < l; i++) {\n          option = el.options[i];\n          if (isMultiple) {\n              selected = looseIndexOf(value, getValue(option)) > -1;\n              if (option.selected !== selected) {\n                  option.selected = selected;\n              }\n          }\n          else {\n              if (looseEqual(getValue(option), value)) {\n                  if (el.selectedIndex !== i) {\n                      el.selectedIndex = i;\n                  }\n                  return;\n              }\n          }\n      }\n      if (!isMultiple) {\n          el.selectedIndex = -1;\n      }\n  }\n  function hasNoMatchingOption(value, options) {\n      return options.every(function (o) { return !looseEqual(o, value); });\n  }\n  function getValue(option) {\n      return '_value' in option ? option._value : option.value;\n  }\n  function onCompositionStart(e) {\n      e.target.composing = true;\n  }\n  function onCompositionEnd(e) {\n      // prevent triggering an input event for no reason\n      if (!e.target.composing)\n          return;\n      e.target.composing = false;\n      trigger(e.target, 'input');\n  }\n  function trigger(el, type) {\n      var e = document.createEvent('HTMLEvents');\n      e.initEvent(type, true, true);\n      el.dispatchEvent(e);\n  }\n\n  // recursively search for possible transition defined inside the component root\n  function locateNode(vnode) {\n      // @ts-expect-error\n      return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n          ? locateNode(vnode.componentInstance._vnode)\n          : vnode;\n  }\n  var show = {\n      bind: function (el, _a, vnode) {\n          var value = _a.value;\n          vnode = locateNode(vnode);\n          var transition = vnode.data && vnode.data.transition;\n          var originalDisplay = (el.__vOriginalDisplay =\n              el.style.display === 'none' ? '' : el.style.display);\n          if (value && transition) {\n              vnode.data.show = true;\n              enter(vnode, function () {\n                  el.style.display = originalDisplay;\n              });\n          }\n          else {\n              el.style.display = value ? originalDisplay : 'none';\n          }\n      },\n      update: function (el, _a, vnode) {\n          var value = _a.value, oldValue = _a.oldValue;\n          /* istanbul ignore if */\n          if (!value === !oldValue)\n              return;\n          vnode = locateNode(vnode);\n          var transition = vnode.data && vnode.data.transition;\n          if (transition) {\n              vnode.data.show = true;\n              if (value) {\n                  enter(vnode, function () {\n                      el.style.display = el.__vOriginalDisplay;\n                  });\n              }\n              else {\n                  leave(vnode, function () {\n                      el.style.display = 'none';\n                  });\n              }\n          }\n          else {\n              el.style.display = value ? el.__vOriginalDisplay : 'none';\n          }\n      },\n      unbind: function (el, binding, vnode, oldVnode, isDestroy) {\n          if (!isDestroy) {\n              el.style.display = el.__vOriginalDisplay;\n          }\n      }\n  };\n\n  var platformDirectives = {\n      model: directive,\n      show: show\n  };\n\n  // Provides transition support for a single element/component.\n  var transitionProps = {\n      name: String,\n      appear: Boolean,\n      css: Boolean,\n      mode: String,\n      type: String,\n      enterClass: String,\n      leaveClass: String,\n      enterToClass: String,\n      leaveToClass: String,\n      enterActiveClass: String,\n      leaveActiveClass: String,\n      appearClass: String,\n      appearActiveClass: String,\n      appearToClass: String,\n      duration: [Number, String, Object]\n  };\n  // in case the child is also an abstract component, e.g. <keep-alive>\n  // we want to recursively retrieve the real component to be rendered\n  function getRealChild(vnode) {\n      var compOptions = vnode && vnode.componentOptions;\n      if (compOptions && compOptions.Ctor.options.abstract) {\n          return getRealChild(getFirstComponentChild(compOptions.children));\n      }\n      else {\n          return vnode;\n      }\n  }\n  function extractTransitionData(comp) {\n      var data = {};\n      var options = comp.$options;\n      // props\n      for (var key in options.propsData) {\n          data[key] = comp[key];\n      }\n      // events.\n      // extract listeners and pass them directly to the transition methods\n      var listeners = options._parentListeners;\n      for (var key in listeners) {\n          data[camelize(key)] = listeners[key];\n      }\n      return data;\n  }\n  function placeholder(h, rawChild) {\n      // @ts-expect-error\n      if (/\\d-keep-alive$/.test(rawChild.tag)) {\n          return h('keep-alive', {\n              props: rawChild.componentOptions.propsData\n          });\n      }\n  }\n  function hasParentTransition(vnode) {\n      while ((vnode = vnode.parent)) {\n          if (vnode.data.transition) {\n              return true;\n          }\n      }\n  }\n  function isSameChild(child, oldChild) {\n      return oldChild.key === child.key && oldChild.tag === child.tag;\n  }\n  var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\n  var isVShowDirective = function (d) { return d.name === 'show'; };\n  var Transition = {\n      name: 'transition',\n      props: transitionProps,\n      abstract: true,\n      render: function (h) {\n          var _this = this;\n          var children = this.$slots.default;\n          if (!children) {\n              return;\n          }\n          // filter out text nodes (possible whitespaces)\n          children = children.filter(isNotTextNode);\n          /* istanbul ignore if */\n          if (!children.length) {\n              return;\n          }\n          // warn multiple elements\n          if (children.length > 1) {\n              warn$2('<transition> can only be used on a single element. Use ' +\n                  '<transition-group> for lists.', this.$parent);\n          }\n          var mode = this.mode;\n          // warn invalid mode\n          if (mode && mode !== 'in-out' && mode !== 'out-in') {\n              warn$2('invalid <transition> mode: ' + mode, this.$parent);\n          }\n          var rawChild = children[0];\n          // if this is a component root node and the component's\n          // parent container node also has transition, skip.\n          if (hasParentTransition(this.$vnode)) {\n              return rawChild;\n          }\n          // apply transition data to child\n          // use getRealChild() to ignore abstract components e.g. keep-alive\n          var child = getRealChild(rawChild);\n          /* istanbul ignore if */\n          if (!child) {\n              return rawChild;\n          }\n          if (this._leaving) {\n              return placeholder(h, rawChild);\n          }\n          // ensure a key that is unique to the vnode type and to this transition\n          // component instance. This key will be used to remove pending leaving nodes\n          // during entering.\n          var id = \"__transition-\".concat(this._uid, \"-\");\n          child.key =\n              child.key == null\n                  ? child.isComment\n                      ? id + 'comment'\n                      : id + child.tag\n                  : isPrimitive(child.key)\n                      ? String(child.key).indexOf(id) === 0\n                          ? child.key\n                          : id + child.key\n                      : child.key;\n          var data = ((child.data || (child.data = {})).transition =\n              extractTransitionData(this));\n          var oldRawChild = this._vnode;\n          var oldChild = getRealChild(oldRawChild);\n          // mark v-show\n          // so that the transition module can hand over the control to the directive\n          if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n              child.data.show = true;\n          }\n          if (oldChild &&\n              oldChild.data &&\n              !isSameChild(child, oldChild) &&\n              !isAsyncPlaceholder(oldChild) &&\n              // #6687 component root is a comment node\n              !(oldChild.componentInstance &&\n                  oldChild.componentInstance._vnode.isComment)) {\n              // replace old child transition data with fresh one\n              // important for dynamic transitions!\n              var oldData = (oldChild.data.transition = extend({}, data));\n              // handle transition mode\n              if (mode === 'out-in') {\n                  // return placeholder node and queue update when leave finishes\n                  this._leaving = true;\n                  mergeVNodeHook(oldData, 'afterLeave', function () {\n                      _this._leaving = false;\n                      _this.$forceUpdate();\n                  });\n                  return placeholder(h, rawChild);\n              }\n              else if (mode === 'in-out') {\n                  if (isAsyncPlaceholder(child)) {\n                      return oldRawChild;\n                  }\n                  var delayedLeave_1;\n                  var performLeave = function () {\n                      delayedLeave_1();\n                  };\n                  mergeVNodeHook(data, 'afterEnter', performLeave);\n                  mergeVNodeHook(data, 'enterCancelled', performLeave);\n                  mergeVNodeHook(oldData, 'delayLeave', function (leave) {\n                      delayedLeave_1 = leave;\n                  });\n              }\n          }\n          return rawChild;\n      }\n  };\n\n  // Provides transition support for list items.\n  var props = extend({\n      tag: String,\n      moveClass: String\n  }, transitionProps);\n  delete props.mode;\n  var TransitionGroup = {\n      props: props,\n      beforeMount: function () {\n          var _this = this;\n          var update = this._update;\n          this._update = function (vnode, hydrating) {\n              var restoreActiveInstance = setActiveInstance(_this);\n              // force removing pass\n              _this.__patch__(_this._vnode, _this.kept, false, // hydrating\n              true // removeOnly (!important, avoids unnecessary moves)\n              );\n              _this._vnode = _this.kept;\n              restoreActiveInstance();\n              update.call(_this, vnode, hydrating);\n          };\n      },\n      render: function (h) {\n          var tag = this.tag || this.$vnode.data.tag || 'span';\n          var map = Object.create(null);\n          var prevChildren = (this.prevChildren = this.children);\n          var rawChildren = this.$slots.default || [];\n          var children = (this.children = []);\n          var transitionData = extractTransitionData(this);\n          for (var i = 0; i < rawChildren.length; i++) {\n              var c = rawChildren[i];\n              if (c.tag) {\n                  if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                      children.push(c);\n                      map[c.key] = c;\n                      (c.data || (c.data = {})).transition = transitionData;\n                  }\n                  else {\n                      var opts = c.componentOptions;\n                      var name_1 = opts\n                          ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                          : c.tag;\n                      warn$2(\"<transition-group> children must be keyed: <\".concat(name_1, \">\"));\n                  }\n              }\n          }\n          if (prevChildren) {\n              var kept = [];\n              var removed = [];\n              for (var i = 0; i < prevChildren.length; i++) {\n                  var c = prevChildren[i];\n                  c.data.transition = transitionData;\n                  // @ts-expect-error .getBoundingClientRect is not typed in Node\n                  c.data.pos = c.elm.getBoundingClientRect();\n                  if (map[c.key]) {\n                      kept.push(c);\n                  }\n                  else {\n                      removed.push(c);\n                  }\n              }\n              this.kept = h(tag, null, kept);\n              this.removed = removed;\n          }\n          return h(tag, null, children);\n      },\n      updated: function () {\n          var children = this.prevChildren;\n          var moveClass = this.moveClass || (this.name || 'v') + '-move';\n          if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n              return;\n          }\n          // we divide the work into three loops to avoid mixing DOM reads and writes\n          // in each iteration - which helps prevent layout thrashing.\n          children.forEach(callPendingCbs);\n          children.forEach(recordPosition);\n          children.forEach(applyTranslation);\n          // force reflow to put everything in position\n          // assign to this to avoid being removed in tree-shaking\n          // $flow-disable-line\n          this._reflow = document.body.offsetHeight;\n          children.forEach(function (c) {\n              if (c.data.moved) {\n                  var el_1 = c.elm;\n                  var s = el_1.style;\n                  addTransitionClass(el_1, moveClass);\n                  s.transform = s.WebkitTransform = s.transitionDuration = '';\n                  el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {\n                      if (e && e.target !== el_1) {\n                          return;\n                      }\n                      if (!e || /transform$/.test(e.propertyName)) {\n                          el_1.removeEventListener(transitionEndEvent, cb);\n                          el_1._moveCb = null;\n                          removeTransitionClass(el_1, moveClass);\n                      }\n                  }));\n              }\n          });\n      },\n      methods: {\n          hasMove: function (el, moveClass) {\n              /* istanbul ignore if */\n              if (!hasTransition) {\n                  return false;\n              }\n              /* istanbul ignore if */\n              if (this._hasMove) {\n                  return this._hasMove;\n              }\n              // Detect whether an element with the move class applied has\n              // CSS transitions. Since the element may be inside an entering\n              // transition at this very moment, we make a clone of it and remove\n              // all other transition classes applied to ensure only the move class\n              // is applied.\n              var clone = el.cloneNode();\n              if (el._transitionClasses) {\n                  el._transitionClasses.forEach(function (cls) {\n                      removeClass(clone, cls);\n                  });\n              }\n              addClass(clone, moveClass);\n              clone.style.display = 'none';\n              this.$el.appendChild(clone);\n              var info = getTransitionInfo(clone);\n              this.$el.removeChild(clone);\n              return (this._hasMove = info.hasTransform);\n          }\n      }\n  };\n  function callPendingCbs(c) {\n      /* istanbul ignore if */\n      if (c.elm._moveCb) {\n          c.elm._moveCb();\n      }\n      /* istanbul ignore if */\n      if (c.elm._enterCb) {\n          c.elm._enterCb();\n      }\n  }\n  function recordPosition(c) {\n      c.data.newPos = c.elm.getBoundingClientRect();\n  }\n  function applyTranslation(c) {\n      var oldPos = c.data.pos;\n      var newPos = c.data.newPos;\n      var dx = oldPos.left - newPos.left;\n      var dy = oldPos.top - newPos.top;\n      if (dx || dy) {\n          c.data.moved = true;\n          var s = c.elm.style;\n          s.transform = s.WebkitTransform = \"translate(\".concat(dx, \"px,\").concat(dy, \"px)\");\n          s.transitionDuration = '0s';\n      }\n  }\n\n  var platformComponents = {\n      Transition: Transition,\n      TransitionGroup: TransitionGroup\n  };\n\n  // install platform specific utils\n  Vue.config.mustUseProp = mustUseProp;\n  Vue.config.isReservedTag = isReservedTag;\n  Vue.config.isReservedAttr = isReservedAttr;\n  Vue.config.getTagNamespace = getTagNamespace;\n  Vue.config.isUnknownElement = isUnknownElement;\n  // install platform runtime directives & components\n  extend(Vue.options.directives, platformDirectives);\n  extend(Vue.options.components, platformComponents);\n  // install platform patch function\n  Vue.prototype.__patch__ = inBrowser ? patch : noop;\n  // public mount method\n  Vue.prototype.$mount = function (el, hydrating) {\n      el = el && inBrowser ? query(el) : undefined;\n      return mountComponent(this, el, hydrating);\n  };\n  // devtools global hook\n  /* istanbul ignore next */\n  if (inBrowser) {\n      setTimeout(function () {\n          if (config.devtools) {\n              if (devtools) {\n                  devtools.emit('init', Vue);\n              }\n              else {\n                  // @ts-expect-error\n                  console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                      'https://github.com/vuejs/vue-devtools');\n              }\n          }\n          if (config.productionTip !== false &&\n              typeof console !== 'undefined') {\n              // @ts-expect-error\n              console[console.info ? 'info' : 'log'](\"You are running Vue in development mode.\\n\" +\n                  \"Make sure to turn on production mode when deploying for production.\\n\" +\n                  \"See more tips at https://vuejs.org/guide/deployment.html\");\n          }\n      }, 0);\n  }\n\n  var defaultTagRE = /\\{\\{((?:.|\\r?\\n)+?)\\}\\}/g;\n  var regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\n  var buildRegex = cached(function (delimiters) {\n      var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n      var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n      return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g');\n  });\n  function parseText(text, delimiters) {\n      //@ts-expect-error\n      var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n      if (!tagRE.test(text)) {\n          return;\n      }\n      var tokens = [];\n      var rawTokens = [];\n      var lastIndex = (tagRE.lastIndex = 0);\n      var match, index, tokenValue;\n      while ((match = tagRE.exec(text))) {\n          index = match.index;\n          // push text token\n          if (index > lastIndex) {\n              rawTokens.push((tokenValue = text.slice(lastIndex, index)));\n              tokens.push(JSON.stringify(tokenValue));\n          }\n          // tag token\n          var exp = parseFilters(match[1].trim());\n          tokens.push(\"_s(\".concat(exp, \")\"));\n          rawTokens.push({ '@binding': exp });\n          lastIndex = index + match[0].length;\n      }\n      if (lastIndex < text.length) {\n          rawTokens.push((tokenValue = text.slice(lastIndex)));\n          tokens.push(JSON.stringify(tokenValue));\n      }\n      return {\n          expression: tokens.join('+'),\n          tokens: rawTokens\n      };\n  }\n\n  function transformNode$1(el, options) {\n      var warn = options.warn || baseWarn;\n      var staticClass = getAndRemoveAttr(el, 'class');\n      if (staticClass) {\n          var res = parseText(staticClass, options.delimiters);\n          if (res) {\n              warn(\"class=\\\"\".concat(staticClass, \"\\\": \") +\n                  'Interpolation inside attributes has been removed. ' +\n                  'Use v-bind or the colon shorthand instead. For example, ' +\n                  'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.', el.rawAttrsMap['class']);\n          }\n      }\n      if (staticClass) {\n          el.staticClass = JSON.stringify(staticClass.replace(/\\s+/g, ' ').trim());\n      }\n      var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n      if (classBinding) {\n          el.classBinding = classBinding;\n      }\n  }\n  function genData$2(el) {\n      var data = '';\n      if (el.staticClass) {\n          data += \"staticClass:\".concat(el.staticClass, \",\");\n      }\n      if (el.classBinding) {\n          data += \"class:\".concat(el.classBinding, \",\");\n      }\n      return data;\n  }\n  var klass = {\n      staticKeys: ['staticClass'],\n      transformNode: transformNode$1,\n      genData: genData$2\n  };\n\n  function transformNode(el, options) {\n      var warn = options.warn || baseWarn;\n      var staticStyle = getAndRemoveAttr(el, 'style');\n      if (staticStyle) {\n          /* istanbul ignore if */\n          {\n              var res = parseText(staticStyle, options.delimiters);\n              if (res) {\n                  warn(\"style=\\\"\".concat(staticStyle, \"\\\": \") +\n                      'Interpolation inside attributes has been removed. ' +\n                      'Use v-bind or the colon shorthand instead. For example, ' +\n                      'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.', el.rawAttrsMap['style']);\n              }\n          }\n          el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n      }\n      var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n      if (styleBinding) {\n          el.styleBinding = styleBinding;\n      }\n  }\n  function genData$1(el) {\n      var data = '';\n      if (el.staticStyle) {\n          data += \"staticStyle:\".concat(el.staticStyle, \",\");\n      }\n      if (el.styleBinding) {\n          data += \"style:(\".concat(el.styleBinding, \"),\");\n      }\n      return data;\n  }\n  var style = {\n      staticKeys: ['staticStyle'],\n      transformNode: transformNode,\n      genData: genData$1\n  };\n\n  var decoder;\n  var he = {\n      decode: function (html) {\n          decoder = decoder || document.createElement('div');\n          decoder.innerHTML = html;\n          return decoder.textContent;\n      }\n  };\n\n  var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n      'link,meta,param,source,track,wbr');\n  // Elements that you can, intentionally, leave open\n  // (and which close themselves)\n  var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');\n  // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n  // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\n  var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n      'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n      'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n      'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n      'title,tr,track');\n\n  /**\n   * Not type-checking this file because it's mostly vendor code.\n   */\n  // Regular Expressions for parsing tags and attributes\n  var attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\n  var dynamicArgAttribute = /^\\s*((?:v-[\\w-]+:|@|:|#)\\[[^=]+?\\][^\\s\"'<>\\/=]*)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\n  var ncname = \"[a-zA-Z_][\\\\-\\\\.0-9_a-zA-Z\".concat(unicodeRegExp.source, \"]*\");\n  var qnameCapture = \"((?:\".concat(ncname, \"\\\\:)?\").concat(ncname, \")\");\n  var startTagOpen = new RegExp(\"^<\".concat(qnameCapture));\n  var startTagClose = /^\\s*(\\/?)>/;\n  var endTag = new RegExp(\"^<\\\\/\".concat(qnameCapture, \"[^>]*>\"));\n  var doctype = /^<!DOCTYPE [^>]+>/i;\n  // #7298: escape - to avoid being passed as HTML comment when inlined in page\n  var comment = /^<!\\--/;\n  var conditionalComment = /^<!\\[/;\n  // Special Elements (can contain anything)\n  var isPlainTextElement = makeMap('script,style,textarea', true);\n  var reCache = {};\n  var decodingMap = {\n      '&lt;': '<',\n      '&gt;': '>',\n      '&quot;': '\"',\n      '&amp;': '&',\n      '&#10;': '\\n',\n      '&#9;': '\\t',\n      '&#39;': \"'\"\n  };\n  var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;\n  var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;\n  // #5992\n  var isIgnoreNewlineTag = makeMap('pre,textarea', true);\n  var shouldIgnoreFirstNewline = function (tag, html) {\n      return tag && isIgnoreNewlineTag(tag) && html[0] === '\\n';\n  };\n  function decodeAttr(value, shouldDecodeNewlines) {\n      var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n      return value.replace(re, function (match) { return decodingMap[match]; });\n  }\n  function parseHTML(html, options) {\n      var stack = [];\n      var expectHTML = options.expectHTML;\n      var isUnaryTag = options.isUnaryTag || no;\n      var canBeLeftOpenTag = options.canBeLeftOpenTag || no;\n      var index = 0;\n      var last, lastTag;\n      var _loop_1 = function () {\n          last = html;\n          // Make sure we're not in a plaintext content element like script/style\n          if (!lastTag || !isPlainTextElement(lastTag)) {\n              var textEnd = html.indexOf('<');\n              if (textEnd === 0) {\n                  // Comment:\n                  if (comment.test(html)) {\n                      var commentEnd = html.indexOf('-->');\n                      if (commentEnd >= 0) {\n                          if (options.shouldKeepComment && options.comment) {\n                              options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);\n                          }\n                          advance(commentEnd + 3);\n                          return \"continue\";\n                      }\n                  }\n                  // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n                  if (conditionalComment.test(html)) {\n                      var conditionalEnd = html.indexOf(']>');\n                      if (conditionalEnd >= 0) {\n                          advance(conditionalEnd + 2);\n                          return \"continue\";\n                      }\n                  }\n                  // Doctype:\n                  var doctypeMatch = html.match(doctype);\n                  if (doctypeMatch) {\n                      advance(doctypeMatch[0].length);\n                      return \"continue\";\n                  }\n                  // End tag:\n                  var endTagMatch = html.match(endTag);\n                  if (endTagMatch) {\n                      var curIndex = index;\n                      advance(endTagMatch[0].length);\n                      parseEndTag(endTagMatch[1], curIndex, index);\n                      return \"continue\";\n                  }\n                  // Start tag:\n                  var startTagMatch = parseStartTag();\n                  if (startTagMatch) {\n                      handleStartTag(startTagMatch);\n                      if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {\n                          advance(1);\n                      }\n                      return \"continue\";\n                  }\n              }\n              var text = void 0, rest = void 0, next = void 0;\n              if (textEnd >= 0) {\n                  rest = html.slice(textEnd);\n                  while (!endTag.test(rest) &&\n                      !startTagOpen.test(rest) &&\n                      !comment.test(rest) &&\n                      !conditionalComment.test(rest)) {\n                      // < in plain text, be forgiving and treat it as text\n                      next = rest.indexOf('<', 1);\n                      if (next < 0)\n                          break;\n                      textEnd += next;\n                      rest = html.slice(textEnd);\n                  }\n                  text = html.substring(0, textEnd);\n              }\n              if (textEnd < 0) {\n                  text = html;\n              }\n              if (text) {\n                  advance(text.length);\n              }\n              if (options.chars && text) {\n                  options.chars(text, index - text.length, index);\n              }\n          }\n          else {\n              var endTagLength_1 = 0;\n              var stackedTag_1 = lastTag.toLowerCase();\n              var reStackedTag = reCache[stackedTag_1] ||\n                  (reCache[stackedTag_1] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));\n              var rest = html.replace(reStackedTag, function (all, text, endTag) {\n                  endTagLength_1 = endTag.length;\n                  if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {\n                      text = text\n                          .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n                          .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n                  }\n                  if (shouldIgnoreFirstNewline(stackedTag_1, text)) {\n                      text = text.slice(1);\n                  }\n                  if (options.chars) {\n                      options.chars(text);\n                  }\n                  return '';\n              });\n              index += html.length - rest.length;\n              html = rest;\n              parseEndTag(stackedTag_1, index - endTagLength_1, index);\n          }\n          if (html === last) {\n              options.chars && options.chars(html);\n              if (!stack.length && options.warn) {\n                  options.warn(\"Mal-formatted tag at end of template: \\\"\".concat(html, \"\\\"\"), {\n                      start: index + html.length\n                  });\n              }\n              return \"break\";\n          }\n      };\n      while (html) {\n          var state_1 = _loop_1();\n          if (state_1 === \"break\")\n              break;\n      }\n      // Clean up any remaining tags\n      parseEndTag();\n      function advance(n) {\n          index += n;\n          html = html.substring(n);\n      }\n      function parseStartTag() {\n          var start = html.match(startTagOpen);\n          if (start) {\n              var match = {\n                  tagName: start[1],\n                  attrs: [],\n                  start: index\n              };\n              advance(start[0].length);\n              var end = void 0, attr = void 0;\n              while (!(end = html.match(startTagClose)) &&\n                  (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {\n                  attr.start = index;\n                  advance(attr[0].length);\n                  attr.end = index;\n                  match.attrs.push(attr);\n              }\n              if (end) {\n                  match.unarySlash = end[1];\n                  advance(end[0].length);\n                  match.end = index;\n                  return match;\n              }\n          }\n      }\n      function handleStartTag(match) {\n          var tagName = match.tagName;\n          var unarySlash = match.unarySlash;\n          if (expectHTML) {\n              if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n                  parseEndTag(lastTag);\n              }\n              if (canBeLeftOpenTag(tagName) && lastTag === tagName) {\n                  parseEndTag(tagName);\n              }\n          }\n          var unary = isUnaryTag(tagName) || !!unarySlash;\n          var l = match.attrs.length;\n          var attrs = new Array(l);\n          for (var i = 0; i < l; i++) {\n              var args = match.attrs[i];\n              var value = args[3] || args[4] || args[5] || '';\n              var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n                  ? options.shouldDecodeNewlinesForHref\n                  : options.shouldDecodeNewlines;\n              attrs[i] = {\n                  name: args[1],\n                  value: decodeAttr(value, shouldDecodeNewlines)\n              };\n              if (options.outputSourceRange) {\n                  attrs[i].start = args.start + args[0].match(/^\\s*/).length;\n                  attrs[i].end = args.end;\n              }\n          }\n          if (!unary) {\n              stack.push({\n                  tag: tagName,\n                  lowerCasedTag: tagName.toLowerCase(),\n                  attrs: attrs,\n                  start: match.start,\n                  end: match.end\n              });\n              lastTag = tagName;\n          }\n          if (options.start) {\n              options.start(tagName, attrs, unary, match.start, match.end);\n          }\n      }\n      function parseEndTag(tagName, start, end) {\n          var pos, lowerCasedTagName;\n          if (start == null)\n              start = index;\n          if (end == null)\n              end = index;\n          // Find the closest opened tag of the same type\n          if (tagName) {\n              lowerCasedTagName = tagName.toLowerCase();\n              for (pos = stack.length - 1; pos >= 0; pos--) {\n                  if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n                      break;\n                  }\n              }\n          }\n          else {\n              // If no tag name is provided, clean shop\n              pos = 0;\n          }\n          if (pos >= 0) {\n              // Close all the open elements, up the stack\n              for (var i = stack.length - 1; i >= pos; i--) {\n                  if ((i > pos || !tagName) && options.warn) {\n                      options.warn(\"tag <\".concat(stack[i].tag, \"> has no matching end tag.\"), {\n                          start: stack[i].start,\n                          end: stack[i].end\n                      });\n                  }\n                  if (options.end) {\n                      options.end(stack[i].tag, start, end);\n                  }\n              }\n              // Remove the open elements from the stack\n              stack.length = pos;\n              lastTag = pos && stack[pos - 1].tag;\n          }\n          else if (lowerCasedTagName === 'br') {\n              if (options.start) {\n                  options.start(tagName, [], true, start, end);\n              }\n          }\n          else if (lowerCasedTagName === 'p') {\n              if (options.start) {\n                  options.start(tagName, [], false, start, end);\n              }\n              if (options.end) {\n                  options.end(tagName, start, end);\n              }\n          }\n      }\n  }\n\n  var onRE = /^@|^v-on:/;\n  var dirRE = /^v-|^@|^:|^#/;\n  var forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n  var forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n  var stripParensRE = /^\\(|\\)$/g;\n  var dynamicArgRE = /^\\[.*\\]$/;\n  var argRE = /:(.*)$/;\n  var bindRE = /^:|^\\.|^v-bind:/;\n  var modifierRE = /\\.[^.\\]]+(?=[^\\]]*$)/g;\n  var slotRE = /^v-slot(:|$)|^#/;\n  var lineBreakRE = /[\\r\\n]/;\n  var whitespaceRE = /[ \\f\\t\\r\\n]+/g;\n  var invalidAttributeRE = /[\\s\"'<>\\/=]/;\n  var decodeHTMLCached = cached(he.decode);\n  var emptySlotScopeToken = \"_empty_\";\n  // configurable state\n  var warn;\n  var delimiters;\n  var transforms;\n  var preTransforms;\n  var postTransforms;\n  var platformIsPreTag;\n  var platformMustUseProp;\n  var platformGetTagNamespace;\n  var maybeComponent;\n  function createASTElement(tag, attrs, parent) {\n      return {\n          type: 1,\n          tag: tag,\n          attrsList: attrs,\n          attrsMap: makeAttrsMap(attrs),\n          rawAttrsMap: {},\n          parent: parent,\n          children: []\n      };\n  }\n  /**\n   * Convert HTML string to AST.\n   */\n  function parse(template, options) {\n      warn = options.warn || baseWarn;\n      platformIsPreTag = options.isPreTag || no;\n      platformMustUseProp = options.mustUseProp || no;\n      platformGetTagNamespace = options.getTagNamespace || no;\n      var isReservedTag = options.isReservedTag || no;\n      maybeComponent = function (el) {\n          return !!(el.component ||\n              el.attrsMap[':is'] ||\n              el.attrsMap['v-bind:is'] ||\n              !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));\n      };\n      transforms = pluckModuleFunction(options.modules, 'transformNode');\n      preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n      postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n      delimiters = options.delimiters;\n      var stack = [];\n      var preserveWhitespace = options.preserveWhitespace !== false;\n      var whitespaceOption = options.whitespace;\n      var root;\n      var currentParent;\n      var inVPre = false;\n      var inPre = false;\n      var warned = false;\n      function warnOnce(msg, range) {\n          if (!warned) {\n              warned = true;\n              warn(msg, range);\n          }\n      }\n      function closeElement(element) {\n          trimEndingWhitespace(element);\n          if (!inVPre && !element.processed) {\n              element = processElement(element, options);\n          }\n          // tree management\n          if (!stack.length && element !== root) {\n              // allow root elements with v-if, v-else-if and v-else\n              if (root.if && (element.elseif || element.else)) {\n                  {\n                      checkRootConstraints(element);\n                  }\n                  addIfCondition(root, {\n                      exp: element.elseif,\n                      block: element\n                  });\n              }\n              else {\n                  warnOnce(\"Component template should contain exactly one root element. \" +\n                      \"If you are using v-if on multiple elements, \" +\n                      \"use v-else-if to chain them instead.\", { start: element.start });\n              }\n          }\n          if (currentParent && !element.forbidden) {\n              if (element.elseif || element.else) {\n                  processIfConditions(element, currentParent);\n              }\n              else {\n                  if (element.slotScope) {\n                      // scoped slot\n                      // keep it in the children list so that v-else(-if) conditions can\n                      // find it as the prev node.\n                      var name_1 = element.slotTarget || '\"default\"';\n                      (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;\n                  }\n                  currentParent.children.push(element);\n                  element.parent = currentParent;\n              }\n          }\n          // final children cleanup\n          // filter out scoped slots\n          element.children = element.children.filter(function (c) { return !c.slotScope; });\n          // remove trailing whitespace node again\n          trimEndingWhitespace(element);\n          // check pre state\n          if (element.pre) {\n              inVPre = false;\n          }\n          if (platformIsPreTag(element.tag)) {\n              inPre = false;\n          }\n          // apply post-transforms\n          for (var i = 0; i < postTransforms.length; i++) {\n              postTransforms[i](element, options);\n          }\n      }\n      function trimEndingWhitespace(el) {\n          // remove trailing whitespace node\n          if (!inPre) {\n              var lastNode = void 0;\n              while ((lastNode = el.children[el.children.length - 1]) &&\n                  lastNode.type === 3 &&\n                  lastNode.text === ' ') {\n                  el.children.pop();\n              }\n          }\n      }\n      function checkRootConstraints(el) {\n          if (el.tag === 'slot' || el.tag === 'template') {\n              warnOnce(\"Cannot use <\".concat(el.tag, \"> as component root element because it may \") +\n                  'contain multiple nodes.', { start: el.start });\n          }\n          if (el.attrsMap.hasOwnProperty('v-for')) {\n              warnOnce('Cannot use v-for on stateful component root element because ' +\n                  'it renders multiple elements.', el.rawAttrsMap['v-for']);\n          }\n      }\n      parseHTML(template, {\n          warn: warn,\n          expectHTML: options.expectHTML,\n          isUnaryTag: options.isUnaryTag,\n          canBeLeftOpenTag: options.canBeLeftOpenTag,\n          shouldDecodeNewlines: options.shouldDecodeNewlines,\n          shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,\n          shouldKeepComment: options.comments,\n          outputSourceRange: options.outputSourceRange,\n          start: function (tag, attrs, unary, start, end) {\n              // check namespace.\n              // inherit parent ns if there is one\n              var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n              // handle IE svg bug\n              /* istanbul ignore if */\n              if (isIE && ns === 'svg') {\n                  attrs = guardIESVGBug(attrs);\n              }\n              var element = createASTElement(tag, attrs, currentParent);\n              if (ns) {\n                  element.ns = ns;\n              }\n              {\n                  if (options.outputSourceRange) {\n                      element.start = start;\n                      element.end = end;\n                      element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {\n                          cumulated[attr.name] = attr;\n                          return cumulated;\n                      }, {});\n                  }\n                  attrs.forEach(function (attr) {\n                      if (invalidAttributeRE.test(attr.name)) {\n                          warn(\"Invalid dynamic argument expression: attribute names cannot contain \" +\n                              \"spaces, quotes, <, >, / or =.\", options.outputSourceRange\n                              ? {\n                                  start: attr.start + attr.name.indexOf(\"[\"),\n                                  end: attr.start + attr.name.length\n                              }\n                              : undefined);\n                      }\n                  });\n              }\n              if (isForbiddenTag(element) && !isServerRendering()) {\n                  element.forbidden = true;\n                  warn('Templates should only be responsible for mapping the state to the ' +\n                          'UI. Avoid placing tags with side-effects in your templates, such as ' +\n                          \"<\".concat(tag, \">\") +\n                          ', as they will not be parsed.', { start: element.start });\n              }\n              // apply pre-transforms\n              for (var i = 0; i < preTransforms.length; i++) {\n                  element = preTransforms[i](element, options) || element;\n              }\n              if (!inVPre) {\n                  processPre(element);\n                  if (element.pre) {\n                      inVPre = true;\n                  }\n              }\n              if (platformIsPreTag(element.tag)) {\n                  inPre = true;\n              }\n              if (inVPre) {\n                  processRawAttrs(element);\n              }\n              else if (!element.processed) {\n                  // structural directives\n                  processFor(element);\n                  processIf(element);\n                  processOnce(element);\n              }\n              if (!root) {\n                  root = element;\n                  {\n                      checkRootConstraints(root);\n                  }\n              }\n              if (!unary) {\n                  currentParent = element;\n                  stack.push(element);\n              }\n              else {\n                  closeElement(element);\n              }\n          },\n          end: function (tag, start, end) {\n              var element = stack[stack.length - 1];\n              // pop stack\n              stack.length -= 1;\n              currentParent = stack[stack.length - 1];\n              if (options.outputSourceRange) {\n                  element.end = end;\n              }\n              closeElement(element);\n          },\n          chars: function (text, start, end) {\n              if (!currentParent) {\n                  {\n                      if (text === template) {\n                          warnOnce('Component template requires a root element, rather than just text.', { start: start });\n                      }\n                      else if ((text = text.trim())) {\n                          warnOnce(\"text \\\"\".concat(text, \"\\\" outside root element will be ignored.\"), {\n                              start: start\n                          });\n                      }\n                  }\n                  return;\n              }\n              // IE textarea placeholder bug\n              /* istanbul ignore if */\n              if (isIE &&\n                  currentParent.tag === 'textarea' &&\n                  currentParent.attrsMap.placeholder === text) {\n                  return;\n              }\n              var children = currentParent.children;\n              if (inPre || text.trim()) {\n                  text = isTextTag(currentParent)\n                      ? text\n                      : decodeHTMLCached(text);\n              }\n              else if (!children.length) {\n                  // remove the whitespace-only node right after an opening tag\n                  text = '';\n              }\n              else if (whitespaceOption) {\n                  if (whitespaceOption === 'condense') {\n                      // in condense mode, remove the whitespace node if it contains\n                      // line break, otherwise condense to a single space\n                      text = lineBreakRE.test(text) ? '' : ' ';\n                  }\n                  else {\n                      text = ' ';\n                  }\n              }\n              else {\n                  text = preserveWhitespace ? ' ' : '';\n              }\n              if (text) {\n                  if (!inPre && whitespaceOption === 'condense') {\n                      // condense consecutive whitespaces into single space\n                      text = text.replace(whitespaceRE, ' ');\n                  }\n                  var res = void 0;\n                  var child = void 0;\n                  if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {\n                      child = {\n                          type: 2,\n                          expression: res.expression,\n                          tokens: res.tokens,\n                          text: text\n                      };\n                  }\n                  else if (text !== ' ' ||\n                      !children.length ||\n                      children[children.length - 1].text !== ' ') {\n                      child = {\n                          type: 3,\n                          text: text\n                      };\n                  }\n                  if (child) {\n                      if (options.outputSourceRange) {\n                          child.start = start;\n                          child.end = end;\n                      }\n                      children.push(child);\n                  }\n              }\n          },\n          comment: function (text, start, end) {\n              // adding anything as a sibling to the root node is forbidden\n              // comments should still be allowed, but ignored\n              if (currentParent) {\n                  var child = {\n                      type: 3,\n                      text: text,\n                      isComment: true\n                  };\n                  if (options.outputSourceRange) {\n                      child.start = start;\n                      child.end = end;\n                  }\n                  currentParent.children.push(child);\n              }\n          }\n      });\n      return root;\n  }\n  function processPre(el) {\n      if (getAndRemoveAttr(el, 'v-pre') != null) {\n          el.pre = true;\n      }\n  }\n  function processRawAttrs(el) {\n      var list = el.attrsList;\n      var len = list.length;\n      if (len) {\n          var attrs = (el.attrs = new Array(len));\n          for (var i = 0; i < len; i++) {\n              attrs[i] = {\n                  name: list[i].name,\n                  value: JSON.stringify(list[i].value)\n              };\n              if (list[i].start != null) {\n                  attrs[i].start = list[i].start;\n                  attrs[i].end = list[i].end;\n              }\n          }\n      }\n      else if (!el.pre) {\n          // non root node in pre blocks with no attributes\n          el.plain = true;\n      }\n  }\n  function processElement(element, options) {\n      processKey(element);\n      // determine whether this is a plain element after\n      // removing structural attributes\n      element.plain =\n          !element.key && !element.scopedSlots && !element.attrsList.length;\n      processRef(element);\n      processSlotContent(element);\n      processSlotOutlet(element);\n      processComponent(element);\n      for (var i = 0; i < transforms.length; i++) {\n          element = transforms[i](element, options) || element;\n      }\n      processAttrs(element);\n      return element;\n  }\n  function processKey(el) {\n      var exp = getBindingAttr(el, 'key');\n      if (exp) {\n          {\n              if (el.tag === 'template') {\n                  warn(\"<template> cannot be keyed. Place the key on real elements instead.\", getRawBindingAttr(el, 'key'));\n              }\n              if (el.for) {\n                  var iterator = el.iterator2 || el.iterator1;\n                  var parent_1 = el.parent;\n                  if (iterator &&\n                      iterator === exp &&\n                      parent_1 &&\n                      parent_1.tag === 'transition-group') {\n                      warn(\"Do not use v-for index as key on <transition-group> children, \" +\n                          \"this is the same as not using keys.\", getRawBindingAttr(el, 'key'), true /* tip */);\n                  }\n              }\n          }\n          el.key = exp;\n      }\n  }\n  function processRef(el) {\n      var ref = getBindingAttr(el, 'ref');\n      if (ref) {\n          el.ref = ref;\n          el.refInFor = checkInFor(el);\n      }\n  }\n  function processFor(el) {\n      var exp;\n      if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n          var res = parseFor(exp);\n          if (res) {\n              extend(el, res);\n          }\n          else {\n              warn(\"Invalid v-for expression: \".concat(exp), el.rawAttrsMap['v-for']);\n          }\n      }\n  }\n  function parseFor(exp) {\n      var inMatch = exp.match(forAliasRE);\n      if (!inMatch)\n          return;\n      var res = {};\n      res.for = inMatch[2].trim();\n      var alias = inMatch[1].trim().replace(stripParensRE, '');\n      var iteratorMatch = alias.match(forIteratorRE);\n      if (iteratorMatch) {\n          res.alias = alias.replace(forIteratorRE, '').trim();\n          res.iterator1 = iteratorMatch[1].trim();\n          if (iteratorMatch[2]) {\n              res.iterator2 = iteratorMatch[2].trim();\n          }\n      }\n      else {\n          res.alias = alias;\n      }\n      return res;\n  }\n  function processIf(el) {\n      var exp = getAndRemoveAttr(el, 'v-if');\n      if (exp) {\n          el.if = exp;\n          addIfCondition(el, {\n              exp: exp,\n              block: el\n          });\n      }\n      else {\n          if (getAndRemoveAttr(el, 'v-else') != null) {\n              el.else = true;\n          }\n          var elseif = getAndRemoveAttr(el, 'v-else-if');\n          if (elseif) {\n              el.elseif = elseif;\n          }\n      }\n  }\n  function processIfConditions(el, parent) {\n      var prev = findPrevElement(parent.children);\n      if (prev && prev.if) {\n          addIfCondition(prev, {\n              exp: el.elseif,\n              block: el\n          });\n      }\n      else {\n          warn(\"v-\".concat(el.elseif ? 'else-if=\"' + el.elseif + '\"' : 'else', \" \") +\n              \"used on element <\".concat(el.tag, \"> without corresponding v-if.\"), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);\n      }\n  }\n  function findPrevElement(children) {\n      var i = children.length;\n      while (i--) {\n          if (children[i].type === 1) {\n              return children[i];\n          }\n          else {\n              if (children[i].text !== ' ') {\n                  warn(\"text \\\"\".concat(children[i].text.trim(), \"\\\" between v-if and v-else(-if) \") +\n                      \"will be ignored.\", children[i]);\n              }\n              children.pop();\n          }\n      }\n  }\n  function addIfCondition(el, condition) {\n      if (!el.ifConditions) {\n          el.ifConditions = [];\n      }\n      el.ifConditions.push(condition);\n  }\n  function processOnce(el) {\n      var once = getAndRemoveAttr(el, 'v-once');\n      if (once != null) {\n          el.once = true;\n      }\n  }\n  // handle content being passed to a component as slot,\n  // e.g. <template slot=\"xxx\">, <div slot-scope=\"xxx\">\n  function processSlotContent(el) {\n      var slotScope;\n      if (el.tag === 'template') {\n          slotScope = getAndRemoveAttr(el, 'scope');\n          /* istanbul ignore if */\n          if (slotScope) {\n              warn(\"the \\\"scope\\\" attribute for scoped slots have been deprecated and \" +\n                  \"replaced by \\\"slot-scope\\\" since 2.5. The new \\\"slot-scope\\\" attribute \" +\n                  \"can also be used on plain elements in addition to <template> to \" +\n                  \"denote scoped slots.\", el.rawAttrsMap['scope'], true);\n          }\n          el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');\n      }\n      else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {\n          /* istanbul ignore if */\n          if (el.attrsMap['v-for']) {\n              warn(\"Ambiguous combined usage of slot-scope and v-for on <\".concat(el.tag, \"> \") +\n                  \"(v-for takes higher priority). Use a wrapper <template> for the \" +\n                  \"scoped slot to make it clearer.\", el.rawAttrsMap['slot-scope'], true);\n          }\n          el.slotScope = slotScope;\n      }\n      // slot=\"xxx\"\n      var slotTarget = getBindingAttr(el, 'slot');\n      if (slotTarget) {\n          el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n          el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);\n          // preserve slot as an attribute for native shadow DOM compat\n          // only for non-scoped slots.\n          if (el.tag !== 'template' && !el.slotScope) {\n              addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));\n          }\n      }\n      // 2.6 v-slot syntax\n      {\n          if (el.tag === 'template') {\n              // v-slot on <template>\n              var slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n              if (slotBinding) {\n                  {\n                      if (el.slotTarget || el.slotScope) {\n                          warn(\"Unexpected mixed usage of different slot syntaxes.\", el);\n                      }\n                      if (el.parent && !maybeComponent(el.parent)) {\n                          warn(\"<template v-slot> can only appear at the root level inside \" +\n                              \"the receiving component\", el);\n                      }\n                  }\n                  var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;\n                  el.slotTarget = name_2;\n                  el.slotTargetDynamic = dynamic;\n                  el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf\n              }\n          }\n          else {\n              // v-slot on component, denotes default slot\n              var slotBinding = getAndRemoveAttrByRegex(el, slotRE);\n              if (slotBinding) {\n                  {\n                      if (!maybeComponent(el)) {\n                          warn(\"v-slot can only be used on components or <template>.\", slotBinding);\n                      }\n                      if (el.slotScope || el.slotTarget) {\n                          warn(\"Unexpected mixed usage of different slot syntaxes.\", el);\n                      }\n                      if (el.scopedSlots) {\n                          warn(\"To avoid scope ambiguity, the default slot should also use \" +\n                              \"<template> syntax when there are other named slots.\", slotBinding);\n                      }\n                  }\n                  // add the component's children to its default slot\n                  var slots = el.scopedSlots || (el.scopedSlots = {});\n                  var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;\n                  var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));\n                  slotContainer_1.slotTarget = name_3;\n                  slotContainer_1.slotTargetDynamic = dynamic;\n                  slotContainer_1.children = el.children.filter(function (c) {\n                      if (!c.slotScope) {\n                          c.parent = slotContainer_1;\n                          return true;\n                      }\n                  });\n                  slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;\n                  // remove children as they are returned from scopedSlots now\n                  el.children = [];\n                  // mark el non-plain so data gets generated\n                  el.plain = false;\n              }\n          }\n      }\n  }\n  function getSlotName(binding) {\n      var name = binding.name.replace(slotRE, '');\n      if (!name) {\n          if (binding.name[0] !== '#') {\n              name = 'default';\n          }\n          else {\n              warn(\"v-slot shorthand syntax requires a slot name.\", binding);\n          }\n      }\n      return dynamicArgRE.test(name)\n          ? // dynamic [name]\n              { name: name.slice(1, -1), dynamic: true }\n          : // static name\n              { name: \"\\\"\".concat(name, \"\\\"\"), dynamic: false };\n  }\n  // handle <slot/> outlets\n  function processSlotOutlet(el) {\n      if (el.tag === 'slot') {\n          el.slotName = getBindingAttr(el, 'name');\n          if (el.key) {\n              warn(\"`key` does not work on <slot> because slots are abstract outlets \" +\n                  \"and can possibly expand into multiple elements. \" +\n                  \"Use the key on a wrapping element instead.\", getRawBindingAttr(el, 'key'));\n          }\n      }\n  }\n  function processComponent(el) {\n      var binding;\n      if ((binding = getBindingAttr(el, 'is'))) {\n          el.component = binding;\n      }\n      if (getAndRemoveAttr(el, 'inline-template') != null) {\n          el.inlineTemplate = true;\n      }\n  }\n  function processAttrs(el) {\n      var list = el.attrsList;\n      var i, l, name, rawName, value, modifiers, syncGen, isDynamic;\n      for (i = 0, l = list.length; i < l; i++) {\n          name = rawName = list[i].name;\n          value = list[i].value;\n          if (dirRE.test(name)) {\n              // mark element as dynamic\n              el.hasBindings = true;\n              // modifiers\n              modifiers = parseModifiers(name.replace(dirRE, ''));\n              // support .foo shorthand syntax for the .prop modifier\n              if (modifiers) {\n                  name = name.replace(modifierRE, '');\n              }\n              if (bindRE.test(name)) {\n                  // v-bind\n                  name = name.replace(bindRE, '');\n                  value = parseFilters(value);\n                  isDynamic = dynamicArgRE.test(name);\n                  if (isDynamic) {\n                      name = name.slice(1, -1);\n                  }\n                  if (value.trim().length === 0) {\n                      warn(\"The value for a v-bind expression cannot be empty. Found in \\\"v-bind:\".concat(name, \"\\\"\"));\n                  }\n                  if (modifiers) {\n                      if (modifiers.prop && !isDynamic) {\n                          name = camelize(name);\n                          if (name === 'innerHtml')\n                              name = 'innerHTML';\n                      }\n                      if (modifiers.camel && !isDynamic) {\n                          name = camelize(name);\n                      }\n                      if (modifiers.sync) {\n                          syncGen = genAssignmentCode(value, \"$event\");\n                          if (!isDynamic) {\n                              addHandler(el, \"update:\".concat(camelize(name)), syncGen, null, false, warn, list[i]);\n                              if (hyphenate(name) !== camelize(name)) {\n                                  addHandler(el, \"update:\".concat(hyphenate(name)), syncGen, null, false, warn, list[i]);\n                              }\n                          }\n                          else {\n                              // handler w/ dynamic event name\n                              addHandler(el, \"\\\"update:\\\"+(\".concat(name, \")\"), syncGen, null, false, warn, list[i], true // dynamic\n                              );\n                          }\n                      }\n                  }\n                  if ((modifiers && modifiers.prop) ||\n                      (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {\n                      addProp(el, name, value, list[i], isDynamic);\n                  }\n                  else {\n                      addAttr(el, name, value, list[i], isDynamic);\n                  }\n              }\n              else if (onRE.test(name)) {\n                  // v-on\n                  name = name.replace(onRE, '');\n                  isDynamic = dynamicArgRE.test(name);\n                  if (isDynamic) {\n                      name = name.slice(1, -1);\n                  }\n                  addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);\n              }\n              else {\n                  // normal directives\n                  name = name.replace(dirRE, '');\n                  // parse arg\n                  var argMatch = name.match(argRE);\n                  var arg = argMatch && argMatch[1];\n                  isDynamic = false;\n                  if (arg) {\n                      name = name.slice(0, -(arg.length + 1));\n                      if (dynamicArgRE.test(arg)) {\n                          arg = arg.slice(1, -1);\n                          isDynamic = true;\n                      }\n                  }\n                  addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);\n                  if (name === 'model') {\n                      checkForAliasModel(el, value);\n                  }\n              }\n          }\n          else {\n              // literal attribute\n              {\n                  var res = parseText(value, delimiters);\n                  if (res) {\n                      warn(\"\".concat(name, \"=\\\"\").concat(value, \"\\\": \") +\n                          'Interpolation inside attributes has been removed. ' +\n                          'Use v-bind or the colon shorthand instead. For example, ' +\n                          'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.', list[i]);\n                  }\n              }\n              addAttr(el, name, JSON.stringify(value), list[i]);\n              // #6887 firefox doesn't update muted state if set via attribute\n              // even immediately after element creation\n              if (!el.component &&\n                  name === 'muted' &&\n                  platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n                  addProp(el, name, 'true', list[i]);\n              }\n          }\n      }\n  }\n  function checkInFor(el) {\n      var parent = el;\n      while (parent) {\n          if (parent.for !== undefined) {\n              return true;\n          }\n          parent = parent.parent;\n      }\n      return false;\n  }\n  function parseModifiers(name) {\n      var match = name.match(modifierRE);\n      if (match) {\n          var ret_1 = {};\n          match.forEach(function (m) {\n              ret_1[m.slice(1)] = true;\n          });\n          return ret_1;\n      }\n  }\n  function makeAttrsMap(attrs) {\n      var map = {};\n      for (var i = 0, l = attrs.length; i < l; i++) {\n          if (map[attrs[i].name] && !isIE && !isEdge) {\n              warn('duplicate attribute: ' + attrs[i].name, attrs[i]);\n          }\n          map[attrs[i].name] = attrs[i].value;\n      }\n      return map;\n  }\n  // for script (e.g. type=\"x/template\") or style, do not decode content\n  function isTextTag(el) {\n      return el.tag === 'script' || el.tag === 'style';\n  }\n  function isForbiddenTag(el) {\n      return (el.tag === 'style' ||\n          (el.tag === 'script' &&\n              (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));\n  }\n  var ieNSBug = /^xmlns:NS\\d+/;\n  var ieNSPrefix = /^NS\\d+:/;\n  /* istanbul ignore next */\n  function guardIESVGBug(attrs) {\n      var res = [];\n      for (var i = 0; i < attrs.length; i++) {\n          var attr = attrs[i];\n          if (!ieNSBug.test(attr.name)) {\n              attr.name = attr.name.replace(ieNSPrefix, '');\n              res.push(attr);\n          }\n      }\n      return res;\n  }\n  function checkForAliasModel(el, value) {\n      var _el = el;\n      while (_el) {\n          if (_el.for && _el.alias === value) {\n              warn(\"<\".concat(el.tag, \" v-model=\\\"\").concat(value, \"\\\">: \") +\n                  \"You are binding v-model directly to a v-for iteration alias. \" +\n                  \"This will not be able to modify the v-for source array because \" +\n                  \"writing to the alias is like modifying a function local variable. \" +\n                  \"Consider using an array of objects and use v-model on an object property instead.\", el.rawAttrsMap['v-model']);\n          }\n          _el = _el.parent;\n      }\n  }\n\n  /**\n   * Expand input[v-model] with dynamic type bindings into v-if-else chains\n   * Turn this:\n   *   <input v-model=\"data[type]\" :type=\"type\">\n   * into this:\n   *   <input v-if=\"type === 'checkbox'\" type=\"checkbox\" v-model=\"data[type]\">\n   *   <input v-else-if=\"type === 'radio'\" type=\"radio\" v-model=\"data[type]\">\n   *   <input v-else :type=\"type\" v-model=\"data[type]\">\n   */\n  function preTransformNode(el, options) {\n      if (el.tag === 'input') {\n          var map = el.attrsMap;\n          if (!map['v-model']) {\n              return;\n          }\n          var typeBinding = void 0;\n          if (map[':type'] || map['v-bind:type']) {\n              typeBinding = getBindingAttr(el, 'type');\n          }\n          if (!map.type && !typeBinding && map['v-bind']) {\n              typeBinding = \"(\".concat(map['v-bind'], \").type\");\n          }\n          if (typeBinding) {\n              var ifCondition = getAndRemoveAttr(el, 'v-if', true);\n              var ifConditionExtra = ifCondition ? \"&&(\".concat(ifCondition, \")\") : \"\";\n              var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n              var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n              // 1. checkbox\n              var branch0 = cloneASTElement(el);\n              // process for on the main node\n              processFor(branch0);\n              addRawAttr(branch0, 'type', 'checkbox');\n              processElement(branch0, options);\n              branch0.processed = true; // prevent it from double-processed\n              branch0.if = \"(\".concat(typeBinding, \")==='checkbox'\") + ifConditionExtra;\n              addIfCondition(branch0, {\n                  exp: branch0.if,\n                  block: branch0\n              });\n              // 2. add radio else-if condition\n              var branch1 = cloneASTElement(el);\n              getAndRemoveAttr(branch1, 'v-for', true);\n              addRawAttr(branch1, 'type', 'radio');\n              processElement(branch1, options);\n              addIfCondition(branch0, {\n                  exp: \"(\".concat(typeBinding, \")==='radio'\") + ifConditionExtra,\n                  block: branch1\n              });\n              // 3. other\n              var branch2 = cloneASTElement(el);\n              getAndRemoveAttr(branch2, 'v-for', true);\n              addRawAttr(branch2, ':type', typeBinding);\n              processElement(branch2, options);\n              addIfCondition(branch0, {\n                  exp: ifCondition,\n                  block: branch2\n              });\n              if (hasElse) {\n                  branch0.else = true;\n              }\n              else if (elseIfCondition) {\n                  branch0.elseif = elseIfCondition;\n              }\n              return branch0;\n          }\n      }\n  }\n  function cloneASTElement(el) {\n      return createASTElement(el.tag, el.attrsList.slice(), el.parent);\n  }\n  var model = {\n      preTransformNode: preTransformNode\n  };\n\n  var modules = [klass, style, model];\n\n  function text(el, dir) {\n      if (dir.value) {\n          addProp(el, 'textContent', \"_s(\".concat(dir.value, \")\"), dir);\n      }\n  }\n\n  function html(el, dir) {\n      if (dir.value) {\n          addProp(el, 'innerHTML', \"_s(\".concat(dir.value, \")\"), dir);\n      }\n  }\n\n  var directives = {\n      model: model$1,\n      text: text,\n      html: html\n  };\n\n  var baseOptions = {\n      expectHTML: true,\n      modules: modules,\n      directives: directives,\n      isPreTag: isPreTag,\n      isUnaryTag: isUnaryTag,\n      mustUseProp: mustUseProp,\n      canBeLeftOpenTag: canBeLeftOpenTag,\n      isReservedTag: isReservedTag,\n      getTagNamespace: getTagNamespace,\n      staticKeys: genStaticKeys$1(modules)\n  };\n\n  var isStaticKey;\n  var isPlatformReservedTag;\n  var genStaticKeysCached = cached(genStaticKeys);\n  /**\n   * Goal of the optimizer: walk the generated template AST tree\n   * and detect sub-trees that are purely static, i.e. parts of\n   * the DOM that never needs to change.\n   *\n   * Once we detect these sub-trees, we can:\n   *\n   * 1. Hoist them into constants, so that we no longer need to\n   *    create fresh nodes for them on each re-render;\n   * 2. Completely skip them in the patching process.\n   */\n  function optimize(root, options) {\n      if (!root)\n          return;\n      isStaticKey = genStaticKeysCached(options.staticKeys || '');\n      isPlatformReservedTag = options.isReservedTag || no;\n      // first pass: mark all non-static nodes.\n      markStatic(root);\n      // second pass: mark static roots.\n      markStaticRoots(root, false);\n  }\n  function genStaticKeys(keys) {\n      return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +\n          (keys ? ',' + keys : ''));\n  }\n  function markStatic(node) {\n      node.static = isStatic(node);\n      if (node.type === 1) {\n          // do not make component slot content static. this avoids\n          // 1. components not able to mutate slot nodes\n          // 2. static slot content fails for hot-reloading\n          if (!isPlatformReservedTag(node.tag) &&\n              node.tag !== 'slot' &&\n              node.attrsMap['inline-template'] == null) {\n              return;\n          }\n          for (var i = 0, l = node.children.length; i < l; i++) {\n              var child = node.children[i];\n              markStatic(child);\n              if (!child.static) {\n                  node.static = false;\n              }\n          }\n          if (node.ifConditions) {\n              for (var i = 1, l = node.ifConditions.length; i < l; i++) {\n                  var block = node.ifConditions[i].block;\n                  markStatic(block);\n                  if (!block.static) {\n                      node.static = false;\n                  }\n              }\n          }\n      }\n  }\n  function markStaticRoots(node, isInFor) {\n      if (node.type === 1) {\n          if (node.static || node.once) {\n              node.staticInFor = isInFor;\n          }\n          // For a node to qualify as a static root, it should have children that\n          // are not just static text. Otherwise the cost of hoisting out will\n          // outweigh the benefits and it's better off to just always render it fresh.\n          if (node.static &&\n              node.children.length &&\n              !(node.children.length === 1 && node.children[0].type === 3)) {\n              node.staticRoot = true;\n              return;\n          }\n          else {\n              node.staticRoot = false;\n          }\n          if (node.children) {\n              for (var i = 0, l = node.children.length; i < l; i++) {\n                  markStaticRoots(node.children[i], isInFor || !!node.for);\n              }\n          }\n          if (node.ifConditions) {\n              for (var i = 1, l = node.ifConditions.length; i < l; i++) {\n                  markStaticRoots(node.ifConditions[i].block, isInFor);\n              }\n          }\n      }\n  }\n  function isStatic(node) {\n      if (node.type === 2) {\n          // expression\n          return false;\n      }\n      if (node.type === 3) {\n          // text\n          return true;\n      }\n      return !!(node.pre ||\n          (!node.hasBindings && // no dynamic bindings\n              !node.if &&\n              !node.for && // not v-if or v-for or v-else\n              !isBuiltInTag(node.tag) && // not a built-in\n              isPlatformReservedTag(node.tag) && // not a component\n              !isDirectChildOfTemplateFor(node) &&\n              Object.keys(node).every(isStaticKey)));\n  }\n  function isDirectChildOfTemplateFor(node) {\n      while (node.parent) {\n          node = node.parent;\n          if (node.tag !== 'template') {\n              return false;\n          }\n          if (node.for) {\n              return true;\n          }\n      }\n      return false;\n  }\n\n  var fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/;\n  var fnInvokeRE = /\\([^)]*?\\);*$/;\n  var simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n  // KeyboardEvent.keyCode aliases\n  var keyCodes = {\n      esc: 27,\n      tab: 9,\n      enter: 13,\n      space: 32,\n      up: 38,\n      left: 37,\n      right: 39,\n      down: 40,\n      delete: [8, 46]\n  };\n  // KeyboardEvent.key aliases\n  var keyNames = {\n      // #7880: IE11 and Edge use `Esc` for Escape key name.\n      esc: ['Esc', 'Escape'],\n      tab: 'Tab',\n      enter: 'Enter',\n      // #9112: IE11 uses `Spacebar` for Space key name.\n      space: [' ', 'Spacebar'],\n      // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n      up: ['Up', 'ArrowUp'],\n      left: ['Left', 'ArrowLeft'],\n      right: ['Right', 'ArrowRight'],\n      down: ['Down', 'ArrowDown'],\n      // #9112: IE11 uses `Del` for Delete key name.\n      delete: ['Backspace', 'Delete', 'Del']\n  };\n  // #4868: modifiers that prevent the execution of the listener\n  // need to explicitly return null so that we can determine whether to remove\n  // the listener for .once\n  var genGuard = function (condition) { return \"if(\".concat(condition, \")return null;\"); };\n  var modifierCode = {\n      stop: '$event.stopPropagation();',\n      prevent: '$event.preventDefault();',\n      self: genGuard(\"$event.target !== $event.currentTarget\"),\n      ctrl: genGuard(\"!$event.ctrlKey\"),\n      shift: genGuard(\"!$event.shiftKey\"),\n      alt: genGuard(\"!$event.altKey\"),\n      meta: genGuard(\"!$event.metaKey\"),\n      left: genGuard(\"'button' in $event && $event.button !== 0\"),\n      middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n      right: genGuard(\"'button' in $event && $event.button !== 2\")\n  };\n  function genHandlers(events, isNative) {\n      var prefix = isNative ? 'nativeOn:' : 'on:';\n      var staticHandlers = \"\";\n      var dynamicHandlers = \"\";\n      for (var name_1 in events) {\n          var handlerCode = genHandler(events[name_1]);\n          //@ts-expect-error\n          if (events[name_1] && events[name_1].dynamic) {\n              dynamicHandlers += \"\".concat(name_1, \",\").concat(handlerCode, \",\");\n          }\n          else {\n              staticHandlers += \"\\\"\".concat(name_1, \"\\\":\").concat(handlerCode, \",\");\n          }\n      }\n      staticHandlers = \"{\".concat(staticHandlers.slice(0, -1), \"}\");\n      if (dynamicHandlers) {\n          return prefix + \"_d(\".concat(staticHandlers, \",[\").concat(dynamicHandlers.slice(0, -1), \"])\");\n      }\n      else {\n          return prefix + staticHandlers;\n      }\n  }\n  function genHandler(handler) {\n      if (!handler) {\n          return 'function(){}';\n      }\n      if (Array.isArray(handler)) {\n          return \"[\".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), \"]\");\n      }\n      var isMethodPath = simplePathRE.test(handler.value);\n      var isFunctionExpression = fnExpRE.test(handler.value);\n      var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));\n      if (!handler.modifiers) {\n          if (isMethodPath || isFunctionExpression) {\n              return handler.value;\n          }\n          return \"function($event){\".concat(isFunctionInvocation ? \"return \".concat(handler.value) : handler.value, \"}\"); // inline statement\n      }\n      else {\n          var code = '';\n          var genModifierCode = '';\n          var keys = [];\n          var _loop_1 = function (key) {\n              if (modifierCode[key]) {\n                  genModifierCode += modifierCode[key];\n                  // left/right\n                  if (keyCodes[key]) {\n                      keys.push(key);\n                  }\n              }\n              else if (key === 'exact') {\n                  var modifiers_1 = handler.modifiers;\n                  genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']\n                      .filter(function (keyModifier) { return !modifiers_1[keyModifier]; })\n                      .map(function (keyModifier) { return \"$event.\".concat(keyModifier, \"Key\"); })\n                      .join('||'));\n              }\n              else {\n                  keys.push(key);\n              }\n          };\n          for (var key in handler.modifiers) {\n              _loop_1(key);\n          }\n          if (keys.length) {\n              code += genKeyFilter(keys);\n          }\n          // Make sure modifiers like prevent and stop get executed after key filtering\n          if (genModifierCode) {\n              code += genModifierCode;\n          }\n          var handlerCode = isMethodPath\n              ? \"return \".concat(handler.value, \".apply(null, arguments)\")\n              : isFunctionExpression\n                  ? \"return (\".concat(handler.value, \").apply(null, arguments)\")\n                  : isFunctionInvocation\n                      ? \"return \".concat(handler.value)\n                      : handler.value;\n          return \"function($event){\".concat(code).concat(handlerCode, \"}\");\n      }\n  }\n  function genKeyFilter(keys) {\n      return (\n      // make sure the key filters only apply to KeyboardEvents\n      // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake\n      // key events that do not have keyCode property...\n      \"if(!$event.type.indexOf('key')&&\" +\n          \"\".concat(keys.map(genFilterCode).join('&&'), \")return null;\"));\n  }\n  function genFilterCode(key) {\n      var keyVal = parseInt(key, 10);\n      if (keyVal) {\n          return \"$event.keyCode!==\".concat(keyVal);\n      }\n      var keyCode = keyCodes[key];\n      var keyName = keyNames[key];\n      return (\"_k($event.keyCode,\" +\n          \"\".concat(JSON.stringify(key), \",\") +\n          \"\".concat(JSON.stringify(keyCode), \",\") +\n          \"$event.key,\" +\n          \"\".concat(JSON.stringify(keyName)) +\n          \")\");\n  }\n\n  function on(el, dir) {\n      if (dir.modifiers) {\n          warn$2(\"v-on without argument does not support modifiers.\");\n      }\n      el.wrapListeners = function (code) { return \"_g(\".concat(code, \",\").concat(dir.value, \")\"); };\n  }\n\n  function bind(el, dir) {\n      el.wrapData = function (code) {\n          return \"_b(\".concat(code, \",'\").concat(el.tag, \"',\").concat(dir.value, \",\").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', \")\");\n      };\n  }\n\n  var baseDirectives = {\n      on: on,\n      bind: bind,\n      cloak: noop\n  };\n\n  var CodegenState = /** @class */ (function () {\n      function CodegenState(options) {\n          this.options = options;\n          this.warn = options.warn || baseWarn;\n          this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n          this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n          this.directives = extend(extend({}, baseDirectives), options.directives);\n          var isReservedTag = options.isReservedTag || no;\n          this.maybeComponent = function (el) {\n              return !!el.component || !isReservedTag(el.tag);\n          };\n          this.onceId = 0;\n          this.staticRenderFns = [];\n          this.pre = false;\n      }\n      return CodegenState;\n  }());\n  function generate(ast, options) {\n      var state = new CodegenState(options);\n      // fix #11483, Root level <script> tags should not be rendered.\n      var code = ast\n          ? ast.tag === 'script'\n              ? 'null'\n              : genElement(ast, state)\n          : '_c(\"div\")';\n      return {\n          render: \"with(this){return \".concat(code, \"}\"),\n          staticRenderFns: state.staticRenderFns\n      };\n  }\n  function genElement(el, state) {\n      if (el.parent) {\n          el.pre = el.pre || el.parent.pre;\n      }\n      if (el.staticRoot && !el.staticProcessed) {\n          return genStatic(el, state);\n      }\n      else if (el.once && !el.onceProcessed) {\n          return genOnce(el, state);\n      }\n      else if (el.for && !el.forProcessed) {\n          return genFor(el, state);\n      }\n      else if (el.if && !el.ifProcessed) {\n          return genIf(el, state);\n      }\n      else if (el.tag === 'template' && !el.slotTarget && !state.pre) {\n          return genChildren(el, state) || 'void 0';\n      }\n      else if (el.tag === 'slot') {\n          return genSlot(el, state);\n      }\n      else {\n          // component or element\n          var code = void 0;\n          if (el.component) {\n              code = genComponent(el.component, el, state);\n          }\n          else {\n              var data = void 0;\n              var maybeComponent = state.maybeComponent(el);\n              if (!el.plain || (el.pre && maybeComponent)) {\n                  data = genData(el, state);\n              }\n              var tag \n              // check if this is a component in <script setup>\n              = void 0;\n              // check if this is a component in <script setup>\n              var bindings = state.options.bindings;\n              if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {\n                  tag = checkBindingType(bindings, el.tag);\n              }\n              if (!tag)\n                  tag = \"'\".concat(el.tag, \"'\");\n              var children = el.inlineTemplate ? null : genChildren(el, state, true);\n              code = \"_c(\".concat(tag).concat(data ? \",\".concat(data) : '' // data\n              ).concat(children ? \",\".concat(children) : '' // children\n              , \")\");\n          }\n          // module transforms\n          for (var i = 0; i < state.transforms.length; i++) {\n              code = state.transforms[i](el, code);\n          }\n          return code;\n      }\n  }\n  function checkBindingType(bindings, key) {\n      var camelName = camelize(key);\n      var PascalName = capitalize(camelName);\n      var checkType = function (type) {\n          if (bindings[key] === type) {\n              return key;\n          }\n          if (bindings[camelName] === type) {\n              return camelName;\n          }\n          if (bindings[PascalName] === type) {\n              return PascalName;\n          }\n      };\n      var fromConst = checkType(\"setup-const\" /* BindingTypes.SETUP_CONST */) ||\n          checkType(\"setup-reactive-const\" /* BindingTypes.SETUP_REACTIVE_CONST */);\n      if (fromConst) {\n          return fromConst;\n      }\n      var fromMaybeRef = checkType(\"setup-let\" /* BindingTypes.SETUP_LET */) ||\n          checkType(\"setup-ref\" /* BindingTypes.SETUP_REF */) ||\n          checkType(\"setup-maybe-ref\" /* BindingTypes.SETUP_MAYBE_REF */);\n      if (fromMaybeRef) {\n          return fromMaybeRef;\n      }\n  }\n  // hoist static sub-trees out\n  function genStatic(el, state) {\n      el.staticProcessed = true;\n      // Some elements (templates) need to behave differently inside of a v-pre\n      // node.  All pre nodes are static roots, so we can use this as a location to\n      // wrap a state change and reset it upon exiting the pre node.\n      var originalPreState = state.pre;\n      if (el.pre) {\n          state.pre = el.pre;\n      }\n      state.staticRenderFns.push(\"with(this){return \".concat(genElement(el, state), \"}\"));\n      state.pre = originalPreState;\n      return \"_m(\".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', \")\");\n  }\n  // v-once\n  function genOnce(el, state) {\n      el.onceProcessed = true;\n      if (el.if && !el.ifProcessed) {\n          return genIf(el, state);\n      }\n      else if (el.staticInFor) {\n          var key = '';\n          var parent_1 = el.parent;\n          while (parent_1) {\n              if (parent_1.for) {\n                  key = parent_1.key;\n                  break;\n              }\n              parent_1 = parent_1.parent;\n          }\n          if (!key) {\n              state.warn(\"v-once can only be used inside v-for that is keyed. \", el.rawAttrsMap['v-once']);\n              return genElement(el, state);\n          }\n          return \"_o(\".concat(genElement(el, state), \",\").concat(state.onceId++, \",\").concat(key, \")\");\n      }\n      else {\n          return genStatic(el, state);\n      }\n  }\n  function genIf(el, state, altGen, altEmpty) {\n      el.ifProcessed = true; // avoid recursion\n      return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);\n  }\n  function genIfConditions(conditions, state, altGen, altEmpty) {\n      if (!conditions.length) {\n          return altEmpty || '_e()';\n      }\n      var condition = conditions.shift();\n      if (condition.exp) {\n          return \"(\".concat(condition.exp, \")?\").concat(genTernaryExp(condition.block), \":\").concat(genIfConditions(conditions, state, altGen, altEmpty));\n      }\n      else {\n          return \"\".concat(genTernaryExp(condition.block));\n      }\n      // v-if with v-once should generate code like (a)?_m(0):_m(1)\n      function genTernaryExp(el) {\n          return altGen\n              ? altGen(el, state)\n              : el.once\n                  ? genOnce(el, state)\n                  : genElement(el, state);\n      }\n  }\n  function genFor(el, state, altGen, altHelper) {\n      var exp = el.for;\n      var alias = el.alias;\n      var iterator1 = el.iterator1 ? \",\".concat(el.iterator1) : '';\n      var iterator2 = el.iterator2 ? \",\".concat(el.iterator2) : '';\n      if (state.maybeComponent(el) &&\n          el.tag !== 'slot' &&\n          el.tag !== 'template' &&\n          !el.key) {\n          state.warn(\"<\".concat(el.tag, \" v-for=\\\"\").concat(alias, \" in \").concat(exp, \"\\\">: component lists rendered with \") +\n              \"v-for should have explicit keys. \" +\n              \"See https://v2.vuejs.org/v2/guide/list.html#key for more info.\", el.rawAttrsMap['v-for'], true /* tip */);\n      }\n      el.forProcessed = true; // avoid recursion\n      return (\"\".concat(altHelper || '_l', \"((\").concat(exp, \"),\") +\n          \"function(\".concat(alias).concat(iterator1).concat(iterator2, \"){\") +\n          \"return \".concat((altGen || genElement)(el, state)) +\n          '})');\n  }\n  function genData(el, state) {\n      var data = '{';\n      // directives first.\n      // directives may mutate the el's other properties before they are generated.\n      var dirs = genDirectives(el, state);\n      if (dirs)\n          data += dirs + ',';\n      // key\n      if (el.key) {\n          data += \"key:\".concat(el.key, \",\");\n      }\n      // ref\n      if (el.ref) {\n          data += \"ref:\".concat(el.ref, \",\");\n      }\n      if (el.refInFor) {\n          data += \"refInFor:true,\";\n      }\n      // pre\n      if (el.pre) {\n          data += \"pre:true,\";\n      }\n      // record original tag name for components using \"is\" attribute\n      if (el.component) {\n          data += \"tag:\\\"\".concat(el.tag, \"\\\",\");\n      }\n      // module data generation functions\n      for (var i = 0; i < state.dataGenFns.length; i++) {\n          data += state.dataGenFns[i](el);\n      }\n      // attributes\n      if (el.attrs) {\n          data += \"attrs:\".concat(genProps(el.attrs), \",\");\n      }\n      // DOM props\n      if (el.props) {\n          data += \"domProps:\".concat(genProps(el.props), \",\");\n      }\n      // event handlers\n      if (el.events) {\n          data += \"\".concat(genHandlers(el.events, false), \",\");\n      }\n      if (el.nativeEvents) {\n          data += \"\".concat(genHandlers(el.nativeEvents, true), \",\");\n      }\n      // slot target\n      // only for non-scoped slots\n      if (el.slotTarget && !el.slotScope) {\n          data += \"slot:\".concat(el.slotTarget, \",\");\n      }\n      // scoped slots\n      if (el.scopedSlots) {\n          data += \"\".concat(genScopedSlots(el, el.scopedSlots, state), \",\");\n      }\n      // component v-model\n      if (el.model) {\n          data += \"model:{value:\".concat(el.model.value, \",callback:\").concat(el.model.callback, \",expression:\").concat(el.model.expression, \"},\");\n      }\n      // inline-template\n      if (el.inlineTemplate) {\n          var inlineTemplate = genInlineTemplate(el, state);\n          if (inlineTemplate) {\n              data += \"\".concat(inlineTemplate, \",\");\n          }\n      }\n      data = data.replace(/,$/, '') + '}';\n      // v-bind dynamic argument wrap\n      // v-bind with dynamic arguments must be applied using the same v-bind object\n      // merge helper so that class/style/mustUseProp attrs are handled correctly.\n      if (el.dynamicAttrs) {\n          data = \"_b(\".concat(data, \",\\\"\").concat(el.tag, \"\\\",\").concat(genProps(el.dynamicAttrs), \")\");\n      }\n      // v-bind data wrap\n      if (el.wrapData) {\n          data = el.wrapData(data);\n      }\n      // v-on data wrap\n      if (el.wrapListeners) {\n          data = el.wrapListeners(data);\n      }\n      return data;\n  }\n  function genDirectives(el, state) {\n      var dirs = el.directives;\n      if (!dirs)\n          return;\n      var res = 'directives:[';\n      var hasRuntime = false;\n      var i, l, dir, needRuntime;\n      for (i = 0, l = dirs.length; i < l; i++) {\n          dir = dirs[i];\n          needRuntime = true;\n          var gen = state.directives[dir.name];\n          if (gen) {\n              // compile-time directive that manipulates AST.\n              // returns true if it also needs a runtime counterpart.\n              needRuntime = !!gen(el, dir, state.warn);\n          }\n          if (needRuntime) {\n              hasRuntime = true;\n              res += \"{name:\\\"\".concat(dir.name, \"\\\",rawName:\\\"\").concat(dir.rawName, \"\\\"\").concat(dir.value\n                  ? \",value:(\".concat(dir.value, \"),expression:\").concat(JSON.stringify(dir.value))\n                  : '').concat(dir.arg ? \",arg:\".concat(dir.isDynamicArg ? dir.arg : \"\\\"\".concat(dir.arg, \"\\\"\")) : '').concat(dir.modifiers ? \",modifiers:\".concat(JSON.stringify(dir.modifiers)) : '', \"},\");\n          }\n      }\n      if (hasRuntime) {\n          return res.slice(0, -1) + ']';\n      }\n  }\n  function genInlineTemplate(el, state) {\n      var ast = el.children[0];\n      if ((el.children.length !== 1 || ast.type !== 1)) {\n          state.warn('Inline-template components must have exactly one child element.', { start: el.start });\n      }\n      if (ast && ast.type === 1) {\n          var inlineRenderFns = generate(ast, state.options);\n          return \"inlineTemplate:{render:function(){\".concat(inlineRenderFns.render, \"},staticRenderFns:[\").concat(inlineRenderFns.staticRenderFns\n              .map(function (code) { return \"function(){\".concat(code, \"}\"); })\n              .join(','), \"]}\");\n      }\n  }\n  function genScopedSlots(el, slots, state) {\n      // by default scoped slots are considered \"stable\", this allows child\n      // components with only scoped slots to skip forced updates from parent.\n      // but in some cases we have to bail-out of this optimization\n      // for example if the slot contains dynamic names, has v-if or v-for on them...\n      var needsForceUpdate = el.for ||\n          Object.keys(slots).some(function (key) {\n              var slot = slots[key];\n              return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic\n              );\n          });\n      // #9534: if a component with scoped slots is inside a conditional branch,\n      // it's possible for the same component to be reused but with different\n      // compiled slot content. To avoid that, we generate a unique key based on\n      // the generated code of all the slot contents.\n      var needsKey = !!el.if;\n      // OR when it is inside another scoped slot or v-for (the reactivity may be\n      // disconnected due to the intermediate scope variable)\n      // #9438, #9506\n      // TODO: this can be further optimized by properly analyzing in-scope bindings\n      // and skip force updating ones that do not actually use scope variables.\n      if (!needsForceUpdate) {\n          var parent_2 = el.parent;\n          while (parent_2) {\n              if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||\n                  parent_2.for) {\n                  needsForceUpdate = true;\n                  break;\n              }\n              if (parent_2.if) {\n                  needsKey = true;\n              }\n              parent_2 = parent_2.parent;\n          }\n      }\n      var generatedSlots = Object.keys(slots)\n          .map(function (key) { return genScopedSlot(slots[key], state); })\n          .join(',');\n      return \"scopedSlots:_u([\".concat(generatedSlots, \"]\").concat(needsForceUpdate ? \",null,true\" : \"\").concat(!needsForceUpdate && needsKey ? \",null,false,\".concat(hash(generatedSlots)) : \"\", \")\");\n  }\n  function hash(str) {\n      var hash = 5381;\n      var i = str.length;\n      while (i) {\n          hash = (hash * 33) ^ str.charCodeAt(--i);\n      }\n      return hash >>> 0;\n  }\n  function containsSlotChild(el) {\n      if (el.type === 1) {\n          if (el.tag === 'slot') {\n              return true;\n          }\n          return el.children.some(containsSlotChild);\n      }\n      return false;\n  }\n  function genScopedSlot(el, state) {\n      var isLegacySyntax = el.attrsMap['slot-scope'];\n      if (el.if && !el.ifProcessed && !isLegacySyntax) {\n          return genIf(el, state, genScopedSlot, \"null\");\n      }\n      if (el.for && !el.forProcessed) {\n          return genFor(el, state, genScopedSlot);\n      }\n      var slotScope = el.slotScope === emptySlotScopeToken ? \"\" : String(el.slotScope);\n      var fn = \"function(\".concat(slotScope, \"){\") +\n          \"return \".concat(el.tag === 'template'\n              ? el.if && isLegacySyntax\n                  ? \"(\".concat(el.if, \")?\").concat(genChildren(el, state) || 'undefined', \":undefined\")\n                  : genChildren(el, state) || 'undefined'\n              : genElement(el, state), \"}\");\n      // reverse proxy v-slot without scope on this.$slots\n      var reverseProxy = slotScope ? \"\" : \",proxy:true\";\n      return \"{key:\".concat(el.slotTarget || \"\\\"default\\\"\", \",fn:\").concat(fn).concat(reverseProxy, \"}\");\n  }\n  function genChildren(el, state, checkSkip, altGenElement, altGenNode) {\n      var children = el.children;\n      if (children.length) {\n          var el_1 = children[0];\n          // optimize single v-for\n          if (children.length === 1 &&\n              el_1.for &&\n              el_1.tag !== 'template' &&\n              el_1.tag !== 'slot') {\n              var normalizationType_1 = checkSkip\n                  ? state.maybeComponent(el_1)\n                      ? \",1\"\n                      : \",0\"\n                  : \"\";\n              return \"\".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);\n          }\n          var normalizationType = checkSkip\n              ? getNormalizationType(children, state.maybeComponent)\n              : 0;\n          var gen_1 = altGenNode || genNode;\n          return \"[\".concat(children.map(function (c) { return gen_1(c, state); }).join(','), \"]\").concat(normalizationType ? \",\".concat(normalizationType) : '');\n      }\n  }\n  // determine the normalization needed for the children array.\n  // 0: no normalization needed\n  // 1: simple normalization needed (possible 1-level deep nested array)\n  // 2: full normalization needed\n  function getNormalizationType(children, maybeComponent) {\n      var res = 0;\n      for (var i = 0; i < children.length; i++) {\n          var el = children[i];\n          if (el.type !== 1) {\n              continue;\n          }\n          if (needsNormalization(el) ||\n              (el.ifConditions &&\n                  el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n              res = 2;\n              break;\n          }\n          if (maybeComponent(el) ||\n              (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n              res = 1;\n          }\n      }\n      return res;\n  }\n  function needsNormalization(el) {\n      return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';\n  }\n  function genNode(node, state) {\n      if (node.type === 1) {\n          return genElement(node, state);\n      }\n      else if (node.type === 3 && node.isComment) {\n          return genComment(node);\n      }\n      else {\n          return genText(node);\n      }\n  }\n  function genText(text) {\n      return \"_v(\".concat(text.type === 2\n          ? text.expression // no need for () because already wrapped in _s()\n          : transformSpecialNewlines(JSON.stringify(text.text)), \")\");\n  }\n  function genComment(comment) {\n      return \"_e(\".concat(JSON.stringify(comment.text), \")\");\n  }\n  function genSlot(el, state) {\n      var slotName = el.slotName || '\"default\"';\n      var children = genChildren(el, state);\n      var res = \"_t(\".concat(slotName).concat(children ? \",function(){return \".concat(children, \"}\") : '');\n      var attrs = el.attrs || el.dynamicAttrs\n          ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({\n              // slot props are camelized\n              name: camelize(attr.name),\n              value: attr.value,\n              dynamic: attr.dynamic\n          }); }))\n          : null;\n      var bind = el.attrsMap['v-bind'];\n      if ((attrs || bind) && !children) {\n          res += \",null\";\n      }\n      if (attrs) {\n          res += \",\".concat(attrs);\n      }\n      if (bind) {\n          res += \"\".concat(attrs ? '' : ',null', \",\").concat(bind);\n      }\n      return res + ')';\n  }\n  // componentName is el.component, take it as argument to shun flow's pessimistic refinement\n  function genComponent(componentName, el, state) {\n      var children = el.inlineTemplate ? null : genChildren(el, state, true);\n      return \"_c(\".concat(componentName, \",\").concat(genData(el, state)).concat(children ? \",\".concat(children) : '', \")\");\n  }\n  function genProps(props) {\n      var staticProps = \"\";\n      var dynamicProps = \"\";\n      for (var i = 0; i < props.length; i++) {\n          var prop = props[i];\n          var value = transformSpecialNewlines(prop.value);\n          if (prop.dynamic) {\n              dynamicProps += \"\".concat(prop.name, \",\").concat(value, \",\");\n          }\n          else {\n              staticProps += \"\\\"\".concat(prop.name, \"\\\":\").concat(value, \",\");\n          }\n      }\n      staticProps = \"{\".concat(staticProps.slice(0, -1), \"}\");\n      if (dynamicProps) {\n          return \"_d(\".concat(staticProps, \",[\").concat(dynamicProps.slice(0, -1), \"])\");\n      }\n      else {\n          return staticProps;\n      }\n  }\n  // #3895, #4268\n  function transformSpecialNewlines(text) {\n      return text.replace(/\\u2028/g, '\\\\u2028').replace(/\\u2029/g, '\\\\u2029');\n  }\n\n  // these keywords should not appear inside expressions, but operators like\n  // typeof, instanceof and in are allowed\n  var prohibitedKeywordRE = new RegExp('\\\\b' +\n      ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n          'super,throw,while,yield,delete,export,import,return,switch,default,' +\n          'extends,finally,continue,debugger,function,arguments')\n          .split(',')\n          .join('\\\\b|\\\\b') +\n      '\\\\b');\n  // these unary operators should not be used as property/method names\n  var unaryOperatorsRE = new RegExp('\\\\b' +\n      'delete,typeof,void'.split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') +\n      '\\\\s*\\\\([^\\\\)]*\\\\)');\n  // strip strings in expressions\n  var stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n  // detect problematic expressions in a template\n  function detectErrors(ast, warn) {\n      if (ast) {\n          checkNode(ast, warn);\n      }\n  }\n  function checkNode(node, warn) {\n      if (node.type === 1) {\n          for (var name_1 in node.attrsMap) {\n              if (dirRE.test(name_1)) {\n                  var value = node.attrsMap[name_1];\n                  if (value) {\n                      var range = node.rawAttrsMap[name_1];\n                      if (name_1 === 'v-for') {\n                          checkFor(node, \"v-for=\\\"\".concat(value, \"\\\"\"), warn, range);\n                      }\n                      else if (name_1 === 'v-slot' || name_1[0] === '#') {\n                          checkFunctionParameterExpression(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                      }\n                      else if (onRE.test(name_1)) {\n                          checkEvent(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                      }\n                      else {\n                          checkExpression(value, \"\".concat(name_1, \"=\\\"\").concat(value, \"\\\"\"), warn, range);\n                      }\n                  }\n              }\n          }\n          if (node.children) {\n              for (var i = 0; i < node.children.length; i++) {\n                  checkNode(node.children[i], warn);\n              }\n          }\n      }\n      else if (node.type === 2) {\n          checkExpression(node.expression, node.text, warn, node);\n      }\n  }\n  function checkEvent(exp, text, warn, range) {\n      var stripped = exp.replace(stripStringRE, '');\n      var keywordMatch = stripped.match(unaryOperatorsRE);\n      if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {\n          warn(\"avoid using JavaScript unary operator as property name: \" +\n              \"\\\"\".concat(keywordMatch[0], \"\\\" in expression \").concat(text.trim()), range);\n      }\n      checkExpression(exp, text, warn, range);\n  }\n  function checkFor(node, text, warn, range) {\n      checkExpression(node.for || '', text, warn, range);\n      checkIdentifier(node.alias, 'v-for alias', text, warn, range);\n      checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);\n      checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);\n  }\n  function checkIdentifier(ident, type, text, warn, range) {\n      if (typeof ident === 'string') {\n          try {\n              new Function(\"var \".concat(ident, \"=_\"));\n          }\n          catch (e) {\n              warn(\"invalid \".concat(type, \" \\\"\").concat(ident, \"\\\" in expression: \").concat(text.trim()), range);\n          }\n      }\n  }\n  function checkExpression(exp, text, warn, range) {\n      try {\n          new Function(\"return \".concat(exp));\n      }\n      catch (e) {\n          var keywordMatch = exp\n              .replace(stripStringRE, '')\n              .match(prohibitedKeywordRE);\n          if (keywordMatch) {\n              warn(\"avoid using JavaScript keyword as property name: \" +\n                  \"\\\"\".concat(keywordMatch[0], \"\\\"\\n  Raw expression: \").concat(text.trim()), range);\n          }\n          else {\n              warn(\"invalid expression: \".concat(e.message, \" in\\n\\n\") +\n                  \"    \".concat(exp, \"\\n\\n\") +\n                  \"  Raw expression: \".concat(text.trim(), \"\\n\"), range);\n          }\n      }\n  }\n  function checkFunctionParameterExpression(exp, text, warn, range) {\n      try {\n          new Function(exp, '');\n      }\n      catch (e) {\n          warn(\"invalid function parameter expression: \".concat(e.message, \" in\\n\\n\") +\n              \"    \".concat(exp, \"\\n\\n\") +\n              \"  Raw expression: \".concat(text.trim(), \"\\n\"), range);\n      }\n  }\n\n  var range = 2;\n  function generateCodeFrame(source, start, end) {\n      if (start === void 0) { start = 0; }\n      if (end === void 0) { end = source.length; }\n      var lines = source.split(/\\r?\\n/);\n      var count = 0;\n      var res = [];\n      for (var i = 0; i < lines.length; i++) {\n          count += lines[i].length + 1;\n          if (count >= start) {\n              for (var j = i - range; j <= i + range || end > count; j++) {\n                  if (j < 0 || j >= lines.length)\n                      continue;\n                  res.push(\"\".concat(j + 1).concat(repeat(\" \", 3 - String(j + 1).length), \"|  \").concat(lines[j]));\n                  var lineLength = lines[j].length;\n                  if (j === i) {\n                      // push underline\n                      var pad = start - (count - lineLength) + 1;\n                      var length_1 = end > count ? lineLength - pad : end - start;\n                      res.push(\"   |  \" + repeat(\" \", pad) + repeat(\"^\", length_1));\n                  }\n                  else if (j > i) {\n                      if (end > count) {\n                          var length_2 = Math.min(end - count, lineLength);\n                          res.push(\"   |  \" + repeat(\"^\", length_2));\n                      }\n                      count += lineLength + 1;\n                  }\n              }\n              break;\n          }\n      }\n      return res.join('\\n');\n  }\n  function repeat(str, n) {\n      var result = '';\n      if (n > 0) {\n          // eslint-disable-next-line no-constant-condition\n          while (true) {\n              // eslint-disable-line\n              if (n & 1)\n                  result += str;\n              n >>>= 1;\n              if (n <= 0)\n                  break;\n              str += str;\n          }\n      }\n      return result;\n  }\n\n  function createFunction(code, errors) {\n      try {\n          return new Function(code);\n      }\n      catch (err) {\n          errors.push({ err: err, code: code });\n          return noop;\n      }\n  }\n  function createCompileToFunctionFn(compile) {\n      var cache = Object.create(null);\n      return function compileToFunctions(template, options, vm) {\n          options = extend({}, options);\n          var warn = options.warn || warn$2;\n          delete options.warn;\n          /* istanbul ignore if */\n          {\n              // detect possible CSP restriction\n              try {\n                  new Function('return 1');\n              }\n              catch (e) {\n                  if (e.toString().match(/unsafe-eval|CSP/)) {\n                      warn('It seems you are using the standalone build of Vue.js in an ' +\n                          'environment with Content Security Policy that prohibits unsafe-eval. ' +\n                          'The template compiler cannot work in this environment. Consider ' +\n                          'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n                          'templates into render functions.');\n                  }\n              }\n          }\n          // check cache\n          var key = options.delimiters\n              ? String(options.delimiters) + template\n              : template;\n          if (cache[key]) {\n              return cache[key];\n          }\n          // compile\n          var compiled = compile(template, options);\n          // check compilation errors/tips\n          {\n              if (compiled.errors && compiled.errors.length) {\n                  if (options.outputSourceRange) {\n                      compiled.errors.forEach(function (e) {\n                          warn(\"Error compiling template:\\n\\n\".concat(e.msg, \"\\n\\n\") +\n                              generateCodeFrame(template, e.start, e.end), vm);\n                      });\n                  }\n                  else {\n                      warn(\"Error compiling template:\\n\\n\".concat(template, \"\\n\\n\") +\n                          compiled.errors.map(function (e) { return \"- \".concat(e); }).join('\\n') +\n                          '\\n', vm);\n                  }\n              }\n              if (compiled.tips && compiled.tips.length) {\n                  if (options.outputSourceRange) {\n                      compiled.tips.forEach(function (e) { return tip(e.msg, vm); });\n                  }\n                  else {\n                      compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n                  }\n              }\n          }\n          // turn code into functions\n          var res = {};\n          var fnGenErrors = [];\n          res.render = createFunction(compiled.render, fnGenErrors);\n          res.staticRenderFns = compiled.staticRenderFns.map(function (code) {\n              return createFunction(code, fnGenErrors);\n          });\n          // check function generation errors.\n          // this should only happen if there is a bug in the compiler itself.\n          // mostly for codegen development use\n          /* istanbul ignore if */\n          {\n              if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n                  warn(\"Failed to generate render function:\\n\\n\" +\n                      fnGenErrors\n                          .map(function (_a) {\n                          var err = _a.err, code = _a.code;\n                          return \"\".concat(err.toString(), \" in\\n\\n\").concat(code, \"\\n\");\n                      })\n                          .join('\\n'), vm);\n              }\n          }\n          return (cache[key] = res);\n      };\n  }\n\n  function createCompilerCreator(baseCompile) {\n      return function createCompiler(baseOptions) {\n          function compile(template, options) {\n              var finalOptions = Object.create(baseOptions);\n              var errors = [];\n              var tips = [];\n              var warn = function (msg, range, tip) {\n                  (tip ? tips : errors).push(msg);\n              };\n              if (options) {\n                  if (options.outputSourceRange) {\n                      // $flow-disable-line\n                      var leadingSpaceLength_1 = template.match(/^\\s*/)[0].length;\n                      warn = function (msg, range, tip) {\n                          var data = typeof msg === 'string' ? { msg: msg } : msg;\n                          if (range) {\n                              if (range.start != null) {\n                                  data.start = range.start + leadingSpaceLength_1;\n                              }\n                              if (range.end != null) {\n                                  data.end = range.end + leadingSpaceLength_1;\n                              }\n                          }\n                          (tip ? tips : errors).push(data);\n                      };\n                  }\n                  // merge custom modules\n                  if (options.modules) {\n                      finalOptions.modules = (baseOptions.modules || []).concat(options.modules);\n                  }\n                  // merge custom directives\n                  if (options.directives) {\n                      finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);\n                  }\n                  // copy other options\n                  for (var key in options) {\n                      if (key !== 'modules' && key !== 'directives') {\n                          finalOptions[key] = options[key];\n                      }\n                  }\n              }\n              finalOptions.warn = warn;\n              var compiled = baseCompile(template.trim(), finalOptions);\n              {\n                  detectErrors(compiled.ast, warn);\n              }\n              compiled.errors = errors;\n              compiled.tips = tips;\n              return compiled;\n          }\n          return {\n              compile: compile,\n              compileToFunctions: createCompileToFunctionFn(compile)\n          };\n      };\n  }\n\n  // `createCompilerCreator` allows creating compilers that use alternative\n  // parser/optimizer/codegen, e.g the SSR optimizing compiler.\n  // Here we just export a default compiler using the default parts.\n  var createCompiler = createCompilerCreator(function baseCompile(template, options) {\n      var ast = parse(template.trim(), options);\n      if (options.optimize !== false) {\n          optimize(ast, options);\n      }\n      var code = generate(ast, options);\n      return {\n          ast: ast,\n          render: code.render,\n          staticRenderFns: code.staticRenderFns\n      };\n  });\n\n  var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;\n\n  // check whether current browser encodes a char inside attribute values\n  var div;\n  function getShouldDecode(href) {\n      div = div || document.createElement('div');\n      div.innerHTML = href ? \"<a href=\\\"\\n\\\"/>\" : \"<div a=\\\"\\n\\\"/>\";\n      return div.innerHTML.indexOf('&#10;') > 0;\n  }\n  // #3663: IE encodes newlines inside attribute values while other browsers don't\n  var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n  // #6828: chrome encodes content in a[href]\n  var shouldDecodeNewlinesForHref = inBrowser\n      ? getShouldDecode(true)\n      : false;\n\n  var idToTemplate = cached(function (id) {\n      var el = query(id);\n      return el && el.innerHTML;\n  });\n  var mount = Vue.prototype.$mount;\n  Vue.prototype.$mount = function (el, hydrating) {\n      el = el && query(el);\n      /* istanbul ignore if */\n      if (el === document.body || el === document.documentElement) {\n          warn$2(\"Do not mount Vue to <html> or <body> - mount to normal elements instead.\");\n          return this;\n      }\n      var options = this.$options;\n      // resolve template/el and convert to render function\n      if (!options.render) {\n          var template = options.template;\n          if (template) {\n              if (typeof template === 'string') {\n                  if (template.charAt(0) === '#') {\n                      template = idToTemplate(template);\n                      /* istanbul ignore if */\n                      if (!template) {\n                          warn$2(\"Template element not found or is empty: \".concat(options.template), this);\n                      }\n                  }\n              }\n              else if (template.nodeType) {\n                  template = template.innerHTML;\n              }\n              else {\n                  {\n                      warn$2('invalid template option:' + template, this);\n                  }\n                  return this;\n              }\n          }\n          else if (el) {\n              // @ts-expect-error\n              template = getOuterHTML(el);\n          }\n          if (template) {\n              /* istanbul ignore if */\n              if (config.performance && mark) {\n                  mark('compile');\n              }\n              var _a = compileToFunctions(template, {\n                  outputSourceRange: true,\n                  shouldDecodeNewlines: shouldDecodeNewlines,\n                  shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,\n                  delimiters: options.delimiters,\n                  comments: options.comments\n              }, this), render = _a.render, staticRenderFns = _a.staticRenderFns;\n              options.render = render;\n              options.staticRenderFns = staticRenderFns;\n              /* istanbul ignore if */\n              if (config.performance && mark) {\n                  mark('compile end');\n                  measure(\"vue \".concat(this._name, \" compile\"), 'compile', 'compile end');\n              }\n          }\n      }\n      return mount.call(this, el, hydrating);\n  };\n  /**\n   * Get outerHTML of elements, taking care\n   * of SVG elements in IE as well.\n   */\n  function getOuterHTML(el) {\n      if (el.outerHTML) {\n          return el.outerHTML;\n      }\n      else {\n          var container = document.createElement('div');\n          container.appendChild(el.cloneNode(true));\n          return container.innerHTML;\n      }\n  }\n  Vue.compile = compileToFunctions;\n\n  // export type EffectScheduler = (...args: any[]) => any\n  /**\n   * @internal since we are not exposing this in Vue 2, it's used only for\n   * internal testing.\n   */\n  function effect(fn, scheduler) {\n      var watcher = new Watcher(currentInstance, fn, noop, {\n          sync: true\n      });\n      if (scheduler) {\n          watcher.update = function () {\n              scheduler(function () { return watcher.run(); });\n          };\n      }\n  }\n\n  extend(Vue, vca);\n  Vue.effect = effect;\n\n  return Vue;\n\n}));\n"
  },
  {
    "path": "web/assets/vue/vue.runtime.common.dev.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\nconst emptyObject = Object.freeze({});\nconst isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n    return v === undefined || v === null;\n}\nfunction isDef(v) {\n    return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n    return v === true;\n}\nfunction isFalse(v) {\n    return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n    return (typeof value === 'string' ||\n        typeof value === 'number' ||\n        // $flow-disable-line\n        typeof value === 'symbol' ||\n        typeof value === 'boolean');\n}\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n    return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nconst _toString = Object.prototype.toString;\nfunction toRawType(value) {\n    return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n    return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n    return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n    const n = parseFloat(String(val));\n    return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n    return (isDef(val) &&\n        typeof val.then === 'function' &&\n        typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n    return val == null\n        ? ''\n        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n            ? JSON.stringify(val, replacer, 2)\n            : String(val);\n}\nfunction replacer(_key, val) {\n    // avoid circular deps from v3\n    if (val && val.__v_isRef) {\n        return val.value;\n    }\n    return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n    const n = parseFloat(val);\n    return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n    const map = Object.create(null);\n    const list = str.split(',');\n    for (let i = 0; i < list.length; i++) {\n        map[list[i]] = true;\n    }\n    return expectsLowerCase ? val => map[val.toLowerCase()] : val => map[val];\n}\n/**\n * Check if a tag is a built-in tag.\n */\nconst isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nconst isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n    const len = arr.length;\n    if (len) {\n        // fast path for the only / last item\n        if (item === arr[len - 1]) {\n            arr.length = len - 1;\n            return;\n        }\n        const index = arr.indexOf(item);\n        if (index > -1) {\n            return arr.splice(index, 1);\n        }\n    }\n}\n/**\n * Check whether an object has the property.\n */\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n    const cache = Object.create(null);\n    return function cachedFn(str) {\n        const hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cached((str) => {\n    return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));\n});\n/**\n * Capitalize a string.\n */\nconst capitalize = cached((str) => {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cached((str) => {\n    return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n    function boundFn(a) {\n        const l = arguments.length;\n        return l\n            ? l > 1\n                ? fn.apply(ctx, arguments)\n                : fn.call(ctx, a)\n            : fn.call(ctx);\n    }\n    boundFn._length = fn.length;\n    return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n    return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nconst bind = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n    start = start || 0;\n    let i = list.length - start;\n    const ret = new Array(i);\n    while (i--) {\n        ret[i] = list[i + start];\n    }\n    return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n    for (const key in _from) {\n        to[key] = _from[key];\n    }\n    return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n    const res = {};\n    for (let i = 0; i < arr.length; i++) {\n        if (arr[i]) {\n            extend(res, arr[i]);\n        }\n    }\n    return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nconst no = (a, b, c) => false;\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nconst identity = (_) => _;\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n    if (a === b)\n        return true;\n    const isObjectA = isObject(a);\n    const isObjectB = isObject(b);\n    if (isObjectA && isObjectB) {\n        try {\n            const isArrayA = Array.isArray(a);\n            const isArrayB = Array.isArray(b);\n            if (isArrayA && isArrayB) {\n                return (a.length === b.length &&\n                    a.every((e, i) => {\n                        return looseEqual(e, b[i]);\n                    }));\n            }\n            else if (a instanceof Date && b instanceof Date) {\n                return a.getTime() === b.getTime();\n            }\n            else if (!isArrayA && !isArrayB) {\n                const keysA = Object.keys(a);\n                const keysB = Object.keys(b);\n                return (keysA.length === keysB.length &&\n                    keysA.every(key => {\n                        return looseEqual(a[key], b[key]);\n                    }));\n            }\n            else {\n                /* istanbul ignore next */\n                return false;\n            }\n        }\n        catch (e) {\n            /* istanbul ignore next */\n            return false;\n        }\n    }\n    else if (!isObjectA && !isObjectB) {\n        return String(a) === String(b);\n    }\n    else {\n        return false;\n    }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n    for (let i = 0; i < arr.length; i++) {\n        if (looseEqual(arr[i], val))\n            return i;\n    }\n    return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n    let called = false;\n    return function () {\n        if (!called) {\n            called = true;\n            fn.apply(this, arguments);\n        }\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n    if (x === y) {\n        return x === 0 && 1 / x !== 1 / y;\n    }\n    else {\n        return x === x || y === y;\n    }\n}\n\nconst SSR_ATTR = 'data-server-rendered';\nconst ASSET_TYPES = ['component', 'directive', 'filter'];\nconst LIFECYCLE_HOOKS = [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated',\n    'errorCaptured',\n    'serverPrefetch',\n    'renderTracked',\n    'renderTriggered'\n];\n\nvar config = {\n    /**\n     * Option merge strategies (used in core/util/options)\n     */\n    // $flow-disable-line\n    optionMergeStrategies: Object.create(null),\n    /**\n     * Whether to suppress warnings.\n     */\n    silent: false,\n    /**\n     * Show production mode tip message on boot?\n     */\n    productionTip: true,\n    /**\n     * Whether to enable devtools\n     */\n    devtools: true,\n    /**\n     * Whether to record perf\n     */\n    performance: false,\n    /**\n     * Error handler for watcher errors\n     */\n    errorHandler: null,\n    /**\n     * Warn handler for watcher warns\n     */\n    warnHandler: null,\n    /**\n     * Ignore certain custom elements\n     */\n    ignoredElements: [],\n    /**\n     * Custom user key aliases for v-on\n     */\n    // $flow-disable-line\n    keyCodes: Object.create(null),\n    /**\n     * Check if a tag is reserved so that it cannot be registered as a\n     * component. This is platform-dependent and may be overwritten.\n     */\n    isReservedTag: no,\n    /**\n     * Check if an attribute is reserved so that it cannot be used as a component\n     * prop. This is platform-dependent and may be overwritten.\n     */\n    isReservedAttr: no,\n    /**\n     * Check if a tag is an unknown element.\n     * Platform-dependent.\n     */\n    isUnknownElement: no,\n    /**\n     * Get the namespace of an element\n     */\n    getTagNamespace: noop,\n    /**\n     * Parse the real tag name for the specific platform.\n     */\n    parsePlatformTagName: identity,\n    /**\n     * Check if an attribute must be bound using property, e.g. value\n     * Platform-dependent.\n     */\n    mustUseProp: no,\n    /**\n     * Perform updates asynchronously. Intended to be used by Vue Test Utils\n     * This will significantly reduce performance if set to false.\n     */\n    async: true,\n    /**\n     * Exposed for legacy reasons\n     */\n    _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nconst unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n    const c = (str + '').charCodeAt(0);\n    return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n    Object.defineProperty(obj, key, {\n        value: val,\n        enumerable: !!enumerable,\n        writable: true,\n        configurable: true\n    });\n}\n/**\n * Parse simple path.\n */\nconst bailRE = new RegExp(`[^${unicodeRegExp.source}.$_\\\\d]`);\nfunction parsePath(path) {\n    if (bailRE.test(path)) {\n        return;\n    }\n    const segments = path.split('.');\n    return function (obj) {\n        for (let i = 0; i < segments.length; i++) {\n            if (!obj)\n                return;\n            obj = obj[segments[i]];\n        }\n        return obj;\n    };\n}\n\n// can we use __proto__?\nconst hasProto = '__proto__' in {};\n// Browser environment sniffing\nconst inBrowser = typeof window !== 'undefined';\nconst UA = inBrowser && window.navigator.userAgent.toLowerCase();\nconst isIE = UA && /msie|trident/.test(UA);\nconst isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nconst isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nconst isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nconst isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nconst nativeWatch = {}.watch;\nlet supportsPassive = false;\nif (inBrowser) {\n    try {\n        const opts = {};\n        Object.defineProperty(opts, 'passive', {\n            get() {\n                /* istanbul ignore next */\n                supportsPassive = true;\n            }\n        }); // https://github.com/facebook/flow/issues/285\n        window.addEventListener('test-passive', null, opts);\n    }\n    catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nlet _isServer;\nconst isServerRendering = () => {\n    if (_isServer === undefined) {\n        /* istanbul ignore if */\n        if (!inBrowser && typeof global !== 'undefined') {\n            // detect presence of vue-server-renderer and avoid\n            // Webpack shimming the process\n            _isServer =\n                global['process'] && global['process'].env.VUE_ENV === 'server';\n        }\n        else {\n            _isServer = false;\n        }\n    }\n    return _isServer;\n};\n// detect devtools\nconst devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nconst hasSymbol = typeof Symbol !== 'undefined' &&\n    isNative(Symbol) &&\n    typeof Reflect !== 'undefined' &&\n    isNative(Reflect.ownKeys);\nlet _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n    // use native Set when available.\n    _Set = Set;\n}\nelse {\n    // a non-standard Set polyfill that only works with primitive keys.\n    _Set = class Set {\n        constructor() {\n            this.set = Object.create(null);\n        }\n        has(key) {\n            return this.set[key] === true;\n        }\n        add(key) {\n            this.set[key] = true;\n        }\n        clear() {\n            this.set = Object.create(null);\n        }\n    };\n}\n\nlet currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n    return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm = null) {\n    if (!vm)\n        currentInstance && currentInstance._scope.off();\n    currentInstance = vm;\n    vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nclass VNode {\n    constructor(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n        this.tag = tag;\n        this.data = data;\n        this.children = children;\n        this.text = text;\n        this.elm = elm;\n        this.ns = undefined;\n        this.context = context;\n        this.fnContext = undefined;\n        this.fnOptions = undefined;\n        this.fnScopeId = undefined;\n        this.key = data && data.key;\n        this.componentOptions = componentOptions;\n        this.componentInstance = undefined;\n        this.parent = undefined;\n        this.raw = false;\n        this.isStatic = false;\n        this.isRootInsert = true;\n        this.isComment = false;\n        this.isCloned = false;\n        this.isOnce = false;\n        this.asyncFactory = asyncFactory;\n        this.asyncMeta = undefined;\n        this.isAsyncPlaceholder = false;\n    }\n    // DEPRECATED: alias for componentInstance for backwards compat.\n    /* istanbul ignore next */\n    get child() {\n        return this.componentInstance;\n    }\n}\nconst createEmptyVNode = (text = '') => {\n    const node = new VNode();\n    node.text = text;\n    node.isComment = true;\n    return node;\n};\nfunction createTextVNode(val) {\n    return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n    const cloned = new VNode(vnode.tag, vnode.data, \n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n    cloned.ns = vnode.ns;\n    cloned.isStatic = vnode.isStatic;\n    cloned.key = vnode.key;\n    cloned.isComment = vnode.isComment;\n    cloned.fnContext = vnode.fnContext;\n    cloned.fnOptions = vnode.fnOptions;\n    cloned.fnScopeId = vnode.fnScopeId;\n    cloned.asyncMeta = vnode.asyncMeta;\n    cloned.isCloned = true;\n    return cloned;\n}\n\nlet uid$2 = 0;\nconst pendingCleanupDeps = [];\nconst cleanupDeps = () => {\n    for (let i = 0; i < pendingCleanupDeps.length; i++) {\n        const dep = pendingCleanupDeps[i];\n        dep.subs = dep.subs.filter(s => s);\n        dep._pending = false;\n    }\n    pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nclass Dep {\n    constructor() {\n        // pending subs cleanup\n        this._pending = false;\n        this.id = uid$2++;\n        this.subs = [];\n    }\n    addSub(sub) {\n        this.subs.push(sub);\n    }\n    removeSub(sub) {\n        // #12696 deps with massive amount of subscribers are extremely slow to\n        // clean up in Chromium\n        // to workaround this, we unset the sub for now, and clear them on\n        // next scheduler flush.\n        this.subs[this.subs.indexOf(sub)] = null;\n        if (!this._pending) {\n            this._pending = true;\n            pendingCleanupDeps.push(this);\n        }\n    }\n    depend(info) {\n        if (Dep.target) {\n            Dep.target.addDep(this);\n            if (info && Dep.target.onTrack) {\n                Dep.target.onTrack(Object.assign({ effect: Dep.target }, info));\n            }\n        }\n    }\n    notify(info) {\n        // stabilize the subscriber list first\n        const subs = this.subs.filter(s => s);\n        if (!config.async) {\n            // subs aren't sorted in scheduler if not running async\n            // we need to sort them now to make sure they fire in correct\n            // order\n            subs.sort((a, b) => a.id - b.id);\n        }\n        for (let i = 0, l = subs.length; i < l; i++) {\n            const sub = subs[i];\n            if (info) {\n                sub.onTrigger &&\n                    sub.onTrigger(Object.assign({ effect: subs[i] }, info));\n            }\n            sub.update();\n        }\n    }\n}\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nconst targetStack = [];\nfunction pushTarget(target) {\n    targetStack.push(target);\n    Dep.target = target;\n}\nfunction popTarget() {\n    targetStack.pop();\n    Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nconst arrayProto = Array.prototype;\nconst arrayMethods = Object.create(arrayProto);\nconst methodsToPatch = [\n    'push',\n    'pop',\n    'shift',\n    'unshift',\n    'splice',\n    'sort',\n    'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n    // cache original method\n    const original = arrayProto[method];\n    def(arrayMethods, method, function mutator(...args) {\n        const result = original.apply(this, args);\n        const ob = this.__ob__;\n        let inserted;\n        switch (method) {\n            case 'push':\n            case 'unshift':\n                inserted = args;\n                break;\n            case 'splice':\n                inserted = args.slice(2);\n                break;\n        }\n        if (inserted)\n            ob.observeArray(inserted);\n        // notify change\n        {\n            ob.dep.notify({\n                type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                target: this,\n                key: method\n            });\n        }\n        return result;\n    });\n});\n\nconst arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nconst NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nlet shouldObserve = true;\nfunction toggleObserving(value) {\n    shouldObserve = value;\n}\n// ssr mock dep\nconst mockDep = {\n    notify: noop,\n    depend: noop,\n    addSub: noop,\n    removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nclass Observer {\n    constructor(value, shallow = false, mock = false) {\n        this.value = value;\n        this.shallow = shallow;\n        this.mock = mock;\n        // this.value = value\n        this.dep = mock ? mockDep : new Dep();\n        this.vmCount = 0;\n        def(value, '__ob__', this);\n        if (isArray(value)) {\n            if (!mock) {\n                if (hasProto) {\n                    value.__proto__ = arrayMethods;\n                    /* eslint-enable no-proto */\n                }\n                else {\n                    for (let i = 0, l = arrayKeys.length; i < l; i++) {\n                        const key = arrayKeys[i];\n                        def(value, key, arrayMethods[key]);\n                    }\n                }\n            }\n            if (!shallow) {\n                this.observeArray(value);\n            }\n        }\n        else {\n            /**\n             * Walk through all properties and convert them into\n             * getter/setters. This method should only be called when\n             * value type is Object.\n             */\n            const keys = Object.keys(value);\n            for (let i = 0; i < keys.length; i++) {\n                const key = keys[i];\n                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n            }\n        }\n    }\n    /**\n     * Observe a list of Array items.\n     */\n    observeArray(value) {\n        for (let i = 0, l = value.length; i < l; i++) {\n            observe(value[i], false, this.mock);\n        }\n    }\n}\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n        return value.__ob__;\n    }\n    if (shouldObserve &&\n        (ssrMockReactivity || !isServerRendering()) &&\n        (isArray(value) || isPlainObject(value)) &&\n        Object.isExtensible(value) &&\n        !value.__v_skip /* ReactiveFlags.SKIP */ &&\n        !isRef(value) &&\n        !(value instanceof VNode)) {\n        return new Observer(value, shallow, ssrMockReactivity);\n    }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow = false) {\n    const dep = new Dep();\n    const property = Object.getOwnPropertyDescriptor(obj, key);\n    if (property && property.configurable === false) {\n        return;\n    }\n    // cater for pre-defined getter/setters\n    const getter = property && property.get;\n    const setter = property && property.set;\n    if ((!getter || setter) &&\n        (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n        val = obj[key];\n    }\n    let childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n    Object.defineProperty(obj, key, {\n        enumerable: true,\n        configurable: true,\n        get: function reactiveGetter() {\n            const value = getter ? getter.call(obj) : val;\n            if (Dep.target) {\n                {\n                    dep.depend({\n                        target: obj,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                if (childOb) {\n                    childOb.dep.depend();\n                    if (isArray(value)) {\n                        dependArray(value);\n                    }\n                }\n            }\n            return isRef(value) && !shallow ? value.value : value;\n        },\n        set: function reactiveSetter(newVal) {\n            const value = getter ? getter.call(obj) : val;\n            if (!hasChanged(value, newVal)) {\n                return;\n            }\n            if (customSetter) {\n                customSetter();\n            }\n            if (setter) {\n                setter.call(obj, newVal);\n            }\n            else if (getter) {\n                // #7981: for accessor properties without setter\n                return;\n            }\n            else if (!shallow && isRef(value) && !isRef(newVal)) {\n                value.value = newVal;\n                return;\n            }\n            else {\n                val = newVal;\n            }\n            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n            {\n                dep.notify({\n                    type: \"set\" /* TriggerOpTypes.SET */,\n                    target: obj,\n                    key,\n                    newValue: newVal,\n                    oldValue: value\n                });\n            }\n        }\n    });\n    return dep;\n}\nfunction set(target, key, val) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn(`Cannot set reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isReadonly(target)) {\n        warn(`Set operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    const ob = target.__ob__;\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.length = Math.max(target.length, key);\n        target.splice(key, 1, val);\n        // when mocking for SSR, array methods are not hijacked\n        if (ob && !ob.shallow && ob.mock) {\n            observe(val, false, true);\n        }\n        return val;\n    }\n    if (key in target && !(key in Object.prototype)) {\n        target[key] = val;\n        return val;\n    }\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                'at runtime - declare it upfront in the data option.');\n        return val;\n    }\n    if (!ob) {\n        target[key] = val;\n        return val;\n    }\n    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n    {\n        ob.dep.notify({\n            type: \"add\" /* TriggerOpTypes.ADD */,\n            target: target,\n            key,\n            newValue: val,\n            oldValue: undefined\n        });\n    }\n    return val;\n}\nfunction del(target, key) {\n    if ((isUndef(target) || isPrimitive(target))) {\n        warn(`Cannot delete reactive property on undefined, null, or primitive value: ${target}`);\n    }\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.splice(key, 1);\n        return;\n    }\n    const ob = target.__ob__;\n    if (target._isVue || (ob && ob.vmCount)) {\n        warn('Avoid deleting properties on a Vue instance or its root $data ' +\n                '- just set it to null.');\n        return;\n    }\n    if (isReadonly(target)) {\n        warn(`Delete operation on key \"${key}\" failed: target is readonly.`);\n        return;\n    }\n    if (!hasOwn(target, key)) {\n        return;\n    }\n    delete target[key];\n    if (!ob) {\n        return;\n    }\n    {\n        ob.dep.notify({\n            type: \"delete\" /* TriggerOpTypes.DELETE */,\n            target: target,\n            key\n        });\n    }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n    for (let e, i = 0, l = value.length; i < l; i++) {\n        e = value[i];\n        if (e && e.__ob__) {\n            e.__ob__.dep.depend();\n        }\n        if (isArray(e)) {\n            dependArray(e);\n        }\n    }\n}\n\nfunction reactive(target) {\n    makeReactive(target, false);\n    return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n    makeReactive(target, true);\n    def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    return target;\n}\nfunction makeReactive(target, shallow) {\n    // if trying to observe a readonly proxy, return the readonly version.\n    if (!isReadonly(target)) {\n        {\n            if (isArray(target)) {\n                warn(`Avoid using Array as root value for ${shallow ? `shallowReactive()` : `reactive()`} as it cannot be tracked in watch() or watchEffect(). Use ${shallow ? `shallowRef()` : `ref()`} instead. This is a Vue-2-only limitation.`);\n            }\n            const existingOb = target && target.__ob__;\n            if (existingOb && existingOb.shallow !== shallow) {\n                warn(`Target is already a ${existingOb.shallow ? `` : `non-`}shallow reactive object, and cannot be converted to ${shallow ? `` : `non-`}shallow.`);\n            }\n        }\n        const ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n        if (!ob) {\n            if (target == null || isPrimitive(target)) {\n                warn(`value cannot be made reactive: ${String(target)}`);\n            }\n            if (isCollectionType(target)) {\n                warn(`Vue 2 does not support reactive collection types such as Map or Set.`);\n            }\n        }\n    }\n}\nfunction isReactive(value) {\n    if (isReadonly(value)) {\n        return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n    }\n    return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n    return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n    return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n    return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n    const raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n    return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n    // non-extensible objects won't be observed anyway\n    if (Object.isExtensible(value)) {\n        def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n    }\n    return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n    const type = toRawType(value);\n    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nconst RefFlag = `__v_isRef`;\nfunction isRef(r) {\n    return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n    return createRef(value, false);\n}\nfunction shallowRef(value) {\n    return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n    if (isRef(rawValue)) {\n        return rawValue;\n    }\n    const ref = {};\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n    return ref;\n}\nfunction triggerRef(ref) {\n    if (!ref.dep) {\n        warn(`received object is not a triggerable ref.`);\n    }\n    {\n        ref.dep &&\n            ref.dep.notify({\n                type: \"set\" /* TriggerOpTypes.SET */,\n                target: ref,\n                key: 'value'\n            });\n    }\n}\nfunction unref(ref) {\n    return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n    if (isReactive(objectWithRefs)) {\n        return objectWithRefs;\n    }\n    const proxy = {};\n    const keys = Object.keys(objectWithRefs);\n    for (let i = 0; i < keys.length; i++) {\n        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n    }\n    return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n    Object.defineProperty(target, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => {\n            const val = source[key];\n            if (isRef(val)) {\n                return val.value;\n            }\n            else {\n                const ob = val && val.__ob__;\n                if (ob)\n                    ob.dep.depend();\n                return val;\n            }\n        },\n        set: value => {\n            const oldValue = source[key];\n            if (isRef(oldValue) && !isRef(value)) {\n                oldValue.value = value;\n            }\n            else {\n                source[key] = value;\n            }\n        }\n    });\n}\nfunction customRef(factory) {\n    const dep = new Dep();\n    const { get, set } = factory(() => {\n        {\n            dep.depend({\n                target: ref,\n                type: \"get\" /* TrackOpTypes.GET */,\n                key: 'value'\n            });\n        }\n    }, () => {\n        {\n            dep.notify({\n                target: ref,\n                type: \"set\" /* TriggerOpTypes.SET */,\n                key: 'value'\n            });\n        }\n    });\n    const ref = {\n        get value() {\n            return get();\n        },\n        set value(newVal) {\n            set(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\nfunction toRefs(object) {\n    if (!isReactive(object)) {\n        warn(`toRefs() expects a reactive object but received a plain one.`);\n    }\n    const ret = isArray(object) ? new Array(object.length) : {};\n    for (const key in object) {\n        ret[key] = toRef(object, key);\n    }\n    return ret;\n}\nfunction toRef(object, key, defaultValue) {\n    const val = object[key];\n    if (isRef(val)) {\n        return val;\n    }\n    const ref = {\n        get value() {\n            const val = object[key];\n            return val === undefined ? defaultValue : val;\n        },\n        set value(newVal) {\n            object[key] = newVal;\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\n\nconst rawToReadonlyFlag = `__v_rawToReadonly`;\nconst rawToShallowReadonlyFlag = `__v_rawToShallowReadonly`;\nfunction readonly(target) {\n    return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n    if (!isPlainObject(target)) {\n        {\n            if (isArray(target)) {\n                warn(`Vue 2 does not support readonly arrays.`);\n            }\n            else if (isCollectionType(target)) {\n                warn(`Vue 2 does not support readonly collection types such as Map or Set.`);\n            }\n            else {\n                warn(`value cannot be made readonly: ${typeof target}`);\n            }\n        }\n        return target;\n    }\n    if (!Object.isExtensible(target)) {\n        warn(`Vue 2 does not support creating readonly proxy for non-extensible object.`);\n    }\n    // already a readonly object\n    if (isReadonly(target)) {\n        return target;\n    }\n    // already has a readonly proxy\n    const existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n    const existingProxy = target[existingFlag];\n    if (existingProxy) {\n        return existingProxy;\n    }\n    const proxy = Object.create(Object.getPrototypeOf(target));\n    def(target, existingFlag, proxy);\n    def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n    def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n    if (isRef(target)) {\n        def(proxy, RefFlag, true);\n    }\n    if (shallow || isShallow(target)) {\n        def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    }\n    const keys = Object.keys(target);\n    for (let i = 0; i < keys.length; i++) {\n        defineReadonlyProperty(proxy, target, keys[i], shallow);\n    }\n    return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            const val = target[key];\n            return shallow || !isPlainObject(val) ? val : readonly(val);\n        },\n        set() {\n            warn(`Set operation on key \"${key}\" failed: target is readonly.`);\n        }\n    });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n    return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n    let getter;\n    let setter;\n    const onlyGetter = isFunction(getterOrOptions);\n    if (onlyGetter) {\n        getter = getterOrOptions;\n        setter = () => {\n                warn('Write operation failed: computed value is readonly');\n            }\n            ;\n    }\n    else {\n        getter = getterOrOptions.get;\n        setter = getterOrOptions.set;\n    }\n    const watcher = isServerRendering()\n        ? null\n        : new Watcher(currentInstance, getter, noop, { lazy: true });\n    if (watcher && debugOptions) {\n        watcher.onTrack = debugOptions.onTrack;\n        watcher.onTrigger = debugOptions.onTrigger;\n    }\n    const ref = {\n        // some libs rely on the presence effect for checking computed refs\n        // from normal refs, but the implementation doesn't matter\n        effect: watcher,\n        get value() {\n            if (watcher) {\n                if (watcher.dirty) {\n                    watcher.evaluate();\n                }\n                if (Dep.target) {\n                    if (Dep.target.onTrack) {\n                        Dep.target.onTrack({\n                            effect: Dep.target,\n                            target: ref,\n                            type: \"get\" /* TrackOpTypes.GET */,\n                            key: 'value'\n                        });\n                    }\n                    watcher.depend();\n                }\n                return watcher.value;\n            }\n            else {\n                return getter();\n            }\n        },\n        set value(newVal) {\n            setter(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n    return ref;\n}\n\nconst WATCHER = `watcher`;\nconst WATCHER_CB = `${WATCHER} callback`;\nconst WATCHER_GETTER = `${WATCHER} getter`;\nconst WATCHER_CLEANUP = `${WATCHER} cleanup`;\n// Simple effect.\nfunction watchEffect(effect, options) {\n    return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));\n}\nfunction watchSyncEffect(effect, options) {\n    return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));\n}\n// initial value for watchers to trigger on undefined initial values\nconst INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n    if (typeof cb !== 'function') {\n        warn(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\n            `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\n            `supports \\`watch(source, cb, options?) signature.`);\n    }\n    return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush = 'pre', onTrack, onTrigger } = emptyObject) {\n    if (!cb) {\n        if (immediate !== undefined) {\n            warn(`watch() \"immediate\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n        if (deep !== undefined) {\n            warn(`watch() \"deep\" option is only respected when using the ` +\n                `watch(source, callback, options?) signature.`);\n        }\n    }\n    const warnInvalidSource = (s) => {\n        warn(`Invalid watch source: ${s}. A watch source can only be a getter/effect ` +\n            `function, a ref, a reactive object, or an array of these types.`);\n    };\n    const instance = currentInstance;\n    const call = (fn, type, args = null) => {\n        const res = invokeWithErrorHandling(fn, null, args, instance, type);\n        if (deep && res && res.__ob__)\n            res.__ob__.dep.depend();\n        return res;\n    };\n    let getter;\n    let forceTrigger = false;\n    let isMultiSource = false;\n    if (isRef(source)) {\n        getter = () => source.value;\n        forceTrigger = isShallow(source);\n    }\n    else if (isReactive(source)) {\n        getter = () => {\n            source.__ob__.dep.depend();\n            return source;\n        };\n        deep = true;\n    }\n    else if (isArray(source)) {\n        isMultiSource = true;\n        forceTrigger = source.some(s => isReactive(s) || isShallow(s));\n        getter = () => source.map(s => {\n            if (isRef(s)) {\n                return s.value;\n            }\n            else if (isReactive(s)) {\n                s.__ob__.dep.depend();\n                return traverse(s);\n            }\n            else if (isFunction(s)) {\n                return call(s, WATCHER_GETTER);\n            }\n            else {\n                warnInvalidSource(s);\n            }\n        });\n    }\n    else if (isFunction(source)) {\n        if (cb) {\n            // getter with cb\n            getter = () => call(source, WATCHER_GETTER);\n        }\n        else {\n            // no cb -> simple effect\n            getter = () => {\n                if (instance && instance._isDestroyed) {\n                    return;\n                }\n                if (cleanup) {\n                    cleanup();\n                }\n                return call(source, WATCHER, [onCleanup]);\n            };\n        }\n    }\n    else {\n        getter = noop;\n        warnInvalidSource(source);\n    }\n    if (cb && deep) {\n        const baseGetter = getter;\n        getter = () => traverse(baseGetter());\n    }\n    let cleanup;\n    let onCleanup = (fn) => {\n        cleanup = watcher.onStop = () => {\n            call(fn, WATCHER_CLEANUP);\n        };\n    };\n    // in SSR there is no need to setup an actual effect, and it should be noop\n    // unless it's eager\n    if (isServerRendering()) {\n        // we will also not call the invalidate callback (+ runner is not set up)\n        onCleanup = noop;\n        if (!cb) {\n            getter();\n        }\n        else if (immediate) {\n            call(cb, WATCHER_CB, [\n                getter(),\n                isMultiSource ? [] : undefined,\n                onCleanup\n            ]);\n        }\n        return noop;\n    }\n    const watcher = new Watcher(currentInstance, getter, noop, {\n        lazy: true\n    });\n    watcher.noRecurse = !cb;\n    let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n    // overwrite default run\n    watcher.run = () => {\n        if (!watcher.active) {\n            return;\n        }\n        if (cb) {\n            // watch(source, cb)\n            const newValue = watcher.get();\n            if (deep ||\n                forceTrigger ||\n                (isMultiSource\n                    ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\n                    : hasChanged(newValue, oldValue))) {\n                // cleanup before running cb again\n                if (cleanup) {\n                    cleanup();\n                }\n                call(cb, WATCHER_CB, [\n                    newValue,\n                    // pass undefined as the old value when it's changed for the first time\n                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                    onCleanup\n                ]);\n                oldValue = newValue;\n            }\n        }\n        else {\n            // watchEffect\n            watcher.get();\n        }\n    };\n    if (flush === 'sync') {\n        watcher.update = watcher.run;\n    }\n    else if (flush === 'post') {\n        watcher.post = true;\n        watcher.update = () => queueWatcher(watcher);\n    }\n    else {\n        // pre\n        watcher.update = () => {\n            if (instance && instance === currentInstance && !instance._isMounted) {\n                // pre-watcher triggered before\n                const buffer = instance._preWatchers || (instance._preWatchers = []);\n                if (buffer.indexOf(watcher) < 0)\n                    buffer.push(watcher);\n            }\n            else {\n                queueWatcher(watcher);\n            }\n        };\n    }\n    {\n        watcher.onTrack = onTrack;\n        watcher.onTrigger = onTrigger;\n    }\n    // initial run\n    if (cb) {\n        if (immediate) {\n            watcher.run();\n        }\n        else {\n            oldValue = watcher.get();\n        }\n    }\n    else if (flush === 'post' && instance) {\n        instance.$once('hook:mounted', () => watcher.get());\n    }\n    else {\n        watcher.get();\n    }\n    return () => {\n        watcher.teardown();\n    };\n}\n\nlet activeEffectScope;\nclass EffectScope {\n    constructor(detached = false) {\n        this.detached = detached;\n        /**\n         * @internal\n         */\n        this.active = true;\n        /**\n         * @internal\n         */\n        this.effects = [];\n        /**\n         * @internal\n         */\n        this.cleanups = [];\n        this.parent = activeEffectScope;\n        if (!detached && activeEffectScope) {\n            this.index =\n                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n        }\n    }\n    run(fn) {\n        if (this.active) {\n            const currentEffectScope = activeEffectScope;\n            try {\n                activeEffectScope = this;\n                return fn();\n            }\n            finally {\n                activeEffectScope = currentEffectScope;\n            }\n        }\n        else {\n            warn(`cannot run an inactive effect scope.`);\n        }\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    on() {\n        activeEffectScope = this;\n    }\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    off() {\n        activeEffectScope = this.parent;\n    }\n    stop(fromParent) {\n        if (this.active) {\n            let i, l;\n            for (i = 0, l = this.effects.length; i < l; i++) {\n                this.effects[i].teardown();\n            }\n            for (i = 0, l = this.cleanups.length; i < l; i++) {\n                this.cleanups[i]();\n            }\n            if (this.scopes) {\n                for (i = 0, l = this.scopes.length; i < l; i++) {\n                    this.scopes[i].stop(true);\n                }\n            }\n            // nested scope, dereference from parent to avoid memory leaks\n            if (!this.detached && this.parent && !fromParent) {\n                // optimized O(1) removal\n                const last = this.parent.scopes.pop();\n                if (last && last !== this) {\n                    this.parent.scopes[this.index] = last;\n                    last.index = this.index;\n                }\n            }\n            this.parent = undefined;\n            this.active = false;\n        }\n    }\n}\nfunction effectScope(detached) {\n    return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n    if (scope && scope.active) {\n        scope.effects.push(effect);\n    }\n}\nfunction getCurrentScope() {\n    return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n    if (activeEffectScope) {\n        activeEffectScope.cleanups.push(fn);\n    }\n    else {\n        warn(`onScopeDispose() is called when there is no active effect scope` +\n            ` to be associated with.`);\n    }\n}\n\nfunction provide(key, value) {\n    if (!currentInstance) {\n        {\n            warn(`provide() can only be used inside setup().`);\n        }\n    }\n    else {\n        // TS doesn't allow symbol as index type\n        resolveProvided(currentInstance)[key] = value;\n    }\n}\nfunction resolveProvided(vm) {\n    // by default an instance inherits its parent's provides object\n    // but when it needs to provide values of its own, it creates its\n    // own provides object using parent provides object as prototype.\n    // this way in `inject` we can simply look up injections from direct\n    // parent and let the prototype chain do the work.\n    const existing = vm._provided;\n    const parentProvides = vm.$parent && vm.$parent._provided;\n    if (parentProvides === existing) {\n        return (vm._provided = Object.create(parentProvides));\n    }\n    else {\n        return existing;\n    }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n    // fallback to `currentRenderingInstance` so that this can be called in\n    // a functional component\n    const instance = currentInstance;\n    if (instance) {\n        // #2400\n        // to support `app.use` plugins,\n        // fallback to appContext's `provides` if the instance is at root\n        const provides = instance.$parent && instance.$parent._provided;\n        if (provides && key in provides) {\n            // TS doesn't allow symbol as index type\n            return provides[key];\n        }\n        else if (arguments.length > 1) {\n            return treatDefaultAsFactory && isFunction(defaultValue)\n                ? defaultValue.call(instance)\n                : defaultValue;\n        }\n        else {\n            warn(`injection \"${String(key)}\" not found.`);\n        }\n    }\n    else {\n        warn(`inject() can only be used inside setup() or functional components.`);\n    }\n}\n\nconst normalizeEvent = cached((name) => {\n    const passive = name.charAt(0) === '&';\n    name = passive ? name.slice(1) : name;\n    const once = name.charAt(0) === '~'; // Prefixed last, checked first\n    name = once ? name.slice(1) : name;\n    const capture = name.charAt(0) === '!';\n    name = capture ? name.slice(1) : name;\n    return {\n        name,\n        once,\n        capture,\n        passive\n    };\n});\nfunction createFnInvoker(fns, vm) {\n    function invoker() {\n        const fns = invoker.fns;\n        if (isArray(fns)) {\n            const cloned = fns.slice();\n            for (let i = 0; i < cloned.length; i++) {\n                invokeWithErrorHandling(cloned[i], null, arguments, vm, `v-on handler`);\n            }\n        }\n        else {\n            // return handler return value for single handlers\n            return invokeWithErrorHandling(fns, null, arguments, vm, `v-on handler`);\n        }\n    }\n    invoker.fns = fns;\n    return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n    let name, cur, old, event;\n    for (name in on) {\n        cur = on[name];\n        old = oldOn[name];\n        event = normalizeEvent(name);\n        if (isUndef(cur)) {\n            warn(`Invalid handler for event \"${event.name}\": got ` + String(cur), vm);\n        }\n        else if (isUndef(old)) {\n            if (isUndef(cur.fns)) {\n                cur = on[name] = createFnInvoker(cur, vm);\n            }\n            if (isTrue(event.once)) {\n                cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n            }\n            add(event.name, cur, event.capture, event.passive, event.params);\n        }\n        else if (cur !== old) {\n            old.fns = cur;\n            on[name] = old;\n        }\n    }\n    for (name in oldOn) {\n        if (isUndef(on[name])) {\n            event = normalizeEvent(name);\n            remove(event.name, oldOn[name], event.capture);\n        }\n    }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n    if (def instanceof VNode) {\n        def = def.data.hook || (def.data.hook = {});\n    }\n    let invoker;\n    const oldHook = def[hookKey];\n    function wrappedHook() {\n        hook.apply(this, arguments);\n        // important: remove merged hook to ensure it's called only once\n        // and prevent memory leak\n        remove$2(invoker.fns, wrappedHook);\n    }\n    if (isUndef(oldHook)) {\n        // no existing hook\n        invoker = createFnInvoker([wrappedHook]);\n    }\n    else {\n        /* istanbul ignore if */\n        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n            // already a merged invoker\n            invoker = oldHook;\n            invoker.fns.push(wrappedHook);\n        }\n        else {\n            // existing plain hook\n            invoker = createFnInvoker([oldHook, wrappedHook]);\n        }\n    }\n    invoker.merged = true;\n    def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n    // we are only extracting raw values here.\n    // validation and default values are handled in the child\n    // component itself.\n    const propOptions = Ctor.options.props;\n    if (isUndef(propOptions)) {\n        return;\n    }\n    const res = {};\n    const { attrs, props } = data;\n    if (isDef(attrs) || isDef(props)) {\n        for (const key in propOptions) {\n            const altKey = hyphenate(key);\n            {\n                const keyInLowerCase = key.toLowerCase();\n                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                    tip(`Prop \"${keyInLowerCase}\" is passed to component ` +\n                        `${formatComponentName(\n                        // @ts-expect-error tag is string\n                        tag || Ctor)}, but the declared prop name is` +\n                        ` \"${key}\". ` +\n                        `Note that HTML attributes are case-insensitive and camelCased ` +\n                        `props need to use their kebab-case equivalents when using in-DOM ` +\n                        `templates. You should probably use \"${altKey}\" instead of \"${key}\".`);\n                }\n            }\n            checkProp(res, props, key, altKey, true) ||\n                checkProp(res, attrs, key, altKey, false);\n        }\n    }\n    return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n    if (isDef(hash)) {\n        if (hasOwn(hash, key)) {\n            res[key] = hash[key];\n            if (!preserve) {\n                delete hash[key];\n            }\n            return true;\n        }\n        else if (hasOwn(hash, altKey)) {\n            res[key] = hash[altKey];\n            if (!preserve) {\n                delete hash[altKey];\n            }\n            return true;\n        }\n    }\n    return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n    for (let i = 0; i < children.length; i++) {\n        if (isArray(children[i])) {\n            return Array.prototype.concat.apply([], children);\n        }\n    }\n    return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren(children) {\n    return isPrimitive(children)\n        ? [createTextVNode(children)]\n        : isArray(children)\n            ? normalizeArrayChildren(children)\n            : undefined;\n}\nfunction isTextNode(node) {\n    return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n}\nfunction normalizeArrayChildren(children, nestedIndex) {\n    const res = [];\n    let i, c, lastIndex, last;\n    for (i = 0; i < children.length; i++) {\n        c = children[i];\n        if (isUndef(c) || typeof c === 'boolean')\n            continue;\n        lastIndex = res.length - 1;\n        last = res[lastIndex];\n        //  nested\n        if (isArray(c)) {\n            if (c.length > 0) {\n                c = normalizeArrayChildren(c, `${nestedIndex || ''}_${i}`);\n                // merge adjacent text nodes\n                if (isTextNode(c[0]) && isTextNode(last)) {\n                    res[lastIndex] = createTextVNode(last.text + c[0].text);\n                    c.shift();\n                }\n                res.push.apply(res, c);\n            }\n        }\n        else if (isPrimitive(c)) {\n            if (isTextNode(last)) {\n                // merge adjacent text nodes\n                // this is necessary for SSR hydration because text nodes are\n                // essentially merged when rendered to HTML strings\n                res[lastIndex] = createTextVNode(last.text + c);\n            }\n            else if (c !== '') {\n                // convert primitive to vnode\n                res.push(createTextVNode(c));\n            }\n        }\n        else {\n            if (isTextNode(c) && isTextNode(last)) {\n                // merge adjacent text nodes\n                res[lastIndex] = createTextVNode(last.text + c.text);\n            }\n            else {\n                // default key for nested array children (likely generated by v-for)\n                if (isTrue(children._isVList) &&\n                    isDef(c.tag) &&\n                    isUndef(c.key) &&\n                    isDef(nestedIndex)) {\n                    c.key = `__vlist${nestedIndex}_${i}__`;\n                }\n                res.push(c);\n            }\n        }\n    }\n    return res;\n}\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList(val, render) {\n    let ret = null, i, l, keys, key;\n    if (isArray(val) || typeof val === 'string') {\n        ret = new Array(val.length);\n        for (i = 0, l = val.length; i < l; i++) {\n            ret[i] = render(val[i], i);\n        }\n    }\n    else if (typeof val === 'number') {\n        ret = new Array(val);\n        for (i = 0; i < val; i++) {\n            ret[i] = render(i + 1, i);\n        }\n    }\n    else if (isObject(val)) {\n        if (hasSymbol && val[Symbol.iterator]) {\n            ret = [];\n            const iterator = val[Symbol.iterator]();\n            let result = iterator.next();\n            while (!result.done) {\n                ret.push(render(result.value, ret.length));\n                result = iterator.next();\n            }\n        }\n        else {\n            keys = Object.keys(val);\n            ret = new Array(keys.length);\n            for (i = 0, l = keys.length; i < l; i++) {\n                key = keys[i];\n                ret[i] = render(val[key], key, i);\n            }\n        }\n    }\n    if (!isDef(ret)) {\n        ret = [];\n    }\n    ret._isVList = true;\n    return ret;\n}\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot(name, fallbackRender, props, bindObject) {\n    const scopedSlotFn = this.$scopedSlots[name];\n    let nodes;\n    if (scopedSlotFn) {\n        // scoped slot\n        props = props || {};\n        if (bindObject) {\n            if (!isObject(bindObject)) {\n                warn('slot v-bind without argument expects an Object', this);\n            }\n            props = extend(extend({}, bindObject), props);\n        }\n        nodes =\n            scopedSlotFn(props) ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    else {\n        nodes =\n            this.$slots[name] ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    const target = props && props.slot;\n    if (target) {\n        return this.$createElement('template', { slot: target }, nodes);\n    }\n    else {\n        return nodes;\n    }\n}\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter(id) {\n    return resolveAsset(this.$options, 'filters', id, true) || identity;\n}\n\nfunction isKeyNotMatch(expect, actual) {\n    if (isArray(expect)) {\n        return expect.indexOf(actual) === -1;\n    }\n    else {\n        return expect !== actual;\n    }\n}\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n    const mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n        return isKeyNotMatch(builtInKeyName, eventKeyName);\n    }\n    else if (mappedKeyCode) {\n        return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n    }\n    else if (eventKeyName) {\n        return hyphenate(eventKeyName) !== key;\n    }\n    return eventKeyCode === undefined;\n}\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps(data, tag, value, asProp, isSync) {\n    if (value) {\n        if (!isObject(value)) {\n            warn('v-bind without argument expects an Object or Array value', this);\n        }\n        else {\n            if (isArray(value)) {\n                value = toObject(value);\n            }\n            let hash;\n            for (const key in value) {\n                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                    hash = data;\n                }\n                else {\n                    const type = data.attrs && data.attrs.type;\n                    hash =\n                        asProp || config.mustUseProp(tag, type, key)\n                            ? data.domProps || (data.domProps = {})\n                            : data.attrs || (data.attrs = {});\n                }\n                const camelizedKey = camelize(key);\n                const hyphenatedKey = hyphenate(key);\n                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                    hash[key] = value[key];\n                    if (isSync) {\n                        const on = data.on || (data.on = {});\n                        on[`update:${key}`] = function ($event) {\n                            value[key] = $event;\n                        };\n                    }\n                }\n            }\n        }\n    }\n    return data;\n}\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic(index, isInFor) {\n    const cached = this._staticTrees || (this._staticTrees = []);\n    let tree = cached[index];\n    // if has already-rendered static tree and not inside v-for,\n    // we can reuse the same tree.\n    if (tree && !isInFor) {\n        return tree;\n    }\n    // otherwise, render a fresh tree.\n    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n    );\n    markStatic(tree, `__static__${index}`, false);\n    return tree;\n}\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce(tree, index, key) {\n    markStatic(tree, `__once__${index}${key ? `_${key}` : ``}`, true);\n    return tree;\n}\nfunction markStatic(tree, key, isOnce) {\n    if (isArray(tree)) {\n        for (let i = 0; i < tree.length; i++) {\n            if (tree[i] && typeof tree[i] !== 'string') {\n                markStaticNode(tree[i], `${key}_${i}`, isOnce);\n            }\n        }\n    }\n    else {\n        markStaticNode(tree, key, isOnce);\n    }\n}\nfunction markStaticNode(node, key, isOnce) {\n    node.isStatic = true;\n    node.key = key;\n    node.isOnce = isOnce;\n}\n\nfunction bindObjectListeners(data, value) {\n    if (value) {\n        if (!isPlainObject(value)) {\n            warn('v-on without argument expects an Object value', this);\n        }\n        else {\n            const on = (data.on = data.on ? extend({}, data.on) : {});\n            for (const key in value) {\n                const existing = on[key];\n                const ours = value[key];\n                on[key] = existing ? [].concat(existing, ours) : ours;\n            }\n        }\n    }\n    return data;\n}\n\nfunction resolveScopedSlots(fns, res, \n// the following are added in 2.6\nhasDynamicKeys, contentHashKey) {\n    res = res || { $stable: !hasDynamicKeys };\n    for (let i = 0; i < fns.length; i++) {\n        const slot = fns[i];\n        if (isArray(slot)) {\n            resolveScopedSlots(slot, res, hasDynamicKeys);\n        }\n        else if (slot) {\n            // marker for reverse proxying v-slot without scope on this.$slots\n            // @ts-expect-error\n            if (slot.proxy) {\n                // @ts-expect-error\n                slot.fn.proxy = true;\n            }\n            res[slot.key] = slot.fn;\n        }\n    }\n    if (contentHashKey) {\n        res.$key = contentHashKey;\n    }\n    return res;\n}\n\n// helper to process dynamic keys for dynamic arguments in v-bind and v-on.\nfunction bindDynamicKeys(baseObj, values) {\n    for (let i = 0; i < values.length; i += 2) {\n        const key = values[i];\n        if (typeof key === 'string' && key) {\n            baseObj[values[i]] = values[i + 1];\n        }\n        else if (key !== '' && key !== null) {\n            // null is a special value for explicitly removing a binding\n            warn(`Invalid value for dynamic directive argument (expected string or null): ${key}`, this);\n        }\n    }\n    return baseObj;\n}\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier(value, symbol) {\n    return typeof value === 'string' ? symbol + value : value;\n}\n\nfunction installRenderHelpers(target) {\n    target._o = markOnce;\n    target._n = toNumber;\n    target._s = toString;\n    target._l = renderList;\n    target._t = renderSlot;\n    target._q = looseEqual;\n    target._i = looseIndexOf;\n    target._m = renderStatic;\n    target._f = resolveFilter;\n    target._k = checkKeyCodes;\n    target._b = bindObjectProps;\n    target._v = createTextVNode;\n    target._e = createEmptyVNode;\n    target._u = resolveScopedSlots;\n    target._g = bindObjectListeners;\n    target._d = bindDynamicKeys;\n    target._p = prependModifier;\n}\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots(children, context) {\n    if (!children || !children.length) {\n        return {};\n    }\n    const slots = {};\n    for (let i = 0, l = children.length; i < l; i++) {\n        const child = children[i];\n        const data = child.data;\n        // remove slot attribute if the node is resolved as a Vue slot node\n        if (data && data.attrs && data.attrs.slot) {\n            delete data.attrs.slot;\n        }\n        // named slots should only be respected if the vnode was rendered in the\n        // same context.\n        if ((child.context === context || child.fnContext === context) &&\n            data &&\n            data.slot != null) {\n            const name = data.slot;\n            const slot = slots[name] || (slots[name] = []);\n            if (child.tag === 'template') {\n                slot.push.apply(slot, child.children || []);\n            }\n            else {\n                slot.push(child);\n            }\n        }\n        else {\n            (slots.default || (slots.default = [])).push(child);\n        }\n    }\n    // ignore slots that contains only whitespace\n    for (const name in slots) {\n        if (slots[name].every(isWhitespace)) {\n            delete slots[name];\n        }\n    }\n    return slots;\n}\nfunction isWhitespace(node) {\n    return (node.isComment && !node.asyncFactory) || node.text === ' ';\n}\n\nfunction isAsyncPlaceholder(node) {\n    // @ts-expect-error not really boolean type\n    return node.isComment && node.asyncFactory;\n}\n\nfunction normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n    let res;\n    const hasNormalSlots = Object.keys(normalSlots).length > 0;\n    const isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n    const key = scopedSlots && scopedSlots.$key;\n    if (!scopedSlots) {\n        res = {};\n    }\n    else if (scopedSlots._normalized) {\n        // fast path 1: child component re-render only, parent did not change\n        return scopedSlots._normalized;\n    }\n    else if (isStable &&\n        prevScopedSlots &&\n        prevScopedSlots !== emptyObject &&\n        key === prevScopedSlots.$key &&\n        !hasNormalSlots &&\n        !prevScopedSlots.$hasNormal) {\n        // fast path 2: stable scoped slots w/ no normal slots to proxy,\n        // only need to normalize once\n        return prevScopedSlots;\n    }\n    else {\n        res = {};\n        for (const key in scopedSlots) {\n            if (scopedSlots[key] && key[0] !== '$') {\n                res[key] = normalizeScopedSlot(ownerVm, normalSlots, key, scopedSlots[key]);\n            }\n        }\n    }\n    // expose normal slots on scopedSlots\n    for (const key in normalSlots) {\n        if (!(key in res)) {\n            res[key] = proxyNormalSlot(normalSlots, key);\n        }\n    }\n    // avoriaz seems to mock a non-extensible $scopedSlots object\n    // and when that is passed down this would cause an error\n    if (scopedSlots && Object.isExtensible(scopedSlots)) {\n        scopedSlots._normalized = res;\n    }\n    def(res, '$stable', isStable);\n    def(res, '$key', key);\n    def(res, '$hasNormal', hasNormalSlots);\n    return res;\n}\nfunction normalizeScopedSlot(vm, normalSlots, key, fn) {\n    const normalized = function () {\n        const cur = currentInstance;\n        setCurrentInstance(vm);\n        let res = arguments.length ? fn.apply(null, arguments) : fn({});\n        res =\n            res && typeof res === 'object' && !isArray(res)\n                ? [res] // single vnode\n                : normalizeChildren(res);\n        const vnode = res && res[0];\n        setCurrentInstance(cur);\n        return res &&\n            (!vnode ||\n                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n            ? undefined\n            : res;\n    };\n    // this is a slot using the new v-slot syntax without scope. although it is\n    // compiled as a scoped slot, render fn users would expect it to be present\n    // on this.$slots because the usage is semantically a normal slot.\n    if (fn.proxy) {\n        Object.defineProperty(normalSlots, key, {\n            get: normalized,\n            enumerable: true,\n            configurable: true\n        });\n    }\n    return normalized;\n}\nfunction proxyNormalSlot(slots, key) {\n    return () => slots[key];\n}\n\nfunction initSetup(vm) {\n    const options = vm.$options;\n    const setup = options.setup;\n    if (setup) {\n        const ctx = (vm._setupContext = createSetupContext(vm));\n        setCurrentInstance(vm);\n        pushTarget();\n        const setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, `setup`);\n        popTarget();\n        setCurrentInstance();\n        if (isFunction(setupResult)) {\n            // render function\n            // @ts-ignore\n            options.render = setupResult;\n        }\n        else if (isObject(setupResult)) {\n            // bindings\n            if (setupResult instanceof VNode) {\n                warn(`setup() should not return VNodes directly - ` +\n                    `return a render function instead.`);\n            }\n            vm._setupState = setupResult;\n            // __sfc indicates compiled bindings from <script setup>\n            if (!setupResult.__sfc) {\n                for (const key in setupResult) {\n                    if (!isReserved(key)) {\n                        proxyWithRefUnwrap(vm, setupResult, key);\n                    }\n                    else {\n                        warn(`Avoid using variables that start with _ or $ in setup().`);\n                    }\n                }\n            }\n            else {\n                // exposed for compiled render fn\n                const proxy = (vm._setupProxy = {});\n                for (const key in setupResult) {\n                    if (key !== '__sfc') {\n                        proxyWithRefUnwrap(proxy, setupResult, key);\n                    }\n                }\n            }\n        }\n        else if (setupResult !== undefined) {\n            warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);\n        }\n    }\n}\nfunction createSetupContext(vm) {\n    let exposeCalled = false;\n    return {\n        get attrs() {\n            if (!vm._attrsProxy) {\n                const proxy = (vm._attrsProxy = {});\n                def(proxy, '_v_attr_proxy', true);\n                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n            }\n            return vm._attrsProxy;\n        },\n        get listeners() {\n            if (!vm._listenersProxy) {\n                const proxy = (vm._listenersProxy = {});\n                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n            }\n            return vm._listenersProxy;\n        },\n        get slots() {\n            return initSlotsProxy(vm);\n        },\n        emit: bind(vm.$emit, vm),\n        expose(exposed) {\n            {\n                if (exposeCalled) {\n                    warn(`expose() should be called only once per setup().`, vm);\n                }\n                exposeCalled = true;\n            }\n            if (exposed) {\n                Object.keys(exposed).forEach(key => proxyWithRefUnwrap(vm, exposed, key));\n            }\n        }\n    };\n}\nfunction syncSetupProxy(to, from, prev, instance, type) {\n    let changed = false;\n    for (const key in from) {\n        if (!(key in to)) {\n            changed = true;\n            defineProxyAttr(to, key, instance, type);\n        }\n        else if (from[key] !== prev[key]) {\n            changed = true;\n        }\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            changed = true;\n            delete to[key];\n        }\n    }\n    return changed;\n}\nfunction defineProxyAttr(proxy, key, instance, type) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get() {\n            return instance[type][key];\n        }\n    });\n}\nfunction initSlotsProxy(vm) {\n    if (!vm._slotsProxy) {\n        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n    }\n    return vm._slotsProxy;\n}\nfunction syncSetupSlots(to, from) {\n    for (const key in from) {\n        to[key] = from[key];\n    }\n    for (const key in to) {\n        if (!(key in from)) {\n            delete to[key];\n        }\n    }\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useSlots() {\n    return getContext().slots;\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useAttrs() {\n    return getContext().attrs;\n}\n/**\n * Vue 2 only\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useListeners() {\n    return getContext().listeners;\n}\nfunction getContext() {\n    if (!currentInstance) {\n        warn(`useContext() called without active instance.`);\n    }\n    const vm = currentInstance;\n    return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n}\n/**\n * Runtime helper for merging default declarations. Imported by compiled code\n * only.\n * @internal\n */\nfunction mergeDefaults(raw, defaults) {\n    const props = isArray(raw)\n        ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})\n        : raw;\n    for (const key in defaults) {\n        const opt = props[key];\n        if (opt) {\n            if (isArray(opt) || isFunction(opt)) {\n                props[key] = { type: opt, default: defaults[key] };\n            }\n            else {\n                opt.default = defaults[key];\n            }\n        }\n        else if (opt === null) {\n            props[key] = { default: defaults[key] };\n        }\n        else {\n            warn(`props default key \"${key}\" has no corresponding declaration.`);\n        }\n    }\n    return props;\n}\n\nfunction initRender(vm) {\n    vm._vnode = null; // the root of the child tree\n    vm._staticTrees = null; // v-once cached trees\n    const options = vm.$options;\n    const parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n    const renderContext = parentVnode && parentVnode.context;\n    vm.$slots = resolveSlots(options._renderChildren, renderContext);\n    vm.$scopedSlots = parentVnode\n        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n        : emptyObject;\n    // bind the createElement fn to this instance\n    // so that we get proper render context inside it.\n    // args order: tag, data, children, normalizationType, alwaysNormalize\n    // internal version is used by render functions compiled from templates\n    // @ts-expect-error\n    vm._c = (a, b, c, d) => createElement$1(vm, a, b, c, d, false);\n    // normalization is always applied for the public version, used in\n    // user-written render functions.\n    // @ts-expect-error\n    vm.$createElement = (a, b, c, d) => createElement$1(vm, a, b, c, d, true);\n    // $attrs & $listeners are exposed for easier HOC creation.\n    // they need to be reactive so that HOCs using them are always updated\n    const parentData = parentVnode && parentVnode.data;\n    /* istanbul ignore else */\n    {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, () => {\n            !isUpdatingChildComponent && warn(`$attrs is readonly.`, vm);\n        }, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, () => {\n            !isUpdatingChildComponent && warn(`$listeners is readonly.`, vm);\n        }, true);\n    }\n}\nlet currentRenderingInstance = null;\nfunction renderMixin(Vue) {\n    // install runtime convenience helpers\n    installRenderHelpers(Vue.prototype);\n    Vue.prototype.$nextTick = function (fn) {\n        return nextTick(fn, this);\n    };\n    Vue.prototype._render = function () {\n        const vm = this;\n        const { render, _parentVnode } = vm.$options;\n        if (_parentVnode && vm._isMounted) {\n            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n            if (vm._slotsProxy) {\n                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n            }\n        }\n        // set parent vnode. this allows render functions to have access\n        // to the data on the placeholder node.\n        vm.$vnode = _parentVnode;\n        // render self\n        const prevInst = currentInstance;\n        const prevRenderInst = currentRenderingInstance;\n        let vnode;\n        try {\n            setCurrentInstance(vm);\n            currentRenderingInstance = vm;\n            vnode = render.call(vm._renderProxy, vm.$createElement);\n        }\n        catch (e) {\n            handleError(e, vm, `render`);\n            // return error render result,\n            // or previous vnode to prevent render error causing blank component\n            /* istanbul ignore else */\n            if (vm.$options.renderError) {\n                try {\n                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                }\n                catch (e) {\n                    handleError(e, vm, `renderError`);\n                    vnode = vm._vnode;\n                }\n            }\n            else {\n                vnode = vm._vnode;\n            }\n        }\n        finally {\n            currentRenderingInstance = prevRenderInst;\n            setCurrentInstance(prevInst);\n        }\n        // if the returned array contains only a single node, allow it\n        if (isArray(vnode) && vnode.length === 1) {\n            vnode = vnode[0];\n        }\n        // return empty vnode in case the render function errored out\n        if (!(vnode instanceof VNode)) {\n            if (isArray(vnode)) {\n                warn('Multiple root nodes returned from render function. Render function ' +\n                    'should return a single root node.', vm);\n            }\n            vnode = createEmptyVNode();\n        }\n        // set parent\n        vnode.parent = _parentVnode;\n        return vnode;\n    };\n}\n\nfunction ensureCtor(comp, base) {\n    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n        comp = comp.default;\n    }\n    return isObject(comp) ? base.extend(comp) : comp;\n}\nfunction createAsyncPlaceholder(factory, data, context, children, tag) {\n    const node = createEmptyVNode();\n    node.asyncFactory = factory;\n    node.asyncMeta = { data, context, children, tag };\n    return node;\n}\nfunction resolveAsyncComponent(factory, baseCtor) {\n    if (isTrue(factory.error) && isDef(factory.errorComp)) {\n        return factory.errorComp;\n    }\n    if (isDef(factory.resolved)) {\n        return factory.resolved;\n    }\n    const owner = currentRenderingInstance;\n    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n        // already pending\n        factory.owners.push(owner);\n    }\n    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n        return factory.loadingComp;\n    }\n    if (owner && !isDef(factory.owners)) {\n        const owners = (factory.owners = [owner]);\n        let sync = true;\n        let timerLoading = null;\n        let timerTimeout = null;\n        owner.$on('hook:destroyed', () => remove$2(owners, owner));\n        const forceRender = (renderCompleted) => {\n            for (let i = 0, l = owners.length; i < l; i++) {\n                owners[i].$forceUpdate();\n            }\n            if (renderCompleted) {\n                owners.length = 0;\n                if (timerLoading !== null) {\n                    clearTimeout(timerLoading);\n                    timerLoading = null;\n                }\n                if (timerTimeout !== null) {\n                    clearTimeout(timerTimeout);\n                    timerTimeout = null;\n                }\n            }\n        };\n        const resolve = once((res) => {\n            // cache resolved\n            factory.resolved = ensureCtor(res, baseCtor);\n            // invoke callbacks only if this is not a synchronous resolve\n            // (async resolves are shimmed as synchronous during SSR)\n            if (!sync) {\n                forceRender(true);\n            }\n            else {\n                owners.length = 0;\n            }\n        });\n        const reject = once(reason => {\n            warn(`Failed to resolve async component: ${String(factory)}` +\n                    (reason ? `\\nReason: ${reason}` : ''));\n            if (isDef(factory.errorComp)) {\n                factory.error = true;\n                forceRender(true);\n            }\n        });\n        const res = factory(resolve, reject);\n        if (isObject(res)) {\n            if (isPromise(res)) {\n                // () => Promise\n                if (isUndef(factory.resolved)) {\n                    res.then(resolve, reject);\n                }\n            }\n            else if (isPromise(res.component)) {\n                res.component.then(resolve, reject);\n                if (isDef(res.error)) {\n                    factory.errorComp = ensureCtor(res.error, baseCtor);\n                }\n                if (isDef(res.loading)) {\n                    factory.loadingComp = ensureCtor(res.loading, baseCtor);\n                    if (res.delay === 0) {\n                        factory.loading = true;\n                    }\n                    else {\n                        // @ts-expect-error NodeJS timeout type\n                        timerLoading = setTimeout(() => {\n                            timerLoading = null;\n                            if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                factory.loading = true;\n                                forceRender(false);\n                            }\n                        }, res.delay || 200);\n                    }\n                }\n                if (isDef(res.timeout)) {\n                    // @ts-expect-error NodeJS timeout type\n                    timerTimeout = setTimeout(() => {\n                        timerTimeout = null;\n                        if (isUndef(factory.resolved)) {\n                            reject(`timeout (${res.timeout}ms)` );\n                        }\n                    }, res.timeout);\n                }\n            }\n        }\n        sync = false;\n        // return in case resolved synchronously\n        return factory.loading ? factory.loadingComp : factory.resolved;\n    }\n}\n\nfunction getFirstComponentChild(children) {\n    if (isArray(children)) {\n        for (let i = 0; i < children.length; i++) {\n            const c = children[i];\n            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                return c;\n            }\n        }\n    }\n}\n\nconst SIMPLE_NORMALIZE = 1;\nconst ALWAYS_NORMALIZE = 2;\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n    if (isArray(data) || isPrimitive(data)) {\n        normalizationType = children;\n        children = data;\n        data = undefined;\n    }\n    if (isTrue(alwaysNormalize)) {\n        normalizationType = ALWAYS_NORMALIZE;\n    }\n    return _createElement(context, tag, data, children, normalizationType);\n}\nfunction _createElement(context, tag, data, children, normalizationType) {\n    if (isDef(data) && isDef(data.__ob__)) {\n        warn(`Avoid using observed data object as vnode data: ${JSON.stringify(data)}\\n` + 'Always create fresh vnode data objects in each render!', context);\n        return createEmptyVNode();\n    }\n    // object syntax in v-bind\n    if (isDef(data) && isDef(data.is)) {\n        tag = data.is;\n    }\n    if (!tag) {\n        // in case of component :is set to falsy value\n        return createEmptyVNode();\n    }\n    // warn against non-primitive key\n    if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n        warn('Avoid using non-primitive value as key, ' +\n            'use string/number value instead.', context);\n    }\n    // support single function children as default scoped slot\n    if (isArray(children) && isFunction(children[0])) {\n        data = data || {};\n        data.scopedSlots = { default: children[0] };\n        children.length = 0;\n    }\n    if (normalizationType === ALWAYS_NORMALIZE) {\n        children = normalizeChildren(children);\n    }\n    else if (normalizationType === SIMPLE_NORMALIZE) {\n        children = simpleNormalizeChildren(children);\n    }\n    let vnode, ns;\n    if (typeof tag === 'string') {\n        let Ctor;\n        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n        if (config.isReservedTag(tag)) {\n            // platform built-in elements\n            if (isDef(data) &&\n                isDef(data.nativeOn) &&\n                data.tag !== 'component') {\n                warn(`The .native modifier for v-on is only valid on components but it was used on <${tag}>.`, context);\n            }\n            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n        }\n        else if ((!data || !data.pre) &&\n            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n            // component\n            vnode = createComponent(Ctor, data, context, children, tag);\n        }\n        else {\n            // unknown or unlisted namespaced elements\n            // check at runtime because it may get assigned a namespace when its\n            // parent normalizes children\n            vnode = new VNode(tag, data, children, undefined, undefined, context);\n        }\n    }\n    else {\n        // direct component options / constructor\n        vnode = createComponent(tag, data, context, children);\n    }\n    if (isArray(vnode)) {\n        return vnode;\n    }\n    else if (isDef(vnode)) {\n        if (isDef(ns))\n            applyNS(vnode, ns);\n        if (isDef(data))\n            registerDeepBindings(data);\n        return vnode;\n    }\n    else {\n        return createEmptyVNode();\n    }\n}\nfunction applyNS(vnode, ns, force) {\n    vnode.ns = ns;\n    if (vnode.tag === 'foreignObject') {\n        // use default namespace inside foreignObject\n        ns = undefined;\n        force = true;\n    }\n    if (isDef(vnode.children)) {\n        for (let i = 0, l = vnode.children.length; i < l; i++) {\n            const child = vnode.children[i];\n            if (isDef(child.tag) &&\n                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                applyNS(child, ns, force);\n            }\n        }\n    }\n}\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings(data) {\n    if (isObject(data.style)) {\n        traverse(data.style);\n    }\n    if (isObject(data.class)) {\n        traverse(data.class);\n    }\n}\n\n/**\n * @internal this function needs manual public type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction h(type, props, children) {\n    if (!currentInstance) {\n        warn(`globally imported h() can only be invoked when there is an active ` +\n                `component instance, e.g. synchronously in a component's render or setup function.`);\n    }\n    return createElement$1(currentInstance, type, props, children, 2, true);\n}\n\nfunction handleError(err, vm, info) {\n    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n    // See: https://github.com/vuejs/vuex/issues/1505\n    pushTarget();\n    try {\n        if (vm) {\n            let cur = vm;\n            while ((cur = cur.$parent)) {\n                const hooks = cur.$options.errorCaptured;\n                if (hooks) {\n                    for (let i = 0; i < hooks.length; i++) {\n                        try {\n                            const capture = hooks[i].call(cur, err, vm, info) === false;\n                            if (capture)\n                                return;\n                        }\n                        catch (e) {\n                            globalHandleError(e, cur, 'errorCaptured hook');\n                        }\n                    }\n                }\n            }\n        }\n        globalHandleError(err, vm, info);\n    }\n    finally {\n        popTarget();\n    }\n}\nfunction invokeWithErrorHandling(handler, context, args, vm, info) {\n    let res;\n    try {\n        res = args ? handler.apply(context, args) : handler.call(context);\n        if (res && !res._isVue && isPromise(res) && !res._handled) {\n            res.catch(e => handleError(e, vm, info + ` (Promise/async)`));\n            res._handled = true;\n        }\n    }\n    catch (e) {\n        handleError(e, vm, info);\n    }\n    return res;\n}\nfunction globalHandleError(err, vm, info) {\n    if (config.errorHandler) {\n        try {\n            return config.errorHandler.call(null, err, vm, info);\n        }\n        catch (e) {\n            // if the user intentionally throws the original error in the handler,\n            // do not log it twice\n            if (e !== err) {\n                logError(e, null, 'config.errorHandler');\n            }\n        }\n    }\n    logError(err, vm, info);\n}\nfunction logError(err, vm, info) {\n    {\n        warn(`Error in ${info}: \"${err.toString()}\"`, vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n        console.error(err);\n    }\n    else {\n        throw err;\n    }\n}\n\n/* globals MutationObserver */\nlet isUsingMicroTask = false;\nconst callbacks = [];\nlet pending = false;\nfunction flushCallbacks() {\n    pending = false;\n    const copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (let i = 0; i < copies.length; i++) {\n        copies[i]();\n    }\n}\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nlet timerFunc;\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n    const p = Promise.resolve();\n    timerFunc = () => {\n        p.then(flushCallbacks);\n        // In problematic UIWebViews, Promise.then doesn't completely break, but\n        // it can get stuck in a weird state where callbacks are pushed into the\n        // microtask queue but the queue isn't being flushed, until the browser\n        // needs to do some other work, e.g. handle a timer. Therefore we can\n        // \"force\" the microtask queue to be flushed by adding an empty timer.\n        if (isIOS)\n            setTimeout(noop);\n    };\n    isUsingMicroTask = true;\n}\nelse if (!isIE &&\n    typeof MutationObserver !== 'undefined' &&\n    (isNative(MutationObserver) ||\n        // PhantomJS and iOS 7.x\n        MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n    // Use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS, iOS7, Android 4.4\n    // (#6466 MutationObserver is unreliable in IE11)\n    let counter = 1;\n    const observer = new MutationObserver(flushCallbacks);\n    const textNode = document.createTextNode(String(counter));\n    observer.observe(textNode, {\n        characterData: true\n    });\n    timerFunc = () => {\n        counter = (counter + 1) % 2;\n        textNode.data = String(counter);\n    };\n    isUsingMicroTask = true;\n}\nelse if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n    // Fallback to setImmediate.\n    // Technically it leverages the (macro) task queue,\n    // but it is still a better choice than setTimeout.\n    timerFunc = () => {\n        setImmediate(flushCallbacks);\n    };\n}\nelse {\n    // Fallback to setTimeout.\n    timerFunc = () => {\n        setTimeout(flushCallbacks, 0);\n    };\n}\n/**\n * @internal\n */\nfunction nextTick(cb, ctx) {\n    let _resolve;\n    callbacks.push(() => {\n        if (cb) {\n            try {\n                cb.call(ctx);\n            }\n            catch (e) {\n                handleError(e, ctx, 'nextTick');\n            }\n        }\n        else if (_resolve) {\n            _resolve(ctx);\n        }\n    });\n    if (!pending) {\n        pending = true;\n        timerFunc();\n    }\n    // $flow-disable-line\n    if (!cb && typeof Promise !== 'undefined') {\n        return new Promise(resolve => {\n            _resolve = resolve;\n        });\n    }\n}\n\nfunction useCssModule(name = '$style') {\n    /* istanbul ignore else */\n    {\n        if (!currentInstance) {\n            warn(`useCssModule must be called inside setup()`);\n            return emptyObject;\n        }\n        const mod = currentInstance[name];\n        if (!mod) {\n            warn(`Current instance does not have CSS module named \"${name}\".`);\n            return emptyObject;\n        }\n        return mod;\n    }\n}\n\n/**\n * Runtime helper for SFC's CSS variable injection feature.\n * @private\n */\nfunction useCssVars(getter) {\n    if (!inBrowser && !false)\n        return;\n    const instance = currentInstance;\n    if (!instance) {\n        warn(`useCssVars is called without current active component instance.`);\n        return;\n    }\n    watchPostEffect(() => {\n        const el = instance.$el;\n        const vars = getter(instance, instance._setupProxy);\n        if (el && el.nodeType === 1) {\n            const style = el.style;\n            for (const key in vars) {\n                style.setProperty(`--${key}`, vars[key]);\n            }\n        }\n    });\n}\n\n/**\n * v3-compatible async component API.\n * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n * because it relies on existing manual types\n */\nfunction defineAsyncComponent(source) {\n    if (isFunction(source)) {\n        source = { loader: source };\n    }\n    const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\n    suspensible = false, // in Vue 3 default is true\n    onError: userOnError } = source;\n    if (suspensible) {\n        warn(`The suspensible option for async components is not supported in Vue2. It is ignored.`);\n    }\n    let pendingRequest = null;\n    let retries = 0;\n    const retry = () => {\n        retries++;\n        pendingRequest = null;\n        return load();\n    };\n    const load = () => {\n        let thisRequest;\n        return (pendingRequest ||\n            (thisRequest = pendingRequest =\n                loader()\n                    .catch(err => {\n                    err = err instanceof Error ? err : new Error(String(err));\n                    if (userOnError) {\n                        return new Promise((resolve, reject) => {\n                            const userRetry = () => resolve(retry());\n                            const userFail = () => reject(err);\n                            userOnError(err, userRetry, userFail, retries + 1);\n                        });\n                    }\n                    else {\n                        throw err;\n                    }\n                })\n                    .then((comp) => {\n                    if (thisRequest !== pendingRequest && pendingRequest) {\n                        return pendingRequest;\n                    }\n                    if (!comp) {\n                        warn(`Async component loader resolved to undefined. ` +\n                            `If you are using retry(), make sure to return its return value.`);\n                    }\n                    // interop module default\n                    if (comp &&\n                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                        comp = comp.default;\n                    }\n                    if (comp && !isObject(comp) && !isFunction(comp)) {\n                        throw new Error(`Invalid async component load result: ${comp}`);\n                    }\n                    return comp;\n                })));\n    };\n    return () => {\n        const component = load();\n        return {\n            component,\n            delay,\n            timeout,\n            error: errorComponent,\n            loading: loadingComponent\n        };\n    };\n}\n\nfunction createLifeCycle(hookName) {\n    return (fn, target = currentInstance) => {\n        if (!target) {\n            warn(`${formatName(hookName)} is called when there is no active component instance to be ` +\n                    `associated with. ` +\n                    `Lifecycle injection APIs can only be used during execution of setup().`);\n            return;\n        }\n        return injectHook(target, hookName, fn);\n    };\n}\nfunction formatName(name) {\n    if (name === 'beforeDestroy') {\n        name = 'beforeUnmount';\n    }\n    else if (name === 'destroyed') {\n        name = 'unmounted';\n    }\n    return `on${name[0].toUpperCase() + name.slice(1)}`;\n}\nfunction injectHook(instance, hookName, fn) {\n    const options = instance.$options;\n    options[hookName] = mergeLifecycleHook(options[hookName], fn);\n}\nconst onBeforeMount = createLifeCycle('beforeMount');\nconst onMounted = createLifeCycle('mounted');\nconst onBeforeUpdate = createLifeCycle('beforeUpdate');\nconst onUpdated = createLifeCycle('updated');\nconst onBeforeUnmount = createLifeCycle('beforeDestroy');\nconst onUnmounted = createLifeCycle('destroyed');\nconst onActivated = createLifeCycle('activated');\nconst onDeactivated = createLifeCycle('deactivated');\nconst onServerPrefetch = createLifeCycle('serverPrefetch');\nconst onRenderTracked = createLifeCycle('renderTracked');\nconst onRenderTriggered = createLifeCycle('renderTriggered');\nconst injectErrorCapturedHook = createLifeCycle('errorCaptured');\nfunction onErrorCaptured(hook, target = currentInstance) {\n    injectErrorCapturedHook(hook, target);\n}\n\n/**\n * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n */\nconst version = '2.7.16';\n/**\n * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n */\nfunction defineComponent(options) {\n    return options;\n}\n\nvar vca = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  version: version,\n  defineComponent: defineComponent,\n  ref: ref$1,\n  shallowRef: shallowRef,\n  isRef: isRef,\n  toRef: toRef,\n  toRefs: toRefs,\n  unref: unref,\n  proxyRefs: proxyRefs,\n  customRef: customRef,\n  triggerRef: triggerRef,\n  reactive: reactive,\n  isReactive: isReactive,\n  isReadonly: isReadonly,\n  isShallow: isShallow,\n  isProxy: isProxy,\n  shallowReactive: shallowReactive,\n  markRaw: markRaw,\n  toRaw: toRaw,\n  readonly: readonly,\n  shallowReadonly: shallowReadonly,\n  computed: computed,\n  watch: watch,\n  watchEffect: watchEffect,\n  watchPostEffect: watchPostEffect,\n  watchSyncEffect: watchSyncEffect,\n  EffectScope: EffectScope,\n  effectScope: effectScope,\n  onScopeDispose: onScopeDispose,\n  getCurrentScope: getCurrentScope,\n  provide: provide,\n  inject: inject,\n  h: h,\n  getCurrentInstance: getCurrentInstance,\n  useSlots: useSlots,\n  useAttrs: useAttrs,\n  useListeners: useListeners,\n  mergeDefaults: mergeDefaults,\n  nextTick: nextTick,\n  set: set,\n  del: del,\n  useCssModule: useCssModule,\n  useCssVars: useCssVars,\n  defineAsyncComponent: defineAsyncComponent,\n  onBeforeMount: onBeforeMount,\n  onMounted: onMounted,\n  onBeforeUpdate: onBeforeUpdate,\n  onUpdated: onUpdated,\n  onBeforeUnmount: onBeforeUnmount,\n  onUnmounted: onUnmounted,\n  onActivated: onActivated,\n  onDeactivated: onDeactivated,\n  onServerPrefetch: onServerPrefetch,\n  onRenderTracked: onRenderTracked,\n  onRenderTriggered: onRenderTriggered,\n  onErrorCaptured: onErrorCaptured\n});\n\nconst seenObjects = new _Set();\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse(val) {\n    _traverse(val, seenObjects);\n    seenObjects.clear();\n    return val;\n}\nfunction _traverse(val, seen) {\n    let i, keys;\n    const isA = isArray(val);\n    if ((!isA && !isObject(val)) ||\n        val.__v_skip /* ReactiveFlags.SKIP */ ||\n        Object.isFrozen(val) ||\n        val instanceof VNode) {\n        return;\n    }\n    if (val.__ob__) {\n        const depId = val.__ob__.dep.id;\n        if (seen.has(depId)) {\n            return;\n        }\n        seen.add(depId);\n    }\n    if (isA) {\n        i = val.length;\n        while (i--)\n            _traverse(val[i], seen);\n    }\n    else if (isRef(val)) {\n        _traverse(val.value, seen);\n    }\n    else {\n        keys = Object.keys(val);\n        i = keys.length;\n        while (i--)\n            _traverse(val[keys[i]], seen);\n    }\n}\n\nlet uid$1 = 0;\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n * @internal\n */\nclass Watcher {\n    constructor(vm, expOrFn, cb, options, isRenderWatcher) {\n        recordEffectScope(this, \n        // if the active effect scope is manually created (not a component scope),\n        // prioritize it\n        activeEffectScope && !activeEffectScope._vm\n            ? activeEffectScope\n            : vm\n                ? vm._scope\n                : undefined);\n        if ((this.vm = vm) && isRenderWatcher) {\n            vm._watcher = this;\n        }\n        // options\n        if (options) {\n            this.deep = !!options.deep;\n            this.user = !!options.user;\n            this.lazy = !!options.lazy;\n            this.sync = !!options.sync;\n            this.before = options.before;\n            {\n                this.onTrack = options.onTrack;\n                this.onTrigger = options.onTrigger;\n            }\n        }\n        else {\n            this.deep = this.user = this.lazy = this.sync = false;\n        }\n        this.cb = cb;\n        this.id = ++uid$1; // uid for batching\n        this.active = true;\n        this.post = false;\n        this.dirty = this.lazy; // for lazy watchers\n        this.deps = [];\n        this.newDeps = [];\n        this.depIds = new _Set();\n        this.newDepIds = new _Set();\n        this.expression = expOrFn.toString() ;\n        // parse expression for getter\n        if (isFunction(expOrFn)) {\n            this.getter = expOrFn;\n        }\n        else {\n            this.getter = parsePath(expOrFn);\n            if (!this.getter) {\n                this.getter = noop;\n                warn(`Failed watching path: \"${expOrFn}\" ` +\n                        'Watcher only accepts simple dot-delimited paths. ' +\n                        'For full control, use a function instead.', vm);\n            }\n        }\n        this.value = this.lazy ? undefined : this.get();\n    }\n    /**\n     * Evaluate the getter, and re-collect dependencies.\n     */\n    get() {\n        pushTarget(this);\n        let value;\n        const vm = this.vm;\n        try {\n            value = this.getter.call(vm, vm);\n        }\n        catch (e) {\n            if (this.user) {\n                handleError(e, vm, `getter for watcher \"${this.expression}\"`);\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // \"touch\" every property so they are all tracked as\n            // dependencies for deep watching\n            if (this.deep) {\n                traverse(value);\n            }\n            popTarget();\n            this.cleanupDeps();\n        }\n        return value;\n    }\n    /**\n     * Add a dependency to this directive.\n     */\n    addDep(dep) {\n        const id = dep.id;\n        if (!this.newDepIds.has(id)) {\n            this.newDepIds.add(id);\n            this.newDeps.push(dep);\n            if (!this.depIds.has(id)) {\n                dep.addSub(this);\n            }\n        }\n    }\n    /**\n     * Clean up for dependency collection.\n     */\n    cleanupDeps() {\n        let i = this.deps.length;\n        while (i--) {\n            const dep = this.deps[i];\n            if (!this.newDepIds.has(dep.id)) {\n                dep.removeSub(this);\n            }\n        }\n        let tmp = this.depIds;\n        this.depIds = this.newDepIds;\n        this.newDepIds = tmp;\n        this.newDepIds.clear();\n        tmp = this.deps;\n        this.deps = this.newDeps;\n        this.newDeps = tmp;\n        this.newDeps.length = 0;\n    }\n    /**\n     * Subscriber interface.\n     * Will be called when a dependency changes.\n     */\n    update() {\n        /* istanbul ignore else */\n        if (this.lazy) {\n            this.dirty = true;\n        }\n        else if (this.sync) {\n            this.run();\n        }\n        else {\n            queueWatcher(this);\n        }\n    }\n    /**\n     * Scheduler job interface.\n     * Will be called by the scheduler.\n     */\n    run() {\n        if (this.active) {\n            const value = this.get();\n            if (value !== this.value ||\n                // Deep watchers and watchers on Object/Arrays should fire even\n                // when the value is the same, because the value may\n                // have mutated.\n                isObject(value) ||\n                this.deep) {\n                // set new value\n                const oldValue = this.value;\n                this.value = value;\n                if (this.user) {\n                    const info = `callback for watcher \"${this.expression}\"`;\n                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                }\n                else {\n                    this.cb.call(this.vm, value, oldValue);\n                }\n            }\n        }\n    }\n    /**\n     * Evaluate the value of the watcher.\n     * This only gets called for lazy watchers.\n     */\n    evaluate() {\n        this.value = this.get();\n        this.dirty = false;\n    }\n    /**\n     * Depend on all deps collected by this watcher.\n     */\n    depend() {\n        let i = this.deps.length;\n        while (i--) {\n            this.deps[i].depend();\n        }\n    }\n    /**\n     * Remove self from all dependencies' subscriber list.\n     */\n    teardown() {\n        if (this.vm && !this.vm._isBeingDestroyed) {\n            remove$2(this.vm._scope.effects, this);\n        }\n        if (this.active) {\n            let i = this.deps.length;\n            while (i--) {\n                this.deps[i].removeSub(this);\n            }\n            this.active = false;\n            if (this.onStop) {\n                this.onStop();\n            }\n        }\n    }\n}\n\nlet mark;\nlet measure;\n{\n    const perf = inBrowser && window.performance;\n    /* istanbul ignore if */\n    if (perf &&\n        // @ts-ignore\n        perf.mark &&\n        // @ts-ignore\n        perf.measure &&\n        // @ts-ignore\n        perf.clearMarks &&\n        // @ts-ignore\n        perf.clearMeasures) {\n        mark = tag => perf.mark(tag);\n        measure = (name, startTag, endTag) => {\n            perf.measure(name, startTag, endTag);\n            perf.clearMarks(startTag);\n            perf.clearMarks(endTag);\n            // perf.clearMeasures(name)\n        };\n    }\n}\n\nfunction initEvents(vm) {\n    vm._events = Object.create(null);\n    vm._hasHookEvent = false;\n    // init parent attached events\n    const listeners = vm.$options._parentListeners;\n    if (listeners) {\n        updateComponentListeners(vm, listeners);\n    }\n}\nlet target$1;\nfunction add$1(event, fn) {\n    target$1.$on(event, fn);\n}\nfunction remove$1(event, fn) {\n    target$1.$off(event, fn);\n}\nfunction createOnceHandler$1(event, fn) {\n    const _target = target$1;\n    return function onceHandler() {\n        const res = fn.apply(null, arguments);\n        if (res !== null) {\n            _target.$off(event, onceHandler);\n        }\n    };\n}\nfunction updateComponentListeners(vm, listeners, oldListeners) {\n    target$1 = vm;\n    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n    target$1 = undefined;\n}\nfunction eventsMixin(Vue) {\n    const hookRE = /^hook:/;\n    Vue.prototype.$on = function (event, fn) {\n        const vm = this;\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$on(event[i], fn);\n            }\n        }\n        else {\n            (vm._events[event] || (vm._events[event] = [])).push(fn);\n            // optimize hook:event cost by using a boolean flag marked at registration\n            // instead of a hash lookup\n            if (hookRE.test(event)) {\n                vm._hasHookEvent = true;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$once = function (event, fn) {\n        const vm = this;\n        function on() {\n            vm.$off(event, on);\n            fn.apply(vm, arguments);\n        }\n        on.fn = fn;\n        vm.$on(event, on);\n        return vm;\n    };\n    Vue.prototype.$off = function (event, fn) {\n        const vm = this;\n        // all\n        if (!arguments.length) {\n            vm._events = Object.create(null);\n            return vm;\n        }\n        // array of events\n        if (isArray(event)) {\n            for (let i = 0, l = event.length; i < l; i++) {\n                vm.$off(event[i], fn);\n            }\n            return vm;\n        }\n        // specific event\n        const cbs = vm._events[event];\n        if (!cbs) {\n            return vm;\n        }\n        if (!fn) {\n            vm._events[event] = null;\n            return vm;\n        }\n        // specific handler\n        let cb;\n        let i = cbs.length;\n        while (i--) {\n            cb = cbs[i];\n            if (cb === fn || cb.fn === fn) {\n                cbs.splice(i, 1);\n                break;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$emit = function (event) {\n        const vm = this;\n        {\n            const lowerCaseEvent = event.toLowerCase();\n            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                tip(`Event \"${lowerCaseEvent}\" is emitted in component ` +\n                    `${formatComponentName(vm)} but the handler is registered for \"${event}\". ` +\n                    `Note that HTML attributes are case-insensitive and you cannot use ` +\n                    `v-on to listen to camelCase events when using in-DOM templates. ` +\n                    `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\n            }\n        }\n        let cbs = vm._events[event];\n        if (cbs) {\n            cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n            const args = toArray(arguments, 1);\n            const info = `event handler for \"${event}\"`;\n            for (let i = 0, l = cbs.length; i < l; i++) {\n                invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n            }\n        }\n        return vm;\n    };\n}\n\nlet activeInstance = null;\nlet isUpdatingChildComponent = false;\nfunction setActiveInstance(vm) {\n    const prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    return () => {\n        activeInstance = prevActiveInstance;\n    };\n}\nfunction initLifecycle(vm) {\n    const options = vm.$options;\n    // locate first non-abstract parent\n    let parent = options.parent;\n    if (parent && !options.abstract) {\n        while (parent.$options.abstract && parent.$parent) {\n            parent = parent.$parent;\n        }\n        parent.$children.push(vm);\n    }\n    vm.$parent = parent;\n    vm.$root = parent ? parent.$root : vm;\n    vm.$children = [];\n    vm.$refs = {};\n    vm._provided = parent ? parent._provided : Object.create(null);\n    vm._watcher = null;\n    vm._inactive = null;\n    vm._directInactive = false;\n    vm._isMounted = false;\n    vm._isDestroyed = false;\n    vm._isBeingDestroyed = false;\n}\nfunction lifecycleMixin(Vue) {\n    Vue.prototype._update = function (vnode, hydrating) {\n        const vm = this;\n        const prevEl = vm.$el;\n        const prevVnode = vm._vnode;\n        const restoreActiveInstance = setActiveInstance(vm);\n        vm._vnode = vnode;\n        // Vue.prototype.__patch__ is injected in entry points\n        // based on the rendering backend used.\n        if (!prevVnode) {\n            // initial render\n            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n        }\n        else {\n            // updates\n            vm.$el = vm.__patch__(prevVnode, vnode);\n        }\n        restoreActiveInstance();\n        // update __vue__ reference\n        if (prevEl) {\n            prevEl.__vue__ = null;\n        }\n        if (vm.$el) {\n            vm.$el.__vue__ = vm;\n        }\n        // if parent is an HOC, update its $el as well\n        let wrapper = vm;\n        while (wrapper &&\n            wrapper.$vnode &&\n            wrapper.$parent &&\n            wrapper.$vnode === wrapper.$parent._vnode) {\n            wrapper.$parent.$el = wrapper.$el;\n            wrapper = wrapper.$parent;\n        }\n        // updated hook is called by the scheduler to ensure that children are\n        // updated in a parent's updated hook.\n    };\n    Vue.prototype.$forceUpdate = function () {\n        const vm = this;\n        if (vm._watcher) {\n            vm._watcher.update();\n        }\n    };\n    Vue.prototype.$destroy = function () {\n        const vm = this;\n        if (vm._isBeingDestroyed) {\n            return;\n        }\n        callHook$1(vm, 'beforeDestroy');\n        vm._isBeingDestroyed = true;\n        // remove self from parent\n        const parent = vm.$parent;\n        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n            remove$2(parent.$children, vm);\n        }\n        // teardown scope. this includes both the render watcher and other\n        // watchers created\n        vm._scope.stop();\n        // remove reference from data ob\n        // frozen object may not have observer.\n        if (vm._data.__ob__) {\n            vm._data.__ob__.vmCount--;\n        }\n        // call the last hook...\n        vm._isDestroyed = true;\n        // invoke destroy hooks on current rendered tree\n        vm.__patch__(vm._vnode, null);\n        // fire destroyed hook\n        callHook$1(vm, 'destroyed');\n        // turn off all instance listeners.\n        vm.$off();\n        // remove __vue__ reference\n        if (vm.$el) {\n            vm.$el.__vue__ = null;\n        }\n        // release circular reference (#6759)\n        if (vm.$vnode) {\n            vm.$vnode.parent = null;\n        }\n    };\n}\nfunction mountComponent(vm, el, hydrating) {\n    vm.$el = el;\n    if (!vm.$options.render) {\n        // @ts-expect-error invalid type\n        vm.$options.render = createEmptyVNode;\n        {\n            /* istanbul ignore if */\n            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                vm.$options.el ||\n                el) {\n                warn('You are using the runtime-only build of Vue where the template ' +\n                    'compiler is not available. Either pre-compile the templates into ' +\n                    'render functions, or use the compiler-included build.', vm);\n            }\n            else {\n                warn('Failed to mount component: template or render function not defined.', vm);\n            }\n        }\n    }\n    callHook$1(vm, 'beforeMount');\n    let updateComponent;\n    /* istanbul ignore if */\n    if (config.performance && mark) {\n        updateComponent = () => {\n            const name = vm._name;\n            const id = vm._uid;\n            const startTag = `vue-perf-start:${id}`;\n            const endTag = `vue-perf-end:${id}`;\n            mark(startTag);\n            const vnode = vm._render();\n            mark(endTag);\n            measure(`vue ${name} render`, startTag, endTag);\n            mark(startTag);\n            vm._update(vnode, hydrating);\n            mark(endTag);\n            measure(`vue ${name} patch`, startTag, endTag);\n        };\n    }\n    else {\n        updateComponent = () => {\n            vm._update(vm._render(), hydrating);\n        };\n    }\n    const watcherOptions = {\n        before() {\n            if (vm._isMounted && !vm._isDestroyed) {\n                callHook$1(vm, 'beforeUpdate');\n            }\n        }\n    };\n    {\n        watcherOptions.onTrack = e => callHook$1(vm, 'renderTracked', [e]);\n        watcherOptions.onTrigger = e => callHook$1(vm, 'renderTriggered', [e]);\n    }\n    // we set this to vm._watcher inside the watcher's constructor\n    // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n    // component's mounted hook), which relies on vm._watcher being already defined\n    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n    hydrating = false;\n    // flush buffer for flush: \"pre\" watchers queued in setup()\n    const preWatchers = vm._preWatchers;\n    if (preWatchers) {\n        for (let i = 0; i < preWatchers.length; i++) {\n            preWatchers[i].run();\n        }\n    }\n    // manually mounted instance, call mounted on self\n    // mounted is called for render-created child components in its inserted hook\n    if (vm.$vnode == null) {\n        vm._isMounted = true;\n        callHook$1(vm, 'mounted');\n    }\n    return vm;\n}\nfunction updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n    {\n        isUpdatingChildComponent = true;\n    }\n    // determine whether component has slot children\n    // we need to do this before overwriting $options._renderChildren.\n    // check if there are dynamic scopedSlots (hand-written or compiled but with\n    // dynamic slot names). Static scoped slots compiled from template has the\n    // \"$stable\" marker.\n    const newScopedSlots = parentVnode.data.scopedSlots;\n    const oldScopedSlots = vm.$scopedSlots;\n    const hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n        (!newScopedSlots && vm.$scopedSlots.$key));\n    // Any static slot children from the parent may have changed during parent's\n    // update. Dynamic scoped slots may also have changed. In such cases, a forced\n    // update is necessary to ensure correctness.\n    let needsForceUpdate = !!(renderChildren || // has new static slots\n        vm.$options._renderChildren || // has old static slots\n        hasDynamicScopedSlot);\n    const prevVNode = vm.$vnode;\n    vm.$options._parentVnode = parentVnode;\n    vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n    if (vm._vnode) {\n        // update child tree's parent\n        vm._vnode.parent = parentVnode;\n    }\n    vm.$options._renderChildren = renderChildren;\n    // update $attrs and $listeners hash\n    // these are also reactive so they may trigger child update if the child\n    // used them during render\n    const attrs = parentVnode.data.attrs || emptyObject;\n    if (vm._attrsProxy) {\n        // force update if attrs are accessed and has changed since it may be\n        // passed to a child component.\n        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n            needsForceUpdate = true;\n        }\n    }\n    vm.$attrs = attrs;\n    // update listeners\n    listeners = listeners || emptyObject;\n    const prevListeners = vm.$options._parentListeners;\n    if (vm._listenersProxy) {\n        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n    }\n    vm.$listeners = vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, prevListeners);\n    // update props\n    if (propsData && vm.$options.props) {\n        toggleObserving(false);\n        const props = vm._props;\n        const propKeys = vm.$options._propKeys || [];\n        for (let i = 0; i < propKeys.length; i++) {\n            const key = propKeys[i];\n            const propOptions = vm.$options.props; // wtf flow?\n            props[key] = validateProp(key, propOptions, propsData, vm);\n        }\n        toggleObserving(true);\n        // keep a copy of raw propsData\n        vm.$options.propsData = propsData;\n    }\n    // resolve slots + force update if has children\n    if (needsForceUpdate) {\n        vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n        vm.$forceUpdate();\n    }\n    {\n        isUpdatingChildComponent = false;\n    }\n}\nfunction isInInactiveTree(vm) {\n    while (vm && (vm = vm.$parent)) {\n        if (vm._inactive)\n            return true;\n    }\n    return false;\n}\nfunction activateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = false;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    else if (vm._directInactive) {\n        return;\n    }\n    if (vm._inactive || vm._inactive === null) {\n        vm._inactive = false;\n        for (let i = 0; i < vm.$children.length; i++) {\n            activateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'activated');\n    }\n}\nfunction deactivateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = true;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    if (!vm._inactive) {\n        vm._inactive = true;\n        for (let i = 0; i < vm.$children.length; i++) {\n            deactivateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'deactivated');\n    }\n}\nfunction callHook$1(vm, hook, args, setContext = true) {\n    // #7573 disable dep collection when invoking lifecycle hooks\n    pushTarget();\n    const prevInst = currentInstance;\n    const prevScope = getCurrentScope();\n    setContext && setCurrentInstance(vm);\n    const handlers = vm.$options[hook];\n    const info = `${hook} hook`;\n    if (handlers) {\n        for (let i = 0, j = handlers.length; i < j; i++) {\n            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n        }\n    }\n    if (vm._hasHookEvent) {\n        vm.$emit('hook:' + hook);\n    }\n    if (setContext) {\n        setCurrentInstance(prevInst);\n        prevScope && prevScope.on();\n    }\n    popTarget();\n}\n\nconst MAX_UPDATE_COUNT = 100;\nconst queue = [];\nconst activatedChildren = [];\nlet has = {};\nlet circular = {};\nlet waiting = false;\nlet flushing = false;\nlet index = 0;\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState() {\n    index = queue.length = activatedChildren.length = 0;\n    has = {};\n    {\n        circular = {};\n    }\n    waiting = flushing = false;\n}\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nlet currentFlushTimestamp = 0;\n// Async edge case fix requires storing an event listener's attach timestamp.\nlet getNow = Date.now;\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n    const performance = window.performance;\n    if (performance &&\n        typeof performance.now === 'function' &&\n        getNow() > document.createEvent('Event').timeStamp) {\n        // if the event timestamp, although evaluated AFTER the Date.now(), is\n        // smaller than it, it means the event is using a hi-res timestamp,\n        // and we need to use the hi-res version for event listener timestamps as\n        // well.\n        getNow = () => performance.now();\n    }\n}\nconst sortCompareFn = (a, b) => {\n    if (a.post) {\n        if (!b.post)\n            return 1;\n    }\n    else if (b.post) {\n        return -1;\n    }\n    return a.id - b.id;\n};\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue() {\n    currentFlushTimestamp = getNow();\n    flushing = true;\n    let watcher, id;\n    // Sort queue before flush.\n    // This ensures that:\n    // 1. Components are updated from parent to child. (because parent is always\n    //    created before the child)\n    // 2. A component's user watchers are run before its render watcher (because\n    //    user watchers are created before the render watcher)\n    // 3. If a component is destroyed during a parent component's watcher run,\n    //    its watchers can be skipped.\n    queue.sort(sortCompareFn);\n    // do not cache length because more watchers might be pushed\n    // as we run existing watchers\n    for (index = 0; index < queue.length; index++) {\n        watcher = queue[index];\n        if (watcher.before) {\n            watcher.before();\n        }\n        id = watcher.id;\n        has[id] = null;\n        watcher.run();\n        // in dev build, check and stop circular updates.\n        if (has[id] != null) {\n            circular[id] = (circular[id] || 0) + 1;\n            if (circular[id] > MAX_UPDATE_COUNT) {\n                warn('You may have an infinite update loop ' +\n                    (watcher.user\n                        ? `in watcher with expression \"${watcher.expression}\"`\n                        : `in a component render function.`), watcher.vm);\n                break;\n            }\n        }\n    }\n    // keep copies of post queues before resetting state\n    const activatedQueue = activatedChildren.slice();\n    const updatedQueue = queue.slice();\n    resetSchedulerState();\n    // call component updated and activated hooks\n    callActivatedHooks(activatedQueue);\n    callUpdatedHooks(updatedQueue);\n    cleanupDeps();\n    // devtool hook\n    /* istanbul ignore if */\n    if (devtools && config.devtools) {\n        devtools.emit('flush');\n    }\n}\nfunction callUpdatedHooks(queue) {\n    let i = queue.length;\n    while (i--) {\n        const watcher = queue[i];\n        const vm = watcher.vm;\n        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n            callHook$1(vm, 'updated');\n        }\n    }\n}\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent(vm) {\n    // setting _inactive to false here so that a render function can\n    // rely on checking whether it's in an inactive tree (e.g. router-view)\n    vm._inactive = false;\n    activatedChildren.push(vm);\n}\nfunction callActivatedHooks(queue) {\n    for (let i = 0; i < queue.length; i++) {\n        queue[i]._inactive = true;\n        activateChildComponent(queue[i], true /* true */);\n    }\n}\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher(watcher) {\n    const id = watcher.id;\n    if (has[id] != null) {\n        return;\n    }\n    if (watcher === Dep.target && watcher.noRecurse) {\n        return;\n    }\n    has[id] = true;\n    if (!flushing) {\n        queue.push(watcher);\n    }\n    else {\n        // if already flushing, splice the watcher based on its id\n        // if already past its id, it will be run next immediately.\n        let i = queue.length - 1;\n        while (i > index && queue[i].id > watcher.id) {\n            i--;\n        }\n        queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n        waiting = true;\n        if (!config.async) {\n            flushSchedulerQueue();\n            return;\n        }\n        nextTick(flushSchedulerQueue);\n    }\n}\n\nfunction initProvide(vm) {\n    const provideOption = vm.$options.provide;\n    if (provideOption) {\n        const provided = isFunction(provideOption)\n            ? provideOption.call(vm)\n            : provideOption;\n        if (!isObject(provided)) {\n            return;\n        }\n        const source = resolveProvided(vm);\n        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n        // iterate the keys ourselves.\n        const keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n        }\n    }\n}\nfunction initInjections(vm) {\n    const result = resolveInject(vm.$options.inject, vm);\n    if (result) {\n        toggleObserving(false);\n        Object.keys(result).forEach(key => {\n            /* istanbul ignore else */\n            {\n                defineReactive(vm, key, result[key], () => {\n                    warn(`Avoid mutating an injected value directly since the changes will be ` +\n                        `overwritten whenever the provided component re-renders. ` +\n                        `injection being mutated: \"${key}\"`, vm);\n                });\n            }\n        });\n        toggleObserving(true);\n    }\n}\nfunction resolveInject(inject, vm) {\n    if (inject) {\n        // inject is :any because flow is not smart enough to figure out cached\n        const result = Object.create(null);\n        const keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n        for (let i = 0; i < keys.length; i++) {\n            const key = keys[i];\n            // #6574 in case the inject object is observed...\n            if (key === '__ob__')\n                continue;\n            const provideKey = inject[key].from;\n            if (provideKey in vm._provided) {\n                result[key] = vm._provided[provideKey];\n            }\n            else if ('default' in inject[key]) {\n                const provideDefault = inject[key].default;\n                result[key] = isFunction(provideDefault)\n                    ? provideDefault.call(vm)\n                    : provideDefault;\n            }\n            else {\n                warn(`Injection \"${key}\" not found`, vm);\n            }\n        }\n        return result;\n    }\n}\n\nfunction FunctionalRenderContext(data, props, children, parent, Ctor) {\n    const options = Ctor.options;\n    // ensure the createElement function in functional components\n    // gets a unique context - this is necessary for correct named slot check\n    let contextVm;\n    if (hasOwn(parent, '_uid')) {\n        contextVm = Object.create(parent);\n        contextVm._original = parent;\n    }\n    else {\n        // the context vm passed in is a functional context as well.\n        // in this case we want to make sure we are able to get a hold to the\n        // real context instance.\n        contextVm = parent;\n        // @ts-ignore\n        parent = parent._original;\n    }\n    const isCompiled = isTrue(options._compiled);\n    const needNormalization = !isCompiled;\n    this.data = data;\n    this.props = props;\n    this.children = children;\n    this.parent = parent;\n    this.listeners = data.on || emptyObject;\n    this.injections = resolveInject(options.inject, parent);\n    this.slots = () => {\n        if (!this.$slots) {\n            normalizeScopedSlots(parent, data.scopedSlots, (this.$slots = resolveSlots(children, parent)));\n        }\n        return this.$slots;\n    };\n    Object.defineProperty(this, 'scopedSlots', {\n        enumerable: true,\n        get() {\n            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n        }\n    });\n    // support for compiled functional template\n    if (isCompiled) {\n        // exposing $options for renderStatic()\n        this.$options = options;\n        // pre-resolve slots for renderSlot()\n        this.$slots = this.slots();\n        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n    }\n    if (options._scopeId) {\n        this._c = (a, b, c, d) => {\n            const vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n            if (vnode && !isArray(vnode)) {\n                vnode.fnScopeId = options._scopeId;\n                vnode.fnContext = parent;\n            }\n            return vnode;\n        };\n    }\n    else {\n        this._c = (a, b, c, d) => createElement$1(contextVm, a, b, c, d, needNormalization);\n    }\n}\ninstallRenderHelpers(FunctionalRenderContext.prototype);\nfunction createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n    const options = Ctor.options;\n    const props = {};\n    const propOptions = options.props;\n    if (isDef(propOptions)) {\n        for (const key in propOptions) {\n            props[key] = validateProp(key, propOptions, propsData || emptyObject);\n        }\n    }\n    else {\n        if (isDef(data.attrs))\n            mergeProps(props, data.attrs);\n        if (isDef(data.props))\n            mergeProps(props, data.props);\n    }\n    const renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n    const vnode = options.render.call(null, renderContext._c, renderContext);\n    if (vnode instanceof VNode) {\n        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n    }\n    else if (isArray(vnode)) {\n        const vnodes = normalizeChildren(vnode) || [];\n        const res = new Array(vnodes.length);\n        for (let i = 0; i < vnodes.length; i++) {\n            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n        }\n        return res;\n    }\n}\nfunction cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n    // #7817 clone node before setting fnContext, otherwise if the node is reused\n    // (e.g. it was from a cached normal slot) the fnContext causes named slots\n    // that should not be matched to match.\n    const clone = cloneVNode(vnode);\n    clone.fnContext = contextVm;\n    clone.fnOptions = options;\n    {\n        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n            renderContext;\n    }\n    if (data.slot) {\n        (clone.data || (clone.data = {})).slot = data.slot;\n    }\n    return clone;\n}\nfunction mergeProps(to, from) {\n    for (const key in from) {\n        to[camelize(key)] = from[key];\n    }\n}\n\nfunction getComponentName(options) {\n    return options.name || options.__name || options._componentTag;\n}\n// inline hooks to be invoked on component VNodes during patch\nconst componentVNodeHooks = {\n    init(vnode, hydrating) {\n        if (vnode.componentInstance &&\n            !vnode.componentInstance._isDestroyed &&\n            vnode.data.keepAlive) {\n            // kept-alive components, treat as a patch\n            const mountedNode = vnode; // work around flow\n            componentVNodeHooks.prepatch(mountedNode, mountedNode);\n        }\n        else {\n            const child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n            child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n        }\n    },\n    prepatch(oldVnode, vnode) {\n        const options = vnode.componentOptions;\n        const child = (vnode.componentInstance = oldVnode.componentInstance);\n        updateChildComponent(child, options.propsData, // updated props\n        options.listeners, // updated listeners\n        vnode, // new parent vnode\n        options.children // new children\n        );\n    },\n    insert(vnode) {\n        const { context, componentInstance } = vnode;\n        if (!componentInstance._isMounted) {\n            componentInstance._isMounted = true;\n            callHook$1(componentInstance, 'mounted');\n        }\n        if (vnode.data.keepAlive) {\n            if (context._isMounted) {\n                // vue-router#1212\n                // During updates, a kept-alive component's child components may\n                // change, so directly walking the tree here may call activated hooks\n                // on incorrect children. Instead we push them into a queue which will\n                // be processed after the whole patch process ended.\n                queueActivatedComponent(componentInstance);\n            }\n            else {\n                activateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    },\n    destroy(vnode) {\n        const { componentInstance } = vnode;\n        if (!componentInstance._isDestroyed) {\n            if (!vnode.data.keepAlive) {\n                componentInstance.$destroy();\n            }\n            else {\n                deactivateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    }\n};\nconst hooksToMerge = Object.keys(componentVNodeHooks);\nfunction createComponent(Ctor, data, context, children, tag) {\n    if (isUndef(Ctor)) {\n        return;\n    }\n    const baseCtor = context.$options._base;\n    // plain options object: turn it into a constructor\n    if (isObject(Ctor)) {\n        Ctor = baseCtor.extend(Ctor);\n    }\n    // if at this stage it's not a constructor or an async component factory,\n    // reject.\n    if (typeof Ctor !== 'function') {\n        {\n            warn(`Invalid Component definition: ${String(Ctor)}`, context);\n        }\n        return;\n    }\n    // async component\n    let asyncFactory;\n    // @ts-expect-error\n    if (isUndef(Ctor.cid)) {\n        asyncFactory = Ctor;\n        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n        if (Ctor === undefined) {\n            // return a placeholder node for async component, which is rendered\n            // as a comment node but preserves all the raw information for the node.\n            // the information will be used for async server-rendering and hydration.\n            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n        }\n    }\n    data = data || {};\n    // resolve constructor options in case global mixins are applied after\n    // component constructor creation\n    resolveConstructorOptions(Ctor);\n    // transform component v-model data into props & events\n    if (isDef(data.model)) {\n        // @ts-expect-error\n        transformModel(Ctor.options, data);\n    }\n    // extract props\n    // @ts-expect-error\n    const propsData = extractPropsFromVNodeData(data, Ctor, tag);\n    // functional component\n    // @ts-expect-error\n    if (isTrue(Ctor.options.functional)) {\n        return createFunctionalComponent(Ctor, propsData, data, context, children);\n    }\n    // extract listeners, since these needs to be treated as\n    // child component listeners instead of DOM listeners\n    const listeners = data.on;\n    // replace with listeners with .native modifier\n    // so it gets processed during parent component patch.\n    data.on = data.nativeOn;\n    // @ts-expect-error\n    if (isTrue(Ctor.options.abstract)) {\n        // abstract components do not keep anything\n        // other than props & listeners & slot\n        // work around flow\n        const slot = data.slot;\n        data = {};\n        if (slot) {\n            data.slot = slot;\n        }\n    }\n    // install component management hooks onto the placeholder node\n    installComponentHooks(data);\n    // return a placeholder vnode\n    // @ts-expect-error\n    const name = getComponentName(Ctor.options) || tag;\n    const vnode = new VNode(\n    // @ts-expect-error\n    `vue-component-${Ctor.cid}${name ? `-${name}` : ''}`, data, undefined, undefined, undefined, context, \n    // @ts-expect-error\n    { Ctor, propsData, listeners, tag, children }, asyncFactory);\n    return vnode;\n}\nfunction createComponentInstanceForVnode(\n// we know it's MountedComponentVNode but flow doesn't\nvnode, \n// activeInstance in lifecycle state\nparent) {\n    const options = {\n        _isComponent: true,\n        _parentVnode: vnode,\n        parent\n    };\n    // check inline-template render functions\n    const inlineTemplate = vnode.data.inlineTemplate;\n    if (isDef(inlineTemplate)) {\n        options.render = inlineTemplate.render;\n        options.staticRenderFns = inlineTemplate.staticRenderFns;\n    }\n    return new vnode.componentOptions.Ctor(options);\n}\nfunction installComponentHooks(data) {\n    const hooks = data.hook || (data.hook = {});\n    for (let i = 0; i < hooksToMerge.length; i++) {\n        const key = hooksToMerge[i];\n        const existing = hooks[key];\n        const toMerge = componentVNodeHooks[key];\n        // @ts-expect-error\n        if (existing !== toMerge && !(existing && existing._merged)) {\n            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n        }\n    }\n}\nfunction mergeHook(f1, f2) {\n    const merged = (a, b) => {\n        // flow complains about extra args which is why we use any\n        f1(a, b);\n        f2(a, b);\n    };\n    merged._merged = true;\n    return merged;\n}\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel(options, data) {\n    const prop = (options.model && options.model.prop) || 'value';\n    const event = (options.model && options.model.event) || 'input';\n    (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n    const on = data.on || (data.on = {});\n    const existing = on[event];\n    const callback = data.model.callback;\n    if (isDef(existing)) {\n        if (isArray(existing)\n            ? existing.indexOf(callback) === -1\n            : existing !== callback) {\n            on[event] = [callback].concat(existing);\n        }\n    }\n    else {\n        on[event] = callback;\n    }\n}\n\nlet warn = noop;\nlet tip = noop;\nlet generateComponentTrace; // work around flow check\nlet formatComponentName;\n{\n    const hasConsole = typeof console !== 'undefined';\n    const classifyRE = /(?:^|[-_])(\\w)/g;\n    const classify = str => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n    warn = (msg, vm = currentInstance) => {\n        const trace = vm ? generateComponentTrace(vm) : '';\n        if (config.warnHandler) {\n            config.warnHandler.call(null, msg, vm, trace);\n        }\n        else if (hasConsole && !config.silent) {\n            console.error(`[Vue warn]: ${msg}${trace}`);\n        }\n    };\n    tip = (msg, vm) => {\n        if (hasConsole && !config.silent) {\n            console.warn(`[Vue tip]: ${msg}` + (vm ? generateComponentTrace(vm) : ''));\n        }\n    };\n    formatComponentName = (vm, includeFile) => {\n        if (vm.$root === vm) {\n            return '<Root>';\n        }\n        const options = isFunction(vm) && vm.cid != null\n            ? vm.options\n            : vm._isVue\n                ? vm.$options || vm.constructor.options\n                : vm;\n        let name = getComponentName(options);\n        const file = options.__file;\n        if (!name && file) {\n            const match = file.match(/([^/\\\\]+)\\.vue$/);\n            name = match && match[1];\n        }\n        return ((name ? `<${classify(name)}>` : `<Anonymous>`) +\n            (file && includeFile !== false ? ` at ${file}` : ''));\n    };\n    const repeat = (str, n) => {\n        let res = '';\n        while (n) {\n            if (n % 2 === 1)\n                res += str;\n            if (n > 1)\n                str += str;\n            n >>= 1;\n        }\n        return res;\n    };\n    generateComponentTrace = (vm) => {\n        if (vm._isVue && vm.$parent) {\n            const tree = [];\n            let currentRecursiveSequence = 0;\n            while (vm) {\n                if (tree.length > 0) {\n                    const last = tree[tree.length - 1];\n                    if (last.constructor === vm.constructor) {\n                        currentRecursiveSequence++;\n                        vm = vm.$parent;\n                        continue;\n                    }\n                    else if (currentRecursiveSequence > 0) {\n                        tree[tree.length - 1] = [last, currentRecursiveSequence];\n                        currentRecursiveSequence = 0;\n                    }\n                }\n                tree.push(vm);\n                vm = vm.$parent;\n            }\n            return ('\\n\\nfound in\\n\\n' +\n                tree\n                    .map((vm, i) => `${i === 0 ? '---> ' : repeat(' ', 5 + i * 2)}${isArray(vm)\n                    ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n                    : formatComponentName(vm)}`)\n                    .join('\\n'));\n        }\n        else {\n            return `\\n\\n(found in ${formatComponentName(vm)})`;\n        }\n    };\n}\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nconst strats = config.optionMergeStrategies;\n/**\n * Options with restrictions\n */\n{\n    strats.el = strats.propsData = function (parent, child, vm, key) {\n        if (!vm) {\n            warn(`option \"${key}\" can only be used during instance ` +\n                'creation with the `new` keyword.');\n        }\n        return defaultStrat(parent, child);\n    };\n}\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData(to, from, recursive = true) {\n    if (!from)\n        return to;\n    let key, toVal, fromVal;\n    const keys = hasSymbol\n        ? Reflect.ownKeys(from)\n        : Object.keys(from);\n    for (let i = 0; i < keys.length; i++) {\n        key = keys[i];\n        // in case the object is already observed...\n        if (key === '__ob__')\n            continue;\n        toVal = to[key];\n        fromVal = from[key];\n        if (!recursive || !hasOwn(to, key)) {\n            set(to, key, fromVal);\n        }\n        else if (toVal !== fromVal &&\n            isPlainObject(toVal) &&\n            isPlainObject(fromVal)) {\n            mergeData(toVal, fromVal);\n        }\n    }\n    return to;\n}\n/**\n * Data\n */\nfunction mergeDataOrFn(parentVal, childVal, vm) {\n    if (!vm) {\n        // in a Vue.extend merge, both should be functions\n        if (!childVal) {\n            return parentVal;\n        }\n        if (!parentVal) {\n            return childVal;\n        }\n        // when parentVal & childVal are both present,\n        // we need to return a function that returns the\n        // merged result of both functions... no need to\n        // check if parentVal is a function here because\n        // it has to be a function to pass previous merges.\n        return function mergedDataFn() {\n            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n        };\n    }\n    else {\n        return function mergedInstanceDataFn() {\n            // instance merge\n            const instanceData = isFunction(childVal)\n                ? childVal.call(vm, vm)\n                : childVal;\n            const defaultData = isFunction(parentVal)\n                ? parentVal.call(vm, vm)\n                : parentVal;\n            if (instanceData) {\n                return mergeData(instanceData, defaultData);\n            }\n            else {\n                return defaultData;\n            }\n        };\n    }\n}\nstrats.data = function (parentVal, childVal, vm) {\n    if (!vm) {\n        if (childVal && typeof childVal !== 'function') {\n            warn('The \"data\" option should be a function ' +\n                    'that returns a per-instance value in component ' +\n                    'definitions.', vm);\n            return parentVal;\n        }\n        return mergeDataOrFn(parentVal, childVal);\n    }\n    return mergeDataOrFn(parentVal, childVal, vm);\n};\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeLifecycleHook(parentVal, childVal) {\n    const res = childVal\n        ? parentVal\n            ? parentVal.concat(childVal)\n            : isArray(childVal)\n                ? childVal\n                : [childVal]\n        : parentVal;\n    return res ? dedupeHooks(res) : res;\n}\nfunction dedupeHooks(hooks) {\n    const res = [];\n    for (let i = 0; i < hooks.length; i++) {\n        if (res.indexOf(hooks[i]) === -1) {\n            res.push(hooks[i]);\n        }\n    }\n    return res;\n}\nLIFECYCLE_HOOKS.forEach(hook => {\n    strats[hook] = mergeLifecycleHook;\n});\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets(parentVal, childVal, vm, key) {\n    const res = Object.create(parentVal || null);\n    if (childVal) {\n        assertObjectType(key, childVal, vm);\n        return extend(res, childVal);\n    }\n    else {\n        return res;\n    }\n}\nASSET_TYPES.forEach(function (type) {\n    strats[type + 's'] = mergeAssets;\n});\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal, vm, key) {\n    // work around Firefox's Object.prototype.watch...\n    //@ts-expect-error work around\n    if (parentVal === nativeWatch)\n        parentVal = undefined;\n    //@ts-expect-error work around\n    if (childVal === nativeWatch)\n        childVal = undefined;\n    /* istanbul ignore if */\n    if (!childVal)\n        return Object.create(parentVal || null);\n    {\n        assertObjectType(key, childVal, vm);\n    }\n    if (!parentVal)\n        return childVal;\n    const ret = {};\n    extend(ret, parentVal);\n    for (const key in childVal) {\n        let parent = ret[key];\n        const child = childVal[key];\n        if (parent && !isArray(parent)) {\n            parent = [parent];\n        }\n        ret[key] = parent ? parent.concat(child) : isArray(child) ? child : [child];\n    }\n    return ret;\n};\n/**\n * Other object hashes.\n */\nstrats.props =\n    strats.methods =\n        strats.inject =\n            strats.computed =\n                function (parentVal, childVal, vm, key) {\n                    if (childVal && true) {\n                        assertObjectType(key, childVal, vm);\n                    }\n                    if (!parentVal)\n                        return childVal;\n                    const ret = Object.create(null);\n                    extend(ret, parentVal);\n                    if (childVal)\n                        extend(ret, childVal);\n                    return ret;\n                };\nstrats.provide = function (parentVal, childVal) {\n    if (!parentVal)\n        return childVal;\n    return function () {\n        const ret = Object.create(null);\n        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n        if (childVal) {\n            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n            );\n        }\n        return ret;\n    };\n};\n/**\n * Default strategy.\n */\nconst defaultStrat = function (parentVal, childVal) {\n    return childVal === undefined ? parentVal : childVal;\n};\n/**\n * Validate component names\n */\nfunction checkComponents(options) {\n    for (const key in options.components) {\n        validateComponentName(key);\n    }\n}\nfunction validateComponentName(name) {\n    if (!new RegExp(`^[a-zA-Z][\\\\-\\\\.0-9_${unicodeRegExp.source}]*$`).test(name)) {\n        warn('Invalid component name: \"' +\n            name +\n            '\". Component names ' +\n            'should conform to valid custom element name in html5 specification.');\n    }\n    if (isBuiltInTag(name) || config.isReservedTag(name)) {\n        warn('Do not use built-in or reserved HTML elements as component ' +\n            'id: ' +\n            name);\n    }\n}\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps(options, vm) {\n    const props = options.props;\n    if (!props)\n        return;\n    const res = {};\n    let i, val, name;\n    if (isArray(props)) {\n        i = props.length;\n        while (i--) {\n            val = props[i];\n            if (typeof val === 'string') {\n                name = camelize(val);\n                res[name] = { type: null };\n            }\n            else {\n                warn('props must be strings when using array syntax.');\n            }\n        }\n    }\n    else if (isPlainObject(props)) {\n        for (const key in props) {\n            val = props[key];\n            name = camelize(key);\n            res[name] = isPlainObject(val) ? val : { type: val };\n        }\n    }\n    else {\n        warn(`Invalid value for option \"props\": expected an Array or an Object, ` +\n            `but got ${toRawType(props)}.`, vm);\n    }\n    options.props = res;\n}\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject(options, vm) {\n    const inject = options.inject;\n    if (!inject)\n        return;\n    const normalized = (options.inject = {});\n    if (isArray(inject)) {\n        for (let i = 0; i < inject.length; i++) {\n            normalized[inject[i]] = { from: inject[i] };\n        }\n    }\n    else if (isPlainObject(inject)) {\n        for (const key in inject) {\n            const val = inject[key];\n            normalized[key] = isPlainObject(val)\n                ? extend({ from: key }, val)\n                : { from: val };\n        }\n    }\n    else {\n        warn(`Invalid value for option \"inject\": expected an Array or an Object, ` +\n            `but got ${toRawType(inject)}.`, vm);\n    }\n}\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives$1(options) {\n    const dirs = options.directives;\n    if (dirs) {\n        for (const key in dirs) {\n            const def = dirs[key];\n            if (isFunction(def)) {\n                dirs[key] = { bind: def, update: def };\n            }\n        }\n    }\n}\nfunction assertObjectType(name, value, vm) {\n    if (!isPlainObject(value)) {\n        warn(`Invalid value for option \"${name}\": expected an Object, ` +\n            `but got ${toRawType(value)}.`, vm);\n    }\n}\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions(parent, child, vm) {\n    {\n        checkComponents(child);\n    }\n    if (isFunction(child)) {\n        // @ts-expect-error\n        child = child.options;\n    }\n    normalizeProps(child, vm);\n    normalizeInject(child, vm);\n    normalizeDirectives$1(child);\n    // Apply extends and mixins on the child options,\n    // but only if it is a raw options object that isn't\n    // the result of another mergeOptions call.\n    // Only merged options has the _base property.\n    if (!child._base) {\n        if (child.extends) {\n            parent = mergeOptions(parent, child.extends, vm);\n        }\n        if (child.mixins) {\n            for (let i = 0, l = child.mixins.length; i < l; i++) {\n                parent = mergeOptions(parent, child.mixins[i], vm);\n            }\n        }\n    }\n    const options = {};\n    let key;\n    for (key in parent) {\n        mergeField(key);\n    }\n    for (key in child) {\n        if (!hasOwn(parent, key)) {\n            mergeField(key);\n        }\n    }\n    function mergeField(key) {\n        const strat = strats[key] || defaultStrat;\n        options[key] = strat(parent[key], child[key], vm, key);\n    }\n    return options;\n}\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset(options, type, id, warnMissing) {\n    /* istanbul ignore if */\n    if (typeof id !== 'string') {\n        return;\n    }\n    const assets = options[type];\n    // check local registration variations first\n    if (hasOwn(assets, id))\n        return assets[id];\n    const camelizedId = camelize(id);\n    if (hasOwn(assets, camelizedId))\n        return assets[camelizedId];\n    const PascalCaseId = capitalize(camelizedId);\n    if (hasOwn(assets, PascalCaseId))\n        return assets[PascalCaseId];\n    // fallback to prototype chain\n    const res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n    if (warnMissing && !res) {\n        warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n    }\n    return res;\n}\n\nfunction validateProp(key, propOptions, propsData, vm) {\n    const prop = propOptions[key];\n    const absent = !hasOwn(propsData, key);\n    let value = propsData[key];\n    // boolean casting\n    const booleanIndex = getTypeIndex(Boolean, prop.type);\n    if (booleanIndex > -1) {\n        if (absent && !hasOwn(prop, 'default')) {\n            value = false;\n        }\n        else if (value === '' || value === hyphenate(key)) {\n            // only cast empty string / same name to boolean if\n            // boolean has higher priority\n            const stringIndex = getTypeIndex(String, prop.type);\n            if (stringIndex < 0 || booleanIndex < stringIndex) {\n                value = true;\n            }\n        }\n    }\n    // check default value\n    if (value === undefined) {\n        value = getPropDefaultValue(vm, prop, key);\n        // since the default value is a fresh copy,\n        // make sure to observe it.\n        const prevShouldObserve = shouldObserve;\n        toggleObserving(true);\n        observe(value);\n        toggleObserving(prevShouldObserve);\n    }\n    {\n        assertProp(prop, key, value, vm, absent);\n    }\n    return value;\n}\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue(vm, prop, key) {\n    // no default, return undefined\n    if (!hasOwn(prop, 'default')) {\n        return undefined;\n    }\n    const def = prop.default;\n    // warn against non-factory defaults for Object & Array\n    if (isObject(def)) {\n        warn('Invalid default value for prop \"' +\n            key +\n            '\": ' +\n            'Props with type Object/Array must use a factory function ' +\n            'to return the default value.', vm);\n    }\n    // the raw prop value was also undefined from previous render,\n    // return previous default value to avoid unnecessary watcher trigger\n    if (vm &&\n        vm.$options.propsData &&\n        vm.$options.propsData[key] === undefined &&\n        vm._props[key] !== undefined) {\n        return vm._props[key];\n    }\n    // call factory function for non-Function types\n    // a value is Function if its prototype is function even across different execution context\n    return isFunction(def) && getType(prop.type) !== 'Function'\n        ? def.call(vm)\n        : def;\n}\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp(prop, name, value, vm, absent) {\n    if (prop.required && absent) {\n        warn('Missing required prop: \"' + name + '\"', vm);\n        return;\n    }\n    if (value == null && !prop.required) {\n        return;\n    }\n    let type = prop.type;\n    let valid = !type || type === true;\n    const expectedTypes = [];\n    if (type) {\n        if (!isArray(type)) {\n            type = [type];\n        }\n        for (let i = 0; i < type.length && !valid; i++) {\n            const assertedType = assertType(value, type[i], vm);\n            expectedTypes.push(assertedType.expectedType || '');\n            valid = assertedType.valid;\n        }\n    }\n    const haveExpectedTypes = expectedTypes.some(t => t);\n    if (!valid && haveExpectedTypes) {\n        warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n        return;\n    }\n    const validator = prop.validator;\n    if (validator) {\n        if (!validator(value)) {\n            warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n        }\n    }\n}\nconst simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\nfunction assertType(value, type, vm) {\n    let valid;\n    const expectedType = getType(type);\n    if (simpleCheckRE.test(expectedType)) {\n        const t = typeof value;\n        valid = t === expectedType.toLowerCase();\n        // for primitive wrapper objects\n        if (!valid && t === 'object') {\n            valid = value instanceof type;\n        }\n    }\n    else if (expectedType === 'Object') {\n        valid = isPlainObject(value);\n    }\n    else if (expectedType === 'Array') {\n        valid = isArray(value);\n    }\n    else {\n        try {\n            valid = value instanceof type;\n        }\n        catch (e) {\n            warn('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n            valid = false;\n        }\n    }\n    return {\n        valid,\n        expectedType\n    };\n}\nconst functionTypeCheckRE = /^\\s*function (\\w+)/;\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType(fn) {\n    const match = fn && fn.toString().match(functionTypeCheckRE);\n    return match ? match[1] : '';\n}\nfunction isSameType(a, b) {\n    return getType(a) === getType(b);\n}\nfunction getTypeIndex(type, expectedTypes) {\n    if (!isArray(expectedTypes)) {\n        return isSameType(expectedTypes, type) ? 0 : -1;\n    }\n    for (let i = 0, len = expectedTypes.length; i < len; i++) {\n        if (isSameType(expectedTypes[i], type)) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n    let message = `Invalid prop: type check failed for prop \"${name}\".` +\n        ` Expected ${expectedTypes.map(capitalize).join(', ')}`;\n    const expectedType = expectedTypes[0];\n    const receivedType = toRawType(value);\n    // check if we need to specify expected value\n    if (expectedTypes.length === 1 &&\n        isExplicable(expectedType) &&\n        isExplicable(typeof value) &&\n        !isBoolean(expectedType, receivedType)) {\n        message += ` with value ${styleValue(value, expectedType)}`;\n    }\n    message += `, got ${receivedType} `;\n    // check if we need to specify received value\n    if (isExplicable(receivedType)) {\n        message += `with value ${styleValue(value, receivedType)}.`;\n    }\n    return message;\n}\nfunction styleValue(value, type) {\n    if (type === 'String') {\n        return `\"${value}\"`;\n    }\n    else if (type === 'Number') {\n        return `${Number(value)}`;\n    }\n    else {\n        return `${value}`;\n    }\n}\nconst EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable(value) {\n    return EXPLICABLE_TYPES.some(elem => value.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n    return args.some(elem => elem.toLowerCase() === 'boolean');\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\nlet initProxy;\n{\n    const allowedGlobals = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n        'require' // for Webpack/Browserify\n    );\n    const warnNonPresent = (target, key) => {\n        warn(`Property or method \"${key}\" is not defined on the instance but ` +\n            'referenced during render. Make sure that this property is reactive, ' +\n            'either in the data option, or for class-based components, by ' +\n            'initializing the property. ' +\n            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n    };\n    const warnReservedPrefix = (target, key) => {\n        warn(`Property \"${key}\" must be accessed with \"$data.${key}\" because ` +\n            'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n            'prevent conflicts with Vue internals. ' +\n            'See: https://v2.vuejs.org/v2/api/#data', target);\n    };\n    const hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy);\n    if (hasProxy) {\n        const isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n        config.keyCodes = new Proxy(config.keyCodes, {\n            set(target, key, value) {\n                if (isBuiltInModifier(key)) {\n                    warn(`Avoid overwriting built-in modifier in config.keyCodes: .${key}`);\n                    return false;\n                }\n                else {\n                    target[key] = value;\n                    return true;\n                }\n            }\n        });\n    }\n    const hasHandler = {\n        has(target, key) {\n            const has = key in target;\n            const isAllowed = allowedGlobals(key) ||\n                (typeof key === 'string' &&\n                    key.charAt(0) === '_' &&\n                    !(key in target.$data));\n            if (!has && !isAllowed) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return has || !isAllowed;\n        }\n    };\n    const getHandler = {\n        get(target, key) {\n            if (typeof key === 'string' && !(key in target)) {\n                if (key in target.$data)\n                    warnReservedPrefix(target, key);\n                else\n                    warnNonPresent(target, key);\n            }\n            return target[key];\n        }\n    };\n    initProxy = function initProxy(vm) {\n        if (hasProxy) {\n            // determine which proxy handler to use\n            const options = vm.$options;\n            const handlers = options.render && options.render._withStripped ? getHandler : hasHandler;\n            vm._renderProxy = new Proxy(vm, handlers);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n    };\n}\n\nconst sharedPropertyDefinition = {\n    enumerable: true,\n    configurable: true,\n    get: noop,\n    set: noop\n};\nfunction proxy(target, sourceKey, key) {\n    sharedPropertyDefinition.get = function proxyGetter() {\n        return this[sourceKey][key];\n    };\n    sharedPropertyDefinition.set = function proxySetter(val) {\n        this[sourceKey][key] = val;\n    };\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction initState(vm) {\n    const opts = vm.$options;\n    if (opts.props)\n        initProps$1(vm, opts.props);\n    // Composition API\n    initSetup(vm);\n    if (opts.methods)\n        initMethods(vm, opts.methods);\n    if (opts.data) {\n        initData(vm);\n    }\n    else {\n        const ob = observe((vm._data = {}));\n        ob && ob.vmCount++;\n    }\n    if (opts.computed)\n        initComputed$1(vm, opts.computed);\n    if (opts.watch && opts.watch !== nativeWatch) {\n        initWatch(vm, opts.watch);\n    }\n}\nfunction initProps$1(vm, propsOptions) {\n    const propsData = vm.$options.propsData || {};\n    const props = (vm._props = shallowReactive({}));\n    // cache prop keys so that future props updates can iterate using Array\n    // instead of dynamic object key enumeration.\n    const keys = (vm.$options._propKeys = []);\n    const isRoot = !vm.$parent;\n    // root instance props should be converted\n    if (!isRoot) {\n        toggleObserving(false);\n    }\n    for (const key in propsOptions) {\n        keys.push(key);\n        const value = validateProp(key, propsOptions, propsData, vm);\n        /* istanbul ignore else */\n        {\n            const hyphenatedKey = hyphenate(key);\n            if (isReservedAttribute(hyphenatedKey) ||\n                config.isReservedAttr(hyphenatedKey)) {\n                warn(`\"${hyphenatedKey}\" is a reserved attribute and cannot be used as component prop.`, vm);\n            }\n            defineReactive(props, key, value, () => {\n                if (!isRoot && !isUpdatingChildComponent) {\n                    warn(`Avoid mutating a prop directly since the value will be ` +\n                        `overwritten whenever the parent component re-renders. ` +\n                        `Instead, use a data or computed property based on the prop's ` +\n                        `value. Prop being mutated: \"${key}\"`, vm);\n                }\n            }, true /* shallow */);\n        }\n        // static props are already proxied on the component's prototype\n        // during Vue.extend(). We only need to proxy props defined at\n        // instantiation here.\n        if (!(key in vm)) {\n            proxy(vm, `_props`, key);\n        }\n    }\n    toggleObserving(true);\n}\nfunction initData(vm) {\n    let data = vm.$options.data;\n    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n    if (!isPlainObject(data)) {\n        data = {};\n        warn('data functions should return an object:\\n' +\n                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n    }\n    // proxy data on instance\n    const keys = Object.keys(data);\n    const props = vm.$options.props;\n    const methods = vm.$options.methods;\n    let i = keys.length;\n    while (i--) {\n        const key = keys[i];\n        {\n            if (methods && hasOwn(methods, key)) {\n                warn(`Method \"${key}\" has already been defined as a data property.`, vm);\n            }\n        }\n        if (props && hasOwn(props, key)) {\n            warn(`The data property \"${key}\" is already declared as a prop. ` +\n                    `Use prop default value instead.`, vm);\n        }\n        else if (!isReserved(key)) {\n            proxy(vm, `_data`, key);\n        }\n    }\n    // observe data\n    const ob = observe(data);\n    ob && ob.vmCount++;\n}\nfunction getData(data, vm) {\n    // #7573 disable dep collection when invoking data getters\n    pushTarget();\n    try {\n        return data.call(vm, vm);\n    }\n    catch (e) {\n        handleError(e, vm, `data()`);\n        return {};\n    }\n    finally {\n        popTarget();\n    }\n}\nconst computedWatcherOptions = { lazy: true };\nfunction initComputed$1(vm, computed) {\n    // $flow-disable-line\n    const watchers = (vm._computedWatchers = Object.create(null));\n    // computed properties are just getters during SSR\n    const isSSR = isServerRendering();\n    for (const key in computed) {\n        const userDef = computed[key];\n        const getter = isFunction(userDef) ? userDef : userDef.get;\n        if (getter == null) {\n            warn(`Getter is missing for computed property \"${key}\".`, vm);\n        }\n        if (!isSSR) {\n            // create internal watcher for the computed property.\n            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n        }\n        // component-defined computed properties are already defined on the\n        // component prototype. We only need to define computed properties defined\n        // at instantiation here.\n        if (!(key in vm)) {\n            defineComputed(vm, key, userDef);\n        }\n        else {\n            if (key in vm.$data) {\n                warn(`The computed property \"${key}\" is already defined in data.`, vm);\n            }\n            else if (vm.$options.props && key in vm.$options.props) {\n                warn(`The computed property \"${key}\" is already defined as a prop.`, vm);\n            }\n            else if (vm.$options.methods && key in vm.$options.methods) {\n                warn(`The computed property \"${key}\" is already defined as a method.`, vm);\n            }\n        }\n    }\n}\nfunction defineComputed(target, key, userDef) {\n    const shouldCache = !isServerRendering();\n    if (isFunction(userDef)) {\n        sharedPropertyDefinition.get = shouldCache\n            ? createComputedGetter(key)\n            : createGetterInvoker(userDef);\n        sharedPropertyDefinition.set = noop;\n    }\n    else {\n        sharedPropertyDefinition.get = userDef.get\n            ? shouldCache && userDef.cache !== false\n                ? createComputedGetter(key)\n                : createGetterInvoker(userDef.get)\n            : noop;\n        sharedPropertyDefinition.set = userDef.set || noop;\n    }\n    if (sharedPropertyDefinition.set === noop) {\n        sharedPropertyDefinition.set = function () {\n            warn(`Computed property \"${key}\" was assigned to but it has no setter.`, this);\n        };\n    }\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction createComputedGetter(key) {\n    return function computedGetter() {\n        const watcher = this._computedWatchers && this._computedWatchers[key];\n        if (watcher) {\n            if (watcher.dirty) {\n                watcher.evaluate();\n            }\n            if (Dep.target) {\n                if (Dep.target.onTrack) {\n                    Dep.target.onTrack({\n                        effect: Dep.target,\n                        target: this,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key\n                    });\n                }\n                watcher.depend();\n            }\n            return watcher.value;\n        }\n    };\n}\nfunction createGetterInvoker(fn) {\n    return function computedGetter() {\n        return fn.call(this, this);\n    };\n}\nfunction initMethods(vm, methods) {\n    const props = vm.$options.props;\n    for (const key in methods) {\n        {\n            if (typeof methods[key] !== 'function') {\n                warn(`Method \"${key}\" has type \"${typeof methods[key]}\" in the component definition. ` +\n                    `Did you reference the function correctly?`, vm);\n            }\n            if (props && hasOwn(props, key)) {\n                warn(`Method \"${key}\" has already been defined as a prop.`, vm);\n            }\n            if (key in vm && isReserved(key)) {\n                warn(`Method \"${key}\" conflicts with an existing Vue instance method. ` +\n                    `Avoid defining component methods that start with _ or $.`);\n            }\n        }\n        vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n    }\n}\nfunction initWatch(vm, watch) {\n    for (const key in watch) {\n        const handler = watch[key];\n        if (isArray(handler)) {\n            for (let i = 0; i < handler.length; i++) {\n                createWatcher(vm, key, handler[i]);\n            }\n        }\n        else {\n            createWatcher(vm, key, handler);\n        }\n    }\n}\nfunction createWatcher(vm, expOrFn, handler, options) {\n    if (isPlainObject(handler)) {\n        options = handler;\n        handler = handler.handler;\n    }\n    if (typeof handler === 'string') {\n        handler = vm[handler];\n    }\n    return vm.$watch(expOrFn, handler, options);\n}\nfunction stateMixin(Vue) {\n    // flow somehow has problems with directly declared definition object\n    // when using Object.defineProperty, so we have to procedurally build up\n    // the object here.\n    const dataDef = {};\n    dataDef.get = function () {\n        return this._data;\n    };\n    const propsDef = {};\n    propsDef.get = function () {\n        return this._props;\n    };\n    {\n        dataDef.set = function () {\n            warn('Avoid replacing instance root $data. ' +\n                'Use nested data properties instead.', this);\n        };\n        propsDef.set = function () {\n            warn(`$props is readonly.`, this);\n        };\n    }\n    Object.defineProperty(Vue.prototype, '$data', dataDef);\n    Object.defineProperty(Vue.prototype, '$props', propsDef);\n    Vue.prototype.$set = set;\n    Vue.prototype.$delete = del;\n    Vue.prototype.$watch = function (expOrFn, cb, options) {\n        const vm = this;\n        if (isPlainObject(cb)) {\n            return createWatcher(vm, expOrFn, cb, options);\n        }\n        options = options || {};\n        options.user = true;\n        const watcher = new Watcher(vm, expOrFn, cb, options);\n        if (options.immediate) {\n            const info = `callback for immediate watcher \"${watcher.expression}\"`;\n            pushTarget();\n            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n            popTarget();\n        }\n        return function unwatchFn() {\n            watcher.teardown();\n        };\n    };\n}\n\nlet uid = 0;\nfunction initMixin$1(Vue) {\n    Vue.prototype._init = function (options) {\n        const vm = this;\n        // a uid\n        vm._uid = uid++;\n        let startTag, endTag;\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            startTag = `vue-perf-start:${vm._uid}`;\n            endTag = `vue-perf-end:${vm._uid}`;\n            mark(startTag);\n        }\n        // a flag to mark this as a Vue instance without having to do instanceof\n        // check\n        vm._isVue = true;\n        // avoid instances from being observed\n        vm.__v_skip = true;\n        // effect scope\n        vm._scope = new EffectScope(true /* detached */);\n        // #13134 edge case where a child component is manually created during the\n        // render of a parent component\n        vm._scope.parent = undefined;\n        vm._scope._vm = true;\n        // merge options\n        if (options && options._isComponent) {\n            // optimize internal component instantiation\n            // since dynamic options merging is pretty slow, and none of the\n            // internal component options needs special treatment.\n            initInternalComponent(vm, options);\n        }\n        else {\n            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n        }\n        /* istanbul ignore else */\n        {\n            initProxy(vm);\n        }\n        // expose real self\n        vm._self = vm;\n        initLifecycle(vm);\n        initEvents(vm);\n        initRender(vm);\n        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n        initInjections(vm); // resolve injections before data/props\n        initState(vm);\n        initProvide(vm); // resolve provide after data/props\n        callHook$1(vm, 'created');\n        /* istanbul ignore if */\n        if (config.performance && mark) {\n            vm._name = formatComponentName(vm, false);\n            mark(endTag);\n            measure(`vue ${vm._name} init`, startTag, endTag);\n        }\n        if (vm.$options.el) {\n            vm.$mount(vm.$options.el);\n        }\n    };\n}\nfunction initInternalComponent(vm, options) {\n    const opts = (vm.$options = Object.create(vm.constructor.options));\n    // doing this because it's faster than dynamic enumeration.\n    const parentVnode = options._parentVnode;\n    opts.parent = options.parent;\n    opts._parentVnode = parentVnode;\n    const vnodeComponentOptions = parentVnode.componentOptions;\n    opts.propsData = vnodeComponentOptions.propsData;\n    opts._parentListeners = vnodeComponentOptions.listeners;\n    opts._renderChildren = vnodeComponentOptions.children;\n    opts._componentTag = vnodeComponentOptions.tag;\n    if (options.render) {\n        opts.render = options.render;\n        opts.staticRenderFns = options.staticRenderFns;\n    }\n}\nfunction resolveConstructorOptions(Ctor) {\n    let options = Ctor.options;\n    if (Ctor.super) {\n        const superOptions = resolveConstructorOptions(Ctor.super);\n        const cachedSuperOptions = Ctor.superOptions;\n        if (superOptions !== cachedSuperOptions) {\n            // super option changed,\n            // need to resolve new options.\n            Ctor.superOptions = superOptions;\n            // check if there are any late-modified/attached options (#4976)\n            const modifiedOptions = resolveModifiedOptions(Ctor);\n            // update base extend options\n            if (modifiedOptions) {\n                extend(Ctor.extendOptions, modifiedOptions);\n            }\n            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n            if (options.name) {\n                options.components[options.name] = Ctor;\n            }\n        }\n    }\n    return options;\n}\nfunction resolveModifiedOptions(Ctor) {\n    let modified;\n    const latest = Ctor.options;\n    const sealed = Ctor.sealedOptions;\n    for (const key in latest) {\n        if (latest[key] !== sealed[key]) {\n            if (!modified)\n                modified = {};\n            modified[key] = latest[key];\n        }\n    }\n    return modified;\n}\n\nfunction Vue(options) {\n    if (!(this instanceof Vue)) {\n        warn('Vue is a constructor and should be called with the `new` keyword');\n    }\n    this._init(options);\n}\n//@ts-expect-error Vue has function type\ninitMixin$1(Vue);\n//@ts-expect-error Vue has function type\nstateMixin(Vue);\n//@ts-expect-error Vue has function type\neventsMixin(Vue);\n//@ts-expect-error Vue has function type\nlifecycleMixin(Vue);\n//@ts-expect-error Vue has function type\nrenderMixin(Vue);\n\nfunction initUse(Vue) {\n    Vue.use = function (plugin) {\n        const installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n        if (installedPlugins.indexOf(plugin) > -1) {\n            return this;\n        }\n        // additional parameters\n        const args = toArray(arguments, 1);\n        args.unshift(this);\n        if (isFunction(plugin.install)) {\n            plugin.install.apply(plugin, args);\n        }\n        else if (isFunction(plugin)) {\n            plugin.apply(null, args);\n        }\n        installedPlugins.push(plugin);\n        return this;\n    };\n}\n\nfunction initMixin(Vue) {\n    Vue.mixin = function (mixin) {\n        this.options = mergeOptions(this.options, mixin);\n        return this;\n    };\n}\n\nfunction initExtend(Vue) {\n    /**\n     * Each instance constructor, including Vue, has a unique\n     * cid. This enables us to create wrapped \"child\n     * constructors\" for prototypal inheritance and cache them.\n     */\n    Vue.cid = 0;\n    let cid = 1;\n    /**\n     * Class inheritance\n     */\n    Vue.extend = function (extendOptions) {\n        extendOptions = extendOptions || {};\n        const Super = this;\n        const SuperId = Super.cid;\n        const cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n        if (cachedCtors[SuperId]) {\n            return cachedCtors[SuperId];\n        }\n        const name = getComponentName(extendOptions) || getComponentName(Super.options);\n        if (name) {\n            validateComponentName(name);\n        }\n        const Sub = function VueComponent(options) {\n            this._init(options);\n        };\n        Sub.prototype = Object.create(Super.prototype);\n        Sub.prototype.constructor = Sub;\n        Sub.cid = cid++;\n        Sub.options = mergeOptions(Super.options, extendOptions);\n        Sub['super'] = Super;\n        // For props and computed properties, we define the proxy getters on\n        // the Vue instances at extension time, on the extended prototype. This\n        // avoids Object.defineProperty calls for each instance created.\n        if (Sub.options.props) {\n            initProps(Sub);\n        }\n        if (Sub.options.computed) {\n            initComputed(Sub);\n        }\n        // allow further extension/mixin/plugin usage\n        Sub.extend = Super.extend;\n        Sub.mixin = Super.mixin;\n        Sub.use = Super.use;\n        // create asset registers, so extended classes\n        // can have their private assets too.\n        ASSET_TYPES.forEach(function (type) {\n            Sub[type] = Super[type];\n        });\n        // enable recursive self-lookup\n        if (name) {\n            Sub.options.components[name] = Sub;\n        }\n        // keep a reference to the super options at extension time.\n        // later at instantiation we can check if Super's options have\n        // been updated.\n        Sub.superOptions = Super.options;\n        Sub.extendOptions = extendOptions;\n        Sub.sealedOptions = extend({}, Sub.options);\n        // cache constructor\n        cachedCtors[SuperId] = Sub;\n        return Sub;\n    };\n}\nfunction initProps(Comp) {\n    const props = Comp.options.props;\n    for (const key in props) {\n        proxy(Comp.prototype, `_props`, key);\n    }\n}\nfunction initComputed(Comp) {\n    const computed = Comp.options.computed;\n    for (const key in computed) {\n        defineComputed(Comp.prototype, key, computed[key]);\n    }\n}\n\nfunction initAssetRegisters(Vue) {\n    /**\n     * Create asset registration methods.\n     */\n    ASSET_TYPES.forEach(type => {\n        // @ts-expect-error function is not exact same type\n        Vue[type] = function (id, definition) {\n            if (!definition) {\n                return this.options[type + 's'][id];\n            }\n            else {\n                /* istanbul ignore if */\n                if (type === 'component') {\n                    validateComponentName(id);\n                }\n                if (type === 'component' && isPlainObject(definition)) {\n                    // @ts-expect-error\n                    definition.name = definition.name || id;\n                    definition = this.options._base.extend(definition);\n                }\n                if (type === 'directive' && isFunction(definition)) {\n                    definition = { bind: definition, update: definition };\n                }\n                this.options[type + 's'][id] = definition;\n                return definition;\n            }\n        };\n    });\n}\n\nfunction _getComponentName(opts) {\n    return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n}\nfunction matches(pattern, name) {\n    if (isArray(pattern)) {\n        return pattern.indexOf(name) > -1;\n    }\n    else if (typeof pattern === 'string') {\n        return pattern.split(',').indexOf(name) > -1;\n    }\n    else if (isRegExp(pattern)) {\n        return pattern.test(name);\n    }\n    /* istanbul ignore next */\n    return false;\n}\nfunction pruneCache(keepAliveInstance, filter) {\n    const { cache, keys, _vnode, $vnode } = keepAliveInstance;\n    for (const key in cache) {\n        const entry = cache[key];\n        if (entry) {\n            const name = entry.name;\n            if (name && !filter(name)) {\n                pruneCacheEntry(cache, key, keys, _vnode);\n            }\n        }\n    }\n    $vnode.componentOptions.children = undefined;\n}\nfunction pruneCacheEntry(cache, key, keys, current) {\n    const entry = cache[key];\n    if (entry && (!current || entry.tag !== current.tag)) {\n        // @ts-expect-error can be undefined\n        entry.componentInstance.$destroy();\n    }\n    cache[key] = null;\n    remove$2(keys, key);\n}\nconst patternTypes = [String, RegExp, Array];\n// TODO defineComponent\nvar KeepAlive = {\n    name: 'keep-alive',\n    abstract: true,\n    props: {\n        include: patternTypes,\n        exclude: patternTypes,\n        max: [String, Number]\n    },\n    methods: {\n        cacheVNode() {\n            const { cache, keys, vnodeToCache, keyToCache } = this;\n            if (vnodeToCache) {\n                const { tag, componentInstance, componentOptions } = vnodeToCache;\n                cache[keyToCache] = {\n                    name: _getComponentName(componentOptions),\n                    tag,\n                    componentInstance\n                };\n                keys.push(keyToCache);\n                // prune oldest entry\n                if (this.max && keys.length > parseInt(this.max)) {\n                    pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                }\n                this.vnodeToCache = null;\n            }\n        }\n    },\n    created() {\n        this.cache = Object.create(null);\n        this.keys = [];\n    },\n    destroyed() {\n        for (const key in this.cache) {\n            pruneCacheEntry(this.cache, key, this.keys);\n        }\n    },\n    mounted() {\n        this.cacheVNode();\n        this.$watch('include', val => {\n            pruneCache(this, name => matches(val, name));\n        });\n        this.$watch('exclude', val => {\n            pruneCache(this, name => !matches(val, name));\n        });\n    },\n    updated() {\n        this.cacheVNode();\n    },\n    render() {\n        const slot = this.$slots.default;\n        const vnode = getFirstComponentChild(slot);\n        const componentOptions = vnode && vnode.componentOptions;\n        if (componentOptions) {\n            // check pattern\n            const name = _getComponentName(componentOptions);\n            const { include, exclude } = this;\n            if (\n            // not included\n            (include && (!name || !matches(include, name))) ||\n                // excluded\n                (exclude && name && matches(exclude, name))) {\n                return vnode;\n            }\n            const { cache, keys } = this;\n            const key = vnode.key == null\n                ? // same constructor may get registered as different local components\n                    // so cid alone is not enough (#3269)\n                    componentOptions.Ctor.cid +\n                        (componentOptions.tag ? `::${componentOptions.tag}` : '')\n                : vnode.key;\n            if (cache[key]) {\n                vnode.componentInstance = cache[key].componentInstance;\n                // make current key freshest\n                remove$2(keys, key);\n                keys.push(key);\n            }\n            else {\n                // delay setting the cache until update\n                this.vnodeToCache = vnode;\n                this.keyToCache = key;\n            }\n            // @ts-expect-error can vnode.data can be undefined\n            vnode.data.keepAlive = true;\n        }\n        return vnode || (slot && slot[0]);\n    }\n};\n\nvar builtInComponents = {\n    KeepAlive\n};\n\nfunction initGlobalAPI(Vue) {\n    // config\n    const configDef = {};\n    configDef.get = () => config;\n    {\n        configDef.set = () => {\n            warn('Do not replace the Vue.config object, set individual fields instead.');\n        };\n    }\n    Object.defineProperty(Vue, 'config', configDef);\n    // exposed util methods.\n    // NOTE: these are not considered part of the public API - avoid relying on\n    // them unless you are aware of the risk.\n    Vue.util = {\n        warn,\n        extend,\n        mergeOptions,\n        defineReactive\n    };\n    Vue.set = set;\n    Vue.delete = del;\n    Vue.nextTick = nextTick;\n    // 2.6 explicit observable API\n    Vue.observable = (obj) => {\n        observe(obj);\n        return obj;\n    };\n    Vue.options = Object.create(null);\n    ASSET_TYPES.forEach(type => {\n        Vue.options[type + 's'] = Object.create(null);\n    });\n    // this is used to identify the \"base\" constructor to extend all plain-object\n    // components with in Weex's multi-instance scenarios.\n    Vue.options._base = Vue;\n    extend(Vue.options.components, builtInComponents);\n    initUse(Vue);\n    initMixin(Vue);\n    initExtend(Vue);\n    initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\nObject.defineProperty(Vue.prototype, '$isServer', {\n    get: isServerRendering\n});\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n    get() {\n        /* istanbul ignore next */\n        return this.$vnode && this.$vnode.ssrContext;\n    }\n});\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n    value: FunctionalRenderContext\n});\nVue.version = version;\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nconst isReservedAttr = makeMap('style,class');\n// attributes that should be using props for binding\nconst acceptValue = makeMap('input,textarea,option,select,progress');\nconst mustUseProp = (tag, type, attr) => {\n    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n        (attr === 'selected' && tag === 'option') ||\n        (attr === 'checked' && tag === 'input') ||\n        (attr === 'muted' && tag === 'video'));\n};\nconst isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\nconst isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\nconst convertEnumeratedValue = (key, value) => {\n    return isFalsyAttrValue(value) || value === 'false'\n        ? 'false'\n        : // allow arbitrary string value for contenteditable\n            key === 'contenteditable' && isValidContentEditableValue(value)\n                ? value\n                : 'true';\n};\nconst isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n    'required,reversed,scoped,seamless,selected,sortable,' +\n    'truespeed,typemustmatch,visible');\nconst xlinkNS = 'http://www.w3.org/1999/xlink';\nconst isXlink = (name) => {\n    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n};\nconst getXlinkProp = (name) => {\n    return isXlink(name) ? name.slice(6, name.length) : '';\n};\nconst isFalsyAttrValue = (val) => {\n    return val == null || val === false;\n};\n\nfunction genClassForVnode(vnode) {\n    let data = vnode.data;\n    let parentNode = vnode;\n    let childNode = vnode;\n    while (isDef(childNode.componentInstance)) {\n        childNode = childNode.componentInstance._vnode;\n        if (childNode && childNode.data) {\n            data = mergeClassData(childNode.data, data);\n        }\n    }\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while (isDef((parentNode = parentNode.parent))) {\n        if (parentNode && parentNode.data) {\n            data = mergeClassData(data, parentNode.data);\n        }\n    }\n    return renderClass(data.staticClass, data.class);\n}\nfunction mergeClassData(child, parent) {\n    return {\n        staticClass: concat(child.staticClass, parent.staticClass),\n        class: isDef(child.class) ? [child.class, parent.class] : parent.class\n    };\n}\nfunction renderClass(staticClass, dynamicClass) {\n    if (isDef(staticClass) || isDef(dynamicClass)) {\n        return concat(staticClass, stringifyClass(dynamicClass));\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction concat(a, b) {\n    return a ? (b ? a + ' ' + b : a) : b || '';\n}\nfunction stringifyClass(value) {\n    if (Array.isArray(value)) {\n        return stringifyArray(value);\n    }\n    if (isObject(value)) {\n        return stringifyObject(value);\n    }\n    if (typeof value === 'string') {\n        return value;\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction stringifyArray(value) {\n    let res = '';\n    let stringified;\n    for (let i = 0, l = value.length; i < l; i++) {\n        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n            if (res)\n                res += ' ';\n            res += stringified;\n        }\n    }\n    return res;\n}\nfunction stringifyObject(value) {\n    let res = '';\n    for (const key in value) {\n        if (value[key]) {\n            if (res)\n                res += ' ';\n            res += key;\n        }\n    }\n    return res;\n}\n\nconst namespaceMap = {\n    svg: 'http://www.w3.org/2000/svg',\n    math: 'http://www.w3.org/1998/Math/MathML'\n};\nconst isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n    'embed,object,param,source,canvas,script,noscript,del,ins,' +\n    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n    'output,progress,select,textarea,' +\n    'details,dialog,menu,menuitem,summary,' +\n    'content,element,shadow,template,blockquote,iframe,tfoot');\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nconst isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\nconst isReservedTag = (tag) => {\n    return isHTMLTag(tag) || isSVG(tag);\n};\nfunction getTagNamespace(tag) {\n    if (isSVG(tag)) {\n        return 'svg';\n    }\n    // basic support for MathML\n    // note it doesn't support other MathML elements being component roots\n    if (tag === 'math') {\n        return 'math';\n    }\n}\nconst unknownElementCache = Object.create(null);\nfunction isUnknownElement(tag) {\n    /* istanbul ignore if */\n    if (!inBrowser) {\n        return true;\n    }\n    if (isReservedTag(tag)) {\n        return false;\n    }\n    tag = tag.toLowerCase();\n    /* istanbul ignore if */\n    if (unknownElementCache[tag] != null) {\n        return unknownElementCache[tag];\n    }\n    const el = document.createElement(tag);\n    if (tag.indexOf('-') > -1) {\n        // https://stackoverflow.com/a/28210364/1070244\n        return (unknownElementCache[tag] =\n            el.constructor === window.HTMLUnknownElement ||\n                el.constructor === window.HTMLElement);\n    }\n    else {\n        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n    }\n}\nconst isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query(el) {\n    if (typeof el === 'string') {\n        const selected = document.querySelector(el);\n        if (!selected) {\n            warn('Cannot find element: ' + el);\n            return document.createElement('div');\n        }\n        return selected;\n    }\n    else {\n        return el;\n    }\n}\n\nfunction createElement(tagName, vnode) {\n    const elm = document.createElement(tagName);\n    if (tagName !== 'select') {\n        return elm;\n    }\n    // false or null will remove the attribute but undefined will not\n    if (vnode.data &&\n        vnode.data.attrs &&\n        vnode.data.attrs.multiple !== undefined) {\n        elm.setAttribute('multiple', 'multiple');\n    }\n    return elm;\n}\nfunction createElementNS(namespace, tagName) {\n    return document.createElementNS(namespaceMap[namespace], tagName);\n}\nfunction createTextNode(text) {\n    return document.createTextNode(text);\n}\nfunction createComment(text) {\n    return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n    parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n    node.removeChild(child);\n}\nfunction appendChild(node, child) {\n    node.appendChild(child);\n}\nfunction parentNode(node) {\n    return node.parentNode;\n}\nfunction nextSibling(node) {\n    return node.nextSibling;\n}\nfunction tagName(node) {\n    return node.tagName;\n}\nfunction setTextContent(node, text) {\n    node.textContent = text;\n}\nfunction setStyleScope(node, scopeId) {\n    node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\nvar ref = {\n    create(_, vnode) {\n        registerRef(vnode);\n    },\n    update(oldVnode, vnode) {\n        if (oldVnode.data.ref !== vnode.data.ref) {\n            registerRef(oldVnode, true);\n            registerRef(vnode);\n        }\n    },\n    destroy(vnode) {\n        registerRef(vnode, true);\n    }\n};\nfunction registerRef(vnode, isRemoval) {\n    const ref = vnode.data.ref;\n    if (!isDef(ref))\n        return;\n    const vm = vnode.context;\n    const refValue = vnode.componentInstance || vnode.elm;\n    const value = isRemoval ? null : refValue;\n    const $refsValue = isRemoval ? undefined : refValue;\n    if (isFunction(ref)) {\n        invokeWithErrorHandling(ref, vm, [value], vm, `template ref function`);\n        return;\n    }\n    const isFor = vnode.data.refInFor;\n    const _isString = typeof ref === 'string' || typeof ref === 'number';\n    const _isRef = isRef(ref);\n    const refs = vm.$refs;\n    if (_isString || _isRef) {\n        if (isFor) {\n            const existing = _isString ? refs[ref] : ref.value;\n            if (isRemoval) {\n                isArray(existing) && remove$2(existing, refValue);\n            }\n            else {\n                if (!isArray(existing)) {\n                    if (_isString) {\n                        refs[ref] = [refValue];\n                        setSetupRef(vm, ref, refs[ref]);\n                    }\n                    else {\n                        ref.value = [refValue];\n                    }\n                }\n                else if (!existing.includes(refValue)) {\n                    existing.push(refValue);\n                }\n            }\n        }\n        else if (_isString) {\n            if (isRemoval && refs[ref] !== refValue) {\n                return;\n            }\n            refs[ref] = $refsValue;\n            setSetupRef(vm, ref, value);\n        }\n        else if (_isRef) {\n            if (isRemoval && ref.value !== refValue) {\n                return;\n            }\n            ref.value = value;\n        }\n        else {\n            warn(`Invalid template ref type: ${typeof ref}`);\n        }\n    }\n}\nfunction setSetupRef({ _setupState }, key, val) {\n    if (_setupState && hasOwn(_setupState, key)) {\n        if (isRef(_setupState[key])) {\n            _setupState[key].value = val;\n        }\n        else {\n            _setupState[key] = val;\n        }\n    }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\nconst emptyNode = new VNode('', {}, []);\nconst hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\nfunction sameVnode(a, b) {\n    return (a.key === b.key &&\n        a.asyncFactory === b.asyncFactory &&\n        ((a.tag === b.tag &&\n            a.isComment === b.isComment &&\n            isDef(a.data) === isDef(b.data) &&\n            sameInputType(a, b)) ||\n            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n}\nfunction sameInputType(a, b) {\n    if (a.tag !== 'input')\n        return true;\n    let i;\n    const typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n    const typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n    let i, key;\n    const map = {};\n    for (i = beginIdx; i <= endIdx; ++i) {\n        key = children[i].key;\n        if (isDef(key))\n            map[key] = i;\n    }\n    return map;\n}\nfunction createPatchFunction(backend) {\n    let i, j;\n    const cbs = {};\n    const { modules, nodeOps } = backend;\n    for (i = 0; i < hooks.length; ++i) {\n        cbs[hooks[i]] = [];\n        for (j = 0; j < modules.length; ++j) {\n            if (isDef(modules[j][hooks[i]])) {\n                cbs[hooks[i]].push(modules[j][hooks[i]]);\n            }\n        }\n    }\n    function emptyNodeAt(elm) {\n        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n    }\n    function createRmCb(childElm, listeners) {\n        function remove() {\n            if (--remove.listeners === 0) {\n                removeNode(childElm);\n            }\n        }\n        remove.listeners = listeners;\n        return remove;\n    }\n    function removeNode(el) {\n        const parent = nodeOps.parentNode(el);\n        // element may have already been removed due to v-html / v-text\n        if (isDef(parent)) {\n            nodeOps.removeChild(parent, el);\n        }\n    }\n    function isUnknownElement(vnode, inVPre) {\n        return (!inVPre &&\n            !vnode.ns &&\n            !(config.ignoredElements.length &&\n                config.ignoredElements.some(ignore => {\n                    return isRegExp(ignore)\n                        ? ignore.test(vnode.tag)\n                        : ignore === vnode.tag;\n                })) &&\n            config.isUnknownElement(vnode.tag));\n    }\n    let creatingElmInVPre = 0;\n    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // This vnode was used in a previous render!\n            // now it's used as a new node, overwriting its elm would cause\n            // potential patch errors down the road when it's used as an insertion\n            // reference node. Instead, we clone the node on-demand before creating\n            // associated DOM element for it.\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        vnode.isRootInsert = !nested; // for transition enter check\n        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n            return;\n        }\n        const data = vnode.data;\n        const children = vnode.children;\n        const tag = vnode.tag;\n        if (isDef(tag)) {\n            {\n                if (data && data.pre) {\n                    creatingElmInVPre++;\n                }\n                if (isUnknownElement(vnode, creatingElmInVPre)) {\n                    warn('Unknown custom element: <' +\n                        tag +\n                        '> - did you ' +\n                        'register the component correctly? For recursive components, ' +\n                        'make sure to provide the \"name\" option.', vnode.context);\n                }\n            }\n            vnode.elm = vnode.ns\n                ? nodeOps.createElementNS(vnode.ns, tag)\n                : nodeOps.createElement(tag, vnode);\n            setScope(vnode);\n            createChildren(vnode, children, insertedVnodeQueue);\n            if (isDef(data)) {\n                invokeCreateHooks(vnode, insertedVnodeQueue);\n            }\n            insert(parentElm, vnode.elm, refElm);\n            if (data && data.pre) {\n                creatingElmInVPre--;\n            }\n        }\n        else if (isTrue(vnode.isComment)) {\n            vnode.elm = nodeOps.createComment(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n        else {\n            vnode.elm = nodeOps.createTextNode(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n    }\n    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i = vnode.data;\n        if (isDef(i)) {\n            const isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n            if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                i(vnode, false /* hydrating */);\n            }\n            // after calling the init hook, if the vnode is a child component\n            // it should've created a child instance and mounted it. the child\n            // component also has set the placeholder vnode's elm.\n            // in that case we can just return the element and be done.\n            if (isDef(vnode.componentInstance)) {\n                initComponent(vnode, insertedVnodeQueue);\n                insert(parentElm, vnode.elm, refElm);\n                if (isTrue(isReactivated)) {\n                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                }\n                return true;\n            }\n        }\n    }\n    function initComponent(vnode, insertedVnodeQueue) {\n        if (isDef(vnode.data.pendingInsert)) {\n            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n            vnode.data.pendingInsert = null;\n        }\n        vnode.elm = vnode.componentInstance.$el;\n        if (isPatchable(vnode)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            setScope(vnode);\n        }\n        else {\n            // empty component root.\n            // skip all element-related modules except for ref (#3455)\n            registerRef(vnode);\n            // make sure to invoke the insert hook\n            insertedVnodeQueue.push(vnode);\n        }\n    }\n    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        let i;\n        // hack for #4339: a reactivated component with inner transition\n        // does not trigger because the inner node's created hooks are not called\n        // again. It's not ideal to involve module-specific logic in here but\n        // there doesn't seem to be a better way to do it.\n        let innerNode = vnode;\n        while (innerNode.componentInstance) {\n            innerNode = innerNode.componentInstance._vnode;\n            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                for (i = 0; i < cbs.activate.length; ++i) {\n                    cbs.activate[i](emptyNode, innerNode);\n                }\n                insertedVnodeQueue.push(innerNode);\n                break;\n            }\n        }\n        // unlike a newly created component,\n        // a reactivated keep-alive component doesn't insert itself\n        insert(parentElm, vnode.elm, refElm);\n    }\n    function insert(parent, elm, ref) {\n        if (isDef(parent)) {\n            if (isDef(ref)) {\n                if (nodeOps.parentNode(ref) === parent) {\n                    nodeOps.insertBefore(parent, elm, ref);\n                }\n            }\n            else {\n                nodeOps.appendChild(parent, elm);\n            }\n        }\n    }\n    function createChildren(vnode, children, insertedVnodeQueue) {\n        if (isArray(children)) {\n            {\n                checkDuplicateKeys(children);\n            }\n            for (let i = 0; i < children.length; ++i) {\n                createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n            }\n        }\n        else if (isPrimitive(vnode.text)) {\n            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n        }\n    }\n    function isPatchable(vnode) {\n        while (vnode.componentInstance) {\n            vnode = vnode.componentInstance._vnode;\n        }\n        return isDef(vnode.tag);\n    }\n    function invokeCreateHooks(vnode, insertedVnodeQueue) {\n        for (let i = 0; i < cbs.create.length; ++i) {\n            cbs.create[i](emptyNode, vnode);\n        }\n        i = vnode.data.hook; // Reuse variable\n        if (isDef(i)) {\n            if (isDef(i.create))\n                i.create(emptyNode, vnode);\n            if (isDef(i.insert))\n                insertedVnodeQueue.push(vnode);\n        }\n    }\n    // set scope id attribute for scoped CSS.\n    // this is implemented as a special case to avoid the overhead\n    // of going through the normal attribute patching process.\n    function setScope(vnode) {\n        let i;\n        if (isDef((i = vnode.fnScopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n        else {\n            let ancestor = vnode;\n            while (ancestor) {\n                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                    nodeOps.setStyleScope(vnode.elm, i);\n                }\n                ancestor = ancestor.parent;\n            }\n        }\n        // for slot content they should also get the scopeId from the host instance.\n        if (isDef((i = activeInstance)) &&\n            i !== vnode.context &&\n            i !== vnode.fnContext &&\n            isDef((i = i.$options._scopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n    }\n    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n        }\n    }\n    function invokeDestroyHook(vnode) {\n        let i, j;\n        const data = vnode.data;\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                i(vnode);\n            for (i = 0; i < cbs.destroy.length; ++i)\n                cbs.destroy[i](vnode);\n        }\n        if (isDef((i = vnode.children))) {\n            for (j = 0; j < vnode.children.length; ++j) {\n                invokeDestroyHook(vnode.children[j]);\n            }\n        }\n    }\n    function removeVnodes(vnodes, startIdx, endIdx) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            const ch = vnodes[startIdx];\n            if (isDef(ch)) {\n                if (isDef(ch.tag)) {\n                    removeAndInvokeRemoveHook(ch);\n                    invokeDestroyHook(ch);\n                }\n                else {\n                    // Text node\n                    removeNode(ch.elm);\n                }\n            }\n        }\n    }\n    function removeAndInvokeRemoveHook(vnode, rm) {\n        if (isDef(rm) || isDef(vnode.data)) {\n            let i;\n            const listeners = cbs.remove.length + 1;\n            if (isDef(rm)) {\n                // we have a recursively passed down rm callback\n                // increase the listeners count\n                rm.listeners += listeners;\n            }\n            else {\n                // directly removing\n                rm = createRmCb(vnode.elm, listeners);\n            }\n            // recursively invoke hooks on child component root node\n            if (isDef((i = vnode.componentInstance)) &&\n                isDef((i = i._vnode)) &&\n                isDef(i.data)) {\n                removeAndInvokeRemoveHook(i, rm);\n            }\n            for (i = 0; i < cbs.remove.length; ++i) {\n                cbs.remove[i](vnode, rm);\n            }\n            if (isDef((i = vnode.data.hook)) && isDef((i = i.remove))) {\n                i(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n        else {\n            removeNode(vnode.elm);\n        }\n    }\n    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n        let oldStartIdx = 0;\n        let newStartIdx = 0;\n        let oldEndIdx = oldCh.length - 1;\n        let oldStartVnode = oldCh[0];\n        let oldEndVnode = oldCh[oldEndIdx];\n        let newEndIdx = newCh.length - 1;\n        let newStartVnode = newCh[0];\n        let newEndVnode = newCh[newEndIdx];\n        let oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n        // removeOnly is a special flag used only by <transition-group>\n        // to ensure removed elements stay in correct relative positions\n        // during leaving transitions\n        const canMove = !removeOnly;\n        {\n            checkDuplicateKeys(newCh);\n        }\n        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n            if (isUndef(oldStartVnode)) {\n                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n            }\n            else if (isUndef(oldEndVnode)) {\n                oldEndVnode = oldCh[--oldEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newStartVnode)) {\n                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                oldStartVnode = oldCh[++oldStartIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else if (sameVnode(oldEndVnode, newEndVnode)) {\n                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newEndVnode)) {\n                // Vnode moved right\n                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                oldStartVnode = oldCh[++oldStartIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldEndVnode, newStartVnode)) {\n                // Vnode moved left\n                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else {\n                if (isUndef(oldKeyToIdx))\n                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                idxInOld = isDef(newStartVnode.key)\n                    ? oldKeyToIdx[newStartVnode.key]\n                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                if (isUndef(idxInOld)) {\n                    // New element\n                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                }\n                else {\n                    vnodeToMove = oldCh[idxInOld];\n                    if (sameVnode(vnodeToMove, newStartVnode)) {\n                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                        oldCh[idxInOld] = undefined;\n                        canMove &&\n                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                    }\n                    else {\n                        // same key but different element. treat as new element\n                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                    }\n                }\n                newStartVnode = newCh[++newStartIdx];\n            }\n        }\n        if (oldStartIdx > oldEndIdx) {\n            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n        }\n        else if (newStartIdx > newEndIdx) {\n            removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n        }\n    }\n    function checkDuplicateKeys(children) {\n        const seenKeys = {};\n        for (let i = 0; i < children.length; i++) {\n            const vnode = children[i];\n            const key = vnode.key;\n            if (isDef(key)) {\n                if (seenKeys[key]) {\n                    warn(`Duplicate keys detected: '${key}'. This may cause an update error.`, vnode.context);\n                }\n                else {\n                    seenKeys[key] = true;\n                }\n            }\n        }\n    }\n    function findIdxInOld(node, oldCh, start, end) {\n        for (let i = start; i < end; i++) {\n            const c = oldCh[i];\n            if (isDef(c) && sameVnode(node, c))\n                return i;\n        }\n    }\n    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n        if (oldVnode === vnode) {\n            return;\n        }\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // clone reused vnode\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        const elm = (vnode.elm = oldVnode.elm);\n        if (isTrue(oldVnode.isAsyncPlaceholder)) {\n            if (isDef(vnode.asyncFactory.resolved)) {\n                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n            }\n            else {\n                vnode.isAsyncPlaceholder = true;\n            }\n            return;\n        }\n        // reuse element for static trees.\n        // note we only do this if the vnode is cloned -\n        // if the new node is not cloned it means the render functions have been\n        // reset by the hot-reload-api and we need to do a proper re-render.\n        if (isTrue(vnode.isStatic) &&\n            isTrue(oldVnode.isStatic) &&\n            vnode.key === oldVnode.key &&\n            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n            vnode.componentInstance = oldVnode.componentInstance;\n            return;\n        }\n        let i;\n        const data = vnode.data;\n        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n            i(oldVnode, vnode);\n        }\n        const oldCh = oldVnode.children;\n        const ch = vnode.children;\n        if (isDef(data) && isPatchable(vnode)) {\n            for (i = 0; i < cbs.update.length; ++i)\n                cbs.update[i](oldVnode, vnode);\n            if (isDef((i = data.hook)) && isDef((i = i.update)))\n                i(oldVnode, vnode);\n        }\n        if (isUndef(vnode.text)) {\n            if (isDef(oldCh) && isDef(ch)) {\n                if (oldCh !== ch)\n                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n            }\n            else if (isDef(ch)) {\n                {\n                    checkDuplicateKeys(ch);\n                }\n                if (isDef(oldVnode.text))\n                    nodeOps.setTextContent(elm, '');\n                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n            }\n            else if (isDef(oldCh)) {\n                removeVnodes(oldCh, 0, oldCh.length - 1);\n            }\n            else if (isDef(oldVnode.text)) {\n                nodeOps.setTextContent(elm, '');\n            }\n        }\n        else if (oldVnode.text !== vnode.text) {\n            nodeOps.setTextContent(elm, vnode.text);\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                i(oldVnode, vnode);\n        }\n    }\n    function invokeInsertHook(vnode, queue, initial) {\n        // delay insert hooks for component root nodes, invoke them after the\n        // element is really inserted\n        if (isTrue(initial) && isDef(vnode.parent)) {\n            vnode.parent.data.pendingInsert = queue;\n        }\n        else {\n            for (let i = 0; i < queue.length; ++i) {\n                queue[i].data.hook.insert(queue[i]);\n            }\n        }\n    }\n    let hydrationBailed = false;\n    // list of modules that can skip create hook during hydration because they\n    // are already rendered on the client or has no need for initialization\n    // Note: style is excluded because it relies on initial clone for future\n    // deep updates (#7063).\n    const isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n    // Note: this is a browser-only function so we can assume elms are DOM nodes.\n    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n        let i;\n        const { tag, data, children } = vnode;\n        inVPre = inVPre || (data && data.pre);\n        vnode.elm = elm;\n        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n            vnode.isAsyncPlaceholder = true;\n            return true;\n        }\n        // assert node match\n        {\n            if (!assertNodeMatch(elm, vnode, inVPre)) {\n                return false;\n            }\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.init)))\n                i(vnode, true /* hydrating */);\n            if (isDef((i = vnode.componentInstance))) {\n                // child component. it should have hydrated its own tree.\n                initComponent(vnode, insertedVnodeQueue);\n                return true;\n            }\n        }\n        if (isDef(tag)) {\n            if (isDef(children)) {\n                // empty element, allow client to pick up and populate children\n                if (!elm.hasChildNodes()) {\n                    createChildren(vnode, children, insertedVnodeQueue);\n                }\n                else {\n                    // v-html and domProps: innerHTML\n                    if (isDef((i = data)) &&\n                        isDef((i = i.domProps)) &&\n                        isDef((i = i.innerHTML))) {\n                        if (i !== elm.innerHTML) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('server innerHTML: ', i);\n                                console.warn('client innerHTML: ', elm.innerHTML);\n                            }\n                            return false;\n                        }\n                    }\n                    else {\n                        // iterate and compare children lists\n                        let childrenMatch = true;\n                        let childNode = elm.firstChild;\n                        for (let i = 0; i < children.length; i++) {\n                            if (!childNode ||\n                                !hydrate(childNode, children[i], insertedVnodeQueue, inVPre)) {\n                                childrenMatch = false;\n                                break;\n                            }\n                            childNode = childNode.nextSibling;\n                        }\n                        // if childNode is not null, it means the actual childNodes list is\n                        // longer than the virtual children list.\n                        if (!childrenMatch || childNode) {\n                            /* istanbul ignore if */\n                            if (typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                            }\n                            return false;\n                        }\n                    }\n                }\n            }\n            if (isDef(data)) {\n                let fullInvoke = false;\n                for (const key in data) {\n                    if (!isRenderedModule(key)) {\n                        fullInvoke = true;\n                        invokeCreateHooks(vnode, insertedVnodeQueue);\n                        break;\n                    }\n                }\n                if (!fullInvoke && data['class']) {\n                    // ensure collecting deps for deep class bindings for future updates\n                    traverse(data['class']);\n                }\n            }\n        }\n        else if (elm.data !== vnode.text) {\n            elm.data = vnode.text;\n        }\n        return true;\n    }\n    function assertNodeMatch(node, vnode, inVPre) {\n        if (isDef(vnode.tag)) {\n            return (vnode.tag.indexOf('vue-component') === 0 ||\n                (!isUnknownElement(vnode, inVPre) &&\n                    vnode.tag.toLowerCase() ===\n                        (node.tagName && node.tagName.toLowerCase())));\n        }\n        else {\n            return node.nodeType === (vnode.isComment ? 8 : 3);\n        }\n    }\n    return function patch(oldVnode, vnode, hydrating, removeOnly) {\n        if (isUndef(vnode)) {\n            if (isDef(oldVnode))\n                invokeDestroyHook(oldVnode);\n            return;\n        }\n        let isInitialPatch = false;\n        const insertedVnodeQueue = [];\n        if (isUndef(oldVnode)) {\n            // empty mount (likely as component), create new root element\n            isInitialPatch = true;\n            createElm(vnode, insertedVnodeQueue);\n        }\n        else {\n            const isRealElement = isDef(oldVnode.nodeType);\n            if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                // patch existing root node\n                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n            }\n            else {\n                if (isRealElement) {\n                    // mounting to a real element\n                    // check if this is server-rendered content and if we can perform\n                    // a successful hydration.\n                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                        oldVnode.removeAttribute(SSR_ATTR);\n                        hydrating = true;\n                    }\n                    if (isTrue(hydrating)) {\n                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                            invokeInsertHook(vnode, insertedVnodeQueue, true);\n                            return oldVnode;\n                        }\n                        else {\n                            warn('The client-side rendered virtual DOM tree is not matching ' +\n                                'server-rendered content. This is likely caused by incorrect ' +\n                                'HTML markup, for example nesting block-level elements inside ' +\n                                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                'full client-side render.');\n                        }\n                    }\n                    // either not server-rendered, or hydration failed.\n                    // create an empty node and replace it\n                    oldVnode = emptyNodeAt(oldVnode);\n                }\n                // replacing existing element\n                const oldElm = oldVnode.elm;\n                const parentElm = nodeOps.parentNode(oldElm);\n                // create new node\n                createElm(vnode, insertedVnodeQueue, \n                // extremely rare edge case: do not insert if old element is in a\n                // leaving transition. Only happens when combining transition +\n                // keep-alive + HOCs. (#4590)\n                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                // update parent placeholder node element, recursively\n                if (isDef(vnode.parent)) {\n                    let ancestor = vnode.parent;\n                    const patchable = isPatchable(vnode);\n                    while (ancestor) {\n                        for (let i = 0; i < cbs.destroy.length; ++i) {\n                            cbs.destroy[i](ancestor);\n                        }\n                        ancestor.elm = vnode.elm;\n                        if (patchable) {\n                            for (let i = 0; i < cbs.create.length; ++i) {\n                                cbs.create[i](emptyNode, ancestor);\n                            }\n                            // #6513\n                            // invoke insert hooks that may have been merged by create hooks.\n                            // e.g. for directives that uses the \"inserted\" hook.\n                            const insert = ancestor.data.hook.insert;\n                            if (insert.merged) {\n                                // start at index 1 to avoid re-invoking component mounted hook\n                                // clone insert hooks to avoid being mutated during iteration.\n                                // e.g. for customed directives under transition group.\n                                const cloned = insert.fns.slice(1);\n                                for (let i = 0; i < cloned.length; i++) {\n                                    cloned[i]();\n                                }\n                            }\n                        }\n                        else {\n                            registerRef(ancestor);\n                        }\n                        ancestor = ancestor.parent;\n                    }\n                }\n                // destroy old node\n                if (isDef(parentElm)) {\n                    removeVnodes([oldVnode], 0, 0);\n                }\n                else if (isDef(oldVnode.tag)) {\n                    invokeDestroyHook(oldVnode);\n                }\n            }\n        }\n        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n        return vnode.elm;\n    };\n}\n\nvar directives = {\n    create: updateDirectives,\n    update: updateDirectives,\n    destroy: function unbindDirectives(vnode) {\n        // @ts-expect-error emptyNode is not VNodeWithData\n        updateDirectives(vnode, emptyNode);\n    }\n};\nfunction updateDirectives(oldVnode, vnode) {\n    if (oldVnode.data.directives || vnode.data.directives) {\n        _update(oldVnode, vnode);\n    }\n}\nfunction _update(oldVnode, vnode) {\n    const isCreate = oldVnode === emptyNode;\n    const isDestroy = vnode === emptyNode;\n    const oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n    const newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n    const dirsWithInsert = [];\n    const dirsWithPostpatch = [];\n    let key, oldDir, dir;\n    for (key in newDirs) {\n        oldDir = oldDirs[key];\n        dir = newDirs[key];\n        if (!oldDir) {\n            // new directive, bind\n            callHook(dir, 'bind', vnode, oldVnode);\n            if (dir.def && dir.def.inserted) {\n                dirsWithInsert.push(dir);\n            }\n        }\n        else {\n            // existing directive, update\n            dir.oldValue = oldDir.value;\n            dir.oldArg = oldDir.arg;\n            callHook(dir, 'update', vnode, oldVnode);\n            if (dir.def && dir.def.componentUpdated) {\n                dirsWithPostpatch.push(dir);\n            }\n        }\n    }\n    if (dirsWithInsert.length) {\n        const callInsert = () => {\n            for (let i = 0; i < dirsWithInsert.length; i++) {\n                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n            }\n        };\n        if (isCreate) {\n            mergeVNodeHook(vnode, 'insert', callInsert);\n        }\n        else {\n            callInsert();\n        }\n    }\n    if (dirsWithPostpatch.length) {\n        mergeVNodeHook(vnode, 'postpatch', () => {\n            for (let i = 0; i < dirsWithPostpatch.length; i++) {\n                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n            }\n        });\n    }\n    if (!isCreate) {\n        for (key in oldDirs) {\n            if (!newDirs[key]) {\n                // no longer present, unbind\n                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n            }\n        }\n    }\n}\nconst emptyModifiers = Object.create(null);\nfunction normalizeDirectives(dirs, vm) {\n    const res = Object.create(null);\n    if (!dirs) {\n        // $flow-disable-line\n        return res;\n    }\n    let i, dir;\n    for (i = 0; i < dirs.length; i++) {\n        dir = dirs[i];\n        if (!dir.modifiers) {\n            // $flow-disable-line\n            dir.modifiers = emptyModifiers;\n        }\n        res[getRawDirName(dir)] = dir;\n        if (vm._setupState && vm._setupState.__sfc) {\n            const setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n            if (typeof setupDef === 'function') {\n                dir.def = {\n                    bind: setupDef,\n                    update: setupDef,\n                };\n            }\n            else {\n                dir.def = setupDef;\n            }\n        }\n        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n    }\n    // $flow-disable-line\n    return res;\n}\nfunction getRawDirName(dir) {\n    return (dir.rawName || `${dir.name}.${Object.keys(dir.modifiers || {}).join('.')}`);\n}\nfunction callHook(dir, hook, vnode, oldVnode, isDestroy) {\n    const fn = dir.def && dir.def[hook];\n    if (fn) {\n        try {\n            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n        }\n        catch (e) {\n            handleError(e, vnode.context, `directive ${dir.name} ${hook} hook`);\n        }\n    }\n}\n\nvar baseModules = [ref, directives];\n\nfunction updateAttrs(oldVnode, vnode) {\n    const opts = vnode.componentOptions;\n    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n        return;\n    }\n    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n        return;\n    }\n    let key, cur, old;\n    const elm = vnode.elm;\n    const oldAttrs = oldVnode.data.attrs || {};\n    let attrs = vnode.data.attrs || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n        attrs = vnode.data.attrs = extend({}, attrs);\n    }\n    for (key in attrs) {\n        cur = attrs[key];\n        old = oldAttrs[key];\n        if (old !== cur) {\n            setAttr(elm, key, cur, vnode.data.pre);\n        }\n    }\n    // #4391: in IE9, setting type can reset value for input[type=radio]\n    // #6666: IE/Edge forces progress value down to 1 before setting a max\n    /* istanbul ignore if */\n    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n        setAttr(elm, 'value', attrs.value);\n    }\n    for (key in oldAttrs) {\n        if (isUndef(attrs[key])) {\n            if (isXlink(key)) {\n                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n            }\n            else if (!isEnumeratedAttr(key)) {\n                elm.removeAttribute(key);\n            }\n        }\n    }\n}\nfunction setAttr(el, key, value, isInPre) {\n    if (isInPre || el.tagName.indexOf('-') > -1) {\n        baseSetAttr(el, key, value);\n    }\n    else if (isBooleanAttr(key)) {\n        // set attribute for blank value\n        // e.g. <option disabled>Select one</option>\n        if (isFalsyAttrValue(value)) {\n            el.removeAttribute(key);\n        }\n        else {\n            // technically allowfullscreen is a boolean attribute for <iframe>,\n            // but Flash expects a value of \"true\" when used on <embed> tag\n            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n            el.setAttribute(key, value);\n        }\n    }\n    else if (isEnumeratedAttr(key)) {\n        el.setAttribute(key, convertEnumeratedValue(key, value));\n    }\n    else if (isXlink(key)) {\n        if (isFalsyAttrValue(value)) {\n            el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n        }\n        else {\n            el.setAttributeNS(xlinkNS, key, value);\n        }\n    }\n    else {\n        baseSetAttr(el, key, value);\n    }\n}\nfunction baseSetAttr(el, key, value) {\n    if (isFalsyAttrValue(value)) {\n        el.removeAttribute(key);\n    }\n    else {\n        // #7138: IE10 & 11 fires input event when setting placeholder on\n        // <textarea>... block the first input event and remove the blocker\n        // immediately.\n        /* istanbul ignore if */\n        if (isIE &&\n            !isIE9 &&\n            el.tagName === 'TEXTAREA' &&\n            key === 'placeholder' &&\n            value !== '' &&\n            !el.__ieph) {\n            const blocker = e => {\n                e.stopImmediatePropagation();\n                el.removeEventListener('input', blocker);\n            };\n            el.addEventListener('input', blocker);\n            // $flow-disable-line\n            el.__ieph = true; /* IE placeholder patched */\n        }\n        el.setAttribute(key, value);\n    }\n}\nvar attrs = {\n    create: updateAttrs,\n    update: updateAttrs\n};\n\nfunction updateClass(oldVnode, vnode) {\n    const el = vnode.elm;\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticClass) &&\n        isUndef(data.class) &&\n        (isUndef(oldData) ||\n            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n        return;\n    }\n    let cls = genClassForVnode(vnode);\n    // handle transition classes\n    const transitionClass = el._transitionClasses;\n    if (isDef(transitionClass)) {\n        cls = concat(cls, stringifyClass(transitionClass));\n    }\n    // set the class\n    if (cls !== el._prevClass) {\n        el.setAttribute('class', cls);\n        el._prevClass = cls;\n    }\n}\nvar klass = {\n    create: updateClass,\n    update: updateClass\n};\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nconst RANGE_TOKEN = '__r';\nconst CHECKBOX_RADIO_TOKEN = '__c';\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents(on) {\n    /* istanbul ignore if */\n    if (isDef(on[RANGE_TOKEN])) {\n        // IE input[type=range] only supports `change` event\n        const event = isIE ? 'change' : 'input';\n        on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n        delete on[RANGE_TOKEN];\n    }\n    // This was originally intended to fix #4521 but no longer necessary\n    // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n    /* istanbul ignore if */\n    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n        delete on[CHECKBOX_RADIO_TOKEN];\n    }\n}\nlet target;\nfunction createOnceHandler(event, handler, capture) {\n    const _target = target; // save current target element in closure\n    return function onceHandler() {\n        const res = handler.apply(null, arguments);\n        if (res !== null) {\n            remove(event, onceHandler, capture, _target);\n        }\n    };\n}\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nconst useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\nfunction add(name, handler, capture, passive) {\n    // async edge case #6566: inner click event triggers patch, event handler\n    // attached to outer element during patch, and triggered again. This\n    // happens because browsers fire microtask ticks between event propagation.\n    // the solution is simple: we save the timestamp when a handler is attached,\n    // and the handler would only fire if the event passed to it was fired\n    // AFTER it was attached.\n    if (useMicrotaskFix) {\n        const attachedTimestamp = currentFlushTimestamp;\n        const original = handler;\n        //@ts-expect-error\n        handler = original._wrapper = function (e) {\n            if (\n            // no bubbling, should always fire.\n            // this is just a safety net in case event.timeStamp is unreliable in\n            // certain weird environments...\n            e.target === e.currentTarget ||\n                // event is fired after handler attachment\n                e.timeStamp >= attachedTimestamp ||\n                // bail for environments that have buggy event.timeStamp implementations\n                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                // #9681 QtWebEngine event.timeStamp is negative value\n                e.timeStamp <= 0 ||\n                // #9448 bail if event is fired in another document in a multi-page\n                // electron/nw.js app, since event.timeStamp will be using a different\n                // starting reference\n                e.target.ownerDocument !== document) {\n                return original.apply(this, arguments);\n            }\n        };\n    }\n    target.addEventListener(name, handler, supportsPassive ? { capture, passive } : capture);\n}\nfunction remove(name, handler, capture, _target) {\n    (_target || target).removeEventListener(name, \n    //@ts-expect-error\n    handler._wrapper || handler, capture);\n}\nfunction updateDOMListeners(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n        return;\n    }\n    const on = vnode.data.on || {};\n    const oldOn = oldVnode.data.on || {};\n    // vnode is empty when removing all listeners,\n    // and use old vnode dom element\n    target = vnode.elm || oldVnode.elm;\n    normalizeEvents(on);\n    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n    target = undefined;\n}\nvar events = {\n    create: updateDOMListeners,\n    update: updateDOMListeners,\n    // @ts-expect-error emptyNode has actually data\n    destroy: (vnode) => updateDOMListeners(vnode, emptyNode)\n};\n\nlet svgContainer;\nfunction updateDOMProps(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n        return;\n    }\n    let key, cur;\n    const elm = vnode.elm;\n    const oldProps = oldVnode.data.domProps || {};\n    let props = vnode.data.domProps || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n        props = vnode.data.domProps = extend({}, props);\n    }\n    for (key in oldProps) {\n        if (!(key in props)) {\n            elm[key] = '';\n        }\n    }\n    for (key in props) {\n        cur = props[key];\n        // ignore children if the node has textContent or innerHTML,\n        // as these will throw away existing DOM nodes and cause removal errors\n        // on subsequent patches (#3360)\n        if (key === 'textContent' || key === 'innerHTML') {\n            if (vnode.children)\n                vnode.children.length = 0;\n            if (cur === oldProps[key])\n                continue;\n            // #6601 work around Chrome version <= 55 bug where single textNode\n            // replaced by innerHTML/textContent retains its parentNode property\n            if (elm.childNodes.length === 1) {\n                elm.removeChild(elm.childNodes[0]);\n            }\n        }\n        if (key === 'value' && elm.tagName !== 'PROGRESS') {\n            // store value as _value as well since\n            // non-string values will be stringified\n            elm._value = cur;\n            // avoid resetting cursor position when value is the same\n            const strCur = isUndef(cur) ? '' : String(cur);\n            if (shouldUpdateValue(elm, strCur)) {\n                elm.value = strCur;\n            }\n        }\n        else if (key === 'innerHTML' &&\n            isSVG(elm.tagName) &&\n            isUndef(elm.innerHTML)) {\n            // IE doesn't support innerHTML for SVG elements\n            svgContainer = svgContainer || document.createElement('div');\n            svgContainer.innerHTML = `<svg>${cur}</svg>`;\n            const svg = svgContainer.firstChild;\n            while (elm.firstChild) {\n                elm.removeChild(elm.firstChild);\n            }\n            while (svg.firstChild) {\n                elm.appendChild(svg.firstChild);\n            }\n        }\n        else if (\n        // skip the update if old and new VDOM state is the same.\n        // `value` is handled separately because the DOM value may be temporarily\n        // out of sync with VDOM state due to focus, composition and modifiers.\n        // This  #4521 by skipping the unnecessary `checked` update.\n        cur !== oldProps[key]) {\n            // some property updates can throw\n            // e.g. `value` on <progress> w/ non-finite value\n            try {\n                elm[key] = cur;\n            }\n            catch (e) { }\n        }\n    }\n}\nfunction shouldUpdateValue(elm, checkVal) {\n    return (\n    //@ts-expect-error\n    !elm.composing &&\n        (elm.tagName === 'OPTION' ||\n            isNotInFocusAndDirty(elm, checkVal) ||\n            isDirtyWithModifiers(elm, checkVal)));\n}\nfunction isNotInFocusAndDirty(elm, checkVal) {\n    // return true when textbox (.number and .trim) loses focus and its value is\n    // not equal to the updated value\n    let notInFocus = true;\n    // #6157\n    // work around IE bug when accessing document.activeElement in an iframe\n    try {\n        notInFocus = document.activeElement !== elm;\n    }\n    catch (e) { }\n    return notInFocus && elm.value !== checkVal;\n}\nfunction isDirtyWithModifiers(elm, newVal) {\n    const value = elm.value;\n    const modifiers = elm._vModifiers; // injected by v-model runtime\n    if (isDef(modifiers)) {\n        if (modifiers.number) {\n            return toNumber(value) !== toNumber(newVal);\n        }\n        if (modifiers.trim) {\n            return value.trim() !== newVal.trim();\n        }\n    }\n    return value !== newVal;\n}\nvar domProps = {\n    create: updateDOMProps,\n    update: updateDOMProps\n};\n\nconst parseStyleText = cached(function (cssText) {\n    const res = {};\n    const listDelimiter = /;(?![^(]*\\))/g;\n    const propertyDelimiter = /:(.+)/;\n    cssText.split(listDelimiter).forEach(function (item) {\n        if (item) {\n            const tmp = item.split(propertyDelimiter);\n            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n        }\n    });\n    return res;\n});\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData(data) {\n    const style = normalizeStyleBinding(data.style);\n    // static style is pre-processed into an object during compilation\n    // and is always a fresh object, so it's safe to merge into it\n    return data.staticStyle ? extend(data.staticStyle, style) : style;\n}\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding(bindingStyle) {\n    if (Array.isArray(bindingStyle)) {\n        return toObject(bindingStyle);\n    }\n    if (typeof bindingStyle === 'string') {\n        return parseStyleText(bindingStyle);\n    }\n    return bindingStyle;\n}\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle(vnode, checkChild) {\n    const res = {};\n    let styleData;\n    if (checkChild) {\n        let childNode = vnode;\n        while (childNode.componentInstance) {\n            childNode = childNode.componentInstance._vnode;\n            if (childNode &&\n                childNode.data &&\n                (styleData = normalizeStyleData(childNode.data))) {\n                extend(res, styleData);\n            }\n        }\n    }\n    if ((styleData = normalizeStyleData(vnode.data))) {\n        extend(res, styleData);\n    }\n    let parentNode = vnode;\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while ((parentNode = parentNode.parent)) {\n        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n            extend(res, styleData);\n        }\n    }\n    return res;\n}\n\nconst cssVarRE = /^--/;\nconst importantRE = /\\s*!important$/;\nconst setProp = (el, name, val) => {\n    /* istanbul ignore if */\n    if (cssVarRE.test(name)) {\n        el.style.setProperty(name, val);\n    }\n    else if (importantRE.test(val)) {\n        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n    }\n    else {\n        const normalizedName = normalize(name);\n        if (Array.isArray(val)) {\n            // Support values array created by autoprefixer, e.g.\n            // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n            // Set them one by one, and the browser will only set those it can recognize\n            for (let i = 0, len = val.length; i < len; i++) {\n                el.style[normalizedName] = val[i];\n            }\n        }\n        else {\n            el.style[normalizedName] = val;\n        }\n    }\n};\nconst vendorNames = ['Webkit', 'Moz', 'ms'];\nlet emptyStyle;\nconst normalize = cached(function (prop) {\n    emptyStyle = emptyStyle || document.createElement('div').style;\n    prop = camelize(prop);\n    if (prop !== 'filter' && prop in emptyStyle) {\n        return prop;\n    }\n    const capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n    for (let i = 0; i < vendorNames.length; i++) {\n        const name = vendorNames[i] + capName;\n        if (name in emptyStyle) {\n            return name;\n        }\n    }\n});\nfunction updateStyle(oldVnode, vnode) {\n    const data = vnode.data;\n    const oldData = oldVnode.data;\n    if (isUndef(data.staticStyle) &&\n        isUndef(data.style) &&\n        isUndef(oldData.staticStyle) &&\n        isUndef(oldData.style)) {\n        return;\n    }\n    let cur, name;\n    const el = vnode.elm;\n    const oldStaticStyle = oldData.staticStyle;\n    const oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n    // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n    const oldStyle = oldStaticStyle || oldStyleBinding;\n    const style = normalizeStyleBinding(vnode.data.style) || {};\n    // store normalized style under a different key for next diff\n    // make sure to clone it if it's reactive, since the user likely wants\n    // to mutate it.\n    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n    const newStyle = getStyle(vnode, true);\n    for (name in oldStyle) {\n        if (isUndef(newStyle[name])) {\n            setProp(el, name, '');\n        }\n    }\n    for (name in newStyle) {\n        cur = newStyle[name];\n        // ie9 setting to null has no effect, must use empty string\n        setProp(el, name, cur == null ? '' : cur);\n    }\n}\nvar style = {\n    create: updateStyle,\n    update: updateStyle\n};\n\nconst whitespaceRE = /\\s+/;\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE).forEach(c => el.classList.add(c));\n        }\n        else {\n            el.classList.add(cls);\n        }\n    }\n    else {\n        const cur = ` ${el.getAttribute('class') || ''} `;\n        if (cur.indexOf(' ' + cls + ' ') < 0) {\n            el.setAttribute('class', (cur + cls).trim());\n        }\n    }\n}\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE).forEach(c => el.classList.remove(c));\n        }\n        else {\n            el.classList.remove(cls);\n        }\n        if (!el.classList.length) {\n            el.removeAttribute('class');\n        }\n    }\n    else {\n        let cur = ` ${el.getAttribute('class') || ''} `;\n        const tar = ' ' + cls + ' ';\n        while (cur.indexOf(tar) >= 0) {\n            cur = cur.replace(tar, ' ');\n        }\n        cur = cur.trim();\n        if (cur) {\n            el.setAttribute('class', cur);\n        }\n        else {\n            el.removeAttribute('class');\n        }\n    }\n}\n\nfunction resolveTransition(def) {\n    if (!def) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (typeof def === 'object') {\n        const res = {};\n        if (def.css !== false) {\n            extend(res, autoCssTransition(def.name || 'v'));\n        }\n        extend(res, def);\n        return res;\n    }\n    else if (typeof def === 'string') {\n        return autoCssTransition(def);\n    }\n}\nconst autoCssTransition = cached(name => {\n    return {\n        enterClass: `${name}-enter`,\n        enterToClass: `${name}-enter-to`,\n        enterActiveClass: `${name}-enter-active`,\n        leaveClass: `${name}-leave`,\n        leaveToClass: `${name}-leave-to`,\n        leaveActiveClass: `${name}-leave-active`\n    };\n});\nconst hasTransition = inBrowser && !isIE9;\nconst TRANSITION = 'transition';\nconst ANIMATION = 'animation';\n// Transition property/event sniffing\nlet transitionProp = 'transition';\nlet transitionEndEvent = 'transitionend';\nlet animationProp = 'animation';\nlet animationEndEvent = 'animationend';\nif (hasTransition) {\n    /* istanbul ignore if */\n    if (window.ontransitionend === undefined &&\n        window.onwebkittransitionend !== undefined) {\n        transitionProp = 'WebkitTransition';\n        transitionEndEvent = 'webkitTransitionEnd';\n    }\n    if (window.onanimationend === undefined &&\n        window.onwebkitanimationend !== undefined) {\n        animationProp = 'WebkitAnimation';\n        animationEndEvent = 'webkitAnimationEnd';\n    }\n}\n// binding to window is necessary to make hot reload work in IE in strict mode\nconst raf = inBrowser\n    ? window.requestAnimationFrame\n        ? window.requestAnimationFrame.bind(window)\n        : setTimeout\n    : /* istanbul ignore next */ /* istanbul ignore next */ fn => fn();\nfunction nextFrame(fn) {\n    raf(() => {\n        // @ts-expect-error\n        raf(fn);\n    });\n}\nfunction addTransitionClass(el, cls) {\n    const transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n    if (transitionClasses.indexOf(cls) < 0) {\n        transitionClasses.push(cls);\n        addClass(el, cls);\n    }\n}\nfunction removeTransitionClass(el, cls) {\n    if (el._transitionClasses) {\n        remove$2(el._transitionClasses, cls);\n    }\n    removeClass(el, cls);\n}\nfunction whenTransitionEnds(el, expectedType, cb) {\n    const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n    if (!type)\n        return cb();\n    const event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n    let ended = 0;\n    const end = () => {\n        el.removeEventListener(event, onEnd);\n        cb();\n    };\n    const onEnd = e => {\n        if (e.target === el) {\n            if (++ended >= propCount) {\n                end();\n            }\n        }\n    };\n    setTimeout(() => {\n        if (ended < propCount) {\n            end();\n        }\n    }, timeout + 1);\n    el.addEventListener(event, onEnd);\n}\nconst transformRE = /\\b(transform|all)(,|$)/;\nfunction getTransitionInfo(el, expectedType) {\n    const styles = window.getComputedStyle(el);\n    // JSDOM may return undefined for transition properties\n    const transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n    const transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n    const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n    const animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n    const animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n    const animationTimeout = getTimeout(animationDelays, animationDurations);\n    let type;\n    let timeout = 0;\n    let propCount = 0;\n    /* istanbul ignore if */\n    if (expectedType === TRANSITION) {\n        if (transitionTimeout > 0) {\n            type = TRANSITION;\n            timeout = transitionTimeout;\n            propCount = transitionDurations.length;\n        }\n    }\n    else if (expectedType === ANIMATION) {\n        if (animationTimeout > 0) {\n            type = ANIMATION;\n            timeout = animationTimeout;\n            propCount = animationDurations.length;\n        }\n    }\n    else {\n        timeout = Math.max(transitionTimeout, animationTimeout);\n        type =\n            timeout > 0\n                ? transitionTimeout > animationTimeout\n                    ? TRANSITION\n                    : ANIMATION\n                : null;\n        propCount = type\n            ? type === TRANSITION\n                ? transitionDurations.length\n                : animationDurations.length\n            : 0;\n    }\n    const hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n    return {\n        type,\n        timeout,\n        propCount,\n        hasTransform\n    };\n}\nfunction getTimeout(delays, durations) {\n    /* istanbul ignore next */\n    while (delays.length < durations.length) {\n        delays = delays.concat(delays);\n    }\n    return Math.max.apply(null, durations.map((d, i) => {\n        return toMs(d) + toMs(delays[i]);\n    }));\n}\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs(s) {\n    return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n}\n\nfunction enter(vnode, toggleDisplay) {\n    const el = vnode.elm;\n    // call leave callback now\n    if (isDef(el._leaveCb)) {\n        el._leaveCb.cancelled = true;\n        el._leaveCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data)) {\n        return;\n    }\n    /* istanbul ignore if */\n    if (isDef(el._enterCb) || el.nodeType !== 1) {\n        return;\n    }\n    const { css, type, enterClass, enterToClass, enterActiveClass, appearClass, appearToClass, appearActiveClass, beforeEnter, enter, afterEnter, enterCancelled, beforeAppear, appear, afterAppear, appearCancelled, duration } = data;\n    // activeInstance will always be the <transition> component managing this\n    // transition. One edge case to check is when the <transition> is placed\n    // as the root node of a child component. In that case we need to check\n    // <transition>'s parent for appear check.\n    let context = activeInstance;\n    let transitionNode = activeInstance.$vnode;\n    while (transitionNode && transitionNode.parent) {\n        context = transitionNode.context;\n        transitionNode = transitionNode.parent;\n    }\n    const isAppear = !context._isMounted || !vnode.isRootInsert;\n    if (isAppear && !appear && appear !== '') {\n        return;\n    }\n    const startClass = isAppear && appearClass ? appearClass : enterClass;\n    const activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n    const toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n    const beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n    const enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n    const afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n    const enterCancelledHook = isAppear\n        ? appearCancelled || enterCancelled\n        : enterCancelled;\n    const explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n    if (explicitEnterDuration != null) {\n        checkDuration(explicitEnterDuration, 'enter', vnode);\n    }\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(enterHook);\n    const cb = (el._enterCb = once(() => {\n        if (expectsCSS) {\n            removeTransitionClass(el, toClass);\n            removeTransitionClass(el, activeClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, startClass);\n            }\n            enterCancelledHook && enterCancelledHook(el);\n        }\n        else {\n            afterEnterHook && afterEnterHook(el);\n        }\n        el._enterCb = null;\n    }));\n    if (!vnode.data.show) {\n        // remove pending leave element on enter by injecting an insert hook\n        mergeVNodeHook(vnode, 'insert', () => {\n            const parent = el.parentNode;\n            const pendingNode = parent && parent._pending && parent._pending[vnode.key];\n            if (pendingNode &&\n                pendingNode.tag === vnode.tag &&\n                pendingNode.elm._leaveCb) {\n                pendingNode.elm._leaveCb();\n            }\n            enterHook && enterHook(el, cb);\n        });\n    }\n    // start enter transition\n    beforeEnterHook && beforeEnterHook(el);\n    if (expectsCSS) {\n        addTransitionClass(el, startClass);\n        addTransitionClass(el, activeClass);\n        nextFrame(() => {\n            removeTransitionClass(el, startClass);\n            // @ts-expect-error\n            if (!cb.cancelled) {\n                addTransitionClass(el, toClass);\n                if (!userWantsControl) {\n                    if (isValidDuration(explicitEnterDuration)) {\n                        setTimeout(cb, explicitEnterDuration);\n                    }\n                    else {\n                        whenTransitionEnds(el, type, cb);\n                    }\n                }\n            }\n        });\n    }\n    if (vnode.data.show) {\n        toggleDisplay && toggleDisplay();\n        enterHook && enterHook(el, cb);\n    }\n    if (!expectsCSS && !userWantsControl) {\n        cb();\n    }\n}\nfunction leave(vnode, rm) {\n    const el = vnode.elm;\n    // call enter callback now\n    if (isDef(el._enterCb)) {\n        el._enterCb.cancelled = true;\n        el._enterCb();\n    }\n    const data = resolveTransition(vnode.data.transition);\n    if (isUndef(data) || el.nodeType !== 1) {\n        return rm();\n    }\n    /* istanbul ignore if */\n    if (isDef(el._leaveCb)) {\n        return;\n    }\n    const { css, type, leaveClass, leaveToClass, leaveActiveClass, beforeLeave, leave, afterLeave, leaveCancelled, delayLeave, duration } = data;\n    const expectsCSS = css !== false && !isIE9;\n    const userWantsControl = getHookArgumentsLength(leave);\n    const explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n    if (isDef(explicitLeaveDuration)) {\n        checkDuration(explicitLeaveDuration, 'leave', vnode);\n    }\n    const cb = (el._leaveCb = once(() => {\n        if (el.parentNode && el.parentNode._pending) {\n            el.parentNode._pending[vnode.key] = null;\n        }\n        if (expectsCSS) {\n            removeTransitionClass(el, leaveToClass);\n            removeTransitionClass(el, leaveActiveClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, leaveClass);\n            }\n            leaveCancelled && leaveCancelled(el);\n        }\n        else {\n            rm();\n            afterLeave && afterLeave(el);\n        }\n        el._leaveCb = null;\n    }));\n    if (delayLeave) {\n        delayLeave(performLeave);\n    }\n    else {\n        performLeave();\n    }\n    function performLeave() {\n        // the delayed leave may have already been cancelled\n        // @ts-expect-error\n        if (cb.cancelled) {\n            return;\n        }\n        // record leaving element\n        if (!vnode.data.show && el.parentNode) {\n            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                vnode;\n        }\n        beforeLeave && beforeLeave(el);\n        if (expectsCSS) {\n            addTransitionClass(el, leaveClass);\n            addTransitionClass(el, leaveActiveClass);\n            nextFrame(() => {\n                removeTransitionClass(el, leaveClass);\n                // @ts-expect-error\n                if (!cb.cancelled) {\n                    addTransitionClass(el, leaveToClass);\n                    if (!userWantsControl) {\n                        if (isValidDuration(explicitLeaveDuration)) {\n                            setTimeout(cb, explicitLeaveDuration);\n                        }\n                        else {\n                            whenTransitionEnds(el, type, cb);\n                        }\n                    }\n                }\n            });\n        }\n        leave && leave(el, cb);\n        if (!expectsCSS && !userWantsControl) {\n            cb();\n        }\n    }\n}\n// only used in dev mode\nfunction checkDuration(val, name, vnode) {\n    if (typeof val !== 'number') {\n        warn(`<transition> explicit ${name} duration is not a valid number - ` +\n            `got ${JSON.stringify(val)}.`, vnode.context);\n    }\n    else if (isNaN(val)) {\n        warn(`<transition> explicit ${name} duration is NaN - ` +\n            'the duration expression might be incorrect.', vnode.context);\n    }\n}\nfunction isValidDuration(val) {\n    return typeof val === 'number' && !isNaN(val);\n}\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength(fn) {\n    if (isUndef(fn)) {\n        return false;\n    }\n    // @ts-expect-error\n    const invokerFns = fn.fns;\n    if (isDef(invokerFns)) {\n        // invoker\n        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n    }\n    else {\n        // @ts-expect-error\n        return (fn._length || fn.length) > 1;\n    }\n}\nfunction _enter(_, vnode) {\n    if (vnode.data.show !== true) {\n        enter(vnode);\n    }\n}\nvar transition = inBrowser\n    ? {\n        create: _enter,\n        activate: _enter,\n        remove(vnode, rm) {\n            /* istanbul ignore else */\n            if (vnode.data.show !== true) {\n                // @ts-expect-error\n                leave(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n    }\n    : {};\n\nvar platformModules = [attrs, klass, events, domProps, style, transition];\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nconst modules = platformModules.concat(baseModules);\nconst patch = createPatchFunction({ nodeOps, modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n/* istanbul ignore if */\nif (isIE9) {\n    // http://www.matts411.com/post/internet-explorer-9-oninput/\n    document.addEventListener('selectionchange', () => {\n        const el = document.activeElement;\n        // @ts-expect-error\n        if (el && el.vmodel) {\n            trigger(el, 'input');\n        }\n    });\n}\nconst directive = {\n    inserted(el, binding, vnode, oldVnode) {\n        if (vnode.tag === 'select') {\n            // #6903\n            if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                mergeVNodeHook(vnode, 'postpatch', () => {\n                    directive.componentUpdated(el, binding, vnode);\n                });\n            }\n            else {\n                setSelected(el, binding, vnode.context);\n            }\n            el._vOptions = [].map.call(el.options, getValue);\n        }\n        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n            el._vModifiers = binding.modifiers;\n            if (!binding.modifiers.lazy) {\n                el.addEventListener('compositionstart', onCompositionStart);\n                el.addEventListener('compositionend', onCompositionEnd);\n                // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                // switching focus before confirming composition choice\n                // this also fixes the issue where some browsers e.g. iOS Chrome\n                // fires \"change\" instead of \"input\" on autocomplete.\n                el.addEventListener('change', onCompositionEnd);\n                /* istanbul ignore if */\n                if (isIE9) {\n                    el.vmodel = true;\n                }\n            }\n        }\n    },\n    componentUpdated(el, binding, vnode) {\n        if (vnode.tag === 'select') {\n            setSelected(el, binding, vnode.context);\n            // in case the options rendered by v-for have changed,\n            // it's possible that the value is out-of-sync with the rendered options.\n            // detect such cases and filter out values that no longer has a matching\n            // option in the DOM.\n            const prevOptions = el._vOptions;\n            const curOptions = (el._vOptions = [].map.call(el.options, getValue));\n            if (curOptions.some((o, i) => !looseEqual(o, prevOptions[i]))) {\n                // trigger change event if\n                // no matching option found for at least one value\n                const needReset = el.multiple\n                    ? binding.value.some(v => hasNoMatchingOption(v, curOptions))\n                    : binding.value !== binding.oldValue &&\n                        hasNoMatchingOption(binding.value, curOptions);\n                if (needReset) {\n                    trigger(el, 'change');\n                }\n            }\n        }\n    }\n};\nfunction setSelected(el, binding, vm) {\n    actuallySetSelected(el, binding, vm);\n    /* istanbul ignore if */\n    if (isIE || isEdge) {\n        setTimeout(() => {\n            actuallySetSelected(el, binding, vm);\n        }, 0);\n    }\n}\nfunction actuallySetSelected(el, binding, vm) {\n    const value = binding.value;\n    const isMultiple = el.multiple;\n    if (isMultiple && !Array.isArray(value)) {\n        warn(`<select multiple v-model=\"${binding.expression}\"> ` +\n                `expects an Array value for its binding, but got ${Object.prototype.toString\n                    .call(value)\n                    .slice(8, -1)}`, vm);\n        return;\n    }\n    let selected, option;\n    for (let i = 0, l = el.options.length; i < l; i++) {\n        option = el.options[i];\n        if (isMultiple) {\n            selected = looseIndexOf(value, getValue(option)) > -1;\n            if (option.selected !== selected) {\n                option.selected = selected;\n            }\n        }\n        else {\n            if (looseEqual(getValue(option), value)) {\n                if (el.selectedIndex !== i) {\n                    el.selectedIndex = i;\n                }\n                return;\n            }\n        }\n    }\n    if (!isMultiple) {\n        el.selectedIndex = -1;\n    }\n}\nfunction hasNoMatchingOption(value, options) {\n    return options.every(o => !looseEqual(o, value));\n}\nfunction getValue(option) {\n    return '_value' in option ? option._value : option.value;\n}\nfunction onCompositionStart(e) {\n    e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n    // prevent triggering an input event for no reason\n    if (!e.target.composing)\n        return;\n    e.target.composing = false;\n    trigger(e.target, 'input');\n}\nfunction trigger(el, type) {\n    const e = document.createEvent('HTMLEvents');\n    e.initEvent(type, true, true);\n    el.dispatchEvent(e);\n}\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode(vnode) {\n    // @ts-expect-error\n    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n        ? locateNode(vnode.componentInstance._vnode)\n        : vnode;\n}\nvar show = {\n    bind(el, { value }, vnode) {\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        const originalDisplay = (el.__vOriginalDisplay =\n            el.style.display === 'none' ? '' : el.style.display);\n        if (value && transition) {\n            vnode.data.show = true;\n            enter(vnode, () => {\n                el.style.display = originalDisplay;\n            });\n        }\n        else {\n            el.style.display = value ? originalDisplay : 'none';\n        }\n    },\n    update(el, { value, oldValue }, vnode) {\n        /* istanbul ignore if */\n        if (!value === !oldValue)\n            return;\n        vnode = locateNode(vnode);\n        const transition = vnode.data && vnode.data.transition;\n        if (transition) {\n            vnode.data.show = true;\n            if (value) {\n                enter(vnode, () => {\n                    el.style.display = el.__vOriginalDisplay;\n                });\n            }\n            else {\n                leave(vnode, () => {\n                    el.style.display = 'none';\n                });\n            }\n        }\n        else {\n            el.style.display = value ? el.__vOriginalDisplay : 'none';\n        }\n    },\n    unbind(el, binding, vnode, oldVnode, isDestroy) {\n        if (!isDestroy) {\n            el.style.display = el.__vOriginalDisplay;\n        }\n    }\n};\n\nvar platformDirectives = {\n    model: directive,\n    show\n};\n\n// Provides transition support for a single element/component.\nconst transitionProps = {\n    name: String,\n    appear: Boolean,\n    css: Boolean,\n    mode: String,\n    type: String,\n    enterClass: String,\n    leaveClass: String,\n    enterToClass: String,\n    leaveToClass: String,\n    enterActiveClass: String,\n    leaveActiveClass: String,\n    appearClass: String,\n    appearActiveClass: String,\n    appearToClass: String,\n    duration: [Number, String, Object]\n};\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild(vnode) {\n    const compOptions = vnode && vnode.componentOptions;\n    if (compOptions && compOptions.Ctor.options.abstract) {\n        return getRealChild(getFirstComponentChild(compOptions.children));\n    }\n    else {\n        return vnode;\n    }\n}\nfunction extractTransitionData(comp) {\n    const data = {};\n    const options = comp.$options;\n    // props\n    for (const key in options.propsData) {\n        data[key] = comp[key];\n    }\n    // events.\n    // extract listeners and pass them directly to the transition methods\n    const listeners = options._parentListeners;\n    for (const key in listeners) {\n        data[camelize(key)] = listeners[key];\n    }\n    return data;\n}\nfunction placeholder(h, rawChild) {\n    // @ts-expect-error\n    if (/\\d-keep-alive$/.test(rawChild.tag)) {\n        return h('keep-alive', {\n            props: rawChild.componentOptions.propsData\n        });\n    }\n}\nfunction hasParentTransition(vnode) {\n    while ((vnode = vnode.parent)) {\n        if (vnode.data.transition) {\n            return true;\n        }\n    }\n}\nfunction isSameChild(child, oldChild) {\n    return oldChild.key === child.key && oldChild.tag === child.tag;\n}\nconst isNotTextNode = (c) => c.tag || isAsyncPlaceholder(c);\nconst isVShowDirective = d => d.name === 'show';\nvar Transition = {\n    name: 'transition',\n    props: transitionProps,\n    abstract: true,\n    render(h) {\n        let children = this.$slots.default;\n        if (!children) {\n            return;\n        }\n        // filter out text nodes (possible whitespaces)\n        children = children.filter(isNotTextNode);\n        /* istanbul ignore if */\n        if (!children.length) {\n            return;\n        }\n        // warn multiple elements\n        if (children.length > 1) {\n            warn('<transition> can only be used on a single element. Use ' +\n                '<transition-group> for lists.', this.$parent);\n        }\n        const mode = this.mode;\n        // warn invalid mode\n        if (mode && mode !== 'in-out' && mode !== 'out-in') {\n            warn('invalid <transition> mode: ' + mode, this.$parent);\n        }\n        const rawChild = children[0];\n        // if this is a component root node and the component's\n        // parent container node also has transition, skip.\n        if (hasParentTransition(this.$vnode)) {\n            return rawChild;\n        }\n        // apply transition data to child\n        // use getRealChild() to ignore abstract components e.g. keep-alive\n        const child = getRealChild(rawChild);\n        /* istanbul ignore if */\n        if (!child) {\n            return rawChild;\n        }\n        if (this._leaving) {\n            return placeholder(h, rawChild);\n        }\n        // ensure a key that is unique to the vnode type and to this transition\n        // component instance. This key will be used to remove pending leaving nodes\n        // during entering.\n        const id = `__transition-${this._uid}-`;\n        child.key =\n            child.key == null\n                ? child.isComment\n                    ? id + 'comment'\n                    : id + child.tag\n                : isPrimitive(child.key)\n                    ? String(child.key).indexOf(id) === 0\n                        ? child.key\n                        : id + child.key\n                    : child.key;\n        const data = ((child.data || (child.data = {})).transition =\n            extractTransitionData(this));\n        const oldRawChild = this._vnode;\n        const oldChild = getRealChild(oldRawChild);\n        // mark v-show\n        // so that the transition module can hand over the control to the directive\n        if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n            child.data.show = true;\n        }\n        if (oldChild &&\n            oldChild.data &&\n            !isSameChild(child, oldChild) &&\n            !isAsyncPlaceholder(oldChild) &&\n            // #6687 component root is a comment node\n            !(oldChild.componentInstance &&\n                oldChild.componentInstance._vnode.isComment)) {\n            // replace old child transition data with fresh one\n            // important for dynamic transitions!\n            const oldData = (oldChild.data.transition = extend({}, data));\n            // handle transition mode\n            if (mode === 'out-in') {\n                // return placeholder node and queue update when leave finishes\n                this._leaving = true;\n                mergeVNodeHook(oldData, 'afterLeave', () => {\n                    this._leaving = false;\n                    this.$forceUpdate();\n                });\n                return placeholder(h, rawChild);\n            }\n            else if (mode === 'in-out') {\n                if (isAsyncPlaceholder(child)) {\n                    return oldRawChild;\n                }\n                let delayedLeave;\n                const performLeave = () => {\n                    delayedLeave();\n                };\n                mergeVNodeHook(data, 'afterEnter', performLeave);\n                mergeVNodeHook(data, 'enterCancelled', performLeave);\n                mergeVNodeHook(oldData, 'delayLeave', leave => {\n                    delayedLeave = leave;\n                });\n            }\n        }\n        return rawChild;\n    }\n};\n\n// Provides transition support for list items.\nconst props = extend({\n    tag: String,\n    moveClass: String\n}, transitionProps);\ndelete props.mode;\nvar TransitionGroup = {\n    props,\n    beforeMount() {\n        const update = this._update;\n        this._update = (vnode, hydrating) => {\n            const restoreActiveInstance = setActiveInstance(this);\n            // force removing pass\n            this.__patch__(this._vnode, this.kept, false, // hydrating\n            true // removeOnly (!important, avoids unnecessary moves)\n            );\n            this._vnode = this.kept;\n            restoreActiveInstance();\n            update.call(this, vnode, hydrating);\n        };\n    },\n    render(h) {\n        const tag = this.tag || this.$vnode.data.tag || 'span';\n        const map = Object.create(null);\n        const prevChildren = (this.prevChildren = this.children);\n        const rawChildren = this.$slots.default || [];\n        const children = (this.children = []);\n        const transitionData = extractTransitionData(this);\n        for (let i = 0; i < rawChildren.length; i++) {\n            const c = rawChildren[i];\n            if (c.tag) {\n                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                    children.push(c);\n                    map[c.key] = c;\n                    (c.data || (c.data = {})).transition = transitionData;\n                }\n                else {\n                    const opts = c.componentOptions;\n                    const name = opts\n                        ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                        : c.tag;\n                    warn(`<transition-group> children must be keyed: <${name}>`);\n                }\n            }\n        }\n        if (prevChildren) {\n            const kept = [];\n            const removed = [];\n            for (let i = 0; i < prevChildren.length; i++) {\n                const c = prevChildren[i];\n                c.data.transition = transitionData;\n                // @ts-expect-error .getBoundingClientRect is not typed in Node\n                c.data.pos = c.elm.getBoundingClientRect();\n                if (map[c.key]) {\n                    kept.push(c);\n                }\n                else {\n                    removed.push(c);\n                }\n            }\n            this.kept = h(tag, null, kept);\n            this.removed = removed;\n        }\n        return h(tag, null, children);\n    },\n    updated() {\n        const children = this.prevChildren;\n        const moveClass = this.moveClass || (this.name || 'v') + '-move';\n        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n            return;\n        }\n        // we divide the work into three loops to avoid mixing DOM reads and writes\n        // in each iteration - which helps prevent layout thrashing.\n        children.forEach(callPendingCbs);\n        children.forEach(recordPosition);\n        children.forEach(applyTranslation);\n        // force reflow to put everything in position\n        // assign to this to avoid being removed in tree-shaking\n        // $flow-disable-line\n        this._reflow = document.body.offsetHeight;\n        children.forEach((c) => {\n            if (c.data.moved) {\n                const el = c.elm;\n                const s = el.style;\n                addTransitionClass(el, moveClass);\n                s.transform = s.WebkitTransform = s.transitionDuration = '';\n                el.addEventListener(transitionEndEvent, (el._moveCb = function cb(e) {\n                    if (e && e.target !== el) {\n                        return;\n                    }\n                    if (!e || /transform$/.test(e.propertyName)) {\n                        el.removeEventListener(transitionEndEvent, cb);\n                        el._moveCb = null;\n                        removeTransitionClass(el, moveClass);\n                    }\n                }));\n            }\n        });\n    },\n    methods: {\n        hasMove(el, moveClass) {\n            /* istanbul ignore if */\n            if (!hasTransition) {\n                return false;\n            }\n            /* istanbul ignore if */\n            if (this._hasMove) {\n                return this._hasMove;\n            }\n            // Detect whether an element with the move class applied has\n            // CSS transitions. Since the element may be inside an entering\n            // transition at this very moment, we make a clone of it and remove\n            // all other transition classes applied to ensure only the move class\n            // is applied.\n            const clone = el.cloneNode();\n            if (el._transitionClasses) {\n                el._transitionClasses.forEach((cls) => {\n                    removeClass(clone, cls);\n                });\n            }\n            addClass(clone, moveClass);\n            clone.style.display = 'none';\n            this.$el.appendChild(clone);\n            const info = getTransitionInfo(clone);\n            this.$el.removeChild(clone);\n            return (this._hasMove = info.hasTransform);\n        }\n    }\n};\nfunction callPendingCbs(c) {\n    /* istanbul ignore if */\n    if (c.elm._moveCb) {\n        c.elm._moveCb();\n    }\n    /* istanbul ignore if */\n    if (c.elm._enterCb) {\n        c.elm._enterCb();\n    }\n}\nfunction recordPosition(c) {\n    c.data.newPos = c.elm.getBoundingClientRect();\n}\nfunction applyTranslation(c) {\n    const oldPos = c.data.pos;\n    const newPos = c.data.newPos;\n    const dx = oldPos.left - newPos.left;\n    const dy = oldPos.top - newPos.top;\n    if (dx || dy) {\n        c.data.moved = true;\n        const s = c.elm.style;\n        s.transform = s.WebkitTransform = `translate(${dx}px,${dy}px)`;\n        s.transitionDuration = '0s';\n    }\n}\n\nvar platformComponents = {\n    Transition,\n    TransitionGroup\n};\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n// public mount method\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && inBrowser ? query(el) : undefined;\n    return mountComponent(this, el, hydrating);\n};\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n    setTimeout(() => {\n        if (config.devtools) {\n            if (devtools) {\n                devtools.emit('init', Vue);\n            }\n            else {\n                // @ts-expect-error\n                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                    'https://github.com/vuejs/vue-devtools');\n            }\n        }\n        if (config.productionTip !== false &&\n            typeof console !== 'undefined') {\n            // @ts-expect-error\n            console[console.info ? 'info' : 'log'](`You are running Vue in development mode.\\n` +\n                `Make sure to turn on production mode when deploying for production.\\n` +\n                `See more tips at https://vuejs.org/guide/deployment.html`);\n        }\n    }, 0);\n}\n\nextend(Vue, vca);\n\nmodule.exports = Vue;\n"
  },
  {
    "path": "web/assets/vue/vue.runtime.common.js",
    "content": "if (process.env.NODE_ENV === 'production') {\n  module.exports = require('./vue.runtime.common.prod.js')\n} else {\n  module.exports = require('./vue.runtime.common.dev.js')\n}\n"
  },
  {
    "path": "web/assets/vue/vue.runtime.common.prod.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n\"use strict\";const t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function o(t){return null!=t}function r(t){return!0===t}function s(t){return\"string\"==typeof t||\"number\"==typeof t||\"symbol\"==typeof t||\"boolean\"==typeof t}function i(t){return\"function\"==typeof t}function c(t){return null!==t&&\"object\"==typeof t}const a=Object.prototype.toString;function l(t){return\"[object Object]\"===a.call(t)}function u(t){const e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&\"function\"==typeof t.then&&\"function\"==typeof t.catch}function d(t){return null==t?\"\":Array.isArray(t)||l(t)&&t.toString===a?JSON.stringify(t,p,2):String(t)}function p(t,e){return e&&e.__v_isRef?e.value:e}function h(t){const e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){const n=Object.create(null),o=t.split(\",\");for(let t=0;t<o.length;t++)n[o[t]]=!0;return e?t=>n[t.toLowerCase()]:t=>n[t]}const _=m(\"key,ref,slot,slot-scope,is\");function v(t,e){const n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);const o=t.indexOf(e);if(o>-1)return t.splice(o,1)}}const y=Object.prototype.hasOwnProperty;function g(t,e){return y.call(t,e)}function b(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const $=/-(\\w)/g,w=b((t=>t.replace($,((t,e)=>e?e.toUpperCase():\"\")))),C=b((t=>t.charAt(0).toUpperCase()+t.slice(1))),x=/\\B([A-Z])/g,O=b((t=>t.replace(x,\"-$1\").toLowerCase()));const k=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){const o=arguments.length;return o?o>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function S(t,e){e=e||0;let n=t.length-e;const o=new Array(n);for(;n--;)o[n]=t[n+e];return o}function j(t,e){for(const n in e)t[n]=e[n];return t}function A(t){const e={};for(let n=0;n<t.length;n++)t[n]&&j(e,t[n]);return e}function T(t,e,n){}const E=(t,e,n)=>!1,P=t=>t;function I(t,e){if(t===e)return!0;const n=c(t),o=c(e);if(!n||!o)return!n&&!o&&String(t)===String(e);try{const n=Array.isArray(t),o=Array.isArray(e);if(n&&o)return t.length===e.length&&t.every(((t,n)=>I(t,e[n])));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(n||o)return!1;{const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&n.every((n=>I(t[n],e[n])))}}catch(t){return!1}}function D(t,e){for(let n=0;n<t.length;n++)if(I(t[n],e))return n;return-1}function N(t){let e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function M(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}const L=\"data-server-rendered\",R=[\"component\",\"directive\",\"filter\"],F=[\"beforeCreate\",\"created\",\"beforeMount\",\"mounted\",\"beforeUpdate\",\"updated\",\"beforeDestroy\",\"destroyed\",\"activated\",\"deactivated\",\"errorCaptured\",\"serverPrefetch\",\"renderTracked\",\"renderTriggered\"];var U={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:E,isReservedAttr:E,isUnknownElement:E,getTagNamespace:T,parsePlatformTagName:P,mustUseProp:E,async:!0,_lifecycleHooks:F};function B(t){const e=(t+\"\").charCodeAt(0);return 36===e||95===e}function V(t,e,n,o){Object.defineProperty(t,e,{value:n,enumerable:!!o,writable:!0,configurable:!0})}const z=new RegExp(`[^${/a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/.source}.$_\\\\d]`);const H=\"__proto__\"in{},W=\"undefined\"!=typeof window,K=W&&window.navigator.userAgent.toLowerCase(),q=K&&/msie|trident/.test(K),G=K&&K.indexOf(\"msie 9.0\")>0,Z=K&&K.indexOf(\"edge/\")>0;K&&K.indexOf(\"android\");const J=K&&/iphone|ipad|ipod|ios/.test(K);K&&/chrome\\/\\d+/.test(K),K&&/phantomjs/.test(K);const X=K&&K.match(/firefox\\/(\\d+)/),Q={}.watch;let Y,tt=!1;if(W)try{const t={};Object.defineProperty(t,\"passive\",{get(){tt=!0}}),window.addEventListener(\"test-passive\",null,t)}catch(t){}const et=()=>(void 0===Y&&(Y=!W&&\"undefined\"!=typeof global&&(global.process&&\"server\"===global.process.env.VUE_ENV)),Y),nt=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return\"function\"==typeof t&&/native code/.test(t.toString())}const rt=\"undefined\"!=typeof Symbol&&ot(Symbol)&&\"undefined\"!=typeof Reflect&&ot(Reflect.ownKeys);let st;st=\"undefined\"!=typeof Set&&ot(Set)?Set:class{constructor(){this.set=Object.create(null)}has(t){return!0===this.set[t]}add(t){this.set[t]=!0}clear(){this.set=Object.create(null)}};let it=null;function ct(t=null){t||it&&it._scope.off(),it=t,t&&t._scope.on()}class at{constructor(t,e,n,o,r,s,i,c){this.tag=t,this.data=e,this.children=n,this.text=o,this.elm=r,this.ns=void 0,this.context=s,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=i,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=c,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}get child(){return this.componentInstance}}const lt=(t=\"\")=>{const e=new at;return e.text=t,e.isComment=!0,e};function ut(t){return new at(void 0,void 0,void 0,String(t))}function ft(t){const e=new at(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}let dt=0;const pt=[],ht=()=>{for(let t=0;t<pt.length;t++){const e=pt[t];e.subs=e.subs.filter((t=>t)),e._pending=!1}pt.length=0};class mt{constructor(){this._pending=!1,this.id=dt++,this.subs=[]}addSub(t){this.subs.push(t)}removeSub(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,pt.push(this))}depend(t){mt.target&&mt.target.addDep(this)}notify(t){const e=this.subs.filter((t=>t));for(let t=0,n=e.length;t<n;t++){e[t].update()}}}mt.target=null;const _t=[];function vt(t){_t.push(t),mt.target=t}function yt(){_t.pop(),mt.target=_t[_t.length-1]}const gt=Array.prototype,bt=Object.create(gt);[\"push\",\"pop\",\"shift\",\"unshift\",\"splice\",\"sort\",\"reverse\"].forEach((function(t){const e=gt[t];V(bt,t,(function(...n){const o=e.apply(this,n),r=this.__ob__;let s;switch(t){case\"push\":case\"unshift\":s=n;break;case\"splice\":s=n.slice(2)}return s&&r.observeArray(s),r.dep.notify(),o}))}));const $t=Object.getOwnPropertyNames(bt),wt={};let Ct=!0;function xt(t){Ct=t}const Ot={notify:T,depend:T,addSub:T,removeSub:T};class kt{constructor(t,n=!1,o=!1){if(this.value=t,this.shallow=n,this.mock=o,this.dep=o?Ot:new mt,this.vmCount=0,V(t,\"__ob__\",this),e(t)){if(!o)if(H)t.__proto__=bt;else for(let e=0,n=$t.length;e<n;e++){const n=$t[e];V(t,n,bt[n])}n||this.observeArray(t)}else{const e=Object.keys(t);for(let r=0;r<e.length;r++){jt(t,e[r],wt,void 0,n,o)}}}observeArray(t){for(let e=0,n=t.length;e<n;e++)St(t[e],!1,this.mock)}}function St(t,n,o){return t&&g(t,\"__ob__\")&&t.__ob__ instanceof kt?t.__ob__:!Ct||!o&&et()||!e(t)&&!l(t)||!Object.isExtensible(t)||t.__v_skip||Rt(t)||t instanceof at?void 0:new kt(t,n,o)}function jt(t,n,o,r,s,i,c=!1){const a=new mt,l=Object.getOwnPropertyDescriptor(t,n);if(l&&!1===l.configurable)return;const u=l&&l.get,f=l&&l.set;u&&!f||o!==wt&&2!==arguments.length||(o=t[n]);let d=s?o&&o.__ob__:St(o,!1,i);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){const n=u?u.call(t):o;return mt.target&&(a.depend(),d&&(d.dep.depend(),e(n)&&Et(n))),Rt(n)&&!s?n.value:n},set:function(e){const n=u?u.call(t):o;if(M(n,e)){if(f)f.call(t,e);else{if(u)return;if(!s&&Rt(n)&&!Rt(e))return void(n.value=e);o=e}d=s?e&&e.__ob__:St(e,!1,i),a.notify()}}}),a}function At(t,n,o){if(Mt(t))return;const r=t.__ob__;return e(t)&&u(n)?(t.length=Math.max(t.length,n),t.splice(n,1,o),r&&!r.shallow&&r.mock&&St(o,!1,!0),o):n in t&&!(n in Object.prototype)?(t[n]=o,o):t._isVue||r&&r.vmCount?o:r?(jt(r.value,n,o,void 0,r.shallow,r.mock),r.dep.notify(),o):(t[n]=o,o)}function Tt(t,n){if(e(t)&&u(n))return void t.splice(n,1);const o=t.__ob__;t._isVue||o&&o.vmCount||Mt(t)||g(t,n)&&(delete t[n],o&&o.dep.notify())}function Et(t){for(let n,o=0,r=t.length;o<r;o++)n=t[o],n&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Et(n)}function Pt(t){return It(t,!0),V(t,\"__v_isShallow\",!0),t}function It(t,e){Mt(t)||St(t,e,et())}function Dt(t){return Mt(t)?Dt(t.__v_raw):!(!t||!t.__ob__)}function Nt(t){return!(!t||!t.__v_isShallow)}function Mt(t){return!(!t||!t.__v_isReadonly)}const Lt=\"__v_isRef\";function Rt(t){return!(!t||!0!==t.__v_isRef)}function Ft(t,e){if(Rt(t))return t;const n={};return V(n,Lt,!0),V(n,\"__v_isShallow\",e),V(n,\"dep\",jt(n,\"value\",t,null,e,et())),n}function Ut(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>{const t=e[n];if(Rt(t))return t.value;{const e=t&&t.__ob__;return e&&e.dep.depend(),t}},set:t=>{const o=e[n];Rt(o)&&!Rt(t)?o.value=t:e[n]=t}})}function Bt(t,e,n){const o=t[e];if(Rt(o))return o;const r={get value(){const o=t[e];return void 0===o?n:o},set value(n){t[e]=n}};return V(r,Lt,!0),r}const Vt=\"__v_rawToReadonly\",zt=\"__v_rawToShallowReadonly\";function Ht(t){return Wt(t,!1)}function Wt(t,e){if(!l(t))return t;if(Mt(t))return t;const n=e?zt:Vt,o=t[n];if(o)return o;const r=Object.create(Object.getPrototypeOf(t));V(t,n,r),V(r,\"__v_isReadonly\",!0),V(r,\"__v_raw\",t),Rt(t)&&V(r,Lt,!0),(e||Nt(t))&&V(r,\"__v_isShallow\",!0);const s=Object.keys(t);for(let n=0;n<s.length;n++)Kt(r,t,s[n],e);return r}function Kt(t,e,n,o){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){const t=e[n];return o||!l(t)?t:Ht(t)},set(){}})}const qt=\"watcher\",Gt=`${qt} callback`,Zt=`${qt} getter`,Jt=`${qt} cleanup`;function Xt(t,e){return Yt(t,null,{flush:\"post\"})}const Qt={};function Yt(n,o,{immediate:r,deep:s,flush:c=\"pre\",onTrack:a,onTrigger:l}=t){const u=it,f=(t,e,n=null)=>{const o=Ke(t,null,n,u,e);return s&&o&&o.__ob__&&o.__ob__.dep.depend(),o};let d,p,h=!1,m=!1;if(Rt(n)?(d=()=>n.value,h=Nt(n)):Dt(n)?(d=()=>(n.__ob__.dep.depend(),n),s=!0):e(n)?(m=!0,h=n.some((t=>Dt(t)||Nt(t))),d=()=>n.map((t=>Rt(t)?t.value:Dt(t)?(t.__ob__.dep.depend(),yn(t)):i(t)?f(t,Zt):void 0))):d=i(n)?o?()=>f(n,Zt):()=>{if(!u||!u._isDestroyed)return p&&p(),f(n,qt,[_])}:T,o&&s){const t=d;d=()=>yn(t())}let _=t=>{p=v.onStop=()=>{f(t,Jt)}};if(et())return _=T,o?r&&f(o,Gt,[d(),m?[]:void 0,_]):d(),T;const v=new wn(it,d,T,{lazy:!0});v.noRecurse=!o;let y=m?[]:Qt;return v.run=()=>{if(v.active)if(o){const t=v.get();(s||h||(m?t.some(((t,e)=>M(t,y[e]))):M(t,y)))&&(p&&p(),f(o,Gt,[t,y===Qt?void 0:y,_]),y=t)}else v.get()},\"sync\"===c?v.update=v.run:\"post\"===c?(v.post=!0,v.update=()=>zn(v)):v.update=()=>{if(u&&u===it&&!u._isMounted){const t=u._preWatchers||(u._preWatchers=[]);t.indexOf(v)<0&&t.push(v)}else zn(v)},o?r?v.run():y=v.get():\"post\"===c&&u?u.$once(\"hook:mounted\",(()=>v.get())):v.get(),()=>{v.teardown()}}let te;class ee{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=te,!t&&te&&(this.index=(te.scopes||(te.scopes=[])).push(this)-1)}run(t){if(this.active){const e=te;try{return te=this,t()}finally{te=e}}}on(){te=this}off(){te=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function ne(){return te}function oe(t){const e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}const re=b((t=>{const e=\"&\"===t.charAt(0),n=\"~\"===(t=e?t.slice(1):t).charAt(0),o=\"!\"===(t=n?t.slice(1):t).charAt(0);return{name:t=o?t.slice(1):t,once:n,capture:o,passive:e}}));function se(t,n){function o(){const t=o.fns;if(!e(t))return Ke(t,null,arguments,n,\"v-on handler\");{const e=t.slice();for(let t=0;t<e.length;t++)Ke(e[t],null,arguments,n,\"v-on handler\")}}return o.fns=t,o}function ie(t,e,o,s,i,c){let a,l,u,f;for(a in t)l=t[a],u=e[a],f=re(a),n(l)||(n(u)?(n(l.fns)&&(l=t[a]=se(l,c)),r(f.once)&&(l=t[a]=i(f.name,l,f.capture)),o(f.name,l,f.capture,f.passive,f.params)):l!==u&&(u.fns=l,t[a]=u));for(a in e)n(t[a])&&(f=re(a),s(f.name,e[a],f.capture))}function ce(t,e,s){let i;t instanceof at&&(t=t.data.hook||(t.data.hook={}));const c=t[e];function a(){s.apply(this,arguments),v(i.fns,a)}n(c)?i=se([a]):o(c.fns)&&r(c.merged)?(i=c,i.fns.push(a)):i=se([c,a]),i.merged=!0,t[e]=i}function ae(t,e,n,r,s){if(o(e)){if(g(e,n))return t[n]=e[n],s||delete e[n],!0;if(g(e,r))return t[n]=e[r],s||delete e[r],!0}return!1}function le(t){return s(t)?[ut(t)]:e(t)?fe(t):void 0}function ue(t){return o(t)&&o(t.text)&&!1===t.isComment}function fe(t,i){const c=[];let a,l,u,f;for(a=0;a<t.length;a++)l=t[a],n(l)||\"boolean\"==typeof l||(u=c.length-1,f=c[u],e(l)?l.length>0&&(l=fe(l,`${i||\"\"}_${a}`),ue(l[0])&&ue(f)&&(c[u]=ut(f.text+l[0].text),l.shift()),c.push.apply(c,l)):s(l)?ue(f)?c[u]=ut(f.text+l):\"\"!==l&&c.push(ut(l)):ue(l)&&ue(f)?c[u]=ut(f.text+l.text):(r(t._isVList)&&o(l.tag)&&n(l.key)&&o(i)&&(l.key=`__vlist${i}_${a}__`),c.push(l)));return c}function de(t,n){let r,s,i,a,l=null;if(e(t)||\"string\"==typeof t)for(l=new Array(t.length),r=0,s=t.length;r<s;r++)l[r]=n(t[r],r);else if(\"number\"==typeof t)for(l=new Array(t),r=0;r<t;r++)l[r]=n(r+1,r);else if(c(t))if(rt&&t[Symbol.iterator]){l=[];const e=t[Symbol.iterator]();let o=e.next();for(;!o.done;)l.push(n(o.value,l.length)),o=e.next()}else for(i=Object.keys(t),l=new Array(i.length),r=0,s=i.length;r<s;r++)a=i[r],l[r]=n(t[a],a,r);return o(l)||(l=[]),l._isVList=!0,l}function pe(t,e,n,o){const r=this.$scopedSlots[t];let s;r?(n=n||{},o&&(n=j(j({},o),n)),s=r(n)||(i(e)?e():e)):s=this.$slots[t]||(i(e)?e():e);const c=n&&n.slot;return c?this.$createElement(\"template\",{slot:c},s):s}function he(t){return co(this.$options,\"filters\",t)||P}function me(t,n){return e(t)?-1===t.indexOf(n):t!==n}function _e(t,e,n,o,r){const s=U.keyCodes[e]||n;return r&&o&&!U.keyCodes[e]?me(r,o):s?me(s,t):o?O(o)!==e:void 0===t}function ve(t,n,o,r,s){if(o)if(c(o)){let i;e(o)&&(o=A(o));for(const e in o){if(\"class\"===e||\"style\"===e||_(e))i=t;else{const o=t.attrs&&t.attrs.type;i=r||U.mustUseProp(n,o,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}const c=w(e),a=O(e);if(!(c in i)&&!(a in i)&&(i[e]=o[e],s)){(t.on||(t.on={}))[`update:${e}`]=function(t){o[e]=t}}}}else;return t}function ye(t,e){const n=this._staticTrees||(this._staticTrees=[]);let o=n[t];return o&&!e||(o=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),be(o,`__static__${t}`,!1)),o}function ge(t,e,n){return be(t,`__once__${e}${n?`_${n}`:\"\"}`,!0),t}function be(t,n,o){if(e(t))for(let e=0;e<t.length;e++)t[e]&&\"string\"!=typeof t[e]&&$e(t[e],`${n}_${e}`,o);else $e(t,n,o)}function $e(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function we(t,e){if(e)if(l(e)){const n=t.on=t.on?j({},t.on):{};for(const t in e){const o=n[t],r=e[t];n[t]=o?[].concat(o,r):r}}else;return t}function Ce(t,n,o,r){n=n||{$stable:!o};for(let r=0;r<t.length;r++){const s=t[r];e(s)?Ce(s,n,o):s&&(s.proxy&&(s.fn.proxy=!0),n[s.key]=s.fn)}return r&&(n.$key=r),n}function xe(t,e){for(let n=0;n<e.length;n+=2){const o=e[n];\"string\"==typeof o&&o&&(t[e[n]]=e[n+1])}return t}function Oe(t,e){return\"string\"==typeof t?e+t:t}function ke(t){t._o=ge,t._n=h,t._s=d,t._l=de,t._t=pe,t._q=I,t._i=D,t._m=ye,t._f=he,t._k=_e,t._b=ve,t._v=ut,t._e=lt,t._u=Ce,t._g=we,t._d=xe,t._p=Oe}function Se(t,e){if(!t||!t.length)return{};const n={};for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,r.context!==e&&r.fnContext!==e||!s||null==s.slot)(n.default||(n.default=[])).push(r);else{const t=s.slot,e=n[t]||(n[t]=[]);\"template\"===r.tag?e.push.apply(e,r.children||[]):e.push(r)}}for(const t in n)n[t].every(je)&&delete n[t];return n}function je(t){return t.isComment&&!t.asyncFactory||\" \"===t.text}function Ae(t){return t.isComment&&t.asyncFactory}function Te(e,n,o,r){let s;const i=Object.keys(o).length>0,c=n?!!n.$stable:!i,a=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(c&&r&&r!==t&&a===r.$key&&!i&&!r.$hasNormal)return r;s={};for(const t in n)n[t]&&\"$\"!==t[0]&&(s[t]=Ee(e,o,t,n[t]))}else s={};for(const t in o)t in s||(s[t]=Pe(o,t));return n&&Object.isExtensible(n)&&(n._normalized=s),V(s,\"$stable\",c),V(s,\"$key\",a),V(s,\"$hasNormal\",i),s}function Ee(t,n,o,r){const s=function(){const n=it;ct(t);let o=arguments.length?r.apply(null,arguments):r({});o=o&&\"object\"==typeof o&&!e(o)?[o]:le(o);const s=o&&o[0];return ct(n),o&&(!s||1===o.length&&s.isComment&&!Ae(s))?void 0:o};return r.proxy&&Object.defineProperty(n,o,{get:s,enumerable:!0,configurable:!0}),s}function Pe(t,e){return()=>t[e]}function Ie(e){return{get attrs(){if(!e._attrsProxy){const n=e._attrsProxy={};V(n,\"_v_attr_proxy\",!0),De(n,e.$attrs,t,e,\"$attrs\")}return e._attrsProxy},get listeners(){if(!e._listenersProxy){De(e._listenersProxy={},e.$listeners,t,e,\"$listeners\")}return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Me(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:k(e.$emit,e),expose(t){t&&Object.keys(t).forEach((n=>Ut(e,t,n)))}}}function De(t,e,n,o,r){let s=!1;for(const i in e)i in t?e[i]!==n[i]&&(s=!0):(s=!0,Ne(t,i,o,r));for(const n in t)n in e||(s=!0,delete t[n]);return s}function Ne(t,e,n,o){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:()=>n[o][e]})}function Me(t,e){for(const n in e)t[n]=e[n];for(const n in t)n in e||delete t[n]}function Le(){const t=it;return t._setupContext||(t._setupContext=Ie(t))}let Re=null;function Fe(t,e){return(t.__esModule||rt&&\"Module\"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function Ue(t){if(e(t))for(let e=0;e<t.length;e++){const n=t[e];if(o(n)&&(o(n.componentOptions)||Ae(n)))return n}}const Be=1,Ve=2;function ze(t,n,a,l,u,f){return(e(a)||s(a))&&(u=l,l=a,a=void 0),r(f)&&(u=Ve),function(t,n,r,s,a){if(o(r)&&o(r.__ob__))return lt();o(r)&&o(r.is)&&(n=r.is);if(!n)return lt();e(s)&&i(s[0])&&((r=r||{}).scopedSlots={default:s[0]},s.length=0);a===Ve?s=le(s):a===Be&&(s=function(t){for(let n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(s));let l,u;if(\"string\"==typeof n){let e;u=t.$vnode&&t.$vnode.ns||U.getTagNamespace(n),l=U.isReservedTag(n)?new at(U.parsePlatformTagName(n),r,s,void 0,void 0,t):r&&r.pre||!o(e=co(t.$options,\"components\",n))?new at(n,r,s,void 0,void 0,t):Xn(e,r,t,s,n)}else l=Xn(n,r,t,s);return e(l)?l:o(l)?(o(u)&&He(l,u),o(r)&&function(t){c(t.style)&&yn(t.style);c(t.class)&&yn(t.class)}(r),l):lt()}(t,n,a,l,u)}function He(t,e,s){if(t.ns=e,\"foreignObject\"===t.tag&&(e=void 0,s=!0),o(t.children))for(let i=0,c=t.children.length;i<c;i++){const c=t.children[i];o(c.tag)&&(n(c.ns)||r(s)&&\"svg\"!==c.tag)&&He(c,e,s)}}function We(t,e,n){vt();try{if(e){let o=e;for(;o=o.$parent;){const r=o.$options.errorCaptured;if(r)for(let s=0;s<r.length;s++)try{if(!1===r[s].call(o,t,e,n))return}catch(t){qe(t,o,\"errorCaptured hook\")}}}qe(t,e,n)}finally{yt()}}function Ke(t,e,n,o,r){let s;try{s=n?t.apply(e,n):t.call(e),s&&!s._isVue&&f(s)&&!s._handled&&(s.catch((t=>We(t,o,r+\" (Promise/async)\"))),s._handled=!0)}catch(t){We(t,o,r)}return s}function qe(t,e,n){if(U.errorHandler)try{return U.errorHandler.call(null,t,e,n)}catch(e){e!==t&&Ge(e)}Ge(t)}function Ge(t,e,n){if(!W||\"undefined\"==typeof console)throw t;console.error(t)}let Ze=!1;const Je=[];let Xe,Qe=!1;function Ye(){Qe=!1;const t=Je.slice(0);Je.length=0;for(let e=0;e<t.length;e++)t[e]()}if(\"undefined\"!=typeof Promise&&ot(Promise)){const t=Promise.resolve();Xe=()=>{t.then(Ye),J&&setTimeout(T)},Ze=!0}else if(q||\"undefined\"==typeof MutationObserver||!ot(MutationObserver)&&\"[object MutationObserverConstructor]\"!==MutationObserver.toString())Xe=\"undefined\"!=typeof setImmediate&&ot(setImmediate)?()=>{setImmediate(Ye)}:()=>{setTimeout(Ye,0)};else{let t=1;const e=new MutationObserver(Ye),n=document.createTextNode(String(t));e.observe(n,{characterData:!0}),Xe=()=>{t=(t+1)%2,n.data=String(t)},Ze=!0}function tn(t,e){let n;if(Je.push((()=>{if(t)try{t.call(e)}catch(t){We(t,e,\"nextTick\")}else n&&n(e)})),Qe||(Qe=!0,Xe()),!t&&\"undefined\"!=typeof Promise)return new Promise((t=>{n=t}))}function en(t){return(e,n=it)=>{if(n)return function(t,e,n){const o=t.$options;o[e]=oo(o[e],n)}(n,t,e)}}const nn=en(\"beforeMount\"),on=en(\"mounted\"),rn=en(\"beforeUpdate\"),sn=en(\"updated\"),cn=en(\"beforeDestroy\"),an=en(\"destroyed\"),ln=en(\"activated\"),un=en(\"deactivated\"),fn=en(\"serverPrefetch\"),dn=en(\"renderTracked\"),pn=en(\"renderTriggered\"),hn=en(\"errorCaptured\");const mn=\"2.7.16\";var _n=Object.freeze({__proto__:null,version:mn,defineComponent:function(t){return t},ref:function(t){return Ft(t,!1)},shallowRef:function(t){return Ft(t,!0)},isRef:Rt,toRef:Bt,toRefs:function(t){const n=e(t)?new Array(t.length):{};for(const e in t)n[e]=Bt(t,e);return n},unref:function(t){return Rt(t)?t.value:t},proxyRefs:function(t){if(Dt(t))return t;const e={},n=Object.keys(t);for(let o=0;o<n.length;o++)Ut(e,t,n[o]);return e},customRef:function(t){const e=new mt,{get:n,set:o}=t((()=>{e.depend()}),(()=>{e.notify()})),r={get value(){return n()},set value(t){o(t)}};return V(r,Lt,!0),r},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return It(t,!1),t},isReactive:Dt,isReadonly:Mt,isShallow:Nt,isProxy:function(t){return Dt(t)||Mt(t)},shallowReactive:Pt,markRaw:function(t){return Object.isExtensible(t)&&V(t,\"__v_skip\",!0),t},toRaw:function t(e){const n=e&&e.__v_raw;return n?t(n):e},readonly:Ht,shallowReadonly:function(t){return Wt(t,!0)},computed:function(t,e){let n,o;const r=i(t);r?(n=t,o=T):(n=t.get,o=t.set);const s=et()?null:new wn(it,n,T,{lazy:!0}),c={effect:s,get value(){return s?(s.dirty&&s.evaluate(),mt.target&&s.depend(),s.value):n()},set value(t){o(t)}};return V(c,Lt,!0),V(c,\"__v_isReadonly\",r),c},watch:function(t,e,n){return Yt(t,e,n)},watchEffect:function(t,e){return Yt(t,null,e)},watchPostEffect:Xt,watchSyncEffect:function(t,e){return Yt(t,null,{flush:\"sync\"})},EffectScope:ee,effectScope:function(t){return new ee(t)},onScopeDispose:function(t){te&&te.cleanups.push(t)},getCurrentScope:ne,provide:function(t,e){it&&(oe(it)[t]=e)},inject:function(t,e,n=!1){const o=it;if(o){const r=o.$parent&&o.$parent._provided;if(r&&t in r)return r[t];if(arguments.length>1)return n&&i(e)?e.call(o):e}},h:function(t,e,n){return ze(it,t,e,n,2,!0)},getCurrentInstance:function(){return it&&{proxy:it}},useSlots:function(){return Le().slots},useAttrs:function(){return Le().attrs},useListeners:function(){return Le().listeners},mergeDefaults:function(t,n){const o=e(t)?t.reduce(((t,e)=>(t[e]={},t)),{}):t;for(const t in n){const r=o[t];r?e(r)||i(r)?o[t]={type:r,default:n[t]}:r.default=n[t]:null===r&&(o[t]={default:n[t]})}return o},nextTick:tn,set:At,del:Tt,useCssModule:function(e=\"$style\"){{if(!it)return t;const n=it[e];return n||t}},useCssVars:function(t){if(!W)return;const e=it;e&&Xt((()=>{const n=e.$el,o=t(e,e._setupProxy);if(n&&1===n.nodeType){const t=n.style;for(const e in o)t.setProperty(`--${e}`,o[e])}}))},defineAsyncComponent:function(t){i(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:c=!1,onError:a}=t;let l=null,u=0;const f=()=>{let t;return l||(t=l=e().catch((t=>{if(t=t instanceof Error?t:new Error(String(t)),a)return new Promise(((e,n)=>{a(t,(()=>e((u++,l=null,f()))),(()=>n(t)),u+1)}));throw t})).then((e=>t!==l&&l?l:(e&&(e.__esModule||\"Module\"===e[Symbol.toStringTag])&&(e=e.default),e))))};return()=>({component:f(),delay:r,timeout:s,error:o,loading:n})},onBeforeMount:nn,onMounted:on,onBeforeUpdate:rn,onUpdated:sn,onBeforeUnmount:cn,onUnmounted:an,onActivated:ln,onDeactivated:un,onServerPrefetch:fn,onRenderTracked:dn,onRenderTriggered:pn,onErrorCaptured:function(t,e=it){hn(t,e)}});const vn=new st;function yn(t){return gn(t,vn),vn.clear(),t}function gn(t,n){let o,r;const s=e(t);if(!(!s&&!c(t)||t.__v_skip||Object.isFrozen(t)||t instanceof at)){if(t.__ob__){const e=t.__ob__.dep.id;if(n.has(e))return;n.add(e)}if(s)for(o=t.length;o--;)gn(t[o],n);else if(Rt(t))gn(t.value,n);else for(r=Object.keys(t),o=r.length;o--;)gn(t[r[o]],n)}}let bn,$n=0;class wn{constructor(t,e,n,o,r){!function(t,e=te){e&&e.active&&e.effects.push(t)}(this,te&&!te._vm?te:t?t._scope:void 0),(this.vm=t)&&r&&(t._watcher=this),o?(this.deep=!!o.deep,this.user=!!o.user,this.lazy=!!o.lazy,this.sync=!!o.sync,this.before=o.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++$n,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression=\"\",i(e)?this.getter=e:(this.getter=function(t){if(z.test(t))return;const e=t.split(\".\");return function(t){for(let n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}(e),this.getter||(this.getter=T)),this.value=this.lazy?void 0:this.get()}get(){let t;vt(this);const e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;We(t,e,`getter for watcher \"${this.expression}\"`)}finally{this.deep&&yn(t),yt(),this.cleanupDeps()}return t}addDep(t){const e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))}cleanupDeps(){let t=this.deps.length;for(;t--;){const e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}let e=this.depIds;this.depIds=this.newDepIds,this.newDepIds=e,this.newDepIds.clear(),e=this.deps,this.deps=this.newDeps,this.newDeps=e,this.newDeps.length=0}update(){this.lazy?this.dirty=!0:this.sync?this.run():zn(this)}run(){if(this.active){const t=this.get();if(t!==this.value||c(t)||this.deep){const e=this.value;if(this.value=t,this.user){const n=`callback for watcher \"${this.expression}\"`;Ke(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}}evaluate(){this.value=this.get(),this.dirty=!1}depend(){let t=this.deps.length;for(;t--;)this.deps[t].depend()}teardown(){if(this.vm&&!this.vm._isBeingDestroyed&&v(this.vm._scope.effects,this),this.active){let t=this.deps.length;for(;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}}}function Cn(t,e){bn.$on(t,e)}function xn(t,e){bn.$off(t,e)}function On(t,e){const n=bn;return function o(){null!==e.apply(null,arguments)&&n.$off(t,o)}}function kn(t,e,n){bn=t,ie(e,n||{},Cn,xn,On,t),bn=void 0}let Sn=null;function jn(t){const e=Sn;return Sn=t,()=>{Sn=e}}function An(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Tn(t,e){if(e){if(t._directInactive=!1,An(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(let e=0;e<t.$children.length;e++)Tn(t.$children[e]);Pn(t,\"activated\")}}function En(t,e){if(!(e&&(t._directInactive=!0,An(t))||t._inactive)){t._inactive=!0;for(let e=0;e<t.$children.length;e++)En(t.$children[e]);Pn(t,\"deactivated\")}}function Pn(t,e,n,o=!0){vt();const r=it,s=ne();o&&ct(t);const i=t.$options[e],c=`${e} hook`;if(i)for(let e=0,o=i.length;e<o;e++)Ke(i[e],t,n||null,t,c);t._hasHookEvent&&t.$emit(\"hook:\"+e),o&&(ct(r),s&&s.on()),yt()}const In=[],Dn=[];let Nn={},Mn=!1,Ln=!1,Rn=0;let Fn=0,Un=Date.now;if(W&&!q){const t=window.performance;t&&\"function\"==typeof t.now&&Un()>document.createEvent(\"Event\").timeStamp&&(Un=()=>t.now())}const Bn=(t,e)=>{if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Vn(){let t,e;for(Fn=Un(),Ln=!0,In.sort(Bn),Rn=0;Rn<In.length;Rn++)t=In[Rn],t.before&&t.before(),e=t.id,Nn[e]=null,t.run();const n=Dn.slice(),o=In.slice();Rn=In.length=Dn.length=0,Nn={},Mn=Ln=!1,function(t){for(let e=0;e<t.length;e++)t[e]._inactive=!0,Tn(t[e],!0)}(n),function(t){let e=t.length;for(;e--;){const n=t[e],o=n.vm;o&&o._watcher===n&&o._isMounted&&!o._isDestroyed&&Pn(o,\"updated\")}}(o),ht(),nt&&U.devtools&&nt.emit(\"flush\")}function zn(t){const e=t.id;if(null==Nn[e]&&(t!==mt.target||!t.noRecurse)){if(Nn[e]=!0,Ln){let e=In.length-1;for(;e>Rn&&In[e].id>t.id;)e--;In.splice(e+1,0,t)}else In.push(t);Mn||(Mn=!0,tn(Vn))}}function Hn(t,e){if(t){const n=Object.create(null),o=rt?Reflect.ownKeys(t):Object.keys(t);for(let r=0;r<o.length;r++){const s=o[r];if(\"__ob__\"===s)continue;const c=t[s].from;if(c in e._provided)n[s]=e._provided[c];else if(\"default\"in t[s]){const o=t[s].default;n[s]=i(o)?o.call(e):o}}return n}}function Wn(n,o,s,i,c){const a=c.options;let l;g(i,\"_uid\")?(l=Object.create(i),l._original=i):(l=i,i=i._original);const u=r(a._compiled),f=!u;this.data=n,this.props=o,this.children=s,this.parent=i,this.listeners=n.on||t,this.injections=Hn(a.inject,i),this.slots=()=>(this.$slots||Te(i,n.scopedSlots,this.$slots=Se(s,i)),this.$slots),Object.defineProperty(this,\"scopedSlots\",{enumerable:!0,get(){return Te(i,n.scopedSlots,this.slots())}}),u&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=Te(i,n.scopedSlots,this.$slots)),a._scopeId?this._c=(t,n,o,r)=>{const s=ze(l,t,n,o,r,f);return s&&!e(s)&&(s.fnScopeId=a._scopeId,s.fnContext=i),s}:this._c=(t,e,n,o)=>ze(l,t,e,n,o,f)}function Kn(t,e,n,o,r){const s=ft(t);return s.fnContext=n,s.fnOptions=o,e.slot&&((s.data||(s.data={})).slot=e.slot),s}function qn(t,e){for(const n in e)t[w(n)]=e[n]}function Gn(t){return t.name||t.__name||t._componentTag}ke(Wn.prototype);const Zn={init(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){const e=t;Zn.prepatch(e,e)}else{(t.componentInstance=function(t,e){const n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Sn)).$mount(e?t.elm:void 0,e)}},prepatch(e,n){const o=n.componentOptions;!function(e,n,o,r,s){const i=r.data.scopedSlots,c=e.$scopedSlots,a=!!(i&&!i.$stable||c!==t&&!c.$stable||i&&e.$scopedSlots.$key!==i.$key||!i&&e.$scopedSlots.$key);let l=!!(s||e.$options._renderChildren||a);const u=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=s;const f=r.data.attrs||t;e._attrsProxy&&De(e._attrsProxy,f,u.data&&u.data.attrs||t,e,\"$attrs\")&&(l=!0),e.$attrs=f,o=o||t;const d=e.$options._parentListeners;if(e._listenersProxy&&De(e._listenersProxy,o,d||t,e,\"$listeners\"),e.$listeners=e.$options._parentListeners=o,kn(e,o,d),n&&e.$options.props){xt(!1);const t=e._props,o=e.$options._propKeys||[];for(let r=0;r<o.length;r++){const s=o[r],i=e.$options.props;t[s]=ao(s,i,n,e)}xt(!0),e.$options.propsData=n}l&&(e.$slots=Se(s,r.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,o.propsData,o.listeners,n,o.children)},insert(t){const{context:e,componentInstance:n}=t;var o;n._isMounted||(n._isMounted=!0,Pn(n,\"mounted\")),t.data.keepAlive&&(e._isMounted?((o=n)._inactive=!1,Dn.push(o)):Tn(n,!0))},destroy(t){const{componentInstance:e}=t;e._isDestroyed||(t.data.keepAlive?En(e,!0):e.$destroy())}},Jn=Object.keys(Zn);function Xn(s,i,a,l,u){if(n(s))return;const d=a.$options._base;if(c(s)&&(s=d.extend(s)),\"function\"!=typeof s)return;let p;if(n(s.cid)&&(p=s,s=function(t,e){if(r(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;const s=Re;if(s&&o(t.owners)&&-1===t.owners.indexOf(s)&&t.owners.push(s),r(t.loading)&&o(t.loadingComp))return t.loadingComp;if(s&&!o(t.owners)){const r=t.owners=[s];let i=!0,a=null,l=null;s.$on(\"hook:destroyed\",(()=>v(r,s)));const u=t=>{for(let t=0,e=r.length;t<e;t++)r[t].$forceUpdate();t&&(r.length=0,null!==a&&(clearTimeout(a),a=null),null!==l&&(clearTimeout(l),l=null))},d=N((n=>{t.resolved=Fe(n,e),i?r.length=0:u(!0)})),p=N((e=>{o(t.errorComp)&&(t.error=!0,u(!0))})),h=t(d,p);return c(h)&&(f(h)?n(t.resolved)&&h.then(d,p):f(h.component)&&(h.component.then(d,p),o(h.error)&&(t.errorComp=Fe(h.error,e)),o(h.loading)&&(t.loadingComp=Fe(h.loading,e),0===h.delay?t.loading=!0:a=setTimeout((()=>{a=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,u(!1))}),h.delay||200)),o(h.timeout)&&(l=setTimeout((()=>{l=null,n(t.resolved)&&p(null)}),h.timeout)))),i=!1,t.loading?t.loadingComp:t.resolved}}(p,d),void 0===s))return function(t,e,n,o,r){const s=lt();return s.asyncFactory=t,s.asyncMeta={data:e,context:n,children:o,tag:r},s}(p,i,a,l,u);i=i||{},Co(s),o(i.model)&&function(t,n){const r=t.model&&t.model.prop||\"value\",s=t.model&&t.model.event||\"input\";(n.attrs||(n.attrs={}))[r]=n.model.value;const i=n.on||(n.on={}),c=i[s],a=n.model.callback;o(c)?(e(c)?-1===c.indexOf(a):c!==a)&&(i[s]=[a].concat(c)):i[s]=a}(s.options,i);const h=function(t,e,r){const s=e.options.props;if(n(s))return;const i={},{attrs:c,props:a}=t;if(o(c)||o(a))for(const t in s){const e=O(t);ae(i,a,t,e,!0)||ae(i,c,t,e,!1)}return i}(i,s);if(r(s.options.functional))return function(n,r,s,i,c){const a=n.options,l={},u=a.props;if(o(u))for(const e in u)l[e]=ao(e,u,r||t);else o(s.attrs)&&qn(l,s.attrs),o(s.props)&&qn(l,s.props);const f=new Wn(s,l,c,i,n),d=a.render.call(null,f._c,f);if(d instanceof at)return Kn(d,s,f.parent,a);if(e(d)){const t=le(d)||[],e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=Kn(t[n],s,f.parent,a);return e}}(s,h,i,a,l);const m=i.on;if(i.on=i.nativeOn,r(s.options.abstract)){const t=i.slot;i={},t&&(i.slot=t)}!function(t){const e=t.hook||(t.hook={});for(let t=0;t<Jn.length;t++){const n=Jn[t],o=e[n],r=Zn[n];o===r||o&&o._merged||(e[n]=o?Qn(r,o):r)}}(i);const _=Gn(s.options)||u;return new at(`vue-component-${s.cid}${_?`-${_}`:\"\"}`,i,void 0,void 0,void 0,a,{Ctor:s,propsData:h,listeners:m,tag:u,children:l},p)}function Qn(t,e){const n=(n,o)=>{t(n,o),e(n,o)};return n._merged=!0,n}let Yn=T;const to=U.optionMergeStrategies;function eo(t,e,n=!0){if(!e)return t;let o,r,s;const i=rt?Reflect.ownKeys(e):Object.keys(e);for(let c=0;c<i.length;c++)o=i[c],\"__ob__\"!==o&&(r=t[o],s=e[o],n&&g(t,o)?r!==s&&l(r)&&l(s)&&eo(r,s):At(t,o,s));return t}function no(t,e,n){return n?function(){const o=i(e)?e.call(n,n):e,r=i(t)?t.call(n,n):t;return o?eo(o,r):r}:e?t?function(){return eo(i(e)?e.call(this,this):e,i(t)?t.call(this,this):t)}:e:t}function oo(t,n){const o=n?t?t.concat(n):e(n)?n:[n]:t;return o?function(t){const e=[];for(let n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(o):o}function ro(t,e,n,o){const r=Object.create(t||null);return e?j(r,e):r}to.data=function(t,e,n){return n?no(t,e,n):e&&\"function\"!=typeof e?t:no(t,e)},F.forEach((t=>{to[t]=oo})),R.forEach((function(t){to[t+\"s\"]=ro})),to.watch=function(t,n,o,r){if(t===Q&&(t=void 0),n===Q&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;const s={};j(s,t);for(const t in n){let o=s[t];const r=n[t];o&&!e(o)&&(o=[o]),s[t]=o?o.concat(r):e(r)?r:[r]}return s},to.props=to.methods=to.inject=to.computed=function(t,e,n,o){if(!t)return e;const r=Object.create(null);return j(r,t),e&&j(r,e),r},to.provide=function(t,e){return t?function(){const n=Object.create(null);return eo(n,i(t)?t.call(this):t),e&&eo(n,i(e)?e.call(this):e,!1),n}:e};const so=function(t,e){return void 0===e?t:e};function io(t,n,o){if(i(n)&&(n=n.options),function(t,n){const o=t.props;if(!o)return;const r={};let s,i,c;if(e(o))for(s=o.length;s--;)i=o[s],\"string\"==typeof i&&(c=w(i),r[c]={type:null});else if(l(o))for(const t in o)i=o[t],c=w(t),r[c]=l(i)?i:{type:i};t.props=r}(n),function(t,n){const o=t.inject;if(!o)return;const r=t.inject={};if(e(o))for(let t=0;t<o.length;t++)r[o[t]]={from:o[t]};else if(l(o))for(const t in o){const e=o[t];r[t]=l(e)?j({from:t},e):{from:e}}}(n),function(t){const e=t.directives;if(e)for(const t in e){const n=e[t];i(n)&&(e[t]={bind:n,update:n})}}(n),!n._base&&(n.extends&&(t=io(t,n.extends,o)),n.mixins))for(let e=0,r=n.mixins.length;e<r;e++)t=io(t,n.mixins[e],o);const r={};let s;for(s in t)c(s);for(s in n)g(t,s)||c(s);function c(e){const s=to[e]||so;r[e]=s(t[e],n[e],o,e)}return r}function co(t,e,n,o){if(\"string\"!=typeof n)return;const r=t[e];if(g(r,n))return r[n];const s=w(n);if(g(r,s))return r[s];const i=C(s);if(g(r,i))return r[i];return r[n]||r[s]||r[i]}function ao(t,e,n,o){const r=e[t],s=!g(n,t);let c=n[t];const a=po(Boolean,r.type);if(a>-1)if(s&&!g(r,\"default\"))c=!1;else if(\"\"===c||c===O(t)){const t=po(String,r.type);(t<0||a<t)&&(c=!0)}if(void 0===c){c=function(t,e,n){if(!g(e,\"default\"))return;const o=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return i(o)&&\"Function\"!==uo(e.type)?o.call(t):o}(o,r,t);const e=Ct;xt(!0),St(c),xt(e)}return c}const lo=/^\\s*function (\\w+)/;function uo(t){const e=t&&t.toString().match(lo);return e?e[1]:\"\"}function fo(t,e){return uo(t)===uo(e)}function po(t,n){if(!e(n))return fo(n,t)?0:-1;for(let e=0,o=n.length;e<o;e++)if(fo(n[e],t))return e;return-1}const ho={enumerable:!0,configurable:!0,get:T,set:T};function mo(t,e,n){ho.get=function(){return this[e][n]},ho.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ho)}function _o(t){const n=t.$options;if(n.props&&function(t,e){const n=t.$options.propsData||{},o=t._props=Pt({}),r=t.$options._propKeys=[],s=!t.$parent;s||xt(!1);for(const s in e){r.push(s);jt(o,s,ao(s,e,n,t),void 0,!0),s in t||mo(t,\"_props\",s)}xt(!0)}(t,n.props),function(t){const e=t.$options,n=e.setup;if(n){const o=t._setupContext=Ie(t);ct(t),vt();const r=Ke(n,null,[t._props||Pt({}),o],t,\"setup\");if(yt(),ct(),i(r))e.render=r;else if(c(r))if(t._setupState=r,r.__sfc){const e=t._setupProxy={};for(const t in r)\"__sfc\"!==t&&Ut(e,r,t)}else for(const e in r)B(e)||Ut(t,r,e)}}(t),n.methods&&function(t,e){t.$options.props;for(const n in e)t[n]=\"function\"!=typeof e[n]?T:k(e[n],t)}(t,n.methods),n.data)!function(t){let e=t.$options.data;e=t._data=i(e)?function(t,e){vt();try{return t.call(e,e)}catch(t){return We(t,e,\"data()\"),{}}finally{yt()}}(e,t):e||{},l(e)||(e={});const n=Object.keys(e),o=t.$options.props;t.$options.methods;let r=n.length;for(;r--;){const e=n[r];o&&g(o,e)||B(e)||mo(t,\"_data\",e)}const s=St(e);s&&s.vmCount++}(t);else{const e=St(t._data={});e&&e.vmCount++}n.computed&&function(t,e){const n=t._computedWatchers=Object.create(null),o=et();for(const r in e){const s=e[r],c=i(s)?s:s.get;o||(n[r]=new wn(t,c||T,T,vo)),r in t||yo(t,r,s)}}(t,n.computed),n.watch&&n.watch!==Q&&function(t,n){for(const o in n){const r=n[o];if(e(r))for(let e=0;e<r.length;e++)$o(t,o,r[e]);else $o(t,o,r)}}(t,n.watch)}const vo={lazy:!0};function yo(t,e,n){const o=!et();i(n)?(ho.get=o?go(e):bo(n),ho.set=T):(ho.get=n.get?o&&!1!==n.cache?go(e):bo(n.get):T,ho.set=n.set||T),Object.defineProperty(t,e,ho)}function go(t){return function(){const e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function bo(t){return function(){return t.call(this,this)}}function $o(t,e,n,o){return l(n)&&(o=n,n=n.handler),\"string\"==typeof n&&(n=t[n]),t.$watch(e,n,o)}let wo=0;function Co(t){let e=t.options;if(t.super){const n=Co(t.super);if(n!==t.superOptions){t.superOptions=n;const o=function(t){let e;const n=t.options,o=t.sealedOptions;for(const t in n)n[t]!==o[t]&&(e||(e={}),e[t]=n[t]);return e}(t);o&&j(t.extendOptions,o),e=t.options=io(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function xo(t){this._init(t)}function Oo(t){t.cid=0;let e=1;t.extend=function(t){t=t||{};const n=this,o=n.cid,r=t._Ctor||(t._Ctor={});if(r[o])return r[o];const s=Gn(t)||Gn(n.options),i=function(t){this._init(t)};return(i.prototype=Object.create(n.prototype)).constructor=i,i.cid=e++,i.options=io(n.options,t),i.super=n,i.options.props&&function(t){const e=t.options.props;for(const n in e)mo(t.prototype,\"_props\",n)}(i),i.options.computed&&function(t){const e=t.options.computed;for(const n in e)yo(t.prototype,n,e[n])}(i),i.extend=n.extend,i.mixin=n.mixin,i.use=n.use,R.forEach((function(t){i[t]=n[t]})),s&&(i.options.components[s]=i),i.superOptions=n.options,i.extendOptions=t,i.sealedOptions=j({},i.options),r[o]=i,i}}function ko(t){return t&&(Gn(t.Ctor.options)||t.tag)}function So(t,n){return e(t)?t.indexOf(n)>-1:\"string\"==typeof t?t.split(\",\").indexOf(n)>-1:(o=t,\"[object RegExp]\"===a.call(o)&&t.test(n));var o}function jo(t,e){const{cache:n,keys:o,_vnode:r,$vnode:s}=t;for(const t in n){const s=n[t];if(s){const i=s.name;i&&!e(i)&&Ao(n,t,o,r)}}s.componentOptions.children=void 0}function Ao(t,e,n,o){const r=t[e];!r||o&&r.tag===o.tag||r.componentInstance.$destroy(),t[e]=null,v(n,e)}!function(e){e.prototype._init=function(e){const n=this;n._uid=wo++,n._isVue=!0,n.__v_skip=!0,n._scope=new ee(!0),n._scope.parent=void 0,n._scope._vm=!0,e&&e._isComponent?function(t,e){const n=t.$options=Object.create(t.constructor.options),o=e._parentVnode;n.parent=e.parent,n._parentVnode=o;const r=o.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=io(Co(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){const e=t.$options;let n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;const e=t.$options._parentListeners;e&&kn(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;const n=e.$options,o=e.$vnode=n._parentVnode,r=o&&o.context;e.$slots=Se(n._renderChildren,r),e.$scopedSlots=o?Te(e.$parent,o.data.scopedSlots,e.$slots):t,e._c=(t,n,o,r)=>ze(e,t,n,o,r,!1),e.$createElement=(t,n,o,r)=>ze(e,t,n,o,r,!0);const s=o&&o.data;jt(e,\"$attrs\",s&&s.attrs||t,null,!0),jt(e,\"$listeners\",n._parentListeners||t,null,!0)}(n),Pn(n,\"beforeCreate\",void 0,!1),function(t){const e=Hn(t.$options.inject,t);e&&(xt(!1),Object.keys(e).forEach((n=>{jt(t,n,e[n])})),xt(!0))}(n),_o(n),function(t){const e=t.$options.provide;if(e){const n=i(e)?e.call(t):e;if(!c(n))return;const o=oe(t),r=rt?Reflect.ownKeys(n):Object.keys(n);for(let t=0;t<r.length;t++){const e=r[t];Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(n,e))}}}(n),Pn(n,\"created\"),n.$options.el&&n.$mount(n.$options.el)}}(xo),function(t){const e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,\"$data\",e),Object.defineProperty(t.prototype,\"$props\",n),t.prototype.$set=At,t.prototype.$delete=Tt,t.prototype.$watch=function(t,e,n){const o=this;if(l(e))return $o(o,t,e,n);(n=n||{}).user=!0;const r=new wn(o,t,e,n);if(n.immediate){const t=`callback for immediate watcher \"${r.expression}\"`;vt(),Ke(e,o,[r.value],o,t),yt()}return function(){r.teardown()}}}(xo),function(t){const n=/^hook:/;t.prototype.$on=function(t,o){const r=this;if(e(t))for(let e=0,n=t.length;e<n;e++)r.$on(t[e],o);else(r._events[t]||(r._events[t]=[])).push(o),n.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){const n=this;function o(){n.$off(t,o),e.apply(n,arguments)}return o.fn=e,n.$on(t,o),n},t.prototype.$off=function(t,n){const o=this;if(!arguments.length)return o._events=Object.create(null),o;if(e(t)){for(let e=0,r=t.length;e<r;e++)o.$off(t[e],n);return o}const r=o._events[t];if(!r)return o;if(!n)return o._events[t]=null,o;let s,i=r.length;for(;i--;)if(s=r[i],s===n||s.fn===n){r.splice(i,1);break}return o},t.prototype.$emit=function(t){const e=this;let n=e._events[t];if(n){n=n.length>1?S(n):n;const o=S(arguments,1),r=`event handler for \"${t}\"`;for(let t=0,s=n.length;t<s;t++)Ke(n[t],e,o,e,r)}return e}}(xo),function(t){t.prototype._update=function(t,e){const n=this,o=n.$el,r=n._vnode,s=jn(n);n._vnode=t,n.$el=r?n.__patch__(r,t):n.__patch__(n.$el,t,e,!1),s(),o&&(o.__vue__=null),n.$el&&(n.$el.__vue__=n);let i=n;for(;i&&i.$vnode&&i.$parent&&i.$vnode===i.$parent._vnode;)i.$parent.$el=i.$el,i=i.$parent},t.prototype.$forceUpdate=function(){const t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){const t=this;if(t._isBeingDestroyed)return;Pn(t,\"beforeDestroy\"),t._isBeingDestroyed=!0;const e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Pn(t,\"destroyed\"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}(xo),function(t){ke(t.prototype),t.prototype.$nextTick=function(t){return tn(t,this)},t.prototype._render=function(){const t=this,{render:n,_parentVnode:o}=t.$options;o&&t._isMounted&&(t.$scopedSlots=Te(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Me(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;const r=it,s=Re;let i;try{ct(t),Re=t,i=n.call(t._renderProxy,t.$createElement)}catch(e){We(e,t,\"render\"),i=t._vnode}finally{Re=s,ct(r)}return e(i)&&1===i.length&&(i=i[0]),i instanceof at||(i=lt()),i.parent=o,i}}(xo);const To=[String,RegExp,Array];var Eo={KeepAlive:{name:\"keep-alive\",abstract:!0,props:{include:To,exclude:To,max:[String,Number]},methods:{cacheVNode(){const{cache:t,keys:e,vnodeToCache:n,keyToCache:o}=this;if(n){const{tag:r,componentInstance:s,componentOptions:i}=n;t[o]={name:ko(i),tag:r,componentInstance:s},e.push(o),this.max&&e.length>parseInt(this.max)&&Ao(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const t in this.cache)Ao(this.cache,t,this.keys)},mounted(){this.cacheVNode(),this.$watch(\"include\",(t=>{jo(this,(e=>So(t,e)))})),this.$watch(\"exclude\",(t=>{jo(this,(e=>!So(t,e)))}))},updated(){this.cacheVNode()},render(){const t=this.$slots.default,e=Ue(t),n=e&&e.componentOptions;if(n){const t=ko(n),{include:o,exclude:r}=this;if(o&&(!t||!So(o,t))||r&&t&&So(r,t))return e;const{cache:s,keys:i}=this,c=null==e.key?n.Ctor.cid+(n.tag?`::${n.tag}`:\"\"):e.key;s[c]?(e.componentInstance=s[c].componentInstance,v(i,c),i.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){const e={get:()=>U};Object.defineProperty(t,\"config\",e),t.util={warn:Yn,extend:j,mergeOptions:io,defineReactive:jt},t.set=At,t.delete=Tt,t.nextTick=tn,t.observable=t=>(St(t),t),t.options=Object.create(null),R.forEach((e=>{t.options[e+\"s\"]=Object.create(null)})),t.options._base=t,j(t.options.components,Eo),function(t){t.use=function(t){const e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;const n=S(arguments,1);return n.unshift(this),i(t.install)?t.install.apply(t,n):i(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=io(this.options,t),this}}(t),Oo(t),function(t){R.forEach((e=>{t[e]=function(t,n){return n?(\"component\"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),\"directive\"===e&&i(n)&&(n={bind:n,update:n}),this.options[e+\"s\"][t]=n,n):this.options[e+\"s\"][t]}}))}(t)}(xo),Object.defineProperty(xo.prototype,\"$isServer\",{get:et}),Object.defineProperty(xo.prototype,\"$ssrContext\",{get(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xo,\"FunctionalRenderContext\",{value:Wn}),xo.version=mn;const Po=m(\"style,class\"),Io=m(\"input,textarea,option,select,progress\"),Do=m(\"contenteditable,draggable,spellcheck\"),No=m(\"events,caret,typing,plaintext-only\"),Mo=(t,e)=>Bo(e)||\"false\"===e?\"false\":\"contenteditable\"===t&&No(e)?e:\"true\",Lo=m(\"allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible\"),Ro=\"http://www.w3.org/1999/xlink\",Fo=t=>\":\"===t.charAt(5)&&\"xlink\"===t.slice(0,5),Uo=t=>Fo(t)?t.slice(6,t.length):\"\",Bo=t=>null==t||!1===t;function Vo(t){let e=t.data,n=t,r=t;for(;o(r.componentInstance);)r=r.componentInstance._vnode,r&&r.data&&(e=zo(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=zo(e,n.data));return function(t,e){if(o(t)||o(e))return Ho(t,Wo(e));return\"\"}(e.staticClass,e.class)}function zo(t,e){return{staticClass:Ho(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Ho(t,e){return t?e?t+\" \"+e:t:e||\"\"}function Wo(t){return Array.isArray(t)?function(t){let e,n=\"\";for(let r=0,s=t.length;r<s;r++)o(e=Wo(t[r]))&&\"\"!==e&&(n&&(n+=\" \"),n+=e);return n}(t):c(t)?function(t){let e=\"\";for(const n in t)t[n]&&(e&&(e+=\" \"),e+=n);return e}(t):\"string\"==typeof t?t:\"\"}const Ko={svg:\"http://www.w3.org/2000/svg\",math:\"http://www.w3.org/1998/Math/MathML\"},qo=m(\"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot\"),Go=m(\"svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view\",!0),Zo=t=>qo(t)||Go(t);const Jo=Object.create(null);const Xo=m(\"text,number,password,search,email,tel,url\");var Qo=Object.freeze({__proto__:null,createElement:function(t,e){const n=document.createElement(t);return\"select\"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute(\"multiple\",\"multiple\"),n},createElementNS:function(t,e){return document.createElementNS(Ko[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,\"\")}}),Yo={create(t,e){tr(e)},update(t,e){t.data.ref!==e.data.ref&&(tr(t,!0),tr(e))},destroy(t){tr(t,!0)}};function tr(t,n){const r=t.data.ref;if(!o(r))return;const s=t.context,c=t.componentInstance||t.elm,a=n?null:c,l=n?void 0:c;if(i(r))return void Ke(r,s,[a],s,\"template ref function\");const u=t.data.refInFor,f=\"string\"==typeof r||\"number\"==typeof r,d=Rt(r),p=s.$refs;if(f||d)if(u){const t=f?p[r]:r.value;n?e(t)&&v(t,c):e(t)?t.includes(c)||t.push(c):f?(p[r]=[c],er(s,r,p[r])):r.value=[c]}else if(f){if(n&&p[r]!==c)return;p[r]=l,er(s,r,a)}else if(d){if(n&&r.value!==c)return;r.value=a}}function er({_setupState:t},e,n){t&&g(t,e)&&(Rt(t[e])?t[e].value=n:t[e]=n)}const nr=new at(\"\",{},[]),or=[\"create\",\"activate\",\"update\",\"remove\",\"destroy\"];function rr(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if(\"input\"!==t.tag)return!0;let n;const r=o(n=t.data)&&o(n=n.attrs)&&n.type,s=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===s||Xo(r)&&Xo(s)}(t,e)||r(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function sr(t,e,n){let r,s;const i={};for(r=e;r<=n;++r)s=t[r].key,o(s)&&(i[s]=r);return i}var ir={create:cr,update:cr,destroy:function(t){cr(t,nr)}};function cr(t,e){(t.data.directives||e.data.directives)&&function(t,e){const n=t===nr,o=e===nr,r=lr(t.data.directives,t.context),s=lr(e.data.directives,e.context),i=[],c=[];let a,l,u;for(a in s)l=r[a],u=s[a],l?(u.oldValue=l.value,u.oldArg=l.arg,fr(u,\"update\",e,t),u.def&&u.def.componentUpdated&&c.push(u)):(fr(u,\"bind\",e,t),u.def&&u.def.inserted&&i.push(u));if(i.length){const o=()=>{for(let n=0;n<i.length;n++)fr(i[n],\"inserted\",e,t)};n?ce(e,\"insert\",o):o()}c.length&&ce(e,\"postpatch\",(()=>{for(let n=0;n<c.length;n++)fr(c[n],\"componentUpdated\",e,t)}));if(!n)for(a in r)s[a]||fr(r[a],\"unbind\",t,t,o)}(t,e)}const ar=Object.create(null);function lr(t,e){const n=Object.create(null);if(!t)return n;let o,r;for(o=0;o<t.length;o++){if(r=t[o],r.modifiers||(r.modifiers=ar),n[ur(r)]=r,e._setupState&&e._setupState.__sfc){const t=r.def||co(e,\"_setupState\",\"v-\"+r.name);r.def=\"function\"==typeof t?{bind:t,update:t}:t}r.def=r.def||co(e.$options,\"directives\",r.name)}return n}function ur(t){return t.rawName||`${t.name}.${Object.keys(t.modifiers||{}).join(\".\")}`}function fr(t,e,n,o,r){const s=t.def&&t.def[e];if(s)try{s(n.elm,t,n,o,r)}catch(o){We(o,n.context,`directive ${t.name} ${e} hook`)}}var dr=[Yo,ir];function pr(t,e){const s=e.componentOptions;if(o(s)&&!1===s.Ctor.options.inheritAttrs)return;if(n(t.data.attrs)&&n(e.data.attrs))return;let i,c,a;const l=e.elm,u=t.data.attrs||{};let f=e.data.attrs||{};for(i in(o(f.__ob__)||r(f._v_attr_proxy))&&(f=e.data.attrs=j({},f)),f)c=f[i],a=u[i],a!==c&&hr(l,i,c,e.data.pre);for(i in(q||Z)&&f.value!==u.value&&hr(l,\"value\",f.value),u)n(f[i])&&(Fo(i)?l.removeAttributeNS(Ro,Uo(i)):Do(i)||l.removeAttribute(i))}function hr(t,e,n,o){o||t.tagName.indexOf(\"-\")>-1?mr(t,e,n):Lo(e)?Bo(n)?t.removeAttribute(e):(n=\"allowfullscreen\"===e&&\"EMBED\"===t.tagName?\"true\":e,t.setAttribute(e,n)):Do(e)?t.setAttribute(e,Mo(e,n)):Fo(e)?Bo(n)?t.removeAttributeNS(Ro,Uo(e)):t.setAttributeNS(Ro,e,n):mr(t,e,n)}function mr(t,e,n){if(Bo(n))t.removeAttribute(e);else{if(q&&!G&&\"TEXTAREA\"===t.tagName&&\"placeholder\"===e&&\"\"!==n&&!t.__ieph){const e=n=>{n.stopImmediatePropagation(),t.removeEventListener(\"input\",e)};t.addEventListener(\"input\",e),t.__ieph=!0}t.setAttribute(e,n)}}var _r={create:pr,update:pr};function vr(t,e){const r=e.elm,s=e.data,i=t.data;if(n(s.staticClass)&&n(s.class)&&(n(i)||n(i.staticClass)&&n(i.class)))return;let c=Vo(e);const a=r._transitionClasses;o(a)&&(c=Ho(c,Wo(a))),c!==r._prevClass&&(r.setAttribute(\"class\",c),r._prevClass=c)}var yr={create:vr,update:vr};const gr=\"__r\",br=\"__c\";let $r;function wr(t,e,n){const o=$r;return function r(){null!==e.apply(null,arguments)&&Or(t,r,n,o)}}const Cr=Ze&&!(X&&Number(X[1])<=53);function xr(t,e,n,o){if(Cr){const t=Fn,n=e;e=n._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=t||e.timeStamp<=0||e.target.ownerDocument!==document)return n.apply(this,arguments)}}$r.addEventListener(t,e,tt?{capture:n,passive:o}:n)}function Or(t,e,n,o){(o||$r).removeEventListener(t,e._wrapper||e,n)}function kr(t,e){if(n(t.data.on)&&n(e.data.on))return;const r=e.data.on||{},s=t.data.on||{};$r=e.elm||t.elm,function(t){if(o(t[gr])){const e=q?\"change\":\"input\";t[e]=[].concat(t[gr],t[e]||[]),delete t[gr]}o(t[br])&&(t.change=[].concat(t[br],t.change||[]),delete t[br])}(r),ie(r,s,xr,Or,wr,e.context),$r=void 0}var Sr={create:kr,update:kr,destroy:t=>kr(t,nr)};let jr;function Ar(t,e){if(n(t.data.domProps)&&n(e.data.domProps))return;let s,i;const c=e.elm,a=t.data.domProps||{};let l=e.data.domProps||{};for(s in(o(l.__ob__)||r(l._v_attr_proxy))&&(l=e.data.domProps=j({},l)),a)s in l||(c[s]=\"\");for(s in l){if(i=l[s],\"textContent\"===s||\"innerHTML\"===s){if(e.children&&(e.children.length=0),i===a[s])continue;1===c.childNodes.length&&c.removeChild(c.childNodes[0])}if(\"value\"===s&&\"PROGRESS\"!==c.tagName){c._value=i;const t=n(i)?\"\":String(i);Tr(c,t)&&(c.value=t)}else if(\"innerHTML\"===s&&Go(c.tagName)&&n(c.innerHTML)){jr=jr||document.createElement(\"div\"),jr.innerHTML=`<svg>${i}</svg>`;const t=jr.firstChild;for(;c.firstChild;)c.removeChild(c.firstChild);for(;t.firstChild;)c.appendChild(t.firstChild)}else if(i!==a[s])try{c[s]=i}catch(t){}}}function Tr(t,e){return!t.composing&&(\"OPTION\"===t.tagName||function(t,e){let n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){const n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return h(n)!==h(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Er={create:Ar,update:Ar};const Pr=b((function(t){const e={},n=/:(.+)/;return t.split(/;(?![^(]*\\))/g).forEach((function(t){if(t){const o=t.split(n);o.length>1&&(e[o[0].trim()]=o[1].trim())}})),e}));function Ir(t){const e=Dr(t.style);return t.staticStyle?j(t.staticStyle,e):e}function Dr(t){return Array.isArray(t)?A(t):\"string\"==typeof t?Pr(t):t}const Nr=/^--/,Mr=/\\s*!important$/,Lr=(t,e,n)=>{if(Nr.test(e))t.style.setProperty(e,n);else if(Mr.test(n))t.style.setProperty(O(e),n.replace(Mr,\"\"),\"important\");else{const o=Ur(e);if(Array.isArray(n))for(let e=0,r=n.length;e<r;e++)t.style[o]=n[e];else t.style[o]=n}},Rr=[\"Webkit\",\"Moz\",\"ms\"];let Fr;const Ur=b((function(t){if(Fr=Fr||document.createElement(\"div\").style,\"filter\"!==(t=w(t))&&t in Fr)return t;const e=t.charAt(0).toUpperCase()+t.slice(1);for(let t=0;t<Rr.length;t++){const n=Rr[t]+e;if(n in Fr)return n}}));function Br(t,e){const r=e.data,s=t.data;if(n(r.staticStyle)&&n(r.style)&&n(s.staticStyle)&&n(s.style))return;let i,c;const a=e.elm,l=s.staticStyle,u=s.normalizedStyle||s.style||{},f=l||u,d=Dr(e.data.style)||{};e.data.normalizedStyle=o(d.__ob__)?j({},d):d;const p=function(t,e){const n={};let o;if(e){let e=t;for(;e.componentInstance;)e=e.componentInstance._vnode,e&&e.data&&(o=Ir(e.data))&&j(n,o)}(o=Ir(t.data))&&j(n,o);let r=t;for(;r=r.parent;)r.data&&(o=Ir(r.data))&&j(n,o);return n}(e,!0);for(c in f)n(p[c])&&Lr(a,c,\"\");for(c in p)i=p[c],Lr(a,c,null==i?\"\":i)}var Vr={create:Br,update:Br};const zr=/\\s+/;function Hr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(\" \")>-1?e.split(zr).forEach((e=>t.classList.add(e))):t.classList.add(e);else{const n=` ${t.getAttribute(\"class\")||\"\"} `;n.indexOf(\" \"+e+\" \")<0&&t.setAttribute(\"class\",(n+e).trim())}}function Wr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(\" \")>-1?e.split(zr).forEach((e=>t.classList.remove(e))):t.classList.remove(e),t.classList.length||t.removeAttribute(\"class\");else{let n=` ${t.getAttribute(\"class\")||\"\"} `;const o=\" \"+e+\" \";for(;n.indexOf(o)>=0;)n=n.replace(o,\" \");n=n.trim(),n?t.setAttribute(\"class\",n):t.removeAttribute(\"class\")}}function Kr(t){if(t){if(\"object\"==typeof t){const e={};return!1!==t.css&&j(e,qr(t.name||\"v\")),j(e,t),e}return\"string\"==typeof t?qr(t):void 0}}const qr=b((t=>({enterClass:`${t}-enter`,enterToClass:`${t}-enter-to`,enterActiveClass:`${t}-enter-active`,leaveClass:`${t}-leave`,leaveToClass:`${t}-leave-to`,leaveActiveClass:`${t}-leave-active`}))),Gr=W&&!G,Zr=\"transition\",Jr=\"animation\";let Xr=\"transition\",Qr=\"transitionend\",Yr=\"animation\",ts=\"animationend\";Gr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Xr=\"WebkitTransition\",Qr=\"webkitTransitionEnd\"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Yr=\"WebkitAnimation\",ts=\"webkitAnimationEnd\"));const es=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:t=>t();function ns(t){es((()=>{es(t)}))}function os(t,e){const n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Hr(t,e))}function rs(t,e){t._transitionClasses&&v(t._transitionClasses,e),Wr(t,e)}function ss(t,e,n){const{type:o,timeout:r,propCount:s}=cs(t,e);if(!o)return n();const i=o===Zr?Qr:ts;let c=0;const a=()=>{t.removeEventListener(i,l),n()},l=e=>{e.target===t&&++c>=s&&a()};setTimeout((()=>{c<s&&a()}),r+1),t.addEventListener(i,l)}const is=/\\b(transform|all)(,|$)/;function cs(t,e){const n=window.getComputedStyle(t),o=(n[Xr+\"Delay\"]||\"\").split(\", \"),r=(n[Xr+\"Duration\"]||\"\").split(\", \"),s=as(o,r),i=(n[Yr+\"Delay\"]||\"\").split(\", \"),c=(n[Yr+\"Duration\"]||\"\").split(\", \"),a=as(i,c);let l,u=0,f=0;e===Zr?s>0&&(l=Zr,u=s,f=r.length):e===Jr?a>0&&(l=Jr,u=a,f=c.length):(u=Math.max(s,a),l=u>0?s>a?Zr:Jr:null,f=l?l===Zr?r.length:c.length:0);return{type:l,timeout:u,propCount:f,hasTransform:l===Zr&&is.test(n[Xr+\"Property\"])}}function as(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(((e,n)=>ls(e)+ls(t[n]))))}function ls(t){return 1e3*Number(t.slice(0,-1).replace(\",\",\".\"))}function us(t,e){const r=t.elm;o(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());const s=Kr(t.data.transition);if(n(s))return;if(o(r._enterCb)||1!==r.nodeType)return;const{css:a,type:l,enterClass:u,enterToClass:f,enterActiveClass:d,appearClass:p,appearToClass:m,appearActiveClass:_,beforeEnter:v,enter:y,afterEnter:g,enterCancelled:b,beforeAppear:$,appear:w,afterAppear:C,appearCancelled:x,duration:O}=s;let k=Sn,S=Sn.$vnode;for(;S&&S.parent;)k=S.context,S=S.parent;const j=!k._isMounted||!t.isRootInsert;if(j&&!w&&\"\"!==w)return;const A=j&&p?p:u,T=j&&_?_:d,E=j&&m?m:f,P=j&&$||v,I=j&&i(w)?w:y,D=j&&C||g,M=j&&x||b,L=h(c(O)?O.enter:O),R=!1!==a&&!G,F=ps(I),U=r._enterCb=N((()=>{R&&(rs(r,E),rs(r,T)),U.cancelled?(R&&rs(r,A),M&&M(r)):D&&D(r),r._enterCb=null}));t.data.show||ce(t,\"insert\",(()=>{const e=r.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),I&&I(r,U)})),P&&P(r),R&&(os(r,A),os(r,T),ns((()=>{rs(r,A),U.cancelled||(os(r,E),F||(ds(L)?setTimeout(U,L):ss(r,l,U)))}))),t.data.show&&(e&&e(),I&&I(r,U)),R||F||U()}function fs(t,e){const r=t.elm;o(r._enterCb)&&(r._enterCb.cancelled=!0,r._enterCb());const s=Kr(t.data.transition);if(n(s)||1!==r.nodeType)return e();if(o(r._leaveCb))return;const{css:i,type:a,leaveClass:l,leaveToClass:u,leaveActiveClass:f,beforeLeave:d,leave:p,afterLeave:m,leaveCancelled:_,delayLeave:v,duration:y}=s,g=!1!==i&&!G,b=ps(p),$=h(c(y)?y.leave:y),w=r._leaveCb=N((()=>{r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),g&&(rs(r,u),rs(r,f)),w.cancelled?(g&&rs(r,l),_&&_(r)):(e(),m&&m(r)),r._leaveCb=null}));function C(){w.cancelled||(!t.data.show&&r.parentNode&&((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),d&&d(r),g&&(os(r,l),os(r,f),ns((()=>{rs(r,l),w.cancelled||(os(r,u),b||(ds($)?setTimeout(w,$):ss(r,a,w)))}))),p&&p(r,w),g||b||w())}v?v(C):C()}function ds(t){return\"number\"==typeof t&&!isNaN(t)}function ps(t){if(n(t))return!1;const e=t.fns;return o(e)?ps(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function hs(t,e){!0!==e.data.show&&us(e)}const ms=function(t){let i,c;const a={},{modules:l,nodeOps:u}=t;for(i=0;i<or.length;++i)for(a[or[i]]=[],c=0;c<l.length;++c)o(l[c][or[i]])&&a[or[i]].push(l[c][or[i]]);function f(t){const e=u.parentNode(t);o(e)&&u.removeChild(e,t)}function d(t,e,n,s,i,c,l){if(o(t.elm)&&o(c)&&(t=c[l]=ft(t)),t.isRootInsert=!i,function(t,e,n,s){let i=t.data;if(o(i)){const c=o(t.componentInstance)&&i.keepAlive;if(o(i=i.hook)&&o(i=i.init)&&i(t,!1),o(t.componentInstance))return p(t,e),h(n,t.elm,s),r(c)&&function(t,e,n,r){let s,i=t;for(;i.componentInstance;)if(i=i.componentInstance._vnode,o(s=i.data)&&o(s=s.transition)){for(s=0;s<a.activate.length;++s)a.activate[s](nr,i);e.push(i);break}h(n,t.elm,r)}(t,e,n,s),!0}}(t,e,n,s))return;const f=t.data,d=t.children,m=t.tag;o(m)?(t.elm=t.ns?u.createElementNS(t.ns,m):u.createElement(m,t),g(t),_(t,d,e),o(f)&&y(t,e),h(n,t.elm,s)):r(t.isComment)?(t.elm=u.createComment(t.text),h(n,t.elm,s)):(t.elm=u.createTextNode(t.text),h(n,t.elm,s))}function p(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),g(t)):(tr(t),e.push(t))}function h(t,e,n){o(t)&&(o(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function _(t,n,o){if(e(n))for(let e=0;e<n.length;++e)d(n[e],o,t.elm,null,!0,n,e);else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function y(t,e){for(let e=0;e<a.create.length;++e)a.create[e](nr,t);i=t.data.hook,o(i)&&(o(i.create)&&i.create(nr,t),o(i.insert)&&e.push(t))}function g(t){let e;if(o(e=t.fnScopeId))u.setStyleScope(t.elm,e);else{let n=t;for(;n;)o(e=n.context)&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent}o(e=Sn)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function b(t,e,n,o,r,s){for(;o<=r;++o)d(n[o],s,t,e,!1,n,o)}function $(t){let e,n;const r=t.data;if(o(r))for(o(e=r.hook)&&o(e=e.destroy)&&e(t),e=0;e<a.destroy.length;++e)a.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)$(t.children[n])}function w(t,e,n){for(;e<=n;++e){const n=t[e];o(n)&&(o(n.tag)?(C(n),$(n)):f(n.elm))}}function C(t,e){if(o(e)||o(t.data)){let n;const r=a.remove.length+1;for(o(e)?e.listeners+=r:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,r),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&C(n,e),n=0;n<a.remove.length;++n)a.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else f(t.elm)}function x(t,e,n,r){for(let s=n;s<r;s++){const n=e[s];if(o(n)&&rr(t,n))return s}}function O(t,e,s,i,c,l){if(t===e)return;o(e.elm)&&o(i)&&(e=i[c]=ft(e));const f=e.elm=t.elm;if(r(t.isAsyncPlaceholder))return void(o(e.asyncFactory.resolved)?j(t.elm,e,s):e.isAsyncPlaceholder=!0);if(r(e.isStatic)&&r(t.isStatic)&&e.key===t.key&&(r(e.isCloned)||r(e.isOnce)))return void(e.componentInstance=t.componentInstance);let p;const h=e.data;o(h)&&o(p=h.hook)&&o(p=p.prepatch)&&p(t,e);const m=t.children,_=e.children;if(o(h)&&v(e)){for(p=0;p<a.update.length;++p)a.update[p](t,e);o(p=h.hook)&&o(p=p.update)&&p(t,e)}n(e.text)?o(m)&&o(_)?m!==_&&function(t,e,r,s,i){let c,a,l,f,p=0,h=0,m=e.length-1,_=e[0],v=e[m],y=r.length-1,g=r[0],$=r[y];const C=!i;for(;p<=m&&h<=y;)n(_)?_=e[++p]:n(v)?v=e[--m]:rr(_,g)?(O(_,g,s,r,h),_=e[++p],g=r[++h]):rr(v,$)?(O(v,$,s,r,y),v=e[--m],$=r[--y]):rr(_,$)?(O(_,$,s,r,y),C&&u.insertBefore(t,_.elm,u.nextSibling(v.elm)),_=e[++p],$=r[--y]):rr(v,g)?(O(v,g,s,r,h),C&&u.insertBefore(t,v.elm,_.elm),v=e[--m],g=r[++h]):(n(c)&&(c=sr(e,p,m)),a=o(g.key)?c[g.key]:x(g,e,p,m),n(a)?d(g,s,t,_.elm,!1,r,h):(l=e[a],rr(l,g)?(O(l,g,s,r,h),e[a]=void 0,C&&u.insertBefore(t,l.elm,_.elm)):d(g,s,t,_.elm,!1,r,h)),g=r[++h]);p>m?(f=n(r[y+1])?null:r[y+1].elm,b(t,f,r,h,y,s)):h>y&&w(e,p,m)}(f,m,_,s,l):o(_)?(o(t.text)&&u.setTextContent(f,\"\"),b(f,null,_,0,_.length-1,s)):o(m)?w(m,0,m.length-1):o(t.text)&&u.setTextContent(f,\"\"):t.text!==e.text&&u.setTextContent(f,e.text),o(h)&&o(p=h.hook)&&o(p=p.postpatch)&&p(t,e)}function k(t,e,n){if(r(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(let t=0;t<e.length;++t)e[t].data.hook.insert(e[t])}const S=m(\"attrs,class,staticClass,staticStyle,key\");function j(t,e,n,s){let i;const{tag:c,data:a,children:l}=e;if(s=s||a&&a.pre,e.elm=t,r(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(a)&&(o(i=a.hook)&&o(i=i.init)&&i(e,!0),o(i=e.componentInstance)))return p(e,n),!0;if(o(c)){if(o(l))if(t.hasChildNodes())if(o(i=a)&&o(i=i.domProps)&&o(i=i.innerHTML)){if(i!==t.innerHTML)return!1}else{let e=!0,o=t.firstChild;for(let t=0;t<l.length;t++){if(!o||!j(o,l[t],n,s)){e=!1;break}o=o.nextSibling}if(!e||o)return!1}else _(e,l,n);if(o(a)){let t=!1;for(const o in a)if(!S(o)){t=!0,y(e,n);break}!t&&a.class&&yn(a.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,s,i){if(n(e))return void(o(t)&&$(t));let c=!1;const l=[];if(n(t))c=!0,d(e,l);else{const n=o(t.nodeType);if(!n&&rr(t,e))O(t,e,l,null,null,i);else{if(n){if(1===t.nodeType&&t.hasAttribute(L)&&(t.removeAttribute(L),s=!0),r(s)&&j(t,e,l))return k(e,l,!0),t;f=t,t=new at(u.tagName(f).toLowerCase(),{},[],void 0,f)}const i=t.elm,c=u.parentNode(i);if(d(e,l,i._leaveCb?null:c,u.nextSibling(i)),o(e.parent)){let t=e.parent;const n=v(e);for(;t;){for(let e=0;e<a.destroy.length;++e)a.destroy[e](t);if(t.elm=e.elm,n){for(let e=0;e<a.create.length;++e)a.create[e](nr,t);const e=t.data.hook.insert;if(e.merged){const t=e.fns.slice(1);for(let e=0;e<t.length;e++)t[e]()}}else tr(t);t=t.parent}}o(c)?w([t],0,0):o(t.tag)&&$(t)}}var f;return k(e,l,c),e.elm}}({nodeOps:Qo,modules:[_r,yr,Sr,Er,Vr,W?{create:hs,activate:hs,remove(t,e){!0!==t.data.show?fs(t,e):e()}}:{}].concat(dr)});G&&document.addEventListener(\"selectionchange\",(()=>{const t=document.activeElement;t&&t.vmodel&&Cs(t,\"input\")}));const _s={inserted(t,e,n,o){\"select\"===n.tag?(o.elm&&!o.elm._vOptions?ce(n,\"postpatch\",(()=>{_s.componentUpdated(t,e,n)})):vs(t,e,n.context),t._vOptions=[].map.call(t.options,bs)):(\"textarea\"===n.tag||Xo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener(\"compositionstart\",$s),t.addEventListener(\"compositionend\",ws),t.addEventListener(\"change\",ws),G&&(t.vmodel=!0)))},componentUpdated(t,e,n){if(\"select\"===n.tag){vs(t,e,n.context);const o=t._vOptions,r=t._vOptions=[].map.call(t.options,bs);if(r.some(((t,e)=>!I(t,o[e])))){(t.multiple?e.value.some((t=>gs(t,r))):e.value!==e.oldValue&&gs(e.value,r))&&Cs(t,\"change\")}}}};function vs(t,e,n){ys(t,e),(q||Z)&&setTimeout((()=>{ys(t,e)}),0)}function ys(t,e,n){const o=e.value,r=t.multiple;if(r&&!Array.isArray(o))return;let s,i;for(let e=0,n=t.options.length;e<n;e++)if(i=t.options[e],r)s=D(o,bs(i))>-1,i.selected!==s&&(i.selected=s);else if(I(bs(i),o))return void(t.selectedIndex!==e&&(t.selectedIndex=e));r||(t.selectedIndex=-1)}function gs(t,e){return e.every((e=>!I(e,t)))}function bs(t){return\"_value\"in t?t._value:t.value}function $s(t){t.target.composing=!0}function ws(t){t.target.composing&&(t.target.composing=!1,Cs(t.target,\"input\"))}function Cs(t,e){const n=document.createEvent(\"HTMLEvents\");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function xs(t){return!t.componentInstance||t.data&&t.data.transition?t:xs(t.componentInstance._vnode)}var Os={bind(t,{value:e},n){const o=(n=xs(n)).data&&n.data.transition,r=t.__vOriginalDisplay=\"none\"===t.style.display?\"\":t.style.display;e&&o?(n.data.show=!0,us(n,(()=>{t.style.display=r}))):t.style.display=e?r:\"none\"},update(t,{value:e,oldValue:n},o){if(!e==!n)return;(o=xs(o)).data&&o.data.transition?(o.data.show=!0,e?us(o,(()=>{t.style.display=t.__vOriginalDisplay})):fs(o,(()=>{t.style.display=\"none\"}))):t.style.display=e?t.__vOriginalDisplay:\"none\"},unbind(t,e,n,o,r){r||(t.style.display=t.__vOriginalDisplay)}},ks={model:_s,show:Os};const Ss={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function js(t){const e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?js(Ue(e.children)):t}function As(t){const e={},n=t.$options;for(const o in n.propsData)e[o]=t[o];const o=n._parentListeners;for(const t in o)e[w(t)]=o[t];return e}function Ts(t,e){if(/\\d-keep-alive$/.test(e.tag))return t(\"keep-alive\",{props:e.componentOptions.propsData})}const Es=t=>t.tag||Ae(t),Ps=t=>\"show\"===t.name;var Is={name:\"transition\",props:Ss,abstract:!0,render(t){let e=this.$slots.default;if(!e)return;if(e=e.filter(Es),!e.length)return;const n=this.mode,o=e[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;const r=js(o);if(!r)return o;if(this._leaving)return Ts(t,o);const i=`__transition-${this._uid}-`;r.key=null==r.key?r.isComment?i+\"comment\":i+r.tag:s(r.key)?0===String(r.key).indexOf(i)?r.key:i+r.key:r.key;const c=(r.data||(r.data={})).transition=As(this),a=this._vnode,l=js(a);if(r.data.directives&&r.data.directives.some(Ps)&&(r.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(r,l)&&!Ae(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){const e=l.data.transition=j({},c);if(\"out-in\"===n)return this._leaving=!0,ce(e,\"afterLeave\",(()=>{this._leaving=!1,this.$forceUpdate()})),Ts(t,o);if(\"in-out\"===n){if(Ae(r))return a;let t;const n=()=>{t()};ce(c,\"afterEnter\",n),ce(c,\"enterCancelled\",n),ce(e,\"delayLeave\",(e=>{t=e}))}}return o}};const Ds=j({tag:String,moveClass:String},Ss);delete Ds.mode;var Ns={props:Ds,beforeMount(){const t=this._update;this._update=(e,n)=>{const o=jn(this);this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept,o(),t.call(this,e,n)}},render(t){const e=this.tag||this.$vnode.data.tag||\"span\",n=Object.create(null),o=this.prevChildren=this.children,r=this.$slots.default||[],s=this.children=[],i=As(this);for(let t=0;t<r.length;t++){const e=r[t];e.tag&&null!=e.key&&0!==String(e.key).indexOf(\"__vlist\")&&(s.push(e),n[e.key]=e,(e.data||(e.data={})).transition=i)}if(o){const r=[],s=[];for(let t=0;t<o.length;t++){const e=o[t];e.data.transition=i,e.data.pos=e.elm.getBoundingClientRect(),n[e.key]?r.push(e):s.push(e)}this.kept=t(e,null,r),this.removed=s}return t(e,null,s)},updated(){const t=this.prevChildren,e=this.moveClass||(this.name||\"v\")+\"-move\";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Ms),t.forEach(Ls),t.forEach(Rs),this._reflow=document.body.offsetHeight,t.forEach((t=>{if(t.data.moved){const n=t.elm,o=n.style;os(n,e),o.transform=o.WebkitTransform=o.transitionDuration=\"\",n.addEventListener(Qr,n._moveCb=function t(o){o&&o.target!==n||o&&!/transform$/.test(o.propertyName)||(n.removeEventListener(Qr,t),n._moveCb=null,rs(n,e))})}})))},methods:{hasMove(t,e){if(!Gr)return!1;if(this._hasMove)return this._hasMove;const n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((t=>{Wr(n,t)})),Hr(n,e),n.style.display=\"none\",this.$el.appendChild(n);const o=cs(n);return this.$el.removeChild(n),this._hasMove=o.hasTransform}}};function Ms(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Ls(t){t.data.newPos=t.elm.getBoundingClientRect()}function Rs(t){const e=t.data.pos,n=t.data.newPos,o=e.left-n.left,r=e.top-n.top;if(o||r){t.data.moved=!0;const e=t.elm.style;e.transform=e.WebkitTransform=`translate(${o}px,${r}px)`,e.transitionDuration=\"0s\"}}var Fs={Transition:Is,TransitionGroup:Ns};xo.config.mustUseProp=(t,e,n)=>\"value\"===n&&Io(t)&&\"button\"!==e||\"selected\"===n&&\"option\"===t||\"checked\"===n&&\"input\"===t||\"muted\"===n&&\"video\"===t,xo.config.isReservedTag=Zo,xo.config.isReservedAttr=Po,xo.config.getTagNamespace=function(t){return Go(t)?\"svg\":\"math\"===t?\"math\":void 0},xo.config.isUnknownElement=function(t){if(!W)return!0;if(Zo(t))return!1;if(t=t.toLowerCase(),null!=Jo[t])return Jo[t];const e=document.createElement(t);return t.indexOf(\"-\")>-1?Jo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Jo[t]=/HTMLUnknownElement/.test(e.toString())},j(xo.options.directives,ks),j(xo.options.components,Fs),xo.prototype.__patch__=W?ms:T,xo.prototype.$mount=function(t,e){return function(t,e,n){let o;t.$el=e,t.$options.render||(t.$options.render=lt),Pn(t,\"beforeMount\"),o=()=>{t._update(t._render(),n)},new wn(t,o,T,{before(){t._isMounted&&!t._isDestroyed&&Pn(t,\"beforeUpdate\")}},!0),n=!1;const r=t._preWatchers;if(r)for(let t=0;t<r.length;t++)r[t].run();return null==t.$vnode&&(t._isMounted=!0,Pn(t,\"mounted\")),t}(this,t=t&&W?function(t){if(\"string\"==typeof t){return document.querySelector(t)||document.createElement(\"div\")}return t}(t):void 0,e)},W&&setTimeout((()=>{U.devtools&&nt&&nt.emit(\"init\",xo)}),0),j(xo,_n),module.exports=xo;"
  },
  {
    "path": "web/assets/vue/vue.runtime.esm.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\nvar emptyObject = Object.freeze({});\nvar isArray = Array.isArray;\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef(v) {\n    return v === undefined || v === null;\n}\nfunction isDef(v) {\n    return v !== undefined && v !== null;\n}\nfunction isTrue(v) {\n    return v === true;\n}\nfunction isFalse(v) {\n    return v === false;\n}\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive(value) {\n    return (typeof value === 'string' ||\n        typeof value === 'number' ||\n        // $flow-disable-line\n        typeof value === 'symbol' ||\n        typeof value === 'boolean');\n}\nfunction isFunction(value) {\n    return typeof value === 'function';\n}\n/**\n * Quick object check - this is primarily used to tell\n * objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject(obj) {\n    return obj !== null && typeof obj === 'object';\n}\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\nfunction toRawType(value) {\n    return _toString.call(value).slice(8, -1);\n}\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject(obj) {\n    return _toString.call(obj) === '[object Object]';\n}\nfunction isRegExp(v) {\n    return _toString.call(v) === '[object RegExp]';\n}\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex(val) {\n    var n = parseFloat(String(val));\n    return n >= 0 && Math.floor(n) === n && isFinite(val);\n}\nfunction isPromise(val) {\n    return (isDef(val) &&\n        typeof val.then === 'function' &&\n        typeof val.catch === 'function');\n}\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString(val) {\n    return val == null\n        ? ''\n        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n            ? JSON.stringify(val, replacer, 2)\n            : String(val);\n}\nfunction replacer(_key, val) {\n    // avoid circular deps from v3\n    if (val && val.__v_isRef) {\n        return val.value;\n    }\n    return val;\n}\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber(val) {\n    var n = parseFloat(val);\n    return isNaN(n) ? val : n;\n}\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap(str, expectsLowerCase) {\n    var map = Object.create(null);\n    var list = str.split(',');\n    for (var i = 0; i < list.length; i++) {\n        map[list[i]] = true;\n    }\n    return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };\n}\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n/**\n * Remove an item from an array.\n */\nfunction remove$2(arr, item) {\n    var len = arr.length;\n    if (len) {\n        // fast path for the only / last item\n        if (item === arr[len - 1]) {\n            arr.length = len - 1;\n            return;\n        }\n        var index = arr.indexOf(item);\n        if (index > -1) {\n            return arr.splice(index, 1);\n        }\n    }\n}\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n    var cache = Object.create(null);\n    return function cachedFn(str) {\n        var hit = cache[str];\n        return hit || (cache[str] = fn(str));\n    };\n}\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n    return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n});\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n    return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n    function boundFn(a) {\n        var l = arguments.length;\n        return l\n            ? l > 1\n                ? fn.apply(ctx, arguments)\n                : fn.call(ctx, a)\n            : fn.call(ctx);\n    }\n    boundFn._length = fn.length;\n    return boundFn;\n}\nfunction nativeBind(fn, ctx) {\n    return fn.bind(ctx);\n}\n// @ts-expect-error bind cannot be `undefined`\nvar bind = Function.prototype.bind ? nativeBind : polyfillBind;\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray(list, start) {\n    start = start || 0;\n    var i = list.length - start;\n    var ret = new Array(i);\n    while (i--) {\n        ret[i] = list[i + start];\n    }\n    return ret;\n}\n/**\n * Mix properties into target object.\n */\nfunction extend(to, _from) {\n    for (var key in _from) {\n        to[key] = _from[key];\n    }\n    return to;\n}\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject(arr) {\n    var res = {};\n    for (var i = 0; i < arr.length; i++) {\n        if (arr[i]) {\n            extend(res, arr[i]);\n        }\n    }\n    return res;\n}\n/* eslint-disable no-unused-vars */\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop(a, b, c) { }\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n/* eslint-enable no-unused-vars */\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual(a, b) {\n    if (a === b)\n        return true;\n    var isObjectA = isObject(a);\n    var isObjectB = isObject(b);\n    if (isObjectA && isObjectB) {\n        try {\n            var isArrayA = Array.isArray(a);\n            var isArrayB = Array.isArray(b);\n            if (isArrayA && isArrayB) {\n                return (a.length === b.length &&\n                    a.every(function (e, i) {\n                        return looseEqual(e, b[i]);\n                    }));\n            }\n            else if (a instanceof Date && b instanceof Date) {\n                return a.getTime() === b.getTime();\n            }\n            else if (!isArrayA && !isArrayB) {\n                var keysA = Object.keys(a);\n                var keysB = Object.keys(b);\n                return (keysA.length === keysB.length &&\n                    keysA.every(function (key) {\n                        return looseEqual(a[key], b[key]);\n                    }));\n            }\n            else {\n                /* istanbul ignore next */\n                return false;\n            }\n        }\n        catch (e) {\n            /* istanbul ignore next */\n            return false;\n        }\n    }\n    else if (!isObjectA && !isObjectB) {\n        return String(a) === String(b);\n    }\n    else {\n        return false;\n    }\n}\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf(arr, val) {\n    for (var i = 0; i < arr.length; i++) {\n        if (looseEqual(arr[i], val))\n            return i;\n    }\n    return -1;\n}\n/**\n * Ensure a function is called only once.\n */\nfunction once(fn) {\n    var called = false;\n    return function () {\n        if (!called) {\n            called = true;\n            fn.apply(this, arguments);\n        }\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\nfunction hasChanged(x, y) {\n    if (x === y) {\n        return x === 0 && 1 / x !== 1 / y;\n    }\n    else {\n        return x === x || y === y;\n    }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\nvar ASSET_TYPES = ['component', 'directive', 'filter'];\nvar LIFECYCLE_HOOKS = [\n    'beforeCreate',\n    'created',\n    'beforeMount',\n    'mounted',\n    'beforeUpdate',\n    'updated',\n    'beforeDestroy',\n    'destroyed',\n    'activated',\n    'deactivated',\n    'errorCaptured',\n    'serverPrefetch',\n    'renderTracked',\n    'renderTriggered'\n];\n\nvar config = {\n    /**\n     * Option merge strategies (used in core/util/options)\n     */\n    // $flow-disable-line\n    optionMergeStrategies: Object.create(null),\n    /**\n     * Whether to suppress warnings.\n     */\n    silent: false,\n    /**\n     * Show production mode tip message on boot?\n     */\n    productionTip: process.env.NODE_ENV !== 'production',\n    /**\n     * Whether to enable devtools\n     */\n    devtools: process.env.NODE_ENV !== 'production',\n    /**\n     * Whether to record perf\n     */\n    performance: false,\n    /**\n     * Error handler for watcher errors\n     */\n    errorHandler: null,\n    /**\n     * Warn handler for watcher warns\n     */\n    warnHandler: null,\n    /**\n     * Ignore certain custom elements\n     */\n    ignoredElements: [],\n    /**\n     * Custom user key aliases for v-on\n     */\n    // $flow-disable-line\n    keyCodes: Object.create(null),\n    /**\n     * Check if a tag is reserved so that it cannot be registered as a\n     * component. This is platform-dependent and may be overwritten.\n     */\n    isReservedTag: no,\n    /**\n     * Check if an attribute is reserved so that it cannot be used as a component\n     * prop. This is platform-dependent and may be overwritten.\n     */\n    isReservedAttr: no,\n    /**\n     * Check if a tag is an unknown element.\n     * Platform-dependent.\n     */\n    isUnknownElement: no,\n    /**\n     * Get the namespace of an element\n     */\n    getTagNamespace: noop,\n    /**\n     * Parse the real tag name for the specific platform.\n     */\n    parsePlatformTagName: identity,\n    /**\n     * Check if an attribute must be bound using property, e.g. value\n     * Platform-dependent.\n     */\n    mustUseProp: no,\n    /**\n     * Perform updates asynchronously. Intended to be used by Vue Test Utils\n     * This will significantly reduce performance if set to false.\n     */\n    async: true,\n    /**\n     * Exposed for legacy reasons\n     */\n    _lifecycleHooks: LIFECYCLE_HOOKS\n};\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved(str) {\n    var c = (str + '').charCodeAt(0);\n    return c === 0x24 || c === 0x5f;\n}\n/**\n * Define a property.\n */\nfunction def(obj, key, val, enumerable) {\n    Object.defineProperty(obj, key, {\n        value: val,\n        enumerable: !!enumerable,\n        writable: true,\n        configurable: true\n    });\n}\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp(\"[^\".concat(unicodeRegExp.source, \".$_\\\\d]\"));\nfunction parsePath(path) {\n    if (bailRE.test(path)) {\n        return;\n    }\n    var segments = path.split('.');\n    return function (obj) {\n        for (var i = 0; i < segments.length; i++) {\n            if (!obj)\n                return;\n            obj = obj[segments[i]];\n        }\n        return obj;\n    };\n}\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nUA && UA.indexOf('android') > 0;\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\nUA && /chrome\\/\\d+/.test(UA) && !isEdge;\nUA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n// Firefox has a \"watch\" function on Object.prototype...\n// @ts-expect-error firebox support\nvar nativeWatch = {}.watch;\nvar supportsPassive = false;\nif (inBrowser) {\n    try {\n        var opts = {};\n        Object.defineProperty(opts, 'passive', {\n            get: function () {\n                /* istanbul ignore next */\n                supportsPassive = true;\n            }\n        }); // https://github.com/facebook/flow/issues/285\n        window.addEventListener('test-passive', null, opts);\n    }\n    catch (e) { }\n}\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n    if (_isServer === undefined) {\n        /* istanbul ignore if */\n        if (!inBrowser && typeof global !== 'undefined') {\n            // detect presence of vue-server-renderer and avoid\n            // Webpack shimming the process\n            _isServer =\n                global['process'] && global['process'].env.VUE_ENV === 'server';\n        }\n        else {\n            _isServer = false;\n        }\n    }\n    return _isServer;\n};\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n/* istanbul ignore next */\nfunction isNative(Ctor) {\n    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n}\nvar hasSymbol = typeof Symbol !== 'undefined' &&\n    isNative(Symbol) &&\n    typeof Reflect !== 'undefined' &&\n    isNative(Reflect.ownKeys);\nvar _Set; // $flow-disable-line\n/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n    // use native Set when available.\n    _Set = Set;\n}\nelse {\n    // a non-standard Set polyfill that only works with primitive keys.\n    _Set = /** @class */ (function () {\n        function Set() {\n            this.set = Object.create(null);\n        }\n        Set.prototype.has = function (key) {\n            return this.set[key] === true;\n        };\n        Set.prototype.add = function (key) {\n            this.set[key] = true;\n        };\n        Set.prototype.clear = function () {\n            this.set = Object.create(null);\n        };\n        return Set;\n    }());\n}\n\nvar currentInstance = null;\n/**\n * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n * relies on it). Do not use this internally, just use `currentInstance`.\n *\n * @internal this function needs manual type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction getCurrentInstance() {\n    return currentInstance && { proxy: currentInstance };\n}\n/**\n * @internal\n */\nfunction setCurrentInstance(vm) {\n    if (vm === void 0) { vm = null; }\n    if (!vm)\n        currentInstance && currentInstance._scope.off();\n    currentInstance = vm;\n    vm && vm._scope.on();\n}\n\n/**\n * @internal\n */\nvar VNode = /** @class */ (function () {\n    function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n        this.tag = tag;\n        this.data = data;\n        this.children = children;\n        this.text = text;\n        this.elm = elm;\n        this.ns = undefined;\n        this.context = context;\n        this.fnContext = undefined;\n        this.fnOptions = undefined;\n        this.fnScopeId = undefined;\n        this.key = data && data.key;\n        this.componentOptions = componentOptions;\n        this.componentInstance = undefined;\n        this.parent = undefined;\n        this.raw = false;\n        this.isStatic = false;\n        this.isRootInsert = true;\n        this.isComment = false;\n        this.isCloned = false;\n        this.isOnce = false;\n        this.asyncFactory = asyncFactory;\n        this.asyncMeta = undefined;\n        this.isAsyncPlaceholder = false;\n    }\n    Object.defineProperty(VNode.prototype, \"child\", {\n        // DEPRECATED: alias for componentInstance for backwards compat.\n        /* istanbul ignore next */\n        get: function () {\n            return this.componentInstance;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return VNode;\n}());\nvar createEmptyVNode = function (text) {\n    if (text === void 0) { text = ''; }\n    var node = new VNode();\n    node.text = text;\n    node.isComment = true;\n    return node;\n};\nfunction createTextVNode(val) {\n    return new VNode(undefined, undefined, undefined, String(val));\n}\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode(vnode) {\n    var cloned = new VNode(vnode.tag, vnode.data, \n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n    cloned.ns = vnode.ns;\n    cloned.isStatic = vnode.isStatic;\n    cloned.key = vnode.key;\n    cloned.isComment = vnode.isComment;\n    cloned.fnContext = vnode.fnContext;\n    cloned.fnOptions = vnode.fnOptions;\n    cloned.fnScopeId = vnode.fnScopeId;\n    cloned.asyncMeta = vnode.asyncMeta;\n    cloned.isCloned = true;\n    return cloned;\n}\n\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n\nvar __assign = function() {\n    __assign = Object.assign || function __assign(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\n\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n    var e = new Error(message);\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar uid$2 = 0;\nvar pendingCleanupDeps = [];\nvar cleanupDeps = function () {\n    for (var i = 0; i < pendingCleanupDeps.length; i++) {\n        var dep = pendingCleanupDeps[i];\n        dep.subs = dep.subs.filter(function (s) { return s; });\n        dep._pending = false;\n    }\n    pendingCleanupDeps.length = 0;\n};\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n * @internal\n */\nvar Dep = /** @class */ (function () {\n    function Dep() {\n        // pending subs cleanup\n        this._pending = false;\n        this.id = uid$2++;\n        this.subs = [];\n    }\n    Dep.prototype.addSub = function (sub) {\n        this.subs.push(sub);\n    };\n    Dep.prototype.removeSub = function (sub) {\n        // #12696 deps with massive amount of subscribers are extremely slow to\n        // clean up in Chromium\n        // to workaround this, we unset the sub for now, and clear them on\n        // next scheduler flush.\n        this.subs[this.subs.indexOf(sub)] = null;\n        if (!this._pending) {\n            this._pending = true;\n            pendingCleanupDeps.push(this);\n        }\n    };\n    Dep.prototype.depend = function (info) {\n        if (Dep.target) {\n            Dep.target.addDep(this);\n            if (process.env.NODE_ENV !== 'production' && info && Dep.target.onTrack) {\n                Dep.target.onTrack(__assign({ effect: Dep.target }, info));\n            }\n        }\n    };\n    Dep.prototype.notify = function (info) {\n        // stabilize the subscriber list first\n        var subs = this.subs.filter(function (s) { return s; });\n        if (process.env.NODE_ENV !== 'production' && !config.async) {\n            // subs aren't sorted in scheduler if not running async\n            // we need to sort them now to make sure they fire in correct\n            // order\n            subs.sort(function (a, b) { return a.id - b.id; });\n        }\n        for (var i = 0, l = subs.length; i < l; i++) {\n            var sub = subs[i];\n            if (process.env.NODE_ENV !== 'production' && info) {\n                sub.onTrigger &&\n                    sub.onTrigger(__assign({ effect: subs[i] }, info));\n            }\n            sub.update();\n        }\n    };\n    return Dep;\n}());\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\nDep.target = null;\nvar targetStack = [];\nfunction pushTarget(target) {\n    targetStack.push(target);\n    Dep.target = target;\n}\nfunction popTarget() {\n    targetStack.pop();\n    Dep.target = targetStack[targetStack.length - 1];\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\nvar methodsToPatch = [\n    'push',\n    'pop',\n    'shift',\n    'unshift',\n    'splice',\n    'sort',\n    'reverse'\n];\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n    // cache original method\n    var original = arrayProto[method];\n    def(arrayMethods, method, function mutator() {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var result = original.apply(this, args);\n        var ob = this.__ob__;\n        var inserted;\n        switch (method) {\n            case 'push':\n            case 'unshift':\n                inserted = args;\n                break;\n            case 'splice':\n                inserted = args.slice(2);\n                break;\n        }\n        if (inserted)\n            ob.observeArray(inserted);\n        // notify change\n        if (process.env.NODE_ENV !== 'production') {\n            ob.dep.notify({\n                type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                target: this,\n                key: method\n            });\n        }\n        else {\n            ob.dep.notify();\n        }\n        return result;\n    });\n});\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\nvar NO_INITIAL_VALUE = {};\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\nfunction toggleObserving(value) {\n    shouldObserve = value;\n}\n// ssr mock dep\nvar mockDep = {\n    notify: noop,\n    depend: noop,\n    addSub: noop,\n    removeSub: noop\n};\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = /** @class */ (function () {\n    function Observer(value, shallow, mock) {\n        if (shallow === void 0) { shallow = false; }\n        if (mock === void 0) { mock = false; }\n        this.value = value;\n        this.shallow = shallow;\n        this.mock = mock;\n        // this.value = value\n        this.dep = mock ? mockDep : new Dep();\n        this.vmCount = 0;\n        def(value, '__ob__', this);\n        if (isArray(value)) {\n            if (!mock) {\n                if (hasProto) {\n                    value.__proto__ = arrayMethods;\n                    /* eslint-enable no-proto */\n                }\n                else {\n                    for (var i = 0, l = arrayKeys.length; i < l; i++) {\n                        var key = arrayKeys[i];\n                        def(value, key, arrayMethods[key]);\n                    }\n                }\n            }\n            if (!shallow) {\n                this.observeArray(value);\n            }\n        }\n        else {\n            /**\n             * Walk through all properties and convert them into\n             * getter/setters. This method should only be called when\n             * value type is Object.\n             */\n            var keys = Object.keys(value);\n            for (var i = 0; i < keys.length; i++) {\n                var key = keys[i];\n                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n            }\n        }\n    }\n    /**\n     * Observe a list of Array items.\n     */\n    Observer.prototype.observeArray = function (value) {\n        for (var i = 0, l = value.length; i < l; i++) {\n            observe(value[i], false, this.mock);\n        }\n    };\n    return Observer;\n}());\n// helpers\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe(value, shallow, ssrMockReactivity) {\n    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n        return value.__ob__;\n    }\n    if (shouldObserve &&\n        (ssrMockReactivity || !isServerRendering()) &&\n        (isArray(value) || isPlainObject(value)) &&\n        Object.isExtensible(value) &&\n        !value.__v_skip /* ReactiveFlags.SKIP */ &&\n        !isRef(value) &&\n        !(value instanceof VNode)) {\n        return new Observer(value, shallow, ssrMockReactivity);\n    }\n}\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {\n    if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }\n    var dep = new Dep();\n    var property = Object.getOwnPropertyDescriptor(obj, key);\n    if (property && property.configurable === false) {\n        return;\n    }\n    // cater for pre-defined getter/setters\n    var getter = property && property.get;\n    var setter = property && property.set;\n    if ((!getter || setter) &&\n        (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n        val = obj[key];\n    }\n    var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n    Object.defineProperty(obj, key, {\n        enumerable: true,\n        configurable: true,\n        get: function reactiveGetter() {\n            var value = getter ? getter.call(obj) : val;\n            if (Dep.target) {\n                if (process.env.NODE_ENV !== 'production') {\n                    dep.depend({\n                        target: obj,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key: key\n                    });\n                }\n                else {\n                    dep.depend();\n                }\n                if (childOb) {\n                    childOb.dep.depend();\n                    if (isArray(value)) {\n                        dependArray(value);\n                    }\n                }\n            }\n            return isRef(value) && !shallow ? value.value : value;\n        },\n        set: function reactiveSetter(newVal) {\n            var value = getter ? getter.call(obj) : val;\n            if (!hasChanged(value, newVal)) {\n                return;\n            }\n            if (process.env.NODE_ENV !== 'production' && customSetter) {\n                customSetter();\n            }\n            if (setter) {\n                setter.call(obj, newVal);\n            }\n            else if (getter) {\n                // #7981: for accessor properties without setter\n                return;\n            }\n            else if (!shallow && isRef(value) && !isRef(newVal)) {\n                value.value = newVal;\n                return;\n            }\n            else {\n                val = newVal;\n            }\n            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n            if (process.env.NODE_ENV !== 'production') {\n                dep.notify({\n                    type: \"set\" /* TriggerOpTypes.SET */,\n                    target: obj,\n                    key: key,\n                    newValue: newVal,\n                    oldValue: value\n                });\n            }\n            else {\n                dep.notify();\n            }\n        }\n    });\n    return dep;\n}\nfunction set(target, key, val) {\n    if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n        warn(\"Cannot set reactive property on undefined, null, or primitive value: \".concat(target));\n    }\n    if (isReadonly(target)) {\n        process.env.NODE_ENV !== 'production' && warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        return;\n    }\n    var ob = target.__ob__;\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.length = Math.max(target.length, key);\n        target.splice(key, 1, val);\n        // when mocking for SSR, array methods are not hijacked\n        if (ob && !ob.shallow && ob.mock) {\n            observe(val, false, true);\n        }\n        return val;\n    }\n    if (key in target && !(key in Object.prototype)) {\n        target[key] = val;\n        return val;\n    }\n    if (target._isVue || (ob && ob.vmCount)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                'at runtime - declare it upfront in the data option.');\n        return val;\n    }\n    if (!ob) {\n        target[key] = val;\n        return val;\n    }\n    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n    if (process.env.NODE_ENV !== 'production') {\n        ob.dep.notify({\n            type: \"add\" /* TriggerOpTypes.ADD */,\n            target: target,\n            key: key,\n            newValue: val,\n            oldValue: undefined\n        });\n    }\n    else {\n        ob.dep.notify();\n    }\n    return val;\n}\nfunction del(target, key) {\n    if (process.env.NODE_ENV !== 'production' && (isUndef(target) || isPrimitive(target))) {\n        warn(\"Cannot delete reactive property on undefined, null, or primitive value: \".concat(target));\n    }\n    if (isArray(target) && isValidArrayIndex(key)) {\n        target.splice(key, 1);\n        return;\n    }\n    var ob = target.__ob__;\n    if (target._isVue || (ob && ob.vmCount)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn('Avoid deleting properties on a Vue instance or its root $data ' +\n                '- just set it to null.');\n        return;\n    }\n    if (isReadonly(target)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn(\"Delete operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        return;\n    }\n    if (!hasOwn(target, key)) {\n        return;\n    }\n    delete target[key];\n    if (!ob) {\n        return;\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        ob.dep.notify({\n            type: \"delete\" /* TriggerOpTypes.DELETE */,\n            target: target,\n            key: key\n        });\n    }\n    else {\n        ob.dep.notify();\n    }\n}\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray(value) {\n    for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n        e = value[i];\n        if (e && e.__ob__) {\n            e.__ob__.dep.depend();\n        }\n        if (isArray(e)) {\n            dependArray(e);\n        }\n    }\n}\n\nfunction reactive(target) {\n    makeReactive(target, false);\n    return target;\n}\n/**\n * Return a shallowly-reactive copy of the original object, where only the root\n * level properties are reactive. It also does not auto-unwrap refs (even at the\n * root level).\n */\nfunction shallowReactive(target) {\n    makeReactive(target, true);\n    def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    return target;\n}\nfunction makeReactive(target, shallow) {\n    // if trying to observe a readonly proxy, return the readonly version.\n    if (!isReadonly(target)) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (isArray(target)) {\n                warn(\"Avoid using Array as root value for \".concat(shallow ? \"shallowReactive()\" : \"reactive()\", \" as it cannot be tracked in watch() or watchEffect(). Use \").concat(shallow ? \"shallowRef()\" : \"ref()\", \" instead. This is a Vue-2-only limitation.\"));\n            }\n            var existingOb = target && target.__ob__;\n            if (existingOb && existingOb.shallow !== shallow) {\n                warn(\"Target is already a \".concat(existingOb.shallow ? \"\" : \"non-\", \"shallow reactive object, and cannot be converted to \").concat(shallow ? \"\" : \"non-\", \"shallow.\"));\n            }\n        }\n        var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n        if (process.env.NODE_ENV !== 'production' && !ob) {\n            if (target == null || isPrimitive(target)) {\n                warn(\"value cannot be made reactive: \".concat(String(target)));\n            }\n            if (isCollectionType(target)) {\n                warn(\"Vue 2 does not support reactive collection types such as Map or Set.\");\n            }\n        }\n    }\n}\nfunction isReactive(value) {\n    if (isReadonly(value)) {\n        return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n    }\n    return !!(value && value.__ob__);\n}\nfunction isShallow(value) {\n    return !!(value && value.__v_isShallow);\n}\nfunction isReadonly(value) {\n    return !!(value && value.__v_isReadonly);\n}\nfunction isProxy(value) {\n    return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n    var raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n    return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n    // non-extensible objects won't be observed anyway\n    if (Object.isExtensible(value)) {\n        def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n    }\n    return value;\n}\n/**\n * @internal\n */\nfunction isCollectionType(value) {\n    var type = toRawType(value);\n    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n}\n\n/**\n * @internal\n */\nvar RefFlag = \"__v_isRef\";\nfunction isRef(r) {\n    return !!(r && r.__v_isRef === true);\n}\nfunction ref$1(value) {\n    return createRef(value, false);\n}\nfunction shallowRef(value) {\n    return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n    if (isRef(rawValue)) {\n        return rawValue;\n    }\n    var ref = {};\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n    return ref;\n}\nfunction triggerRef(ref) {\n    if (process.env.NODE_ENV !== 'production' && !ref.dep) {\n        warn(\"received object is not a triggerable ref.\");\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        ref.dep &&\n            ref.dep.notify({\n                type: \"set\" /* TriggerOpTypes.SET */,\n                target: ref,\n                key: 'value'\n            });\n    }\n    else {\n        ref.dep && ref.dep.notify();\n    }\n}\nfunction unref(ref) {\n    return isRef(ref) ? ref.value : ref;\n}\nfunction proxyRefs(objectWithRefs) {\n    if (isReactive(objectWithRefs)) {\n        return objectWithRefs;\n    }\n    var proxy = {};\n    var keys = Object.keys(objectWithRefs);\n    for (var i = 0; i < keys.length; i++) {\n        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n    }\n    return proxy;\n}\nfunction proxyWithRefUnwrap(target, source, key) {\n    Object.defineProperty(target, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            var val = source[key];\n            if (isRef(val)) {\n                return val.value;\n            }\n            else {\n                var ob = val && val.__ob__;\n                if (ob)\n                    ob.dep.depend();\n                return val;\n            }\n        },\n        set: function (value) {\n            var oldValue = source[key];\n            if (isRef(oldValue) && !isRef(value)) {\n                oldValue.value = value;\n            }\n            else {\n                source[key] = value;\n            }\n        }\n    });\n}\nfunction customRef(factory) {\n    var dep = new Dep();\n    var _a = factory(function () {\n        if (process.env.NODE_ENV !== 'production') {\n            dep.depend({\n                target: ref,\n                type: \"get\" /* TrackOpTypes.GET */,\n                key: 'value'\n            });\n        }\n        else {\n            dep.depend();\n        }\n    }, function () {\n        if (process.env.NODE_ENV !== 'production') {\n            dep.notify({\n                target: ref,\n                type: \"set\" /* TriggerOpTypes.SET */,\n                key: 'value'\n            });\n        }\n        else {\n            dep.notify();\n        }\n    }), get = _a.get, set = _a.set;\n    var ref = {\n        get value() {\n            return get();\n        },\n        set value(newVal) {\n            set(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\nfunction toRefs(object) {\n    if (process.env.NODE_ENV !== 'production' && !isReactive(object)) {\n        warn(\"toRefs() expects a reactive object but received a plain one.\");\n    }\n    var ret = isArray(object) ? new Array(object.length) : {};\n    for (var key in object) {\n        ret[key] = toRef(object, key);\n    }\n    return ret;\n}\nfunction toRef(object, key, defaultValue) {\n    var val = object[key];\n    if (isRef(val)) {\n        return val;\n    }\n    var ref = {\n        get value() {\n            var val = object[key];\n            return val === undefined ? defaultValue : val;\n        },\n        set value(newVal) {\n            object[key] = newVal;\n        }\n    };\n    def(ref, RefFlag, true);\n    return ref;\n}\n\nvar rawToReadonlyFlag = \"__v_rawToReadonly\";\nvar rawToShallowReadonlyFlag = \"__v_rawToShallowReadonly\";\nfunction readonly(target) {\n    return createReadonly(target, false);\n}\nfunction createReadonly(target, shallow) {\n    if (!isPlainObject(target)) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (isArray(target)) {\n                warn(\"Vue 2 does not support readonly arrays.\");\n            }\n            else if (isCollectionType(target)) {\n                warn(\"Vue 2 does not support readonly collection types such as Map or Set.\");\n            }\n            else {\n                warn(\"value cannot be made readonly: \".concat(typeof target));\n            }\n        }\n        return target;\n    }\n    if (process.env.NODE_ENV !== 'production' && !Object.isExtensible(target)) {\n        warn(\"Vue 2 does not support creating readonly proxy for non-extensible object.\");\n    }\n    // already a readonly object\n    if (isReadonly(target)) {\n        return target;\n    }\n    // already has a readonly proxy\n    var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n    var existingProxy = target[existingFlag];\n    if (existingProxy) {\n        return existingProxy;\n    }\n    var proxy = Object.create(Object.getPrototypeOf(target));\n    def(target, existingFlag, proxy);\n    def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n    def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n    if (isRef(target)) {\n        def(proxy, RefFlag, true);\n    }\n    if (shallow || isShallow(target)) {\n        def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n    }\n    var keys = Object.keys(target);\n    for (var i = 0; i < keys.length; i++) {\n        defineReadonlyProperty(proxy, target, keys[i], shallow);\n    }\n    return proxy;\n}\nfunction defineReadonlyProperty(proxy, target, key, shallow) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            var val = target[key];\n            return shallow || !isPlainObject(val) ? val : readonly(val);\n        },\n        set: function () {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n        }\n    });\n}\n/**\n * Returns a reactive-copy of the original object, where only the root level\n * properties are readonly, and does NOT unwrap refs nor recursively convert\n * returned properties.\n * This is used for creating the props proxy object for stateful components.\n */\nfunction shallowReadonly(target) {\n    return createReadonly(target, true);\n}\n\nfunction computed(getterOrOptions, debugOptions) {\n    var getter;\n    var setter;\n    var onlyGetter = isFunction(getterOrOptions);\n    if (onlyGetter) {\n        getter = getterOrOptions;\n        setter = process.env.NODE_ENV !== 'production'\n            ? function () {\n                warn('Write operation failed: computed value is readonly');\n            }\n            : noop;\n    }\n    else {\n        getter = getterOrOptions.get;\n        setter = getterOrOptions.set;\n    }\n    var watcher = isServerRendering()\n        ? null\n        : new Watcher(currentInstance, getter, noop, { lazy: true });\n    if (process.env.NODE_ENV !== 'production' && watcher && debugOptions) {\n        watcher.onTrack = debugOptions.onTrack;\n        watcher.onTrigger = debugOptions.onTrigger;\n    }\n    var ref = {\n        // some libs rely on the presence effect for checking computed refs\n        // from normal refs, but the implementation doesn't matter\n        effect: watcher,\n        get value() {\n            if (watcher) {\n                if (watcher.dirty) {\n                    watcher.evaluate();\n                }\n                if (Dep.target) {\n                    if (process.env.NODE_ENV !== 'production' && Dep.target.onTrack) {\n                        Dep.target.onTrack({\n                            effect: Dep.target,\n                            target: ref,\n                            type: \"get\" /* TrackOpTypes.GET */,\n                            key: 'value'\n                        });\n                    }\n                    watcher.depend();\n                }\n                return watcher.value;\n            }\n            else {\n                return getter();\n            }\n        },\n        set value(newVal) {\n            setter(newVal);\n        }\n    };\n    def(ref, RefFlag, true);\n    def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n    return ref;\n}\n\nvar WATCHER = \"watcher\";\nvar WATCHER_CB = \"\".concat(WATCHER, \" callback\");\nvar WATCHER_GETTER = \"\".concat(WATCHER, \" getter\");\nvar WATCHER_CLEANUP = \"\".concat(WATCHER, \" cleanup\");\n// Simple effect.\nfunction watchEffect(effect, options) {\n    return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n    return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n        ? __assign(__assign({}, options), { flush: 'post' }) : { flush: 'post' }));\n}\nfunction watchSyncEffect(effect, options) {\n    return doWatch(effect, null, (process.env.NODE_ENV !== 'production'\n        ? __assign(__assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));\n}\n// initial value for watchers to trigger on undefined initial values\nvar INITIAL_WATCHER_VALUE = {};\n// implementation\nfunction watch(source, cb, options) {\n    if (process.env.NODE_ENV !== 'production' && typeof cb !== 'function') {\n        warn(\"`watch(fn, options?)` signature has been moved to a separate API. \" +\n            \"Use `watchEffect(fn, options?)` instead. `watch` now only \" +\n            \"supports `watch(source, cb, options?) signature.\");\n    }\n    return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, _a) {\n    var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;\n    if (process.env.NODE_ENV !== 'production' && !cb) {\n        if (immediate !== undefined) {\n            warn(\"watch() \\\"immediate\\\" option is only respected when using the \" +\n                \"watch(source, callback, options?) signature.\");\n        }\n        if (deep !== undefined) {\n            warn(\"watch() \\\"deep\\\" option is only respected when using the \" +\n                \"watch(source, callback, options?) signature.\");\n        }\n    }\n    var warnInvalidSource = function (s) {\n        warn(\"Invalid watch source: \".concat(s, \". A watch source can only be a getter/effect \") +\n            \"function, a ref, a reactive object, or an array of these types.\");\n    };\n    var instance = currentInstance;\n    var call = function (fn, type, args) {\n        if (args === void 0) { args = null; }\n        var res = invokeWithErrorHandling(fn, null, args, instance, type);\n        if (deep && res && res.__ob__)\n            res.__ob__.dep.depend();\n        return res;\n    };\n    var getter;\n    var forceTrigger = false;\n    var isMultiSource = false;\n    if (isRef(source)) {\n        getter = function () { return source.value; };\n        forceTrigger = isShallow(source);\n    }\n    else if (isReactive(source)) {\n        getter = function () {\n            source.__ob__.dep.depend();\n            return source;\n        };\n        deep = true;\n    }\n    else if (isArray(source)) {\n        isMultiSource = true;\n        forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });\n        getter = function () {\n            return source.map(function (s) {\n                if (isRef(s)) {\n                    return s.value;\n                }\n                else if (isReactive(s)) {\n                    s.__ob__.dep.depend();\n                    return traverse(s);\n                }\n                else if (isFunction(s)) {\n                    return call(s, WATCHER_GETTER);\n                }\n                else {\n                    process.env.NODE_ENV !== 'production' && warnInvalidSource(s);\n                }\n            });\n        };\n    }\n    else if (isFunction(source)) {\n        if (cb) {\n            // getter with cb\n            getter = function () { return call(source, WATCHER_GETTER); };\n        }\n        else {\n            // no cb -> simple effect\n            getter = function () {\n                if (instance && instance._isDestroyed) {\n                    return;\n                }\n                if (cleanup) {\n                    cleanup();\n                }\n                return call(source, WATCHER, [onCleanup]);\n            };\n        }\n    }\n    else {\n        getter = noop;\n        process.env.NODE_ENV !== 'production' && warnInvalidSource(source);\n    }\n    if (cb && deep) {\n        var baseGetter_1 = getter;\n        getter = function () { return traverse(baseGetter_1()); };\n    }\n    var cleanup;\n    var onCleanup = function (fn) {\n        cleanup = watcher.onStop = function () {\n            call(fn, WATCHER_CLEANUP);\n        };\n    };\n    // in SSR there is no need to setup an actual effect, and it should be noop\n    // unless it's eager\n    if (isServerRendering()) {\n        // we will also not call the invalidate callback (+ runner is not set up)\n        onCleanup = noop;\n        if (!cb) {\n            getter();\n        }\n        else if (immediate) {\n            call(cb, WATCHER_CB, [\n                getter(),\n                isMultiSource ? [] : undefined,\n                onCleanup\n            ]);\n        }\n        return noop;\n    }\n    var watcher = new Watcher(currentInstance, getter, noop, {\n        lazy: true\n    });\n    watcher.noRecurse = !cb;\n    var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n    // overwrite default run\n    watcher.run = function () {\n        if (!watcher.active) {\n            return;\n        }\n        if (cb) {\n            // watch(source, cb)\n            var newValue = watcher.get();\n            if (deep ||\n                forceTrigger ||\n                (isMultiSource\n                    ? newValue.some(function (v, i) {\n                        return hasChanged(v, oldValue[i]);\n                    })\n                    : hasChanged(newValue, oldValue))) {\n                // cleanup before running cb again\n                if (cleanup) {\n                    cleanup();\n                }\n                call(cb, WATCHER_CB, [\n                    newValue,\n                    // pass undefined as the old value when it's changed for the first time\n                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                    onCleanup\n                ]);\n                oldValue = newValue;\n            }\n        }\n        else {\n            // watchEffect\n            watcher.get();\n        }\n    };\n    if (flush === 'sync') {\n        watcher.update = watcher.run;\n    }\n    else if (flush === 'post') {\n        watcher.post = true;\n        watcher.update = function () { return queueWatcher(watcher); };\n    }\n    else {\n        // pre\n        watcher.update = function () {\n            if (instance && instance === currentInstance && !instance._isMounted) {\n                // pre-watcher triggered before\n                var buffer = instance._preWatchers || (instance._preWatchers = []);\n                if (buffer.indexOf(watcher) < 0)\n                    buffer.push(watcher);\n            }\n            else {\n                queueWatcher(watcher);\n            }\n        };\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        watcher.onTrack = onTrack;\n        watcher.onTrigger = onTrigger;\n    }\n    // initial run\n    if (cb) {\n        if (immediate) {\n            watcher.run();\n        }\n        else {\n            oldValue = watcher.get();\n        }\n    }\n    else if (flush === 'post' && instance) {\n        instance.$once('hook:mounted', function () { return watcher.get(); });\n    }\n    else {\n        watcher.get();\n    }\n    return function () {\n        watcher.teardown();\n    };\n}\n\nvar activeEffectScope;\nvar EffectScope = /** @class */ (function () {\n    function EffectScope(detached) {\n        if (detached === void 0) { detached = false; }\n        this.detached = detached;\n        /**\n         * @internal\n         */\n        this.active = true;\n        /**\n         * @internal\n         */\n        this.effects = [];\n        /**\n         * @internal\n         */\n        this.cleanups = [];\n        this.parent = activeEffectScope;\n        if (!detached && activeEffectScope) {\n            this.index =\n                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n        }\n    }\n    EffectScope.prototype.run = function (fn) {\n        if (this.active) {\n            var currentEffectScope = activeEffectScope;\n            try {\n                activeEffectScope = this;\n                return fn();\n            }\n            finally {\n                activeEffectScope = currentEffectScope;\n            }\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"cannot run an inactive effect scope.\");\n        }\n    };\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    EffectScope.prototype.on = function () {\n        activeEffectScope = this;\n    };\n    /**\n     * This should only be called on non-detached scopes\n     * @internal\n     */\n    EffectScope.prototype.off = function () {\n        activeEffectScope = this.parent;\n    };\n    EffectScope.prototype.stop = function (fromParent) {\n        if (this.active) {\n            var i = void 0, l = void 0;\n            for (i = 0, l = this.effects.length; i < l; i++) {\n                this.effects[i].teardown();\n            }\n            for (i = 0, l = this.cleanups.length; i < l; i++) {\n                this.cleanups[i]();\n            }\n            if (this.scopes) {\n                for (i = 0, l = this.scopes.length; i < l; i++) {\n                    this.scopes[i].stop(true);\n                }\n            }\n            // nested scope, dereference from parent to avoid memory leaks\n            if (!this.detached && this.parent && !fromParent) {\n                // optimized O(1) removal\n                var last = this.parent.scopes.pop();\n                if (last && last !== this) {\n                    this.parent.scopes[this.index] = last;\n                    last.index = this.index;\n                }\n            }\n            this.parent = undefined;\n            this.active = false;\n        }\n    };\n    return EffectScope;\n}());\nfunction effectScope(detached) {\n    return new EffectScope(detached);\n}\n/**\n * @internal\n */\nfunction recordEffectScope(effect, scope) {\n    if (scope === void 0) { scope = activeEffectScope; }\n    if (scope && scope.active) {\n        scope.effects.push(effect);\n    }\n}\nfunction getCurrentScope() {\n    return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n    if (activeEffectScope) {\n        activeEffectScope.cleanups.push(fn);\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn(\"onScopeDispose() is called when there is no active effect scope\" +\n            \" to be associated with.\");\n    }\n}\n\nfunction provide(key, value) {\n    if (!currentInstance) {\n        if (process.env.NODE_ENV !== 'production') {\n            warn(\"provide() can only be used inside setup().\");\n        }\n    }\n    else {\n        // TS doesn't allow symbol as index type\n        resolveProvided(currentInstance)[key] = value;\n    }\n}\nfunction resolveProvided(vm) {\n    // by default an instance inherits its parent's provides object\n    // but when it needs to provide values of its own, it creates its\n    // own provides object using parent provides object as prototype.\n    // this way in `inject` we can simply look up injections from direct\n    // parent and let the prototype chain do the work.\n    var existing = vm._provided;\n    var parentProvides = vm.$parent && vm.$parent._provided;\n    if (parentProvides === existing) {\n        return (vm._provided = Object.create(parentProvides));\n    }\n    else {\n        return existing;\n    }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory) {\n    if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }\n    // fallback to `currentRenderingInstance` so that this can be called in\n    // a functional component\n    var instance = currentInstance;\n    if (instance) {\n        // #2400\n        // to support `app.use` plugins,\n        // fallback to appContext's `provides` if the instance is at root\n        var provides = instance.$parent && instance.$parent._provided;\n        if (provides && key in provides) {\n            // TS doesn't allow symbol as index type\n            return provides[key];\n        }\n        else if (arguments.length > 1) {\n            return treatDefaultAsFactory && isFunction(defaultValue)\n                ? defaultValue.call(instance)\n                : defaultValue;\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"injection \\\"\".concat(String(key), \"\\\" not found.\"));\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn(\"inject() can only be used inside setup() or functional components.\");\n    }\n}\n\nvar normalizeEvent = cached(function (name) {\n    var passive = name.charAt(0) === '&';\n    name = passive ? name.slice(1) : name;\n    var once = name.charAt(0) === '~'; // Prefixed last, checked first\n    name = once ? name.slice(1) : name;\n    var capture = name.charAt(0) === '!';\n    name = capture ? name.slice(1) : name;\n    return {\n        name: name,\n        once: once,\n        capture: capture,\n        passive: passive\n    };\n});\nfunction createFnInvoker(fns, vm) {\n    function invoker() {\n        var fns = invoker.fns;\n        if (isArray(fns)) {\n            var cloned = fns.slice();\n            for (var i = 0; i < cloned.length; i++) {\n                invokeWithErrorHandling(cloned[i], null, arguments, vm, \"v-on handler\");\n            }\n        }\n        else {\n            // return handler return value for single handlers\n            return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n        }\n    }\n    invoker.fns = fns;\n    return invoker;\n}\nfunction updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n    var name, cur, old, event;\n    for (name in on) {\n        cur = on[name];\n        old = oldOn[name];\n        event = normalizeEvent(name);\n        if (isUndef(cur)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"Invalid handler for event \\\"\".concat(event.name, \"\\\": got \") + String(cur), vm);\n        }\n        else if (isUndef(old)) {\n            if (isUndef(cur.fns)) {\n                cur = on[name] = createFnInvoker(cur, vm);\n            }\n            if (isTrue(event.once)) {\n                cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n            }\n            add(event.name, cur, event.capture, event.passive, event.params);\n        }\n        else if (cur !== old) {\n            old.fns = cur;\n            on[name] = old;\n        }\n    }\n    for (name in oldOn) {\n        if (isUndef(on[name])) {\n            event = normalizeEvent(name);\n            remove(event.name, oldOn[name], event.capture);\n        }\n    }\n}\n\nfunction mergeVNodeHook(def, hookKey, hook) {\n    if (def instanceof VNode) {\n        def = def.data.hook || (def.data.hook = {});\n    }\n    var invoker;\n    var oldHook = def[hookKey];\n    function wrappedHook() {\n        hook.apply(this, arguments);\n        // important: remove merged hook to ensure it's called only once\n        // and prevent memory leak\n        remove$2(invoker.fns, wrappedHook);\n    }\n    if (isUndef(oldHook)) {\n        // no existing hook\n        invoker = createFnInvoker([wrappedHook]);\n    }\n    else {\n        /* istanbul ignore if */\n        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n            // already a merged invoker\n            invoker = oldHook;\n            invoker.fns.push(wrappedHook);\n        }\n        else {\n            // existing plain hook\n            invoker = createFnInvoker([oldHook, wrappedHook]);\n        }\n    }\n    invoker.merged = true;\n    def[hookKey] = invoker;\n}\n\nfunction extractPropsFromVNodeData(data, Ctor, tag) {\n    // we are only extracting raw values here.\n    // validation and default values are handled in the child\n    // component itself.\n    var propOptions = Ctor.options.props;\n    if (isUndef(propOptions)) {\n        return;\n    }\n    var res = {};\n    var attrs = data.attrs, props = data.props;\n    if (isDef(attrs) || isDef(props)) {\n        for (var key in propOptions) {\n            var altKey = hyphenate(key);\n            if (process.env.NODE_ENV !== 'production') {\n                var keyInLowerCase = key.toLowerCase();\n                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                    tip(\"Prop \\\"\".concat(keyInLowerCase, \"\\\" is passed to component \") +\n                        \"\".concat(formatComponentName(\n                        // @ts-expect-error tag is string\n                        tag || Ctor), \", but the declared prop name is\") +\n                        \" \\\"\".concat(key, \"\\\". \") +\n                        \"Note that HTML attributes are case-insensitive and camelCased \" +\n                        \"props need to use their kebab-case equivalents when using in-DOM \" +\n                        \"templates. You should probably use \\\"\".concat(altKey, \"\\\" instead of \\\"\").concat(key, \"\\\".\"));\n                }\n            }\n            checkProp(res, props, key, altKey, true) ||\n                checkProp(res, attrs, key, altKey, false);\n        }\n    }\n    return res;\n}\nfunction checkProp(res, hash, key, altKey, preserve) {\n    if (isDef(hash)) {\n        if (hasOwn(hash, key)) {\n            res[key] = hash[key];\n            if (!preserve) {\n                delete hash[key];\n            }\n            return true;\n        }\n        else if (hasOwn(hash, altKey)) {\n            res[key] = hash[altKey];\n            if (!preserve) {\n                delete hash[altKey];\n            }\n            return true;\n        }\n    }\n    return false;\n}\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren(children) {\n    for (var i = 0; i < children.length; i++) {\n        if (isArray(children[i])) {\n            return Array.prototype.concat.apply([], children);\n        }\n    }\n    return children;\n}\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren(children) {\n    return isPrimitive(children)\n        ? [createTextVNode(children)]\n        : isArray(children)\n            ? normalizeArrayChildren(children)\n            : undefined;\n}\nfunction isTextNode(node) {\n    return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n}\nfunction normalizeArrayChildren(children, nestedIndex) {\n    var res = [];\n    var i, c, lastIndex, last;\n    for (i = 0; i < children.length; i++) {\n        c = children[i];\n        if (isUndef(c) || typeof c === 'boolean')\n            continue;\n        lastIndex = res.length - 1;\n        last = res[lastIndex];\n        //  nested\n        if (isArray(c)) {\n            if (c.length > 0) {\n                c = normalizeArrayChildren(c, \"\".concat(nestedIndex || '', \"_\").concat(i));\n                // merge adjacent text nodes\n                if (isTextNode(c[0]) && isTextNode(last)) {\n                    res[lastIndex] = createTextVNode(last.text + c[0].text);\n                    c.shift();\n                }\n                res.push.apply(res, c);\n            }\n        }\n        else if (isPrimitive(c)) {\n            if (isTextNode(last)) {\n                // merge adjacent text nodes\n                // this is necessary for SSR hydration because text nodes are\n                // essentially merged when rendered to HTML strings\n                res[lastIndex] = createTextVNode(last.text + c);\n            }\n            else if (c !== '') {\n                // convert primitive to vnode\n                res.push(createTextVNode(c));\n            }\n        }\n        else {\n            if (isTextNode(c) && isTextNode(last)) {\n                // merge adjacent text nodes\n                res[lastIndex] = createTextVNode(last.text + c.text);\n            }\n            else {\n                // default key for nested array children (likely generated by v-for)\n                if (isTrue(children._isVList) &&\n                    isDef(c.tag) &&\n                    isUndef(c.key) &&\n                    isDef(nestedIndex)) {\n                    c.key = \"__vlist\".concat(nestedIndex, \"_\").concat(i, \"__\");\n                }\n                res.push(c);\n            }\n        }\n    }\n    return res;\n}\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList(val, render) {\n    var ret = null, i, l, keys, key;\n    if (isArray(val) || typeof val === 'string') {\n        ret = new Array(val.length);\n        for (i = 0, l = val.length; i < l; i++) {\n            ret[i] = render(val[i], i);\n        }\n    }\n    else if (typeof val === 'number') {\n        ret = new Array(val);\n        for (i = 0; i < val; i++) {\n            ret[i] = render(i + 1, i);\n        }\n    }\n    else if (isObject(val)) {\n        if (hasSymbol && val[Symbol.iterator]) {\n            ret = [];\n            var iterator = val[Symbol.iterator]();\n            var result = iterator.next();\n            while (!result.done) {\n                ret.push(render(result.value, ret.length));\n                result = iterator.next();\n            }\n        }\n        else {\n            keys = Object.keys(val);\n            ret = new Array(keys.length);\n            for (i = 0, l = keys.length; i < l; i++) {\n                key = keys[i];\n                ret[i] = render(val[key], key, i);\n            }\n        }\n    }\n    if (!isDef(ret)) {\n        ret = [];\n    }\n    ret._isVList = true;\n    return ret;\n}\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot(name, fallbackRender, props, bindObject) {\n    var scopedSlotFn = this.$scopedSlots[name];\n    var nodes;\n    if (scopedSlotFn) {\n        // scoped slot\n        props = props || {};\n        if (bindObject) {\n            if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {\n                warn('slot v-bind without argument expects an Object', this);\n            }\n            props = extend(extend({}, bindObject), props);\n        }\n        nodes =\n            scopedSlotFn(props) ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    else {\n        nodes =\n            this.$slots[name] ||\n                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n    }\n    var target = props && props.slot;\n    if (target) {\n        return this.$createElement('template', { slot: target }, nodes);\n    }\n    else {\n        return nodes;\n    }\n}\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter(id) {\n    return resolveAsset(this.$options, 'filters', id, true) || identity;\n}\n\nfunction isKeyNotMatch(expect, actual) {\n    if (isArray(expect)) {\n        return expect.indexOf(actual) === -1;\n    }\n    else {\n        return expect !== actual;\n    }\n}\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n    var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n        return isKeyNotMatch(builtInKeyName, eventKeyName);\n    }\n    else if (mappedKeyCode) {\n        return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n    }\n    else if (eventKeyName) {\n        return hyphenate(eventKeyName) !== key;\n    }\n    return eventKeyCode === undefined;\n}\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps(data, tag, value, asProp, isSync) {\n    if (value) {\n        if (!isObject(value)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn('v-bind without argument expects an Object or Array value', this);\n        }\n        else {\n            if (isArray(value)) {\n                value = toObject(value);\n            }\n            var hash = void 0;\n            var _loop_1 = function (key) {\n                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                    hash = data;\n                }\n                else {\n                    var type = data.attrs && data.attrs.type;\n                    hash =\n                        asProp || config.mustUseProp(tag, type, key)\n                            ? data.domProps || (data.domProps = {})\n                            : data.attrs || (data.attrs = {});\n                }\n                var camelizedKey = camelize(key);\n                var hyphenatedKey = hyphenate(key);\n                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                    hash[key] = value[key];\n                    if (isSync) {\n                        var on = data.on || (data.on = {});\n                        on[\"update:\".concat(key)] = function ($event) {\n                            value[key] = $event;\n                        };\n                    }\n                }\n            };\n            for (var key in value) {\n                _loop_1(key);\n            }\n        }\n    }\n    return data;\n}\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic(index, isInFor) {\n    var cached = this._staticTrees || (this._staticTrees = []);\n    var tree = cached[index];\n    // if has already-rendered static tree and not inside v-for,\n    // we can reuse the same tree.\n    if (tree && !isInFor) {\n        return tree;\n    }\n    // otherwise, render a fresh tree.\n    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n    );\n    markStatic(tree, \"__static__\".concat(index), false);\n    return tree;\n}\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce(tree, index, key) {\n    markStatic(tree, \"__once__\".concat(index).concat(key ? \"_\".concat(key) : \"\"), true);\n    return tree;\n}\nfunction markStatic(tree, key, isOnce) {\n    if (isArray(tree)) {\n        for (var i = 0; i < tree.length; i++) {\n            if (tree[i] && typeof tree[i] !== 'string') {\n                markStaticNode(tree[i], \"\".concat(key, \"_\").concat(i), isOnce);\n            }\n        }\n    }\n    else {\n        markStaticNode(tree, key, isOnce);\n    }\n}\nfunction markStaticNode(node, key, isOnce) {\n    node.isStatic = true;\n    node.key = key;\n    node.isOnce = isOnce;\n}\n\nfunction bindObjectListeners(data, value) {\n    if (value) {\n        if (!isPlainObject(value)) {\n            process.env.NODE_ENV !== 'production' && warn('v-on without argument expects an Object value', this);\n        }\n        else {\n            var on = (data.on = data.on ? extend({}, data.on) : {});\n            for (var key in value) {\n                var existing = on[key];\n                var ours = value[key];\n                on[key] = existing ? [].concat(existing, ours) : ours;\n            }\n        }\n    }\n    return data;\n}\n\nfunction resolveScopedSlots(fns, res, \n// the following are added in 2.6\nhasDynamicKeys, contentHashKey) {\n    res = res || { $stable: !hasDynamicKeys };\n    for (var i = 0; i < fns.length; i++) {\n        var slot = fns[i];\n        if (isArray(slot)) {\n            resolveScopedSlots(slot, res, hasDynamicKeys);\n        }\n        else if (slot) {\n            // marker for reverse proxying v-slot without scope on this.$slots\n            // @ts-expect-error\n            if (slot.proxy) {\n                // @ts-expect-error\n                slot.fn.proxy = true;\n            }\n            res[slot.key] = slot.fn;\n        }\n    }\n    if (contentHashKey) {\n        res.$key = contentHashKey;\n    }\n    return res;\n}\n\n// helper to process dynamic keys for dynamic arguments in v-bind and v-on.\nfunction bindDynamicKeys(baseObj, values) {\n    for (var i = 0; i < values.length; i += 2) {\n        var key = values[i];\n        if (typeof key === 'string' && key) {\n            baseObj[values[i]] = values[i + 1];\n        }\n        else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {\n            // null is a special value for explicitly removing a binding\n            warn(\"Invalid value for dynamic directive argument (expected string or null): \".concat(key), this);\n        }\n    }\n    return baseObj;\n}\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier(value, symbol) {\n    return typeof value === 'string' ? symbol + value : value;\n}\n\nfunction installRenderHelpers(target) {\n    target._o = markOnce;\n    target._n = toNumber;\n    target._s = toString;\n    target._l = renderList;\n    target._t = renderSlot;\n    target._q = looseEqual;\n    target._i = looseIndexOf;\n    target._m = renderStatic;\n    target._f = resolveFilter;\n    target._k = checkKeyCodes;\n    target._b = bindObjectProps;\n    target._v = createTextVNode;\n    target._e = createEmptyVNode;\n    target._u = resolveScopedSlots;\n    target._g = bindObjectListeners;\n    target._d = bindDynamicKeys;\n    target._p = prependModifier;\n}\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots(children, context) {\n    if (!children || !children.length) {\n        return {};\n    }\n    var slots = {};\n    for (var i = 0, l = children.length; i < l; i++) {\n        var child = children[i];\n        var data = child.data;\n        // remove slot attribute if the node is resolved as a Vue slot node\n        if (data && data.attrs && data.attrs.slot) {\n            delete data.attrs.slot;\n        }\n        // named slots should only be respected if the vnode was rendered in the\n        // same context.\n        if ((child.context === context || child.fnContext === context) &&\n            data &&\n            data.slot != null) {\n            var name_1 = data.slot;\n            var slot = slots[name_1] || (slots[name_1] = []);\n            if (child.tag === 'template') {\n                slot.push.apply(slot, child.children || []);\n            }\n            else {\n                slot.push(child);\n            }\n        }\n        else {\n            (slots.default || (slots.default = [])).push(child);\n        }\n    }\n    // ignore slots that contains only whitespace\n    for (var name_2 in slots) {\n        if (slots[name_2].every(isWhitespace)) {\n            delete slots[name_2];\n        }\n    }\n    return slots;\n}\nfunction isWhitespace(node) {\n    return (node.isComment && !node.asyncFactory) || node.text === ' ';\n}\n\nfunction isAsyncPlaceholder(node) {\n    // @ts-expect-error not really boolean type\n    return node.isComment && node.asyncFactory;\n}\n\nfunction normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n    var res;\n    var hasNormalSlots = Object.keys(normalSlots).length > 0;\n    var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n    var key = scopedSlots && scopedSlots.$key;\n    if (!scopedSlots) {\n        res = {};\n    }\n    else if (scopedSlots._normalized) {\n        // fast path 1: child component re-render only, parent did not change\n        return scopedSlots._normalized;\n    }\n    else if (isStable &&\n        prevScopedSlots &&\n        prevScopedSlots !== emptyObject &&\n        key === prevScopedSlots.$key &&\n        !hasNormalSlots &&\n        !prevScopedSlots.$hasNormal) {\n        // fast path 2: stable scoped slots w/ no normal slots to proxy,\n        // only need to normalize once\n        return prevScopedSlots;\n    }\n    else {\n        res = {};\n        for (var key_1 in scopedSlots) {\n            if (scopedSlots[key_1] && key_1[0] !== '$') {\n                res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);\n            }\n        }\n    }\n    // expose normal slots on scopedSlots\n    for (var key_2 in normalSlots) {\n        if (!(key_2 in res)) {\n            res[key_2] = proxyNormalSlot(normalSlots, key_2);\n        }\n    }\n    // avoriaz seems to mock a non-extensible $scopedSlots object\n    // and when that is passed down this would cause an error\n    if (scopedSlots && Object.isExtensible(scopedSlots)) {\n        scopedSlots._normalized = res;\n    }\n    def(res, '$stable', isStable);\n    def(res, '$key', key);\n    def(res, '$hasNormal', hasNormalSlots);\n    return res;\n}\nfunction normalizeScopedSlot(vm, normalSlots, key, fn) {\n    var normalized = function () {\n        var cur = currentInstance;\n        setCurrentInstance(vm);\n        var res = arguments.length ? fn.apply(null, arguments) : fn({});\n        res =\n            res && typeof res === 'object' && !isArray(res)\n                ? [res] // single vnode\n                : normalizeChildren(res);\n        var vnode = res && res[0];\n        setCurrentInstance(cur);\n        return res &&\n            (!vnode ||\n                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n            ? undefined\n            : res;\n    };\n    // this is a slot using the new v-slot syntax without scope. although it is\n    // compiled as a scoped slot, render fn users would expect it to be present\n    // on this.$slots because the usage is semantically a normal slot.\n    if (fn.proxy) {\n        Object.defineProperty(normalSlots, key, {\n            get: normalized,\n            enumerable: true,\n            configurable: true\n        });\n    }\n    return normalized;\n}\nfunction proxyNormalSlot(slots, key) {\n    return function () { return slots[key]; };\n}\n\nfunction initSetup(vm) {\n    var options = vm.$options;\n    var setup = options.setup;\n    if (setup) {\n        var ctx = (vm._setupContext = createSetupContext(vm));\n        setCurrentInstance(vm);\n        pushTarget();\n        var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, \"setup\");\n        popTarget();\n        setCurrentInstance();\n        if (isFunction(setupResult)) {\n            // render function\n            // @ts-ignore\n            options.render = setupResult;\n        }\n        else if (isObject(setupResult)) {\n            // bindings\n            if (process.env.NODE_ENV !== 'production' && setupResult instanceof VNode) {\n                warn(\"setup() should not return VNodes directly - \" +\n                    \"return a render function instead.\");\n            }\n            vm._setupState = setupResult;\n            // __sfc indicates compiled bindings from <script setup>\n            if (!setupResult.__sfc) {\n                for (var key in setupResult) {\n                    if (!isReserved(key)) {\n                        proxyWithRefUnwrap(vm, setupResult, key);\n                    }\n                    else if (process.env.NODE_ENV !== 'production') {\n                        warn(\"Avoid using variables that start with _ or $ in setup().\");\n                    }\n                }\n            }\n            else {\n                // exposed for compiled render fn\n                var proxy = (vm._setupProxy = {});\n                for (var key in setupResult) {\n                    if (key !== '__sfc') {\n                        proxyWithRefUnwrap(proxy, setupResult, key);\n                    }\n                }\n            }\n        }\n        else if (process.env.NODE_ENV !== 'production' && setupResult !== undefined) {\n            warn(\"setup() should return an object. Received: \".concat(setupResult === null ? 'null' : typeof setupResult));\n        }\n    }\n}\nfunction createSetupContext(vm) {\n    var exposeCalled = false;\n    return {\n        get attrs() {\n            if (!vm._attrsProxy) {\n                var proxy = (vm._attrsProxy = {});\n                def(proxy, '_v_attr_proxy', true);\n                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n            }\n            return vm._attrsProxy;\n        },\n        get listeners() {\n            if (!vm._listenersProxy) {\n                var proxy = (vm._listenersProxy = {});\n                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n            }\n            return vm._listenersProxy;\n        },\n        get slots() {\n            return initSlotsProxy(vm);\n        },\n        emit: bind(vm.$emit, vm),\n        expose: function (exposed) {\n            if (process.env.NODE_ENV !== 'production') {\n                if (exposeCalled) {\n                    warn(\"expose() should be called only once per setup().\", vm);\n                }\n                exposeCalled = true;\n            }\n            if (exposed) {\n                Object.keys(exposed).forEach(function (key) {\n                    return proxyWithRefUnwrap(vm, exposed, key);\n                });\n            }\n        }\n    };\n}\nfunction syncSetupProxy(to, from, prev, instance, type) {\n    var changed = false;\n    for (var key in from) {\n        if (!(key in to)) {\n            changed = true;\n            defineProxyAttr(to, key, instance, type);\n        }\n        else if (from[key] !== prev[key]) {\n            changed = true;\n        }\n    }\n    for (var key in to) {\n        if (!(key in from)) {\n            changed = true;\n            delete to[key];\n        }\n    }\n    return changed;\n}\nfunction defineProxyAttr(proxy, key, instance, type) {\n    Object.defineProperty(proxy, key, {\n        enumerable: true,\n        configurable: true,\n        get: function () {\n            return instance[type][key];\n        }\n    });\n}\nfunction initSlotsProxy(vm) {\n    if (!vm._slotsProxy) {\n        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n    }\n    return vm._slotsProxy;\n}\nfunction syncSetupSlots(to, from) {\n    for (var key in from) {\n        to[key] = from[key];\n    }\n    for (var key in to) {\n        if (!(key in from)) {\n            delete to[key];\n        }\n    }\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useSlots() {\n    return getContext().slots;\n}\n/**\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useAttrs() {\n    return getContext().attrs;\n}\n/**\n * Vue 2 only\n * @internal use manual type def because public setup context type relies on\n * legacy VNode types\n */\nfunction useListeners() {\n    return getContext().listeners;\n}\nfunction getContext() {\n    if (process.env.NODE_ENV !== 'production' && !currentInstance) {\n        warn(\"useContext() called without active instance.\");\n    }\n    var vm = currentInstance;\n    return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n}\n/**\n * Runtime helper for merging default declarations. Imported by compiled code\n * only.\n * @internal\n */\nfunction mergeDefaults(raw, defaults) {\n    var props = isArray(raw)\n        ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})\n        : raw;\n    for (var key in defaults) {\n        var opt = props[key];\n        if (opt) {\n            if (isArray(opt) || isFunction(opt)) {\n                props[key] = { type: opt, default: defaults[key] };\n            }\n            else {\n                opt.default = defaults[key];\n            }\n        }\n        else if (opt === null) {\n            props[key] = { default: defaults[key] };\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"props default key \\\"\".concat(key, \"\\\" has no corresponding declaration.\"));\n        }\n    }\n    return props;\n}\n\nfunction initRender(vm) {\n    vm._vnode = null; // the root of the child tree\n    vm._staticTrees = null; // v-once cached trees\n    var options = vm.$options;\n    var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n    var renderContext = parentVnode && parentVnode.context;\n    vm.$slots = resolveSlots(options._renderChildren, renderContext);\n    vm.$scopedSlots = parentVnode\n        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n        : emptyObject;\n    // bind the createElement fn to this instance\n    // so that we get proper render context inside it.\n    // args order: tag, data, children, normalizationType, alwaysNormalize\n    // internal version is used by render functions compiled from templates\n    // @ts-expect-error\n    vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };\n    // normalization is always applied for the public version, used in\n    // user-written render functions.\n    // @ts-expect-error\n    vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };\n    // $attrs & $listeners are exposed for easier HOC creation.\n    // they need to be reactive so that HOCs using them are always updated\n    var parentData = parentVnode && parentVnode.data;\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {\n            !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n        }, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {\n            !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n        }, true);\n    }\n    else {\n        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, null, true);\n        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n    }\n}\nvar currentRenderingInstance = null;\nfunction renderMixin(Vue) {\n    // install runtime convenience helpers\n    installRenderHelpers(Vue.prototype);\n    Vue.prototype.$nextTick = function (fn) {\n        return nextTick(fn, this);\n    };\n    Vue.prototype._render = function () {\n        var vm = this;\n        var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;\n        if (_parentVnode && vm._isMounted) {\n            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n            if (vm._slotsProxy) {\n                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n            }\n        }\n        // set parent vnode. this allows render functions to have access\n        // to the data on the placeholder node.\n        vm.$vnode = _parentVnode;\n        // render self\n        var prevInst = currentInstance;\n        var prevRenderInst = currentRenderingInstance;\n        var vnode;\n        try {\n            setCurrentInstance(vm);\n            currentRenderingInstance = vm;\n            vnode = render.call(vm._renderProxy, vm.$createElement);\n        }\n        catch (e) {\n            handleError(e, vm, \"render\");\n            // return error render result,\n            // or previous vnode to prevent render error causing blank component\n            /* istanbul ignore else */\n            if (process.env.NODE_ENV !== 'production' && vm.$options.renderError) {\n                try {\n                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                }\n                catch (e) {\n                    handleError(e, vm, \"renderError\");\n                    vnode = vm._vnode;\n                }\n            }\n            else {\n                vnode = vm._vnode;\n            }\n        }\n        finally {\n            currentRenderingInstance = prevRenderInst;\n            setCurrentInstance(prevInst);\n        }\n        // if the returned array contains only a single node, allow it\n        if (isArray(vnode) && vnode.length === 1) {\n            vnode = vnode[0];\n        }\n        // return empty vnode in case the render function errored out\n        if (!(vnode instanceof VNode)) {\n            if (process.env.NODE_ENV !== 'production' && isArray(vnode)) {\n                warn('Multiple root nodes returned from render function. Render function ' +\n                    'should return a single root node.', vm);\n            }\n            vnode = createEmptyVNode();\n        }\n        // set parent\n        vnode.parent = _parentVnode;\n        return vnode;\n    };\n}\n\nfunction ensureCtor(comp, base) {\n    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n        comp = comp.default;\n    }\n    return isObject(comp) ? base.extend(comp) : comp;\n}\nfunction createAsyncPlaceholder(factory, data, context, children, tag) {\n    var node = createEmptyVNode();\n    node.asyncFactory = factory;\n    node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n    return node;\n}\nfunction resolveAsyncComponent(factory, baseCtor) {\n    if (isTrue(factory.error) && isDef(factory.errorComp)) {\n        return factory.errorComp;\n    }\n    if (isDef(factory.resolved)) {\n        return factory.resolved;\n    }\n    var owner = currentRenderingInstance;\n    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n        // already pending\n        factory.owners.push(owner);\n    }\n    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n        return factory.loadingComp;\n    }\n    if (owner && !isDef(factory.owners)) {\n        var owners_1 = (factory.owners = [owner]);\n        var sync_1 = true;\n        var timerLoading_1 = null;\n        var timerTimeout_1 = null;\n        owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });\n        var forceRender_1 = function (renderCompleted) {\n            for (var i = 0, l = owners_1.length; i < l; i++) {\n                owners_1[i].$forceUpdate();\n            }\n            if (renderCompleted) {\n                owners_1.length = 0;\n                if (timerLoading_1 !== null) {\n                    clearTimeout(timerLoading_1);\n                    timerLoading_1 = null;\n                }\n                if (timerTimeout_1 !== null) {\n                    clearTimeout(timerTimeout_1);\n                    timerTimeout_1 = null;\n                }\n            }\n        };\n        var resolve = once(function (res) {\n            // cache resolved\n            factory.resolved = ensureCtor(res, baseCtor);\n            // invoke callbacks only if this is not a synchronous resolve\n            // (async resolves are shimmed as synchronous during SSR)\n            if (!sync_1) {\n                forceRender_1(true);\n            }\n            else {\n                owners_1.length = 0;\n            }\n        });\n        var reject_1 = once(function (reason) {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"Failed to resolve async component: \".concat(String(factory)) +\n                    (reason ? \"\\nReason: \".concat(reason) : ''));\n            if (isDef(factory.errorComp)) {\n                factory.error = true;\n                forceRender_1(true);\n            }\n        });\n        var res_1 = factory(resolve, reject_1);\n        if (isObject(res_1)) {\n            if (isPromise(res_1)) {\n                // () => Promise\n                if (isUndef(factory.resolved)) {\n                    res_1.then(resolve, reject_1);\n                }\n            }\n            else if (isPromise(res_1.component)) {\n                res_1.component.then(resolve, reject_1);\n                if (isDef(res_1.error)) {\n                    factory.errorComp = ensureCtor(res_1.error, baseCtor);\n                }\n                if (isDef(res_1.loading)) {\n                    factory.loadingComp = ensureCtor(res_1.loading, baseCtor);\n                    if (res_1.delay === 0) {\n                        factory.loading = true;\n                    }\n                    else {\n                        // @ts-expect-error NodeJS timeout type\n                        timerLoading_1 = setTimeout(function () {\n                            timerLoading_1 = null;\n                            if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                factory.loading = true;\n                                forceRender_1(false);\n                            }\n                        }, res_1.delay || 200);\n                    }\n                }\n                if (isDef(res_1.timeout)) {\n                    // @ts-expect-error NodeJS timeout type\n                    timerTimeout_1 = setTimeout(function () {\n                        timerTimeout_1 = null;\n                        if (isUndef(factory.resolved)) {\n                            reject_1(process.env.NODE_ENV !== 'production' ? \"timeout (\".concat(res_1.timeout, \"ms)\") : null);\n                        }\n                    }, res_1.timeout);\n                }\n            }\n        }\n        sync_1 = false;\n        // return in case resolved synchronously\n        return factory.loading ? factory.loadingComp : factory.resolved;\n    }\n}\n\nfunction getFirstComponentChild(children) {\n    if (isArray(children)) {\n        for (var i = 0; i < children.length; i++) {\n            var c = children[i];\n            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                return c;\n            }\n        }\n    }\n}\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n    if (isArray(data) || isPrimitive(data)) {\n        normalizationType = children;\n        children = data;\n        data = undefined;\n    }\n    if (isTrue(alwaysNormalize)) {\n        normalizationType = ALWAYS_NORMALIZE;\n    }\n    return _createElement(context, tag, data, children, normalizationType);\n}\nfunction _createElement(context, tag, data, children, normalizationType) {\n    if (isDef(data) && isDef(data.__ob__)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn(\"Avoid using observed data object as vnode data: \".concat(JSON.stringify(data), \"\\n\") + 'Always create fresh vnode data objects in each render!', context);\n        return createEmptyVNode();\n    }\n    // object syntax in v-bind\n    if (isDef(data) && isDef(data.is)) {\n        tag = data.is;\n    }\n    if (!tag) {\n        // in case of component :is set to falsy value\n        return createEmptyVNode();\n    }\n    // warn against non-primitive key\n    if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n        warn('Avoid using non-primitive value as key, ' +\n            'use string/number value instead.', context);\n    }\n    // support single function children as default scoped slot\n    if (isArray(children) && isFunction(children[0])) {\n        data = data || {};\n        data.scopedSlots = { default: children[0] };\n        children.length = 0;\n    }\n    if (normalizationType === ALWAYS_NORMALIZE) {\n        children = normalizeChildren(children);\n    }\n    else if (normalizationType === SIMPLE_NORMALIZE) {\n        children = simpleNormalizeChildren(children);\n    }\n    var vnode, ns;\n    if (typeof tag === 'string') {\n        var Ctor = void 0;\n        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n        if (config.isReservedTag(tag)) {\n            // platform built-in elements\n            if (process.env.NODE_ENV !== 'production' &&\n                isDef(data) &&\n                isDef(data.nativeOn) &&\n                data.tag !== 'component') {\n                warn(\"The .native modifier for v-on is only valid on components but it was used on <\".concat(tag, \">.\"), context);\n            }\n            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n        }\n        else if ((!data || !data.pre) &&\n            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n            // component\n            vnode = createComponent(Ctor, data, context, children, tag);\n        }\n        else {\n            // unknown or unlisted namespaced elements\n            // check at runtime because it may get assigned a namespace when its\n            // parent normalizes children\n            vnode = new VNode(tag, data, children, undefined, undefined, context);\n        }\n    }\n    else {\n        // direct component options / constructor\n        vnode = createComponent(tag, data, context, children);\n    }\n    if (isArray(vnode)) {\n        return vnode;\n    }\n    else if (isDef(vnode)) {\n        if (isDef(ns))\n            applyNS(vnode, ns);\n        if (isDef(data))\n            registerDeepBindings(data);\n        return vnode;\n    }\n    else {\n        return createEmptyVNode();\n    }\n}\nfunction applyNS(vnode, ns, force) {\n    vnode.ns = ns;\n    if (vnode.tag === 'foreignObject') {\n        // use default namespace inside foreignObject\n        ns = undefined;\n        force = true;\n    }\n    if (isDef(vnode.children)) {\n        for (var i = 0, l = vnode.children.length; i < l; i++) {\n            var child = vnode.children[i];\n            if (isDef(child.tag) &&\n                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                applyNS(child, ns, force);\n            }\n        }\n    }\n}\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings(data) {\n    if (isObject(data.style)) {\n        traverse(data.style);\n    }\n    if (isObject(data.class)) {\n        traverse(data.class);\n    }\n}\n\n/**\n * @internal this function needs manual public type declaration because it relies\n * on previously manually authored types from Vue 2\n */\nfunction h(type, props, children) {\n    if (!currentInstance) {\n        process.env.NODE_ENV !== 'production' &&\n            warn(\"globally imported h() can only be invoked when there is an active \" +\n                \"component instance, e.g. synchronously in a component's render or setup function.\");\n    }\n    return createElement$1(currentInstance, type, props, children, 2, true);\n}\n\nfunction handleError(err, vm, info) {\n    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n    // See: https://github.com/vuejs/vuex/issues/1505\n    pushTarget();\n    try {\n        if (vm) {\n            var cur = vm;\n            while ((cur = cur.$parent)) {\n                var hooks = cur.$options.errorCaptured;\n                if (hooks) {\n                    for (var i = 0; i < hooks.length; i++) {\n                        try {\n                            var capture = hooks[i].call(cur, err, vm, info) === false;\n                            if (capture)\n                                return;\n                        }\n                        catch (e) {\n                            globalHandleError(e, cur, 'errorCaptured hook');\n                        }\n                    }\n                }\n            }\n        }\n        globalHandleError(err, vm, info);\n    }\n    finally {\n        popTarget();\n    }\n}\nfunction invokeWithErrorHandling(handler, context, args, vm, info) {\n    var res;\n    try {\n        res = args ? handler.apply(context, args) : handler.call(context);\n        if (res && !res._isVue && isPromise(res) && !res._handled) {\n            res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n            res._handled = true;\n        }\n    }\n    catch (e) {\n        handleError(e, vm, info);\n    }\n    return res;\n}\nfunction globalHandleError(err, vm, info) {\n    if (config.errorHandler) {\n        try {\n            return config.errorHandler.call(null, err, vm, info);\n        }\n        catch (e) {\n            // if the user intentionally throws the original error in the handler,\n            // do not log it twice\n            if (e !== err) {\n                logError(e, null, 'config.errorHandler');\n            }\n        }\n    }\n    logError(err, vm, info);\n}\nfunction logError(err, vm, info) {\n    if (process.env.NODE_ENV !== 'production') {\n        warn(\"Error in \".concat(info, \": \\\"\").concat(err.toString(), \"\\\"\"), vm);\n    }\n    /* istanbul ignore else */\n    if (inBrowser && typeof console !== 'undefined') {\n        console.error(err);\n    }\n    else {\n        throw err;\n    }\n}\n\n/* globals MutationObserver */\nvar isUsingMicroTask = false;\nvar callbacks = [];\nvar pending = false;\nfunction flushCallbacks() {\n    pending = false;\n    var copies = callbacks.slice(0);\n    callbacks.length = 0;\n    for (var i = 0; i < copies.length; i++) {\n        copies[i]();\n    }\n}\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n    var p_1 = Promise.resolve();\n    timerFunc = function () {\n        p_1.then(flushCallbacks);\n        // In problematic UIWebViews, Promise.then doesn't completely break, but\n        // it can get stuck in a weird state where callbacks are pushed into the\n        // microtask queue but the queue isn't being flushed, until the browser\n        // needs to do some other work, e.g. handle a timer. Therefore we can\n        // \"force\" the microtask queue to be flushed by adding an empty timer.\n        if (isIOS)\n            setTimeout(noop);\n    };\n    isUsingMicroTask = true;\n}\nelse if (!isIE &&\n    typeof MutationObserver !== 'undefined' &&\n    (isNative(MutationObserver) ||\n        // PhantomJS and iOS 7.x\n        MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n    // Use MutationObserver where native Promise is not available,\n    // e.g. PhantomJS, iOS7, Android 4.4\n    // (#6466 MutationObserver is unreliable in IE11)\n    var counter_1 = 1;\n    var observer = new MutationObserver(flushCallbacks);\n    var textNode_1 = document.createTextNode(String(counter_1));\n    observer.observe(textNode_1, {\n        characterData: true\n    });\n    timerFunc = function () {\n        counter_1 = (counter_1 + 1) % 2;\n        textNode_1.data = String(counter_1);\n    };\n    isUsingMicroTask = true;\n}\nelse if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n    // Fallback to setImmediate.\n    // Technically it leverages the (macro) task queue,\n    // but it is still a better choice than setTimeout.\n    timerFunc = function () {\n        setImmediate(flushCallbacks);\n    };\n}\nelse {\n    // Fallback to setTimeout.\n    timerFunc = function () {\n        setTimeout(flushCallbacks, 0);\n    };\n}\n/**\n * @internal\n */\nfunction nextTick(cb, ctx) {\n    var _resolve;\n    callbacks.push(function () {\n        if (cb) {\n            try {\n                cb.call(ctx);\n            }\n            catch (e) {\n                handleError(e, ctx, 'nextTick');\n            }\n        }\n        else if (_resolve) {\n            _resolve(ctx);\n        }\n    });\n    if (!pending) {\n        pending = true;\n        timerFunc();\n    }\n    // $flow-disable-line\n    if (!cb && typeof Promise !== 'undefined') {\n        return new Promise(function (resolve) {\n            _resolve = resolve;\n        });\n    }\n}\n\nfunction useCssModule(name) {\n    if (name === void 0) { name = '$style'; }\n    /* istanbul ignore else */\n    {\n        if (!currentInstance) {\n            process.env.NODE_ENV !== 'production' && warn(\"useCssModule must be called inside setup()\");\n            return emptyObject;\n        }\n        var mod = currentInstance[name];\n        if (!mod) {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"Current instance does not have CSS module named \\\"\".concat(name, \"\\\".\"));\n            return emptyObject;\n        }\n        return mod;\n    }\n}\n\n/**\n * Runtime helper for SFC's CSS variable injection feature.\n * @private\n */\nfunction useCssVars(getter) {\n    if (!inBrowser && !false)\n        return;\n    var instance = currentInstance;\n    if (!instance) {\n        process.env.NODE_ENV !== 'production' &&\n            warn(\"useCssVars is called without current active component instance.\");\n        return;\n    }\n    watchPostEffect(function () {\n        var el = instance.$el;\n        var vars = getter(instance, instance._setupProxy);\n        if (el && el.nodeType === 1) {\n            var style = el.style;\n            for (var key in vars) {\n                style.setProperty(\"--\".concat(key), vars[key]);\n            }\n        }\n    });\n}\n\n/**\n * v3-compatible async component API.\n * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n * because it relies on existing manual types\n */\nfunction defineAsyncComponent(source) {\n    if (isFunction(source)) {\n        source = { loader: source };\n    }\n    var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out\n    _b = source.suspensible, // undefined = never times out\n    suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true\n    userOnError = source.onError;\n    if (process.env.NODE_ENV !== 'production' && suspensible) {\n        warn(\"The suspensible option for async components is not supported in Vue2. It is ignored.\");\n    }\n    var pendingRequest = null;\n    var retries = 0;\n    var retry = function () {\n        retries++;\n        pendingRequest = null;\n        return load();\n    };\n    var load = function () {\n        var thisRequest;\n        return (pendingRequest ||\n            (thisRequest = pendingRequest =\n                loader()\n                    .catch(function (err) {\n                    err = err instanceof Error ? err : new Error(String(err));\n                    if (userOnError) {\n                        return new Promise(function (resolve, reject) {\n                            var userRetry = function () { return resolve(retry()); };\n                            var userFail = function () { return reject(err); };\n                            userOnError(err, userRetry, userFail, retries + 1);\n                        });\n                    }\n                    else {\n                        throw err;\n                    }\n                })\n                    .then(function (comp) {\n                    if (thisRequest !== pendingRequest && pendingRequest) {\n                        return pendingRequest;\n                    }\n                    if (process.env.NODE_ENV !== 'production' && !comp) {\n                        warn(\"Async component loader resolved to undefined. \" +\n                            \"If you are using retry(), make sure to return its return value.\");\n                    }\n                    // interop module default\n                    if (comp &&\n                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                        comp = comp.default;\n                    }\n                    if (process.env.NODE_ENV !== 'production' && comp && !isObject(comp) && !isFunction(comp)) {\n                        throw new Error(\"Invalid async component load result: \".concat(comp));\n                    }\n                    return comp;\n                })));\n    };\n    return function () {\n        var component = load();\n        return {\n            component: component,\n            delay: delay,\n            timeout: timeout,\n            error: errorComponent,\n            loading: loadingComponent\n        };\n    };\n}\n\nfunction createLifeCycle(hookName) {\n    return function (fn, target) {\n        if (target === void 0) { target = currentInstance; }\n        if (!target) {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"\".concat(formatName(hookName), \" is called when there is no active component instance to be \") +\n                    \"associated with. \" +\n                    \"Lifecycle injection APIs can only be used during execution of setup().\");\n            return;\n        }\n        return injectHook(target, hookName, fn);\n    };\n}\nfunction formatName(name) {\n    if (name === 'beforeDestroy') {\n        name = 'beforeUnmount';\n    }\n    else if (name === 'destroyed') {\n        name = 'unmounted';\n    }\n    return \"on\".concat(name[0].toUpperCase() + name.slice(1));\n}\nfunction injectHook(instance, hookName, fn) {\n    var options = instance.$options;\n    options[hookName] = mergeLifecycleHook(options[hookName], fn);\n}\nvar onBeforeMount = createLifeCycle('beforeMount');\nvar onMounted = createLifeCycle('mounted');\nvar onBeforeUpdate = createLifeCycle('beforeUpdate');\nvar onUpdated = createLifeCycle('updated');\nvar onBeforeUnmount = createLifeCycle('beforeDestroy');\nvar onUnmounted = createLifeCycle('destroyed');\nvar onActivated = createLifeCycle('activated');\nvar onDeactivated = createLifeCycle('deactivated');\nvar onServerPrefetch = createLifeCycle('serverPrefetch');\nvar onRenderTracked = createLifeCycle('renderTracked');\nvar onRenderTriggered = createLifeCycle('renderTriggered');\nvar injectErrorCapturedHook = createLifeCycle('errorCaptured');\nfunction onErrorCaptured(hook, target) {\n    if (target === void 0) { target = currentInstance; }\n    injectErrorCapturedHook(hook, target);\n}\n\n/**\n * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n */\nvar version = '2.7.16';\n/**\n * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n */\nfunction defineComponent(options) {\n    return options;\n}\n\nvar seenObjects = new _Set();\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse(val) {\n    _traverse(val, seenObjects);\n    seenObjects.clear();\n    return val;\n}\nfunction _traverse(val, seen) {\n    var i, keys;\n    var isA = isArray(val);\n    if ((!isA && !isObject(val)) ||\n        val.__v_skip /* ReactiveFlags.SKIP */ ||\n        Object.isFrozen(val) ||\n        val instanceof VNode) {\n        return;\n    }\n    if (val.__ob__) {\n        var depId = val.__ob__.dep.id;\n        if (seen.has(depId)) {\n            return;\n        }\n        seen.add(depId);\n    }\n    if (isA) {\n        i = val.length;\n        while (i--)\n            _traverse(val[i], seen);\n    }\n    else if (isRef(val)) {\n        _traverse(val.value, seen);\n    }\n    else {\n        keys = Object.keys(val);\n        i = keys.length;\n        while (i--)\n            _traverse(val[keys[i]], seen);\n    }\n}\n\nvar uid$1 = 0;\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n * @internal\n */\nvar Watcher = /** @class */ (function () {\n    function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {\n        recordEffectScope(this, \n        // if the active effect scope is manually created (not a component scope),\n        // prioritize it\n        activeEffectScope && !activeEffectScope._vm\n            ? activeEffectScope\n            : vm\n                ? vm._scope\n                : undefined);\n        if ((this.vm = vm) && isRenderWatcher) {\n            vm._watcher = this;\n        }\n        // options\n        if (options) {\n            this.deep = !!options.deep;\n            this.user = !!options.user;\n            this.lazy = !!options.lazy;\n            this.sync = !!options.sync;\n            this.before = options.before;\n            if (process.env.NODE_ENV !== 'production') {\n                this.onTrack = options.onTrack;\n                this.onTrigger = options.onTrigger;\n            }\n        }\n        else {\n            this.deep = this.user = this.lazy = this.sync = false;\n        }\n        this.cb = cb;\n        this.id = ++uid$1; // uid for batching\n        this.active = true;\n        this.post = false;\n        this.dirty = this.lazy; // for lazy watchers\n        this.deps = [];\n        this.newDeps = [];\n        this.depIds = new _Set();\n        this.newDepIds = new _Set();\n        this.expression = process.env.NODE_ENV !== 'production' ? expOrFn.toString() : '';\n        // parse expression for getter\n        if (isFunction(expOrFn)) {\n            this.getter = expOrFn;\n        }\n        else {\n            this.getter = parsePath(expOrFn);\n            if (!this.getter) {\n                this.getter = noop;\n                process.env.NODE_ENV !== 'production' &&\n                    warn(\"Failed watching path: \\\"\".concat(expOrFn, \"\\\" \") +\n                        'Watcher only accepts simple dot-delimited paths. ' +\n                        'For full control, use a function instead.', vm);\n            }\n        }\n        this.value = this.lazy ? undefined : this.get();\n    }\n    /**\n     * Evaluate the getter, and re-collect dependencies.\n     */\n    Watcher.prototype.get = function () {\n        pushTarget(this);\n        var value;\n        var vm = this.vm;\n        try {\n            value = this.getter.call(vm, vm);\n        }\n        catch (e) {\n            if (this.user) {\n                handleError(e, vm, \"getter for watcher \\\"\".concat(this.expression, \"\\\"\"));\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // \"touch\" every property so they are all tracked as\n            // dependencies for deep watching\n            if (this.deep) {\n                traverse(value);\n            }\n            popTarget();\n            this.cleanupDeps();\n        }\n        return value;\n    };\n    /**\n     * Add a dependency to this directive.\n     */\n    Watcher.prototype.addDep = function (dep) {\n        var id = dep.id;\n        if (!this.newDepIds.has(id)) {\n            this.newDepIds.add(id);\n            this.newDeps.push(dep);\n            if (!this.depIds.has(id)) {\n                dep.addSub(this);\n            }\n        }\n    };\n    /**\n     * Clean up for dependency collection.\n     */\n    Watcher.prototype.cleanupDeps = function () {\n        var i = this.deps.length;\n        while (i--) {\n            var dep = this.deps[i];\n            if (!this.newDepIds.has(dep.id)) {\n                dep.removeSub(this);\n            }\n        }\n        var tmp = this.depIds;\n        this.depIds = this.newDepIds;\n        this.newDepIds = tmp;\n        this.newDepIds.clear();\n        tmp = this.deps;\n        this.deps = this.newDeps;\n        this.newDeps = tmp;\n        this.newDeps.length = 0;\n    };\n    /**\n     * Subscriber interface.\n     * Will be called when a dependency changes.\n     */\n    Watcher.prototype.update = function () {\n        /* istanbul ignore else */\n        if (this.lazy) {\n            this.dirty = true;\n        }\n        else if (this.sync) {\n            this.run();\n        }\n        else {\n            queueWatcher(this);\n        }\n    };\n    /**\n     * Scheduler job interface.\n     * Will be called by the scheduler.\n     */\n    Watcher.prototype.run = function () {\n        if (this.active) {\n            var value = this.get();\n            if (value !== this.value ||\n                // Deep watchers and watchers on Object/Arrays should fire even\n                // when the value is the same, because the value may\n                // have mutated.\n                isObject(value) ||\n                this.deep) {\n                // set new value\n                var oldValue = this.value;\n                this.value = value;\n                if (this.user) {\n                    var info = \"callback for watcher \\\"\".concat(this.expression, \"\\\"\");\n                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                }\n                else {\n                    this.cb.call(this.vm, value, oldValue);\n                }\n            }\n        }\n    };\n    /**\n     * Evaluate the value of the watcher.\n     * This only gets called for lazy watchers.\n     */\n    Watcher.prototype.evaluate = function () {\n        this.value = this.get();\n        this.dirty = false;\n    };\n    /**\n     * Depend on all deps collected by this watcher.\n     */\n    Watcher.prototype.depend = function () {\n        var i = this.deps.length;\n        while (i--) {\n            this.deps[i].depend();\n        }\n    };\n    /**\n     * Remove self from all dependencies' subscriber list.\n     */\n    Watcher.prototype.teardown = function () {\n        if (this.vm && !this.vm._isBeingDestroyed) {\n            remove$2(this.vm._scope.effects, this);\n        }\n        if (this.active) {\n            var i = this.deps.length;\n            while (i--) {\n                this.deps[i].removeSub(this);\n            }\n            this.active = false;\n            if (this.onStop) {\n                this.onStop();\n            }\n        }\n    };\n    return Watcher;\n}());\n\nvar mark;\nvar measure;\nif (process.env.NODE_ENV !== 'production') {\n    var perf_1 = inBrowser && window.performance;\n    /* istanbul ignore if */\n    if (perf_1 &&\n        // @ts-ignore\n        perf_1.mark &&\n        // @ts-ignore\n        perf_1.measure &&\n        // @ts-ignore\n        perf_1.clearMarks &&\n        // @ts-ignore\n        perf_1.clearMeasures) {\n        mark = function (tag) { return perf_1.mark(tag); };\n        measure = function (name, startTag, endTag) {\n            perf_1.measure(name, startTag, endTag);\n            perf_1.clearMarks(startTag);\n            perf_1.clearMarks(endTag);\n            // perf.clearMeasures(name)\n        };\n    }\n}\n\nfunction initEvents(vm) {\n    vm._events = Object.create(null);\n    vm._hasHookEvent = false;\n    // init parent attached events\n    var listeners = vm.$options._parentListeners;\n    if (listeners) {\n        updateComponentListeners(vm, listeners);\n    }\n}\nvar target$1;\nfunction add$1(event, fn) {\n    target$1.$on(event, fn);\n}\nfunction remove$1(event, fn) {\n    target$1.$off(event, fn);\n}\nfunction createOnceHandler$1(event, fn) {\n    var _target = target$1;\n    return function onceHandler() {\n        var res = fn.apply(null, arguments);\n        if (res !== null) {\n            _target.$off(event, onceHandler);\n        }\n    };\n}\nfunction updateComponentListeners(vm, listeners, oldListeners) {\n    target$1 = vm;\n    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n    target$1 = undefined;\n}\nfunction eventsMixin(Vue) {\n    var hookRE = /^hook:/;\n    Vue.prototype.$on = function (event, fn) {\n        var vm = this;\n        if (isArray(event)) {\n            for (var i = 0, l = event.length; i < l; i++) {\n                vm.$on(event[i], fn);\n            }\n        }\n        else {\n            (vm._events[event] || (vm._events[event] = [])).push(fn);\n            // optimize hook:event cost by using a boolean flag marked at registration\n            // instead of a hash lookup\n            if (hookRE.test(event)) {\n                vm._hasHookEvent = true;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$once = function (event, fn) {\n        var vm = this;\n        function on() {\n            vm.$off(event, on);\n            fn.apply(vm, arguments);\n        }\n        on.fn = fn;\n        vm.$on(event, on);\n        return vm;\n    };\n    Vue.prototype.$off = function (event, fn) {\n        var vm = this;\n        // all\n        if (!arguments.length) {\n            vm._events = Object.create(null);\n            return vm;\n        }\n        // array of events\n        if (isArray(event)) {\n            for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {\n                vm.$off(event[i_1], fn);\n            }\n            return vm;\n        }\n        // specific event\n        var cbs = vm._events[event];\n        if (!cbs) {\n            return vm;\n        }\n        if (!fn) {\n            vm._events[event] = null;\n            return vm;\n        }\n        // specific handler\n        var cb;\n        var i = cbs.length;\n        while (i--) {\n            cb = cbs[i];\n            if (cb === fn || cb.fn === fn) {\n                cbs.splice(i, 1);\n                break;\n            }\n        }\n        return vm;\n    };\n    Vue.prototype.$emit = function (event) {\n        var vm = this;\n        if (process.env.NODE_ENV !== 'production') {\n            var lowerCaseEvent = event.toLowerCase();\n            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                tip(\"Event \\\"\".concat(lowerCaseEvent, \"\\\" is emitted in component \") +\n                    \"\".concat(formatComponentName(vm), \" but the handler is registered for \\\"\").concat(event, \"\\\". \") +\n                    \"Note that HTML attributes are case-insensitive and you cannot use \" +\n                    \"v-on to listen to camelCase events when using in-DOM templates. \" +\n                    \"You should probably use \\\"\".concat(hyphenate(event), \"\\\" instead of \\\"\").concat(event, \"\\\".\"));\n            }\n        }\n        var cbs = vm._events[event];\n        if (cbs) {\n            cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n            var args = toArray(arguments, 1);\n            var info = \"event handler for \\\"\".concat(event, \"\\\"\");\n            for (var i = 0, l = cbs.length; i < l; i++) {\n                invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n            }\n        }\n        return vm;\n    };\n}\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\nfunction setActiveInstance(vm) {\n    var prevActiveInstance = activeInstance;\n    activeInstance = vm;\n    return function () {\n        activeInstance = prevActiveInstance;\n    };\n}\nfunction initLifecycle(vm) {\n    var options = vm.$options;\n    // locate first non-abstract parent\n    var parent = options.parent;\n    if (parent && !options.abstract) {\n        while (parent.$options.abstract && parent.$parent) {\n            parent = parent.$parent;\n        }\n        parent.$children.push(vm);\n    }\n    vm.$parent = parent;\n    vm.$root = parent ? parent.$root : vm;\n    vm.$children = [];\n    vm.$refs = {};\n    vm._provided = parent ? parent._provided : Object.create(null);\n    vm._watcher = null;\n    vm._inactive = null;\n    vm._directInactive = false;\n    vm._isMounted = false;\n    vm._isDestroyed = false;\n    vm._isBeingDestroyed = false;\n}\nfunction lifecycleMixin(Vue) {\n    Vue.prototype._update = function (vnode, hydrating) {\n        var vm = this;\n        var prevEl = vm.$el;\n        var prevVnode = vm._vnode;\n        var restoreActiveInstance = setActiveInstance(vm);\n        vm._vnode = vnode;\n        // Vue.prototype.__patch__ is injected in entry points\n        // based on the rendering backend used.\n        if (!prevVnode) {\n            // initial render\n            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n        }\n        else {\n            // updates\n            vm.$el = vm.__patch__(prevVnode, vnode);\n        }\n        restoreActiveInstance();\n        // update __vue__ reference\n        if (prevEl) {\n            prevEl.__vue__ = null;\n        }\n        if (vm.$el) {\n            vm.$el.__vue__ = vm;\n        }\n        // if parent is an HOC, update its $el as well\n        var wrapper = vm;\n        while (wrapper &&\n            wrapper.$vnode &&\n            wrapper.$parent &&\n            wrapper.$vnode === wrapper.$parent._vnode) {\n            wrapper.$parent.$el = wrapper.$el;\n            wrapper = wrapper.$parent;\n        }\n        // updated hook is called by the scheduler to ensure that children are\n        // updated in a parent's updated hook.\n    };\n    Vue.prototype.$forceUpdate = function () {\n        var vm = this;\n        if (vm._watcher) {\n            vm._watcher.update();\n        }\n    };\n    Vue.prototype.$destroy = function () {\n        var vm = this;\n        if (vm._isBeingDestroyed) {\n            return;\n        }\n        callHook$1(vm, 'beforeDestroy');\n        vm._isBeingDestroyed = true;\n        // remove self from parent\n        var parent = vm.$parent;\n        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n            remove$2(parent.$children, vm);\n        }\n        // teardown scope. this includes both the render watcher and other\n        // watchers created\n        vm._scope.stop();\n        // remove reference from data ob\n        // frozen object may not have observer.\n        if (vm._data.__ob__) {\n            vm._data.__ob__.vmCount--;\n        }\n        // call the last hook...\n        vm._isDestroyed = true;\n        // invoke destroy hooks on current rendered tree\n        vm.__patch__(vm._vnode, null);\n        // fire destroyed hook\n        callHook$1(vm, 'destroyed');\n        // turn off all instance listeners.\n        vm.$off();\n        // remove __vue__ reference\n        if (vm.$el) {\n            vm.$el.__vue__ = null;\n        }\n        // release circular reference (#6759)\n        if (vm.$vnode) {\n            vm.$vnode.parent = null;\n        }\n    };\n}\nfunction mountComponent(vm, el, hydrating) {\n    vm.$el = el;\n    if (!vm.$options.render) {\n        // @ts-expect-error invalid type\n        vm.$options.render = createEmptyVNode;\n        if (process.env.NODE_ENV !== 'production') {\n            /* istanbul ignore if */\n            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                vm.$options.el ||\n                el) {\n                warn('You are using the runtime-only build of Vue where the template ' +\n                    'compiler is not available. Either pre-compile the templates into ' +\n                    'render functions, or use the compiler-included build.', vm);\n            }\n            else {\n                warn('Failed to mount component: template or render function not defined.', vm);\n            }\n        }\n    }\n    callHook$1(vm, 'beforeMount');\n    var updateComponent;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n        updateComponent = function () {\n            var name = vm._name;\n            var id = vm._uid;\n            var startTag = \"vue-perf-start:\".concat(id);\n            var endTag = \"vue-perf-end:\".concat(id);\n            mark(startTag);\n            var vnode = vm._render();\n            mark(endTag);\n            measure(\"vue \".concat(name, \" render\"), startTag, endTag);\n            mark(startTag);\n            vm._update(vnode, hydrating);\n            mark(endTag);\n            measure(\"vue \".concat(name, \" patch\"), startTag, endTag);\n        };\n    }\n    else {\n        updateComponent = function () {\n            vm._update(vm._render(), hydrating);\n        };\n    }\n    var watcherOptions = {\n        before: function () {\n            if (vm._isMounted && !vm._isDestroyed) {\n                callHook$1(vm, 'beforeUpdate');\n            }\n        }\n    };\n    if (process.env.NODE_ENV !== 'production') {\n        watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };\n        watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };\n    }\n    // we set this to vm._watcher inside the watcher's constructor\n    // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n    // component's mounted hook), which relies on vm._watcher being already defined\n    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n    hydrating = false;\n    // flush buffer for flush: \"pre\" watchers queued in setup()\n    var preWatchers = vm._preWatchers;\n    if (preWatchers) {\n        for (var i = 0; i < preWatchers.length; i++) {\n            preWatchers[i].run();\n        }\n    }\n    // manually mounted instance, call mounted on self\n    // mounted is called for render-created child components in its inserted hook\n    if (vm.$vnode == null) {\n        vm._isMounted = true;\n        callHook$1(vm, 'mounted');\n    }\n    return vm;\n}\nfunction updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n    if (process.env.NODE_ENV !== 'production') {\n        isUpdatingChildComponent = true;\n    }\n    // determine whether component has slot children\n    // we need to do this before overwriting $options._renderChildren.\n    // check if there are dynamic scopedSlots (hand-written or compiled but with\n    // dynamic slot names). Static scoped slots compiled from template has the\n    // \"$stable\" marker.\n    var newScopedSlots = parentVnode.data.scopedSlots;\n    var oldScopedSlots = vm.$scopedSlots;\n    var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n        (!newScopedSlots && vm.$scopedSlots.$key));\n    // Any static slot children from the parent may have changed during parent's\n    // update. Dynamic scoped slots may also have changed. In such cases, a forced\n    // update is necessary to ensure correctness.\n    var needsForceUpdate = !!(renderChildren || // has new static slots\n        vm.$options._renderChildren || // has old static slots\n        hasDynamicScopedSlot);\n    var prevVNode = vm.$vnode;\n    vm.$options._parentVnode = parentVnode;\n    vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n    if (vm._vnode) {\n        // update child tree's parent\n        vm._vnode.parent = parentVnode;\n    }\n    vm.$options._renderChildren = renderChildren;\n    // update $attrs and $listeners hash\n    // these are also reactive so they may trigger child update if the child\n    // used them during render\n    var attrs = parentVnode.data.attrs || emptyObject;\n    if (vm._attrsProxy) {\n        // force update if attrs are accessed and has changed since it may be\n        // passed to a child component.\n        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n            needsForceUpdate = true;\n        }\n    }\n    vm.$attrs = attrs;\n    // update listeners\n    listeners = listeners || emptyObject;\n    var prevListeners = vm.$options._parentListeners;\n    if (vm._listenersProxy) {\n        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n    }\n    vm.$listeners = vm.$options._parentListeners = listeners;\n    updateComponentListeners(vm, listeners, prevListeners);\n    // update props\n    if (propsData && vm.$options.props) {\n        toggleObserving(false);\n        var props = vm._props;\n        var propKeys = vm.$options._propKeys || [];\n        for (var i = 0; i < propKeys.length; i++) {\n            var key = propKeys[i];\n            var propOptions = vm.$options.props; // wtf flow?\n            props[key] = validateProp(key, propOptions, propsData, vm);\n        }\n        toggleObserving(true);\n        // keep a copy of raw propsData\n        vm.$options.propsData = propsData;\n    }\n    // resolve slots + force update if has children\n    if (needsForceUpdate) {\n        vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n        vm.$forceUpdate();\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        isUpdatingChildComponent = false;\n    }\n}\nfunction isInInactiveTree(vm) {\n    while (vm && (vm = vm.$parent)) {\n        if (vm._inactive)\n            return true;\n    }\n    return false;\n}\nfunction activateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = false;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    else if (vm._directInactive) {\n        return;\n    }\n    if (vm._inactive || vm._inactive === null) {\n        vm._inactive = false;\n        for (var i = 0; i < vm.$children.length; i++) {\n            activateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'activated');\n    }\n}\nfunction deactivateChildComponent(vm, direct) {\n    if (direct) {\n        vm._directInactive = true;\n        if (isInInactiveTree(vm)) {\n            return;\n        }\n    }\n    if (!vm._inactive) {\n        vm._inactive = true;\n        for (var i = 0; i < vm.$children.length; i++) {\n            deactivateChildComponent(vm.$children[i]);\n        }\n        callHook$1(vm, 'deactivated');\n    }\n}\nfunction callHook$1(vm, hook, args, setContext) {\n    if (setContext === void 0) { setContext = true; }\n    // #7573 disable dep collection when invoking lifecycle hooks\n    pushTarget();\n    var prevInst = currentInstance;\n    var prevScope = getCurrentScope();\n    setContext && setCurrentInstance(vm);\n    var handlers = vm.$options[hook];\n    var info = \"\".concat(hook, \" hook\");\n    if (handlers) {\n        for (var i = 0, j = handlers.length; i < j; i++) {\n            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n        }\n    }\n    if (vm._hasHookEvent) {\n        vm.$emit('hook:' + hook);\n    }\n    if (setContext) {\n        setCurrentInstance(prevInst);\n        prevScope && prevScope.on();\n    }\n    popTarget();\n}\n\nvar MAX_UPDATE_COUNT = 100;\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState() {\n    index = queue.length = activatedChildren.length = 0;\n    has = {};\n    if (process.env.NODE_ENV !== 'production') {\n        circular = {};\n    }\n    waiting = flushing = false;\n}\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n    var performance_1 = window.performance;\n    if (performance_1 &&\n        typeof performance_1.now === 'function' &&\n        getNow() > document.createEvent('Event').timeStamp) {\n        // if the event timestamp, although evaluated AFTER the Date.now(), is\n        // smaller than it, it means the event is using a hi-res timestamp,\n        // and we need to use the hi-res version for event listener timestamps as\n        // well.\n        getNow = function () { return performance_1.now(); };\n    }\n}\nvar sortCompareFn = function (a, b) {\n    if (a.post) {\n        if (!b.post)\n            return 1;\n    }\n    else if (b.post) {\n        return -1;\n    }\n    return a.id - b.id;\n};\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue() {\n    currentFlushTimestamp = getNow();\n    flushing = true;\n    var watcher, id;\n    // Sort queue before flush.\n    // This ensures that:\n    // 1. Components are updated from parent to child. (because parent is always\n    //    created before the child)\n    // 2. A component's user watchers are run before its render watcher (because\n    //    user watchers are created before the render watcher)\n    // 3. If a component is destroyed during a parent component's watcher run,\n    //    its watchers can be skipped.\n    queue.sort(sortCompareFn);\n    // do not cache length because more watchers might be pushed\n    // as we run existing watchers\n    for (index = 0; index < queue.length; index++) {\n        watcher = queue[index];\n        if (watcher.before) {\n            watcher.before();\n        }\n        id = watcher.id;\n        has[id] = null;\n        watcher.run();\n        // in dev build, check and stop circular updates.\n        if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n            circular[id] = (circular[id] || 0) + 1;\n            if (circular[id] > MAX_UPDATE_COUNT) {\n                warn('You may have an infinite update loop ' +\n                    (watcher.user\n                        ? \"in watcher with expression \\\"\".concat(watcher.expression, \"\\\"\")\n                        : \"in a component render function.\"), watcher.vm);\n                break;\n            }\n        }\n    }\n    // keep copies of post queues before resetting state\n    var activatedQueue = activatedChildren.slice();\n    var updatedQueue = queue.slice();\n    resetSchedulerState();\n    // call component updated and activated hooks\n    callActivatedHooks(activatedQueue);\n    callUpdatedHooks(updatedQueue);\n    cleanupDeps();\n    // devtool hook\n    /* istanbul ignore if */\n    if (devtools && config.devtools) {\n        devtools.emit('flush');\n    }\n}\nfunction callUpdatedHooks(queue) {\n    var i = queue.length;\n    while (i--) {\n        var watcher = queue[i];\n        var vm = watcher.vm;\n        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n            callHook$1(vm, 'updated');\n        }\n    }\n}\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent(vm) {\n    // setting _inactive to false here so that a render function can\n    // rely on checking whether it's in an inactive tree (e.g. router-view)\n    vm._inactive = false;\n    activatedChildren.push(vm);\n}\nfunction callActivatedHooks(queue) {\n    for (var i = 0; i < queue.length; i++) {\n        queue[i]._inactive = true;\n        activateChildComponent(queue[i], true /* true */);\n    }\n}\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher(watcher) {\n    var id = watcher.id;\n    if (has[id] != null) {\n        return;\n    }\n    if (watcher === Dep.target && watcher.noRecurse) {\n        return;\n    }\n    has[id] = true;\n    if (!flushing) {\n        queue.push(watcher);\n    }\n    else {\n        // if already flushing, splice the watcher based on its id\n        // if already past its id, it will be run next immediately.\n        var i = queue.length - 1;\n        while (i > index && queue[i].id > watcher.id) {\n            i--;\n        }\n        queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n        waiting = true;\n        if (process.env.NODE_ENV !== 'production' && !config.async) {\n            flushSchedulerQueue();\n            return;\n        }\n        nextTick(flushSchedulerQueue);\n    }\n}\n\nfunction initProvide(vm) {\n    var provideOption = vm.$options.provide;\n    if (provideOption) {\n        var provided = isFunction(provideOption)\n            ? provideOption.call(vm)\n            : provideOption;\n        if (!isObject(provided)) {\n            return;\n        }\n        var source = resolveProvided(vm);\n        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n        // iterate the keys ourselves.\n        var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n        for (var i = 0; i < keys.length; i++) {\n            var key = keys[i];\n            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n        }\n    }\n}\nfunction initInjections(vm) {\n    var result = resolveInject(vm.$options.inject, vm);\n    if (result) {\n        toggleObserving(false);\n        Object.keys(result).forEach(function (key) {\n            /* istanbul ignore else */\n            if (process.env.NODE_ENV !== 'production') {\n                defineReactive(vm, key, result[key], function () {\n                    warn(\"Avoid mutating an injected value directly since the changes will be \" +\n                        \"overwritten whenever the provided component re-renders. \" +\n                        \"injection being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                });\n            }\n            else {\n                defineReactive(vm, key, result[key]);\n            }\n        });\n        toggleObserving(true);\n    }\n}\nfunction resolveInject(inject, vm) {\n    if (inject) {\n        // inject is :any because flow is not smart enough to figure out cached\n        var result = Object.create(null);\n        var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n        for (var i = 0; i < keys.length; i++) {\n            var key = keys[i];\n            // #6574 in case the inject object is observed...\n            if (key === '__ob__')\n                continue;\n            var provideKey = inject[key].from;\n            if (provideKey in vm._provided) {\n                result[key] = vm._provided[provideKey];\n            }\n            else if ('default' in inject[key]) {\n                var provideDefault = inject[key].default;\n                result[key] = isFunction(provideDefault)\n                    ? provideDefault.call(vm)\n                    : provideDefault;\n            }\n            else if (process.env.NODE_ENV !== 'production') {\n                warn(\"Injection \\\"\".concat(key, \"\\\" not found\"), vm);\n            }\n        }\n        return result;\n    }\n}\n\nfunction FunctionalRenderContext(data, props, children, parent, Ctor) {\n    var _this = this;\n    var options = Ctor.options;\n    // ensure the createElement function in functional components\n    // gets a unique context - this is necessary for correct named slot check\n    var contextVm;\n    if (hasOwn(parent, '_uid')) {\n        contextVm = Object.create(parent);\n        contextVm._original = parent;\n    }\n    else {\n        // the context vm passed in is a functional context as well.\n        // in this case we want to make sure we are able to get a hold to the\n        // real context instance.\n        contextVm = parent;\n        // @ts-ignore\n        parent = parent._original;\n    }\n    var isCompiled = isTrue(options._compiled);\n    var needNormalization = !isCompiled;\n    this.data = data;\n    this.props = props;\n    this.children = children;\n    this.parent = parent;\n    this.listeners = data.on || emptyObject;\n    this.injections = resolveInject(options.inject, parent);\n    this.slots = function () {\n        if (!_this.$slots) {\n            normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));\n        }\n        return _this.$slots;\n    };\n    Object.defineProperty(this, 'scopedSlots', {\n        enumerable: true,\n        get: function () {\n            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n        }\n    });\n    // support for compiled functional template\n    if (isCompiled) {\n        // exposing $options for renderStatic()\n        this.$options = options;\n        // pre-resolve slots for renderSlot()\n        this.$slots = this.slots();\n        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n    }\n    if (options._scopeId) {\n        this._c = function (a, b, c, d) {\n            var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n            if (vnode && !isArray(vnode)) {\n                vnode.fnScopeId = options._scopeId;\n                vnode.fnContext = parent;\n            }\n            return vnode;\n        };\n    }\n    else {\n        this._c = function (a, b, c, d) {\n            return createElement$1(contextVm, a, b, c, d, needNormalization);\n        };\n    }\n}\ninstallRenderHelpers(FunctionalRenderContext.prototype);\nfunction createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n    var options = Ctor.options;\n    var props = {};\n    var propOptions = options.props;\n    if (isDef(propOptions)) {\n        for (var key in propOptions) {\n            props[key] = validateProp(key, propOptions, propsData || emptyObject);\n        }\n    }\n    else {\n        if (isDef(data.attrs))\n            mergeProps(props, data.attrs);\n        if (isDef(data.props))\n            mergeProps(props, data.props);\n    }\n    var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n    var vnode = options.render.call(null, renderContext._c, renderContext);\n    if (vnode instanceof VNode) {\n        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n    }\n    else if (isArray(vnode)) {\n        var vnodes = normalizeChildren(vnode) || [];\n        var res = new Array(vnodes.length);\n        for (var i = 0; i < vnodes.length; i++) {\n            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n        }\n        return res;\n    }\n}\nfunction cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n    // #7817 clone node before setting fnContext, otherwise if the node is reused\n    // (e.g. it was from a cached normal slot) the fnContext causes named slots\n    // that should not be matched to match.\n    var clone = cloneVNode(vnode);\n    clone.fnContext = contextVm;\n    clone.fnOptions = options;\n    if (process.env.NODE_ENV !== 'production') {\n        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n            renderContext;\n    }\n    if (data.slot) {\n        (clone.data || (clone.data = {})).slot = data.slot;\n    }\n    return clone;\n}\nfunction mergeProps(to, from) {\n    for (var key in from) {\n        to[camelize(key)] = from[key];\n    }\n}\n\nfunction getComponentName(options) {\n    return options.name || options.__name || options._componentTag;\n}\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n    init: function (vnode, hydrating) {\n        if (vnode.componentInstance &&\n            !vnode.componentInstance._isDestroyed &&\n            vnode.data.keepAlive) {\n            // kept-alive components, treat as a patch\n            var mountedNode = vnode; // work around flow\n            componentVNodeHooks.prepatch(mountedNode, mountedNode);\n        }\n        else {\n            var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n            child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n        }\n    },\n    prepatch: function (oldVnode, vnode) {\n        var options = vnode.componentOptions;\n        var child = (vnode.componentInstance = oldVnode.componentInstance);\n        updateChildComponent(child, options.propsData, // updated props\n        options.listeners, // updated listeners\n        vnode, // new parent vnode\n        options.children // new children\n        );\n    },\n    insert: function (vnode) {\n        var context = vnode.context, componentInstance = vnode.componentInstance;\n        if (!componentInstance._isMounted) {\n            componentInstance._isMounted = true;\n            callHook$1(componentInstance, 'mounted');\n        }\n        if (vnode.data.keepAlive) {\n            if (context._isMounted) {\n                // vue-router#1212\n                // During updates, a kept-alive component's child components may\n                // change, so directly walking the tree here may call activated hooks\n                // on incorrect children. Instead we push them into a queue which will\n                // be processed after the whole patch process ended.\n                queueActivatedComponent(componentInstance);\n            }\n            else {\n                activateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    },\n    destroy: function (vnode) {\n        var componentInstance = vnode.componentInstance;\n        if (!componentInstance._isDestroyed) {\n            if (!vnode.data.keepAlive) {\n                componentInstance.$destroy();\n            }\n            else {\n                deactivateChildComponent(componentInstance, true /* direct */);\n            }\n        }\n    }\n};\nvar hooksToMerge = Object.keys(componentVNodeHooks);\nfunction createComponent(Ctor, data, context, children, tag) {\n    if (isUndef(Ctor)) {\n        return;\n    }\n    var baseCtor = context.$options._base;\n    // plain options object: turn it into a constructor\n    if (isObject(Ctor)) {\n        Ctor = baseCtor.extend(Ctor);\n    }\n    // if at this stage it's not a constructor or an async component factory,\n    // reject.\n    if (typeof Ctor !== 'function') {\n        if (process.env.NODE_ENV !== 'production') {\n            warn(\"Invalid Component definition: \".concat(String(Ctor)), context);\n        }\n        return;\n    }\n    // async component\n    var asyncFactory;\n    // @ts-expect-error\n    if (isUndef(Ctor.cid)) {\n        asyncFactory = Ctor;\n        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n        if (Ctor === undefined) {\n            // return a placeholder node for async component, which is rendered\n            // as a comment node but preserves all the raw information for the node.\n            // the information will be used for async server-rendering and hydration.\n            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n        }\n    }\n    data = data || {};\n    // resolve constructor options in case global mixins are applied after\n    // component constructor creation\n    resolveConstructorOptions(Ctor);\n    // transform component v-model data into props & events\n    if (isDef(data.model)) {\n        // @ts-expect-error\n        transformModel(Ctor.options, data);\n    }\n    // extract props\n    // @ts-expect-error\n    var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n    // functional component\n    // @ts-expect-error\n    if (isTrue(Ctor.options.functional)) {\n        return createFunctionalComponent(Ctor, propsData, data, context, children);\n    }\n    // extract listeners, since these needs to be treated as\n    // child component listeners instead of DOM listeners\n    var listeners = data.on;\n    // replace with listeners with .native modifier\n    // so it gets processed during parent component patch.\n    data.on = data.nativeOn;\n    // @ts-expect-error\n    if (isTrue(Ctor.options.abstract)) {\n        // abstract components do not keep anything\n        // other than props & listeners & slot\n        // work around flow\n        var slot = data.slot;\n        data = {};\n        if (slot) {\n            data.slot = slot;\n        }\n    }\n    // install component management hooks onto the placeholder node\n    installComponentHooks(data);\n    // return a placeholder vnode\n    // @ts-expect-error\n    var name = getComponentName(Ctor.options) || tag;\n    var vnode = new VNode(\n    // @ts-expect-error\n    \"vue-component-\".concat(Ctor.cid).concat(name ? \"-\".concat(name) : ''), data, undefined, undefined, undefined, context, \n    // @ts-expect-error\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);\n    return vnode;\n}\nfunction createComponentInstanceForVnode(\n// we know it's MountedComponentVNode but flow doesn't\nvnode, \n// activeInstance in lifecycle state\nparent) {\n    var options = {\n        _isComponent: true,\n        _parentVnode: vnode,\n        parent: parent\n    };\n    // check inline-template render functions\n    var inlineTemplate = vnode.data.inlineTemplate;\n    if (isDef(inlineTemplate)) {\n        options.render = inlineTemplate.render;\n        options.staticRenderFns = inlineTemplate.staticRenderFns;\n    }\n    return new vnode.componentOptions.Ctor(options);\n}\nfunction installComponentHooks(data) {\n    var hooks = data.hook || (data.hook = {});\n    for (var i = 0; i < hooksToMerge.length; i++) {\n        var key = hooksToMerge[i];\n        var existing = hooks[key];\n        var toMerge = componentVNodeHooks[key];\n        // @ts-expect-error\n        if (existing !== toMerge && !(existing && existing._merged)) {\n            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n        }\n    }\n}\nfunction mergeHook(f1, f2) {\n    var merged = function (a, b) {\n        // flow complains about extra args which is why we use any\n        f1(a, b);\n        f2(a, b);\n    };\n    merged._merged = true;\n    return merged;\n}\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel(options, data) {\n    var prop = (options.model && options.model.prop) || 'value';\n    var event = (options.model && options.model.event) || 'input';\n    (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n    var on = data.on || (data.on = {});\n    var existing = on[event];\n    var callback = data.model.callback;\n    if (isDef(existing)) {\n        if (isArray(existing)\n            ? existing.indexOf(callback) === -1\n            : existing !== callback) {\n            on[event] = [callback].concat(existing);\n        }\n    }\n    else {\n        on[event] = callback;\n    }\n}\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace; // work around flow check\nvar formatComponentName;\nif (process.env.NODE_ENV !== 'production') {\n    var hasConsole_1 = typeof console !== 'undefined';\n    var classifyRE_1 = /(?:^|[-_])(\\w)/g;\n    var classify_1 = function (str) {\n        return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');\n    };\n    warn = function (msg, vm) {\n        if (vm === void 0) { vm = currentInstance; }\n        var trace = vm ? generateComponentTrace(vm) : '';\n        if (config.warnHandler) {\n            config.warnHandler.call(null, msg, vm, trace);\n        }\n        else if (hasConsole_1 && !config.silent) {\n            console.error(\"[Vue warn]: \".concat(msg).concat(trace));\n        }\n    };\n    tip = function (msg, vm) {\n        if (hasConsole_1 && !config.silent) {\n            console.warn(\"[Vue tip]: \".concat(msg) + (vm ? generateComponentTrace(vm) : ''));\n        }\n    };\n    formatComponentName = function (vm, includeFile) {\n        if (vm.$root === vm) {\n            return '<Root>';\n        }\n        var options = isFunction(vm) && vm.cid != null\n            ? vm.options\n            : vm._isVue\n                ? vm.$options || vm.constructor.options\n                : vm;\n        var name = getComponentName(options);\n        var file = options.__file;\n        if (!name && file) {\n            var match = file.match(/([^/\\\\]+)\\.vue$/);\n            name = match && match[1];\n        }\n        return ((name ? \"<\".concat(classify_1(name), \">\") : \"<Anonymous>\") +\n            (file && includeFile !== false ? \" at \".concat(file) : ''));\n    };\n    var repeat_1 = function (str, n) {\n        var res = '';\n        while (n) {\n            if (n % 2 === 1)\n                res += str;\n            if (n > 1)\n                str += str;\n            n >>= 1;\n        }\n        return res;\n    };\n    generateComponentTrace = function (vm) {\n        if (vm._isVue && vm.$parent) {\n            var tree = [];\n            var currentRecursiveSequence = 0;\n            while (vm) {\n                if (tree.length > 0) {\n                    var last = tree[tree.length - 1];\n                    if (last.constructor === vm.constructor) {\n                        currentRecursiveSequence++;\n                        vm = vm.$parent;\n                        continue;\n                    }\n                    else if (currentRecursiveSequence > 0) {\n                        tree[tree.length - 1] = [last, currentRecursiveSequence];\n                        currentRecursiveSequence = 0;\n                    }\n                }\n                tree.push(vm);\n                vm = vm.$parent;\n            }\n            return ('\\n\\nfound in\\n\\n' +\n                tree\n                    .map(function (vm, i) {\n                    return \"\".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)\n                        ? \"\".concat(formatComponentName(vm[0]), \"... (\").concat(vm[1], \" recursive calls)\")\n                        : formatComponentName(vm));\n                })\n                    .join('\\n'));\n        }\n        else {\n            return \"\\n\\n(found in \".concat(formatComponentName(vm), \")\");\n        }\n    };\n}\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n    strats.el = strats.propsData = function (parent, child, vm, key) {\n        if (!vm) {\n            warn(\"option \\\"\".concat(key, \"\\\" can only be used during instance \") +\n                'creation with the `new` keyword.');\n        }\n        return defaultStrat(parent, child);\n    };\n}\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData(to, from, recursive) {\n    if (recursive === void 0) { recursive = true; }\n    if (!from)\n        return to;\n    var key, toVal, fromVal;\n    var keys = hasSymbol\n        ? Reflect.ownKeys(from)\n        : Object.keys(from);\n    for (var i = 0; i < keys.length; i++) {\n        key = keys[i];\n        // in case the object is already observed...\n        if (key === '__ob__')\n            continue;\n        toVal = to[key];\n        fromVal = from[key];\n        if (!recursive || !hasOwn(to, key)) {\n            set(to, key, fromVal);\n        }\n        else if (toVal !== fromVal &&\n            isPlainObject(toVal) &&\n            isPlainObject(fromVal)) {\n            mergeData(toVal, fromVal);\n        }\n    }\n    return to;\n}\n/**\n * Data\n */\nfunction mergeDataOrFn(parentVal, childVal, vm) {\n    if (!vm) {\n        // in a Vue.extend merge, both should be functions\n        if (!childVal) {\n            return parentVal;\n        }\n        if (!parentVal) {\n            return childVal;\n        }\n        // when parentVal & childVal are both present,\n        // we need to return a function that returns the\n        // merged result of both functions... no need to\n        // check if parentVal is a function here because\n        // it has to be a function to pass previous merges.\n        return function mergedDataFn() {\n            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n        };\n    }\n    else {\n        return function mergedInstanceDataFn() {\n            // instance merge\n            var instanceData = isFunction(childVal)\n                ? childVal.call(vm, vm)\n                : childVal;\n            var defaultData = isFunction(parentVal)\n                ? parentVal.call(vm, vm)\n                : parentVal;\n            if (instanceData) {\n                return mergeData(instanceData, defaultData);\n            }\n            else {\n                return defaultData;\n            }\n        };\n    }\n}\nstrats.data = function (parentVal, childVal, vm) {\n    if (!vm) {\n        if (childVal && typeof childVal !== 'function') {\n            process.env.NODE_ENV !== 'production' &&\n                warn('The \"data\" option should be a function ' +\n                    'that returns a per-instance value in component ' +\n                    'definitions.', vm);\n            return parentVal;\n        }\n        return mergeDataOrFn(parentVal, childVal);\n    }\n    return mergeDataOrFn(parentVal, childVal, vm);\n};\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeLifecycleHook(parentVal, childVal) {\n    var res = childVal\n        ? parentVal\n            ? parentVal.concat(childVal)\n            : isArray(childVal)\n                ? childVal\n                : [childVal]\n        : parentVal;\n    return res ? dedupeHooks(res) : res;\n}\nfunction dedupeHooks(hooks) {\n    var res = [];\n    for (var i = 0; i < hooks.length; i++) {\n        if (res.indexOf(hooks[i]) === -1) {\n            res.push(hooks[i]);\n        }\n    }\n    return res;\n}\nLIFECYCLE_HOOKS.forEach(function (hook) {\n    strats[hook] = mergeLifecycleHook;\n});\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets(parentVal, childVal, vm, key) {\n    var res = Object.create(parentVal || null);\n    if (childVal) {\n        process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n        return extend(res, childVal);\n    }\n    else {\n        return res;\n    }\n}\nASSET_TYPES.forEach(function (type) {\n    strats[type + 's'] = mergeAssets;\n});\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (parentVal, childVal, vm, key) {\n    // work around Firefox's Object.prototype.watch...\n    //@ts-expect-error work around\n    if (parentVal === nativeWatch)\n        parentVal = undefined;\n    //@ts-expect-error work around\n    if (childVal === nativeWatch)\n        childVal = undefined;\n    /* istanbul ignore if */\n    if (!childVal)\n        return Object.create(parentVal || null);\n    if (process.env.NODE_ENV !== 'production') {\n        assertObjectType(key, childVal, vm);\n    }\n    if (!parentVal)\n        return childVal;\n    var ret = {};\n    extend(ret, parentVal);\n    for (var key_1 in childVal) {\n        var parent_1 = ret[key_1];\n        var child = childVal[key_1];\n        if (parent_1 && !isArray(parent_1)) {\n            parent_1 = [parent_1];\n        }\n        ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];\n    }\n    return ret;\n};\n/**\n * Other object hashes.\n */\nstrats.props =\n    strats.methods =\n        strats.inject =\n            strats.computed =\n                function (parentVal, childVal, vm, key) {\n                    if (childVal && process.env.NODE_ENV !== 'production') {\n                        assertObjectType(key, childVal, vm);\n                    }\n                    if (!parentVal)\n                        return childVal;\n                    var ret = Object.create(null);\n                    extend(ret, parentVal);\n                    if (childVal)\n                        extend(ret, childVal);\n                    return ret;\n                };\nstrats.provide = function (parentVal, childVal) {\n    if (!parentVal)\n        return childVal;\n    return function () {\n        var ret = Object.create(null);\n        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n        if (childVal) {\n            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n            );\n        }\n        return ret;\n    };\n};\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n    return childVal === undefined ? parentVal : childVal;\n};\n/**\n * Validate component names\n */\nfunction checkComponents(options) {\n    for (var key in options.components) {\n        validateComponentName(key);\n    }\n}\nfunction validateComponentName(name) {\n    if (!new RegExp(\"^[a-zA-Z][\\\\-\\\\.0-9_\".concat(unicodeRegExp.source, \"]*$\")).test(name)) {\n        warn('Invalid component name: \"' +\n            name +\n            '\". Component names ' +\n            'should conform to valid custom element name in html5 specification.');\n    }\n    if (isBuiltInTag(name) || config.isReservedTag(name)) {\n        warn('Do not use built-in or reserved HTML elements as component ' +\n            'id: ' +\n            name);\n    }\n}\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps(options, vm) {\n    var props = options.props;\n    if (!props)\n        return;\n    var res = {};\n    var i, val, name;\n    if (isArray(props)) {\n        i = props.length;\n        while (i--) {\n            val = props[i];\n            if (typeof val === 'string') {\n                name = camelize(val);\n                res[name] = { type: null };\n            }\n            else if (process.env.NODE_ENV !== 'production') {\n                warn('props must be strings when using array syntax.');\n            }\n        }\n    }\n    else if (isPlainObject(props)) {\n        for (var key in props) {\n            val = props[key];\n            name = camelize(key);\n            res[name] = isPlainObject(val) ? val : { type: val };\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n            \"but got \".concat(toRawType(props), \".\"), vm);\n    }\n    options.props = res;\n}\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject(options, vm) {\n    var inject = options.inject;\n    if (!inject)\n        return;\n    var normalized = (options.inject = {});\n    if (isArray(inject)) {\n        for (var i = 0; i < inject.length; i++) {\n            normalized[inject[i]] = { from: inject[i] };\n        }\n    }\n    else if (isPlainObject(inject)) {\n        for (var key in inject) {\n            var val = inject[key];\n            normalized[key] = isPlainObject(val)\n                ? extend({ from: key }, val)\n                : { from: val };\n        }\n    }\n    else if (process.env.NODE_ENV !== 'production') {\n        warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n            \"but got \".concat(toRawType(inject), \".\"), vm);\n    }\n}\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives$1(options) {\n    var dirs = options.directives;\n    if (dirs) {\n        for (var key in dirs) {\n            var def = dirs[key];\n            if (isFunction(def)) {\n                dirs[key] = { bind: def, update: def };\n            }\n        }\n    }\n}\nfunction assertObjectType(name, value, vm) {\n    if (!isPlainObject(value)) {\n        warn(\"Invalid value for option \\\"\".concat(name, \"\\\": expected an Object, \") +\n            \"but got \".concat(toRawType(value), \".\"), vm);\n    }\n}\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions(parent, child, vm) {\n    if (process.env.NODE_ENV !== 'production') {\n        checkComponents(child);\n    }\n    if (isFunction(child)) {\n        // @ts-expect-error\n        child = child.options;\n    }\n    normalizeProps(child, vm);\n    normalizeInject(child, vm);\n    normalizeDirectives$1(child);\n    // Apply extends and mixins on the child options,\n    // but only if it is a raw options object that isn't\n    // the result of another mergeOptions call.\n    // Only merged options has the _base property.\n    if (!child._base) {\n        if (child.extends) {\n            parent = mergeOptions(parent, child.extends, vm);\n        }\n        if (child.mixins) {\n            for (var i = 0, l = child.mixins.length; i < l; i++) {\n                parent = mergeOptions(parent, child.mixins[i], vm);\n            }\n        }\n    }\n    var options = {};\n    var key;\n    for (key in parent) {\n        mergeField(key);\n    }\n    for (key in child) {\n        if (!hasOwn(parent, key)) {\n            mergeField(key);\n        }\n    }\n    function mergeField(key) {\n        var strat = strats[key] || defaultStrat;\n        options[key] = strat(parent[key], child[key], vm, key);\n    }\n    return options;\n}\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset(options, type, id, warnMissing) {\n    /* istanbul ignore if */\n    if (typeof id !== 'string') {\n        return;\n    }\n    var assets = options[type];\n    // check local registration variations first\n    if (hasOwn(assets, id))\n        return assets[id];\n    var camelizedId = camelize(id);\n    if (hasOwn(assets, camelizedId))\n        return assets[camelizedId];\n    var PascalCaseId = capitalize(camelizedId);\n    if (hasOwn(assets, PascalCaseId))\n        return assets[PascalCaseId];\n    // fallback to prototype chain\n    var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n    if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n        warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n    }\n    return res;\n}\n\nfunction validateProp(key, propOptions, propsData, vm) {\n    var prop = propOptions[key];\n    var absent = !hasOwn(propsData, key);\n    var value = propsData[key];\n    // boolean casting\n    var booleanIndex = getTypeIndex(Boolean, prop.type);\n    if (booleanIndex > -1) {\n        if (absent && !hasOwn(prop, 'default')) {\n            value = false;\n        }\n        else if (value === '' || value === hyphenate(key)) {\n            // only cast empty string / same name to boolean if\n            // boolean has higher priority\n            var stringIndex = getTypeIndex(String, prop.type);\n            if (stringIndex < 0 || booleanIndex < stringIndex) {\n                value = true;\n            }\n        }\n    }\n    // check default value\n    if (value === undefined) {\n        value = getPropDefaultValue(vm, prop, key);\n        // since the default value is a fresh copy,\n        // make sure to observe it.\n        var prevShouldObserve = shouldObserve;\n        toggleObserving(true);\n        observe(value);\n        toggleObserving(prevShouldObserve);\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        assertProp(prop, key, value, vm, absent);\n    }\n    return value;\n}\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue(vm, prop, key) {\n    // no default, return undefined\n    if (!hasOwn(prop, 'default')) {\n        return undefined;\n    }\n    var def = prop.default;\n    // warn against non-factory defaults for Object & Array\n    if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n        warn('Invalid default value for prop \"' +\n            key +\n            '\": ' +\n            'Props with type Object/Array must use a factory function ' +\n            'to return the default value.', vm);\n    }\n    // the raw prop value was also undefined from previous render,\n    // return previous default value to avoid unnecessary watcher trigger\n    if (vm &&\n        vm.$options.propsData &&\n        vm.$options.propsData[key] === undefined &&\n        vm._props[key] !== undefined) {\n        return vm._props[key];\n    }\n    // call factory function for non-Function types\n    // a value is Function if its prototype is function even across different execution context\n    return isFunction(def) && getType(prop.type) !== 'Function'\n        ? def.call(vm)\n        : def;\n}\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp(prop, name, value, vm, absent) {\n    if (prop.required && absent) {\n        warn('Missing required prop: \"' + name + '\"', vm);\n        return;\n    }\n    if (value == null && !prop.required) {\n        return;\n    }\n    var type = prop.type;\n    var valid = !type || type === true;\n    var expectedTypes = [];\n    if (type) {\n        if (!isArray(type)) {\n            type = [type];\n        }\n        for (var i = 0; i < type.length && !valid; i++) {\n            var assertedType = assertType(value, type[i], vm);\n            expectedTypes.push(assertedType.expectedType || '');\n            valid = assertedType.valid;\n        }\n    }\n    var haveExpectedTypes = expectedTypes.some(function (t) { return t; });\n    if (!valid && haveExpectedTypes) {\n        warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n        return;\n    }\n    var validator = prop.validator;\n    if (validator) {\n        if (!validator(value)) {\n            warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n        }\n    }\n}\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\nfunction assertType(value, type, vm) {\n    var valid;\n    var expectedType = getType(type);\n    if (simpleCheckRE.test(expectedType)) {\n        var t = typeof value;\n        valid = t === expectedType.toLowerCase();\n        // for primitive wrapper objects\n        if (!valid && t === 'object') {\n            valid = value instanceof type;\n        }\n    }\n    else if (expectedType === 'Object') {\n        valid = isPlainObject(value);\n    }\n    else if (expectedType === 'Array') {\n        valid = isArray(value);\n    }\n    else {\n        try {\n            valid = value instanceof type;\n        }\n        catch (e) {\n            warn('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n            valid = false;\n        }\n    }\n    return {\n        valid: valid,\n        expectedType: expectedType\n    };\n}\nvar functionTypeCheckRE = /^\\s*function (\\w+)/;\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType(fn) {\n    var match = fn && fn.toString().match(functionTypeCheckRE);\n    return match ? match[1] : '';\n}\nfunction isSameType(a, b) {\n    return getType(a) === getType(b);\n}\nfunction getTypeIndex(type, expectedTypes) {\n    if (!isArray(expectedTypes)) {\n        return isSameType(expectedTypes, type) ? 0 : -1;\n    }\n    for (var i = 0, len = expectedTypes.length; i < len; i++) {\n        if (isSameType(expectedTypes[i], type)) {\n            return i;\n        }\n    }\n    return -1;\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n    var message = \"Invalid prop: type check failed for prop \\\"\".concat(name, \"\\\".\") +\n        \" Expected \".concat(expectedTypes.map(capitalize).join(', '));\n    var expectedType = expectedTypes[0];\n    var receivedType = toRawType(value);\n    // check if we need to specify expected value\n    if (expectedTypes.length === 1 &&\n        isExplicable(expectedType) &&\n        isExplicable(typeof value) &&\n        !isBoolean(expectedType, receivedType)) {\n        message += \" with value \".concat(styleValue(value, expectedType));\n    }\n    message += \", got \".concat(receivedType, \" \");\n    // check if we need to specify received value\n    if (isExplicable(receivedType)) {\n        message += \"with value \".concat(styleValue(value, receivedType), \".\");\n    }\n    return message;\n}\nfunction styleValue(value, type) {\n    if (type === 'String') {\n        return \"\\\"\".concat(value, \"\\\"\");\n    }\n    else if (type === 'Number') {\n        return \"\".concat(Number(value));\n    }\n    else {\n        return \"\".concat(value);\n    }\n}\nvar EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\nfunction isExplicable(value) {\n    return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });\n}\nfunction isBoolean() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\nvar initProxy;\nif (process.env.NODE_ENV !== 'production') {\n    var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n        'require' // for Webpack/Browserify\n    );\n    var warnNonPresent_1 = function (target, key) {\n        warn(\"Property or method \\\"\".concat(key, \"\\\" is not defined on the instance but \") +\n            'referenced during render. Make sure that this property is reactive, ' +\n            'either in the data option, or for class-based components, by ' +\n            'initializing the property. ' +\n            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n    };\n    var warnReservedPrefix_1 = function (target, key) {\n        warn(\"Property \\\"\".concat(key, \"\\\" must be accessed with \\\"$data.\").concat(key, \"\\\" because \") +\n            'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n            'prevent conflicts with Vue internals. ' +\n            'See: https://v2.vuejs.org/v2/api/#data', target);\n    };\n    var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);\n    if (hasProxy_1) {\n        var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n        config.keyCodes = new Proxy(config.keyCodes, {\n            set: function (target, key, value) {\n                if (isBuiltInModifier_1(key)) {\n                    warn(\"Avoid overwriting built-in modifier in config.keyCodes: .\".concat(key));\n                    return false;\n                }\n                else {\n                    target[key] = value;\n                    return true;\n                }\n            }\n        });\n    }\n    var hasHandler_1 = {\n        has: function (target, key) {\n            var has = key in target;\n            var isAllowed = allowedGlobals_1(key) ||\n                (typeof key === 'string' &&\n                    key.charAt(0) === '_' &&\n                    !(key in target.$data));\n            if (!has && !isAllowed) {\n                if (key in target.$data)\n                    warnReservedPrefix_1(target, key);\n                else\n                    warnNonPresent_1(target, key);\n            }\n            return has || !isAllowed;\n        }\n    };\n    var getHandler_1 = {\n        get: function (target, key) {\n            if (typeof key === 'string' && !(key in target)) {\n                if (key in target.$data)\n                    warnReservedPrefix_1(target, key);\n                else\n                    warnNonPresent_1(target, key);\n            }\n            return target[key];\n        }\n    };\n    initProxy = function initProxy(vm) {\n        if (hasProxy_1) {\n            // determine which proxy handler to use\n            var options = vm.$options;\n            var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;\n            vm._renderProxy = new Proxy(vm, handlers);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n    };\n}\n\nvar sharedPropertyDefinition = {\n    enumerable: true,\n    configurable: true,\n    get: noop,\n    set: noop\n};\nfunction proxy(target, sourceKey, key) {\n    sharedPropertyDefinition.get = function proxyGetter() {\n        return this[sourceKey][key];\n    };\n    sharedPropertyDefinition.set = function proxySetter(val) {\n        this[sourceKey][key] = val;\n    };\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction initState(vm) {\n    var opts = vm.$options;\n    if (opts.props)\n        initProps$1(vm, opts.props);\n    // Composition API\n    initSetup(vm);\n    if (opts.methods)\n        initMethods(vm, opts.methods);\n    if (opts.data) {\n        initData(vm);\n    }\n    else {\n        var ob = observe((vm._data = {}));\n        ob && ob.vmCount++;\n    }\n    if (opts.computed)\n        initComputed$1(vm, opts.computed);\n    if (opts.watch && opts.watch !== nativeWatch) {\n        initWatch(vm, opts.watch);\n    }\n}\nfunction initProps$1(vm, propsOptions) {\n    var propsData = vm.$options.propsData || {};\n    var props = (vm._props = shallowReactive({}));\n    // cache prop keys so that future props updates can iterate using Array\n    // instead of dynamic object key enumeration.\n    var keys = (vm.$options._propKeys = []);\n    var isRoot = !vm.$parent;\n    // root instance props should be converted\n    if (!isRoot) {\n        toggleObserving(false);\n    }\n    var _loop_1 = function (key) {\n        keys.push(key);\n        var value = validateProp(key, propsOptions, propsData, vm);\n        /* istanbul ignore else */\n        if (process.env.NODE_ENV !== 'production') {\n            var hyphenatedKey = hyphenate(key);\n            if (isReservedAttribute(hyphenatedKey) ||\n                config.isReservedAttr(hyphenatedKey)) {\n                warn(\"\\\"\".concat(hyphenatedKey, \"\\\" is a reserved attribute and cannot be used as component prop.\"), vm);\n            }\n            defineReactive(props, key, value, function () {\n                if (!isRoot && !isUpdatingChildComponent) {\n                    warn(\"Avoid mutating a prop directly since the value will be \" +\n                        \"overwritten whenever the parent component re-renders. \" +\n                        \"Instead, use a data or computed property based on the prop's \" +\n                        \"value. Prop being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                }\n            }, true /* shallow */);\n        }\n        else {\n            defineReactive(props, key, value, undefined, true /* shallow */);\n        }\n        // static props are already proxied on the component's prototype\n        // during Vue.extend(). We only need to proxy props defined at\n        // instantiation here.\n        if (!(key in vm)) {\n            proxy(vm, \"_props\", key);\n        }\n    };\n    for (var key in propsOptions) {\n        _loop_1(key);\n    }\n    toggleObserving(true);\n}\nfunction initData(vm) {\n    var data = vm.$options.data;\n    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n    if (!isPlainObject(data)) {\n        data = {};\n        process.env.NODE_ENV !== 'production' &&\n            warn('data functions should return an object:\\n' +\n                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n    }\n    // proxy data on instance\n    var keys = Object.keys(data);\n    var props = vm.$options.props;\n    var methods = vm.$options.methods;\n    var i = keys.length;\n    while (i--) {\n        var key = keys[i];\n        if (process.env.NODE_ENV !== 'production') {\n            if (methods && hasOwn(methods, key)) {\n                warn(\"Method \\\"\".concat(key, \"\\\" has already been defined as a data property.\"), vm);\n            }\n        }\n        if (props && hasOwn(props, key)) {\n            process.env.NODE_ENV !== 'production' &&\n                warn(\"The data property \\\"\".concat(key, \"\\\" is already declared as a prop. \") +\n                    \"Use prop default value instead.\", vm);\n        }\n        else if (!isReserved(key)) {\n            proxy(vm, \"_data\", key);\n        }\n    }\n    // observe data\n    var ob = observe(data);\n    ob && ob.vmCount++;\n}\nfunction getData(data, vm) {\n    // #7573 disable dep collection when invoking data getters\n    pushTarget();\n    try {\n        return data.call(vm, vm);\n    }\n    catch (e) {\n        handleError(e, vm, \"data()\");\n        return {};\n    }\n    finally {\n        popTarget();\n    }\n}\nvar computedWatcherOptions = { lazy: true };\nfunction initComputed$1(vm, computed) {\n    // $flow-disable-line\n    var watchers = (vm._computedWatchers = Object.create(null));\n    // computed properties are just getters during SSR\n    var isSSR = isServerRendering();\n    for (var key in computed) {\n        var userDef = computed[key];\n        var getter = isFunction(userDef) ? userDef : userDef.get;\n        if (process.env.NODE_ENV !== 'production' && getter == null) {\n            warn(\"Getter is missing for computed property \\\"\".concat(key, \"\\\".\"), vm);\n        }\n        if (!isSSR) {\n            // create internal watcher for the computed property.\n            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n        }\n        // component-defined computed properties are already defined on the\n        // component prototype. We only need to define computed properties defined\n        // at instantiation here.\n        if (!(key in vm)) {\n            defineComputed(vm, key, userDef);\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            if (key in vm.$data) {\n                warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined in data.\"), vm);\n            }\n            else if (vm.$options.props && key in vm.$options.props) {\n                warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a prop.\"), vm);\n            }\n            else if (vm.$options.methods && key in vm.$options.methods) {\n                warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a method.\"), vm);\n            }\n        }\n    }\n}\nfunction defineComputed(target, key, userDef) {\n    var shouldCache = !isServerRendering();\n    if (isFunction(userDef)) {\n        sharedPropertyDefinition.get = shouldCache\n            ? createComputedGetter(key)\n            : createGetterInvoker(userDef);\n        sharedPropertyDefinition.set = noop;\n    }\n    else {\n        sharedPropertyDefinition.get = userDef.get\n            ? shouldCache && userDef.cache !== false\n                ? createComputedGetter(key)\n                : createGetterInvoker(userDef.get)\n            : noop;\n        sharedPropertyDefinition.set = userDef.set || noop;\n    }\n    if (process.env.NODE_ENV !== 'production' && sharedPropertyDefinition.set === noop) {\n        sharedPropertyDefinition.set = function () {\n            warn(\"Computed property \\\"\".concat(key, \"\\\" was assigned to but it has no setter.\"), this);\n        };\n    }\n    Object.defineProperty(target, key, sharedPropertyDefinition);\n}\nfunction createComputedGetter(key) {\n    return function computedGetter() {\n        var watcher = this._computedWatchers && this._computedWatchers[key];\n        if (watcher) {\n            if (watcher.dirty) {\n                watcher.evaluate();\n            }\n            if (Dep.target) {\n                if (process.env.NODE_ENV !== 'production' && Dep.target.onTrack) {\n                    Dep.target.onTrack({\n                        effect: Dep.target,\n                        target: this,\n                        type: \"get\" /* TrackOpTypes.GET */,\n                        key: key\n                    });\n                }\n                watcher.depend();\n            }\n            return watcher.value;\n        }\n    };\n}\nfunction createGetterInvoker(fn) {\n    return function computedGetter() {\n        return fn.call(this, this);\n    };\n}\nfunction initMethods(vm, methods) {\n    var props = vm.$options.props;\n    for (var key in methods) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (typeof methods[key] !== 'function') {\n                warn(\"Method \\\"\".concat(key, \"\\\" has type \\\"\").concat(typeof methods[key], \"\\\" in the component definition. \") +\n                    \"Did you reference the function correctly?\", vm);\n            }\n            if (props && hasOwn(props, key)) {\n                warn(\"Method \\\"\".concat(key, \"\\\" has already been defined as a prop.\"), vm);\n            }\n            if (key in vm && isReserved(key)) {\n                warn(\"Method \\\"\".concat(key, \"\\\" conflicts with an existing Vue instance method. \") +\n                    \"Avoid defining component methods that start with _ or $.\");\n            }\n        }\n        vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n    }\n}\nfunction initWatch(vm, watch) {\n    for (var key in watch) {\n        var handler = watch[key];\n        if (isArray(handler)) {\n            for (var i = 0; i < handler.length; i++) {\n                createWatcher(vm, key, handler[i]);\n            }\n        }\n        else {\n            createWatcher(vm, key, handler);\n        }\n    }\n}\nfunction createWatcher(vm, expOrFn, handler, options) {\n    if (isPlainObject(handler)) {\n        options = handler;\n        handler = handler.handler;\n    }\n    if (typeof handler === 'string') {\n        handler = vm[handler];\n    }\n    return vm.$watch(expOrFn, handler, options);\n}\nfunction stateMixin(Vue) {\n    // flow somehow has problems with directly declared definition object\n    // when using Object.defineProperty, so we have to procedurally build up\n    // the object here.\n    var dataDef = {};\n    dataDef.get = function () {\n        return this._data;\n    };\n    var propsDef = {};\n    propsDef.get = function () {\n        return this._props;\n    };\n    if (process.env.NODE_ENV !== 'production') {\n        dataDef.set = function () {\n            warn('Avoid replacing instance root $data. ' +\n                'Use nested data properties instead.', this);\n        };\n        propsDef.set = function () {\n            warn(\"$props is readonly.\", this);\n        };\n    }\n    Object.defineProperty(Vue.prototype, '$data', dataDef);\n    Object.defineProperty(Vue.prototype, '$props', propsDef);\n    Vue.prototype.$set = set;\n    Vue.prototype.$delete = del;\n    Vue.prototype.$watch = function (expOrFn, cb, options) {\n        var vm = this;\n        if (isPlainObject(cb)) {\n            return createWatcher(vm, expOrFn, cb, options);\n        }\n        options = options || {};\n        options.user = true;\n        var watcher = new Watcher(vm, expOrFn, cb, options);\n        if (options.immediate) {\n            var info = \"callback for immediate watcher \\\"\".concat(watcher.expression, \"\\\"\");\n            pushTarget();\n            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n            popTarget();\n        }\n        return function unwatchFn() {\n            watcher.teardown();\n        };\n    };\n}\n\nvar uid = 0;\nfunction initMixin$1(Vue) {\n    Vue.prototype._init = function (options) {\n        var vm = this;\n        // a uid\n        vm._uid = uid++;\n        var startTag, endTag;\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n            startTag = \"vue-perf-start:\".concat(vm._uid);\n            endTag = \"vue-perf-end:\".concat(vm._uid);\n            mark(startTag);\n        }\n        // a flag to mark this as a Vue instance without having to do instanceof\n        // check\n        vm._isVue = true;\n        // avoid instances from being observed\n        vm.__v_skip = true;\n        // effect scope\n        vm._scope = new EffectScope(true /* detached */);\n        // #13134 edge case where a child component is manually created during the\n        // render of a parent component\n        vm._scope.parent = undefined;\n        vm._scope._vm = true;\n        // merge options\n        if (options && options._isComponent) {\n            // optimize internal component instantiation\n            // since dynamic options merging is pretty slow, and none of the\n            // internal component options needs special treatment.\n            initInternalComponent(vm, options);\n        }\n        else {\n            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n        }\n        /* istanbul ignore else */\n        if (process.env.NODE_ENV !== 'production') {\n            initProxy(vm);\n        }\n        else {\n            vm._renderProxy = vm;\n        }\n        // expose real self\n        vm._self = vm;\n        initLifecycle(vm);\n        initEvents(vm);\n        initRender(vm);\n        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n        initInjections(vm); // resolve injections before data/props\n        initState(vm);\n        initProvide(vm); // resolve provide after data/props\n        callHook$1(vm, 'created');\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n            vm._name = formatComponentName(vm, false);\n            mark(endTag);\n            measure(\"vue \".concat(vm._name, \" init\"), startTag, endTag);\n        }\n        if (vm.$options.el) {\n            vm.$mount(vm.$options.el);\n        }\n    };\n}\nfunction initInternalComponent(vm, options) {\n    var opts = (vm.$options = Object.create(vm.constructor.options));\n    // doing this because it's faster than dynamic enumeration.\n    var parentVnode = options._parentVnode;\n    opts.parent = options.parent;\n    opts._parentVnode = parentVnode;\n    var vnodeComponentOptions = parentVnode.componentOptions;\n    opts.propsData = vnodeComponentOptions.propsData;\n    opts._parentListeners = vnodeComponentOptions.listeners;\n    opts._renderChildren = vnodeComponentOptions.children;\n    opts._componentTag = vnodeComponentOptions.tag;\n    if (options.render) {\n        opts.render = options.render;\n        opts.staticRenderFns = options.staticRenderFns;\n    }\n}\nfunction resolveConstructorOptions(Ctor) {\n    var options = Ctor.options;\n    if (Ctor.super) {\n        var superOptions = resolveConstructorOptions(Ctor.super);\n        var cachedSuperOptions = Ctor.superOptions;\n        if (superOptions !== cachedSuperOptions) {\n            // super option changed,\n            // need to resolve new options.\n            Ctor.superOptions = superOptions;\n            // check if there are any late-modified/attached options (#4976)\n            var modifiedOptions = resolveModifiedOptions(Ctor);\n            // update base extend options\n            if (modifiedOptions) {\n                extend(Ctor.extendOptions, modifiedOptions);\n            }\n            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n            if (options.name) {\n                options.components[options.name] = Ctor;\n            }\n        }\n    }\n    return options;\n}\nfunction resolveModifiedOptions(Ctor) {\n    var modified;\n    var latest = Ctor.options;\n    var sealed = Ctor.sealedOptions;\n    for (var key in latest) {\n        if (latest[key] !== sealed[key]) {\n            if (!modified)\n                modified = {};\n            modified[key] = latest[key];\n        }\n    }\n    return modified;\n}\n\nfunction Vue(options) {\n    if (process.env.NODE_ENV !== 'production' && !(this instanceof Vue)) {\n        warn('Vue is a constructor and should be called with the `new` keyword');\n    }\n    this._init(options);\n}\n//@ts-expect-error Vue has function type\ninitMixin$1(Vue);\n//@ts-expect-error Vue has function type\nstateMixin(Vue);\n//@ts-expect-error Vue has function type\neventsMixin(Vue);\n//@ts-expect-error Vue has function type\nlifecycleMixin(Vue);\n//@ts-expect-error Vue has function type\nrenderMixin(Vue);\n\nfunction initUse(Vue) {\n    Vue.use = function (plugin) {\n        var installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n        if (installedPlugins.indexOf(plugin) > -1) {\n            return this;\n        }\n        // additional parameters\n        var args = toArray(arguments, 1);\n        args.unshift(this);\n        if (isFunction(plugin.install)) {\n            plugin.install.apply(plugin, args);\n        }\n        else if (isFunction(plugin)) {\n            plugin.apply(null, args);\n        }\n        installedPlugins.push(plugin);\n        return this;\n    };\n}\n\nfunction initMixin(Vue) {\n    Vue.mixin = function (mixin) {\n        this.options = mergeOptions(this.options, mixin);\n        return this;\n    };\n}\n\nfunction initExtend(Vue) {\n    /**\n     * Each instance constructor, including Vue, has a unique\n     * cid. This enables us to create wrapped \"child\n     * constructors\" for prototypal inheritance and cache them.\n     */\n    Vue.cid = 0;\n    var cid = 1;\n    /**\n     * Class inheritance\n     */\n    Vue.extend = function (extendOptions) {\n        extendOptions = extendOptions || {};\n        var Super = this;\n        var SuperId = Super.cid;\n        var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n        if (cachedCtors[SuperId]) {\n            return cachedCtors[SuperId];\n        }\n        var name = getComponentName(extendOptions) || getComponentName(Super.options);\n        if (process.env.NODE_ENV !== 'production' && name) {\n            validateComponentName(name);\n        }\n        var Sub = function VueComponent(options) {\n            this._init(options);\n        };\n        Sub.prototype = Object.create(Super.prototype);\n        Sub.prototype.constructor = Sub;\n        Sub.cid = cid++;\n        Sub.options = mergeOptions(Super.options, extendOptions);\n        Sub['super'] = Super;\n        // For props and computed properties, we define the proxy getters on\n        // the Vue instances at extension time, on the extended prototype. This\n        // avoids Object.defineProperty calls for each instance created.\n        if (Sub.options.props) {\n            initProps(Sub);\n        }\n        if (Sub.options.computed) {\n            initComputed(Sub);\n        }\n        // allow further extension/mixin/plugin usage\n        Sub.extend = Super.extend;\n        Sub.mixin = Super.mixin;\n        Sub.use = Super.use;\n        // create asset registers, so extended classes\n        // can have their private assets too.\n        ASSET_TYPES.forEach(function (type) {\n            Sub[type] = Super[type];\n        });\n        // enable recursive self-lookup\n        if (name) {\n            Sub.options.components[name] = Sub;\n        }\n        // keep a reference to the super options at extension time.\n        // later at instantiation we can check if Super's options have\n        // been updated.\n        Sub.superOptions = Super.options;\n        Sub.extendOptions = extendOptions;\n        Sub.sealedOptions = extend({}, Sub.options);\n        // cache constructor\n        cachedCtors[SuperId] = Sub;\n        return Sub;\n    };\n}\nfunction initProps(Comp) {\n    var props = Comp.options.props;\n    for (var key in props) {\n        proxy(Comp.prototype, \"_props\", key);\n    }\n}\nfunction initComputed(Comp) {\n    var computed = Comp.options.computed;\n    for (var key in computed) {\n        defineComputed(Comp.prototype, key, computed[key]);\n    }\n}\n\nfunction initAssetRegisters(Vue) {\n    /**\n     * Create asset registration methods.\n     */\n    ASSET_TYPES.forEach(function (type) {\n        // @ts-expect-error function is not exact same type\n        Vue[type] = function (id, definition) {\n            if (!definition) {\n                return this.options[type + 's'][id];\n            }\n            else {\n                /* istanbul ignore if */\n                if (process.env.NODE_ENV !== 'production' && type === 'component') {\n                    validateComponentName(id);\n                }\n                if (type === 'component' && isPlainObject(definition)) {\n                    // @ts-expect-error\n                    definition.name = definition.name || id;\n                    definition = this.options._base.extend(definition);\n                }\n                if (type === 'directive' && isFunction(definition)) {\n                    definition = { bind: definition, update: definition };\n                }\n                this.options[type + 's'][id] = definition;\n                return definition;\n            }\n        };\n    });\n}\n\nfunction _getComponentName(opts) {\n    return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n}\nfunction matches(pattern, name) {\n    if (isArray(pattern)) {\n        return pattern.indexOf(name) > -1;\n    }\n    else if (typeof pattern === 'string') {\n        return pattern.split(',').indexOf(name) > -1;\n    }\n    else if (isRegExp(pattern)) {\n        return pattern.test(name);\n    }\n    /* istanbul ignore next */\n    return false;\n}\nfunction pruneCache(keepAliveInstance, filter) {\n    var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode, $vnode = keepAliveInstance.$vnode;\n    for (var key in cache) {\n        var entry = cache[key];\n        if (entry) {\n            var name_1 = entry.name;\n            if (name_1 && !filter(name_1)) {\n                pruneCacheEntry(cache, key, keys, _vnode);\n            }\n        }\n    }\n    $vnode.componentOptions.children = undefined;\n}\nfunction pruneCacheEntry(cache, key, keys, current) {\n    var entry = cache[key];\n    if (entry && (!current || entry.tag !== current.tag)) {\n        // @ts-expect-error can be undefined\n        entry.componentInstance.$destroy();\n    }\n    cache[key] = null;\n    remove$2(keys, key);\n}\nvar patternTypes = [String, RegExp, Array];\n// TODO defineComponent\nvar KeepAlive = {\n    name: 'keep-alive',\n    abstract: true,\n    props: {\n        include: patternTypes,\n        exclude: patternTypes,\n        max: [String, Number]\n    },\n    methods: {\n        cacheVNode: function () {\n            var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;\n            if (vnodeToCache) {\n                var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;\n                cache[keyToCache] = {\n                    name: _getComponentName(componentOptions),\n                    tag: tag,\n                    componentInstance: componentInstance\n                };\n                keys.push(keyToCache);\n                // prune oldest entry\n                if (this.max && keys.length > parseInt(this.max)) {\n                    pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                }\n                this.vnodeToCache = null;\n            }\n        }\n    },\n    created: function () {\n        this.cache = Object.create(null);\n        this.keys = [];\n    },\n    destroyed: function () {\n        for (var key in this.cache) {\n            pruneCacheEntry(this.cache, key, this.keys);\n        }\n    },\n    mounted: function () {\n        var _this = this;\n        this.cacheVNode();\n        this.$watch('include', function (val) {\n            pruneCache(_this, function (name) { return matches(val, name); });\n        });\n        this.$watch('exclude', function (val) {\n            pruneCache(_this, function (name) { return !matches(val, name); });\n        });\n    },\n    updated: function () {\n        this.cacheVNode();\n    },\n    render: function () {\n        var slot = this.$slots.default;\n        var vnode = getFirstComponentChild(slot);\n        var componentOptions = vnode && vnode.componentOptions;\n        if (componentOptions) {\n            // check pattern\n            var name_2 = _getComponentName(componentOptions);\n            var _a = this, include = _a.include, exclude = _a.exclude;\n            if (\n            // not included\n            (include && (!name_2 || !matches(include, name_2))) ||\n                // excluded\n                (exclude && name_2 && matches(exclude, name_2))) {\n                return vnode;\n            }\n            var _b = this, cache = _b.cache, keys = _b.keys;\n            var key = vnode.key == null\n                ? // same constructor may get registered as different local components\n                    // so cid alone is not enough (#3269)\n                    componentOptions.Ctor.cid +\n                        (componentOptions.tag ? \"::\".concat(componentOptions.tag) : '')\n                : vnode.key;\n            if (cache[key]) {\n                vnode.componentInstance = cache[key].componentInstance;\n                // make current key freshest\n                remove$2(keys, key);\n                keys.push(key);\n            }\n            else {\n                // delay setting the cache until update\n                this.vnodeToCache = vnode;\n                this.keyToCache = key;\n            }\n            // @ts-expect-error can vnode.data can be undefined\n            vnode.data.keepAlive = true;\n        }\n        return vnode || (slot && slot[0]);\n    }\n};\n\nvar builtInComponents = {\n    KeepAlive: KeepAlive\n};\n\nfunction initGlobalAPI(Vue) {\n    // config\n    var configDef = {};\n    configDef.get = function () { return config; };\n    if (process.env.NODE_ENV !== 'production') {\n        configDef.set = function () {\n            warn('Do not replace the Vue.config object, set individual fields instead.');\n        };\n    }\n    Object.defineProperty(Vue, 'config', configDef);\n    // exposed util methods.\n    // NOTE: these are not considered part of the public API - avoid relying on\n    // them unless you are aware of the risk.\n    Vue.util = {\n        warn: warn,\n        extend: extend,\n        mergeOptions: mergeOptions,\n        defineReactive: defineReactive\n    };\n    Vue.set = set;\n    Vue.delete = del;\n    Vue.nextTick = nextTick;\n    // 2.6 explicit observable API\n    Vue.observable = function (obj) {\n        observe(obj);\n        return obj;\n    };\n    Vue.options = Object.create(null);\n    ASSET_TYPES.forEach(function (type) {\n        Vue.options[type + 's'] = Object.create(null);\n    });\n    // this is used to identify the \"base\" constructor to extend all plain-object\n    // components with in Weex's multi-instance scenarios.\n    Vue.options._base = Vue;\n    extend(Vue.options.components, builtInComponents);\n    initUse(Vue);\n    initMixin(Vue);\n    initExtend(Vue);\n    initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\nObject.defineProperty(Vue.prototype, '$isServer', {\n    get: isServerRendering\n});\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n    get: function () {\n        /* istanbul ignore next */\n        return this.$vnode && this.$vnode.ssrContext;\n    }\n});\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n    value: FunctionalRenderContext\n});\nVue.version = version;\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n        (attr === 'selected' && tag === 'option') ||\n        (attr === 'checked' && tag === 'input') ||\n        (attr === 'muted' && tag === 'video'));\n};\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\nvar isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\nvar convertEnumeratedValue = function (key, value) {\n    return isFalsyAttrValue(value) || value === 'false'\n        ? 'false'\n        : // allow arbitrary string value for contenteditable\n            key === 'contenteditable' && isValidContentEditableValue(value)\n                ? value\n                : 'true';\n};\nvar isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n    'required,reversed,scoped,seamless,selected,sortable,' +\n    'truespeed,typemustmatch,visible');\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\nvar isXlink = function (name) {\n    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n};\nvar getXlinkProp = function (name) {\n    return isXlink(name) ? name.slice(6, name.length) : '';\n};\nvar isFalsyAttrValue = function (val) {\n    return val == null || val === false;\n};\n\nfunction genClassForVnode(vnode) {\n    var data = vnode.data;\n    var parentNode = vnode;\n    var childNode = vnode;\n    while (isDef(childNode.componentInstance)) {\n        childNode = childNode.componentInstance._vnode;\n        if (childNode && childNode.data) {\n            data = mergeClassData(childNode.data, data);\n        }\n    }\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while (isDef((parentNode = parentNode.parent))) {\n        if (parentNode && parentNode.data) {\n            data = mergeClassData(data, parentNode.data);\n        }\n    }\n    return renderClass(data.staticClass, data.class);\n}\nfunction mergeClassData(child, parent) {\n    return {\n        staticClass: concat(child.staticClass, parent.staticClass),\n        class: isDef(child.class) ? [child.class, parent.class] : parent.class\n    };\n}\nfunction renderClass(staticClass, dynamicClass) {\n    if (isDef(staticClass) || isDef(dynamicClass)) {\n        return concat(staticClass, stringifyClass(dynamicClass));\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction concat(a, b) {\n    return a ? (b ? a + ' ' + b : a) : b || '';\n}\nfunction stringifyClass(value) {\n    if (Array.isArray(value)) {\n        return stringifyArray(value);\n    }\n    if (isObject(value)) {\n        return stringifyObject(value);\n    }\n    if (typeof value === 'string') {\n        return value;\n    }\n    /* istanbul ignore next */\n    return '';\n}\nfunction stringifyArray(value) {\n    var res = '';\n    var stringified;\n    for (var i = 0, l = value.length; i < l; i++) {\n        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n            if (res)\n                res += ' ';\n            res += stringified;\n        }\n    }\n    return res;\n}\nfunction stringifyObject(value) {\n    var res = '';\n    for (var key in value) {\n        if (value[key]) {\n            if (res)\n                res += ' ';\n            res += key;\n        }\n    }\n    return res;\n}\n\nvar namespaceMap = {\n    svg: 'http://www.w3.org/2000/svg',\n    math: 'http://www.w3.org/1998/Math/MathML'\n};\nvar isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n    'embed,object,param,source,canvas,script,noscript,del,ins,' +\n    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n    'output,progress,select,textarea,' +\n    'details,dialog,menu,menuitem,summary,' +\n    'content,element,shadow,template,blockquote,iframe,tfoot');\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\nvar isReservedTag = function (tag) {\n    return isHTMLTag(tag) || isSVG(tag);\n};\nfunction getTagNamespace(tag) {\n    if (isSVG(tag)) {\n        return 'svg';\n    }\n    // basic support for MathML\n    // note it doesn't support other MathML elements being component roots\n    if (tag === 'math') {\n        return 'math';\n    }\n}\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement(tag) {\n    /* istanbul ignore if */\n    if (!inBrowser) {\n        return true;\n    }\n    if (isReservedTag(tag)) {\n        return false;\n    }\n    tag = tag.toLowerCase();\n    /* istanbul ignore if */\n    if (unknownElementCache[tag] != null) {\n        return unknownElementCache[tag];\n    }\n    var el = document.createElement(tag);\n    if (tag.indexOf('-') > -1) {\n        // https://stackoverflow.com/a/28210364/1070244\n        return (unknownElementCache[tag] =\n            el.constructor === window.HTMLUnknownElement ||\n                el.constructor === window.HTMLElement);\n    }\n    else {\n        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n    }\n}\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query(el) {\n    if (typeof el === 'string') {\n        var selected = document.querySelector(el);\n        if (!selected) {\n            process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n            return document.createElement('div');\n        }\n        return selected;\n    }\n    else {\n        return el;\n    }\n}\n\nfunction createElement(tagName, vnode) {\n    var elm = document.createElement(tagName);\n    if (tagName !== 'select') {\n        return elm;\n    }\n    // false or null will remove the attribute but undefined will not\n    if (vnode.data &&\n        vnode.data.attrs &&\n        vnode.data.attrs.multiple !== undefined) {\n        elm.setAttribute('multiple', 'multiple');\n    }\n    return elm;\n}\nfunction createElementNS(namespace, tagName) {\n    return document.createElementNS(namespaceMap[namespace], tagName);\n}\nfunction createTextNode(text) {\n    return document.createTextNode(text);\n}\nfunction createComment(text) {\n    return document.createComment(text);\n}\nfunction insertBefore(parentNode, newNode, referenceNode) {\n    parentNode.insertBefore(newNode, referenceNode);\n}\nfunction removeChild(node, child) {\n    node.removeChild(child);\n}\nfunction appendChild(node, child) {\n    node.appendChild(child);\n}\nfunction parentNode(node) {\n    return node.parentNode;\n}\nfunction nextSibling(node) {\n    return node.nextSibling;\n}\nfunction tagName(node) {\n    return node.tagName;\n}\nfunction setTextContent(node, text) {\n    node.textContent = text;\n}\nfunction setStyleScope(node, scopeId) {\n    node.setAttribute(scopeId, '');\n}\n\nvar nodeOps = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createElement: createElement,\n  createElementNS: createElementNS,\n  createTextNode: createTextNode,\n  createComment: createComment,\n  insertBefore: insertBefore,\n  removeChild: removeChild,\n  appendChild: appendChild,\n  parentNode: parentNode,\n  nextSibling: nextSibling,\n  tagName: tagName,\n  setTextContent: setTextContent,\n  setStyleScope: setStyleScope\n});\n\nvar ref = {\n    create: function (_, vnode) {\n        registerRef(vnode);\n    },\n    update: function (oldVnode, vnode) {\n        if (oldVnode.data.ref !== vnode.data.ref) {\n            registerRef(oldVnode, true);\n            registerRef(vnode);\n        }\n    },\n    destroy: function (vnode) {\n        registerRef(vnode, true);\n    }\n};\nfunction registerRef(vnode, isRemoval) {\n    var ref = vnode.data.ref;\n    if (!isDef(ref))\n        return;\n    var vm = vnode.context;\n    var refValue = vnode.componentInstance || vnode.elm;\n    var value = isRemoval ? null : refValue;\n    var $refsValue = isRemoval ? undefined : refValue;\n    if (isFunction(ref)) {\n        invokeWithErrorHandling(ref, vm, [value], vm, \"template ref function\");\n        return;\n    }\n    var isFor = vnode.data.refInFor;\n    var _isString = typeof ref === 'string' || typeof ref === 'number';\n    var _isRef = isRef(ref);\n    var refs = vm.$refs;\n    if (_isString || _isRef) {\n        if (isFor) {\n            var existing = _isString ? refs[ref] : ref.value;\n            if (isRemoval) {\n                isArray(existing) && remove$2(existing, refValue);\n            }\n            else {\n                if (!isArray(existing)) {\n                    if (_isString) {\n                        refs[ref] = [refValue];\n                        setSetupRef(vm, ref, refs[ref]);\n                    }\n                    else {\n                        ref.value = [refValue];\n                    }\n                }\n                else if (!existing.includes(refValue)) {\n                    existing.push(refValue);\n                }\n            }\n        }\n        else if (_isString) {\n            if (isRemoval && refs[ref] !== refValue) {\n                return;\n            }\n            refs[ref] = $refsValue;\n            setSetupRef(vm, ref, value);\n        }\n        else if (_isRef) {\n            if (isRemoval && ref.value !== refValue) {\n                return;\n            }\n            ref.value = value;\n        }\n        else if (process.env.NODE_ENV !== 'production') {\n            warn(\"Invalid template ref type: \".concat(typeof ref));\n        }\n    }\n}\nfunction setSetupRef(_a, key, val) {\n    var _setupState = _a._setupState;\n    if (_setupState && hasOwn(_setupState, key)) {\n        if (isRef(_setupState[key])) {\n            _setupState[key].value = val;\n        }\n        else {\n            _setupState[key] = val;\n        }\n    }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\nvar emptyNode = new VNode('', {}, []);\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\nfunction sameVnode(a, b) {\n    return (a.key === b.key &&\n        a.asyncFactory === b.asyncFactory &&\n        ((a.tag === b.tag &&\n            a.isComment === b.isComment &&\n            isDef(a.data) === isDef(b.data) &&\n            sameInputType(a, b)) ||\n            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n}\nfunction sameInputType(a, b) {\n    if (a.tag !== 'input')\n        return true;\n    var i;\n    var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n    var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n    var i, key;\n    var map = {};\n    for (i = beginIdx; i <= endIdx; ++i) {\n        key = children[i].key;\n        if (isDef(key))\n            map[key] = i;\n    }\n    return map;\n}\nfunction createPatchFunction(backend) {\n    var i, j;\n    var cbs = {};\n    var modules = backend.modules, nodeOps = backend.nodeOps;\n    for (i = 0; i < hooks.length; ++i) {\n        cbs[hooks[i]] = [];\n        for (j = 0; j < modules.length; ++j) {\n            if (isDef(modules[j][hooks[i]])) {\n                cbs[hooks[i]].push(modules[j][hooks[i]]);\n            }\n        }\n    }\n    function emptyNodeAt(elm) {\n        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n    }\n    function createRmCb(childElm, listeners) {\n        function remove() {\n            if (--remove.listeners === 0) {\n                removeNode(childElm);\n            }\n        }\n        remove.listeners = listeners;\n        return remove;\n    }\n    function removeNode(el) {\n        var parent = nodeOps.parentNode(el);\n        // element may have already been removed due to v-html / v-text\n        if (isDef(parent)) {\n            nodeOps.removeChild(parent, el);\n        }\n    }\n    function isUnknownElement(vnode, inVPre) {\n        return (!inVPre &&\n            !vnode.ns &&\n            !(config.ignoredElements.length &&\n                config.ignoredElements.some(function (ignore) {\n                    return isRegExp(ignore)\n                        ? ignore.test(vnode.tag)\n                        : ignore === vnode.tag;\n                })) &&\n            config.isUnknownElement(vnode.tag));\n    }\n    var creatingElmInVPre = 0;\n    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // This vnode was used in a previous render!\n            // now it's used as a new node, overwriting its elm would cause\n            // potential patch errors down the road when it's used as an insertion\n            // reference node. Instead, we clone the node on-demand before creating\n            // associated DOM element for it.\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        vnode.isRootInsert = !nested; // for transition enter check\n        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n            return;\n        }\n        var data = vnode.data;\n        var children = vnode.children;\n        var tag = vnode.tag;\n        if (isDef(tag)) {\n            if (process.env.NODE_ENV !== 'production') {\n                if (data && data.pre) {\n                    creatingElmInVPre++;\n                }\n                if (isUnknownElement(vnode, creatingElmInVPre)) {\n                    warn('Unknown custom element: <' +\n                        tag +\n                        '> - did you ' +\n                        'register the component correctly? For recursive components, ' +\n                        'make sure to provide the \"name\" option.', vnode.context);\n                }\n            }\n            vnode.elm = vnode.ns\n                ? nodeOps.createElementNS(vnode.ns, tag)\n                : nodeOps.createElement(tag, vnode);\n            setScope(vnode);\n            createChildren(vnode, children, insertedVnodeQueue);\n            if (isDef(data)) {\n                invokeCreateHooks(vnode, insertedVnodeQueue);\n            }\n            insert(parentElm, vnode.elm, refElm);\n            if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n                creatingElmInVPre--;\n            }\n        }\n        else if (isTrue(vnode.isComment)) {\n            vnode.elm = nodeOps.createComment(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n        else {\n            vnode.elm = nodeOps.createTextNode(vnode.text);\n            insert(parentElm, vnode.elm, refElm);\n        }\n    }\n    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        var i = vnode.data;\n        if (isDef(i)) {\n            var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n            if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                i(vnode, false /* hydrating */);\n            }\n            // after calling the init hook, if the vnode is a child component\n            // it should've created a child instance and mounted it. the child\n            // component also has set the placeholder vnode's elm.\n            // in that case we can just return the element and be done.\n            if (isDef(vnode.componentInstance)) {\n                initComponent(vnode, insertedVnodeQueue);\n                insert(parentElm, vnode.elm, refElm);\n                if (isTrue(isReactivated)) {\n                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                }\n                return true;\n            }\n        }\n    }\n    function initComponent(vnode, insertedVnodeQueue) {\n        if (isDef(vnode.data.pendingInsert)) {\n            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n            vnode.data.pendingInsert = null;\n        }\n        vnode.elm = vnode.componentInstance.$el;\n        if (isPatchable(vnode)) {\n            invokeCreateHooks(vnode, insertedVnodeQueue);\n            setScope(vnode);\n        }\n        else {\n            // empty component root.\n            // skip all element-related modules except for ref (#3455)\n            registerRef(vnode);\n            // make sure to invoke the insert hook\n            insertedVnodeQueue.push(vnode);\n        }\n    }\n    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n        var i;\n        // hack for #4339: a reactivated component with inner transition\n        // does not trigger because the inner node's created hooks are not called\n        // again. It's not ideal to involve module-specific logic in here but\n        // there doesn't seem to be a better way to do it.\n        var innerNode = vnode;\n        while (innerNode.componentInstance) {\n            innerNode = innerNode.componentInstance._vnode;\n            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                for (i = 0; i < cbs.activate.length; ++i) {\n                    cbs.activate[i](emptyNode, innerNode);\n                }\n                insertedVnodeQueue.push(innerNode);\n                break;\n            }\n        }\n        // unlike a newly created component,\n        // a reactivated keep-alive component doesn't insert itself\n        insert(parentElm, vnode.elm, refElm);\n    }\n    function insert(parent, elm, ref) {\n        if (isDef(parent)) {\n            if (isDef(ref)) {\n                if (nodeOps.parentNode(ref) === parent) {\n                    nodeOps.insertBefore(parent, elm, ref);\n                }\n            }\n            else {\n                nodeOps.appendChild(parent, elm);\n            }\n        }\n    }\n    function createChildren(vnode, children, insertedVnodeQueue) {\n        if (isArray(children)) {\n            if (process.env.NODE_ENV !== 'production') {\n                checkDuplicateKeys(children);\n            }\n            for (var i_1 = 0; i_1 < children.length; ++i_1) {\n                createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);\n            }\n        }\n        else if (isPrimitive(vnode.text)) {\n            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n        }\n    }\n    function isPatchable(vnode) {\n        while (vnode.componentInstance) {\n            vnode = vnode.componentInstance._vnode;\n        }\n        return isDef(vnode.tag);\n    }\n    function invokeCreateHooks(vnode, insertedVnodeQueue) {\n        for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {\n            cbs.create[i_2](emptyNode, vnode);\n        }\n        i = vnode.data.hook; // Reuse variable\n        if (isDef(i)) {\n            if (isDef(i.create))\n                i.create(emptyNode, vnode);\n            if (isDef(i.insert))\n                insertedVnodeQueue.push(vnode);\n        }\n    }\n    // set scope id attribute for scoped CSS.\n    // this is implemented as a special case to avoid the overhead\n    // of going through the normal attribute patching process.\n    function setScope(vnode) {\n        var i;\n        if (isDef((i = vnode.fnScopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n        else {\n            var ancestor = vnode;\n            while (ancestor) {\n                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                    nodeOps.setStyleScope(vnode.elm, i);\n                }\n                ancestor = ancestor.parent;\n            }\n        }\n        // for slot content they should also get the scopeId from the host instance.\n        if (isDef((i = activeInstance)) &&\n            i !== vnode.context &&\n            i !== vnode.fnContext &&\n            isDef((i = i.$options._scopeId))) {\n            nodeOps.setStyleScope(vnode.elm, i);\n        }\n    }\n    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n        }\n    }\n    function invokeDestroyHook(vnode) {\n        var i, j;\n        var data = vnode.data;\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                i(vnode);\n            for (i = 0; i < cbs.destroy.length; ++i)\n                cbs.destroy[i](vnode);\n        }\n        if (isDef((i = vnode.children))) {\n            for (j = 0; j < vnode.children.length; ++j) {\n                invokeDestroyHook(vnode.children[j]);\n            }\n        }\n    }\n    function removeVnodes(vnodes, startIdx, endIdx) {\n        for (; startIdx <= endIdx; ++startIdx) {\n            var ch = vnodes[startIdx];\n            if (isDef(ch)) {\n                if (isDef(ch.tag)) {\n                    removeAndInvokeRemoveHook(ch);\n                    invokeDestroyHook(ch);\n                }\n                else {\n                    // Text node\n                    removeNode(ch.elm);\n                }\n            }\n        }\n    }\n    function removeAndInvokeRemoveHook(vnode, rm) {\n        if (isDef(rm) || isDef(vnode.data)) {\n            var i_3;\n            var listeners = cbs.remove.length + 1;\n            if (isDef(rm)) {\n                // we have a recursively passed down rm callback\n                // increase the listeners count\n                rm.listeners += listeners;\n            }\n            else {\n                // directly removing\n                rm = createRmCb(vnode.elm, listeners);\n            }\n            // recursively invoke hooks on child component root node\n            if (isDef((i_3 = vnode.componentInstance)) &&\n                isDef((i_3 = i_3._vnode)) &&\n                isDef(i_3.data)) {\n                removeAndInvokeRemoveHook(i_3, rm);\n            }\n            for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {\n                cbs.remove[i_3](vnode, rm);\n            }\n            if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {\n                i_3(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n        else {\n            removeNode(vnode.elm);\n        }\n    }\n    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n        var oldStartIdx = 0;\n        var newStartIdx = 0;\n        var oldEndIdx = oldCh.length - 1;\n        var oldStartVnode = oldCh[0];\n        var oldEndVnode = oldCh[oldEndIdx];\n        var newEndIdx = newCh.length - 1;\n        var newStartVnode = newCh[0];\n        var newEndVnode = newCh[newEndIdx];\n        var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n        // removeOnly is a special flag used only by <transition-group>\n        // to ensure removed elements stay in correct relative positions\n        // during leaving transitions\n        var canMove = !removeOnly;\n        if (process.env.NODE_ENV !== 'production') {\n            checkDuplicateKeys(newCh);\n        }\n        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n            if (isUndef(oldStartVnode)) {\n                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n            }\n            else if (isUndef(oldEndVnode)) {\n                oldEndVnode = oldCh[--oldEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newStartVnode)) {\n                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                oldStartVnode = oldCh[++oldStartIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else if (sameVnode(oldEndVnode, newEndVnode)) {\n                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldStartVnode, newEndVnode)) {\n                // Vnode moved right\n                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                oldStartVnode = oldCh[++oldStartIdx];\n                newEndVnode = newCh[--newEndIdx];\n            }\n            else if (sameVnode(oldEndVnode, newStartVnode)) {\n                // Vnode moved left\n                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                canMove &&\n                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                oldEndVnode = oldCh[--oldEndIdx];\n                newStartVnode = newCh[++newStartIdx];\n            }\n            else {\n                if (isUndef(oldKeyToIdx))\n                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                idxInOld = isDef(newStartVnode.key)\n                    ? oldKeyToIdx[newStartVnode.key]\n                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                if (isUndef(idxInOld)) {\n                    // New element\n                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                }\n                else {\n                    vnodeToMove = oldCh[idxInOld];\n                    if (sameVnode(vnodeToMove, newStartVnode)) {\n                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                        oldCh[idxInOld] = undefined;\n                        canMove &&\n                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                    }\n                    else {\n                        // same key but different element. treat as new element\n                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                    }\n                }\n                newStartVnode = newCh[++newStartIdx];\n            }\n        }\n        if (oldStartIdx > oldEndIdx) {\n            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n        }\n        else if (newStartIdx > newEndIdx) {\n            removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n        }\n    }\n    function checkDuplicateKeys(children) {\n        var seenKeys = {};\n        for (var i_4 = 0; i_4 < children.length; i_4++) {\n            var vnode = children[i_4];\n            var key = vnode.key;\n            if (isDef(key)) {\n                if (seenKeys[key]) {\n                    warn(\"Duplicate keys detected: '\".concat(key, \"'. This may cause an update error.\"), vnode.context);\n                }\n                else {\n                    seenKeys[key] = true;\n                }\n            }\n        }\n    }\n    function findIdxInOld(node, oldCh, start, end) {\n        for (var i_5 = start; i_5 < end; i_5++) {\n            var c = oldCh[i_5];\n            if (isDef(c) && sameVnode(node, c))\n                return i_5;\n        }\n    }\n    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n        if (oldVnode === vnode) {\n            return;\n        }\n        if (isDef(vnode.elm) && isDef(ownerArray)) {\n            // clone reused vnode\n            vnode = ownerArray[index] = cloneVNode(vnode);\n        }\n        var elm = (vnode.elm = oldVnode.elm);\n        if (isTrue(oldVnode.isAsyncPlaceholder)) {\n            if (isDef(vnode.asyncFactory.resolved)) {\n                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n            }\n            else {\n                vnode.isAsyncPlaceholder = true;\n            }\n            return;\n        }\n        // reuse element for static trees.\n        // note we only do this if the vnode is cloned -\n        // if the new node is not cloned it means the render functions have been\n        // reset by the hot-reload-api and we need to do a proper re-render.\n        if (isTrue(vnode.isStatic) &&\n            isTrue(oldVnode.isStatic) &&\n            vnode.key === oldVnode.key &&\n            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n            vnode.componentInstance = oldVnode.componentInstance;\n            return;\n        }\n        var i;\n        var data = vnode.data;\n        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n            i(oldVnode, vnode);\n        }\n        var oldCh = oldVnode.children;\n        var ch = vnode.children;\n        if (isDef(data) && isPatchable(vnode)) {\n            for (i = 0; i < cbs.update.length; ++i)\n                cbs.update[i](oldVnode, vnode);\n            if (isDef((i = data.hook)) && isDef((i = i.update)))\n                i(oldVnode, vnode);\n        }\n        if (isUndef(vnode.text)) {\n            if (isDef(oldCh) && isDef(ch)) {\n                if (oldCh !== ch)\n                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n            }\n            else if (isDef(ch)) {\n                if (process.env.NODE_ENV !== 'production') {\n                    checkDuplicateKeys(ch);\n                }\n                if (isDef(oldVnode.text))\n                    nodeOps.setTextContent(elm, '');\n                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n            }\n            else if (isDef(oldCh)) {\n                removeVnodes(oldCh, 0, oldCh.length - 1);\n            }\n            else if (isDef(oldVnode.text)) {\n                nodeOps.setTextContent(elm, '');\n            }\n        }\n        else if (oldVnode.text !== vnode.text) {\n            nodeOps.setTextContent(elm, vnode.text);\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                i(oldVnode, vnode);\n        }\n    }\n    function invokeInsertHook(vnode, queue, initial) {\n        // delay insert hooks for component root nodes, invoke them after the\n        // element is really inserted\n        if (isTrue(initial) && isDef(vnode.parent)) {\n            vnode.parent.data.pendingInsert = queue;\n        }\n        else {\n            for (var i_6 = 0; i_6 < queue.length; ++i_6) {\n                queue[i_6].data.hook.insert(queue[i_6]);\n            }\n        }\n    }\n    var hydrationBailed = false;\n    // list of modules that can skip create hook during hydration because they\n    // are already rendered on the client or has no need for initialization\n    // Note: style is excluded because it relies on initial clone for future\n    // deep updates (#7063).\n    var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n    // Note: this is a browser-only function so we can assume elms are DOM nodes.\n    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n        var i;\n        var tag = vnode.tag, data = vnode.data, children = vnode.children;\n        inVPre = inVPre || (data && data.pre);\n        vnode.elm = elm;\n        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n            vnode.isAsyncPlaceholder = true;\n            return true;\n        }\n        // assert node match\n        if (process.env.NODE_ENV !== 'production') {\n            if (!assertNodeMatch(elm, vnode, inVPre)) {\n                return false;\n            }\n        }\n        if (isDef(data)) {\n            if (isDef((i = data.hook)) && isDef((i = i.init)))\n                i(vnode, true /* hydrating */);\n            if (isDef((i = vnode.componentInstance))) {\n                // child component. it should have hydrated its own tree.\n                initComponent(vnode, insertedVnodeQueue);\n                return true;\n            }\n        }\n        if (isDef(tag)) {\n            if (isDef(children)) {\n                // empty element, allow client to pick up and populate children\n                if (!elm.hasChildNodes()) {\n                    createChildren(vnode, children, insertedVnodeQueue);\n                }\n                else {\n                    // v-html and domProps: innerHTML\n                    if (isDef((i = data)) &&\n                        isDef((i = i.domProps)) &&\n                        isDef((i = i.innerHTML))) {\n                        if (i !== elm.innerHTML) {\n                            /* istanbul ignore if */\n                            if (process.env.NODE_ENV !== 'production' &&\n                                typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('server innerHTML: ', i);\n                                console.warn('client innerHTML: ', elm.innerHTML);\n                            }\n                            return false;\n                        }\n                    }\n                    else {\n                        // iterate and compare children lists\n                        var childrenMatch = true;\n                        var childNode = elm.firstChild;\n                        for (var i_7 = 0; i_7 < children.length; i_7++) {\n                            if (!childNode ||\n                                !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {\n                                childrenMatch = false;\n                                break;\n                            }\n                            childNode = childNode.nextSibling;\n                        }\n                        // if childNode is not null, it means the actual childNodes list is\n                        // longer than the virtual children list.\n                        if (!childrenMatch || childNode) {\n                            /* istanbul ignore if */\n                            if (process.env.NODE_ENV !== 'production' &&\n                                typeof console !== 'undefined' &&\n                                !hydrationBailed) {\n                                hydrationBailed = true;\n                                console.warn('Parent: ', elm);\n                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                            }\n                            return false;\n                        }\n                    }\n                }\n            }\n            if (isDef(data)) {\n                var fullInvoke = false;\n                for (var key in data) {\n                    if (!isRenderedModule(key)) {\n                        fullInvoke = true;\n                        invokeCreateHooks(vnode, insertedVnodeQueue);\n                        break;\n                    }\n                }\n                if (!fullInvoke && data['class']) {\n                    // ensure collecting deps for deep class bindings for future updates\n                    traverse(data['class']);\n                }\n            }\n        }\n        else if (elm.data !== vnode.text) {\n            elm.data = vnode.text;\n        }\n        return true;\n    }\n    function assertNodeMatch(node, vnode, inVPre) {\n        if (isDef(vnode.tag)) {\n            return (vnode.tag.indexOf('vue-component') === 0 ||\n                (!isUnknownElement(vnode, inVPre) &&\n                    vnode.tag.toLowerCase() ===\n                        (node.tagName && node.tagName.toLowerCase())));\n        }\n        else {\n            return node.nodeType === (vnode.isComment ? 8 : 3);\n        }\n    }\n    return function patch(oldVnode, vnode, hydrating, removeOnly) {\n        if (isUndef(vnode)) {\n            if (isDef(oldVnode))\n                invokeDestroyHook(oldVnode);\n            return;\n        }\n        var isInitialPatch = false;\n        var insertedVnodeQueue = [];\n        if (isUndef(oldVnode)) {\n            // empty mount (likely as component), create new root element\n            isInitialPatch = true;\n            createElm(vnode, insertedVnodeQueue);\n        }\n        else {\n            var isRealElement = isDef(oldVnode.nodeType);\n            if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                // patch existing root node\n                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n            }\n            else {\n                if (isRealElement) {\n                    // mounting to a real element\n                    // check if this is server-rendered content and if we can perform\n                    // a successful hydration.\n                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                        oldVnode.removeAttribute(SSR_ATTR);\n                        hydrating = true;\n                    }\n                    if (isTrue(hydrating)) {\n                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                            invokeInsertHook(vnode, insertedVnodeQueue, true);\n                            return oldVnode;\n                        }\n                        else if (process.env.NODE_ENV !== 'production') {\n                            warn('The client-side rendered virtual DOM tree is not matching ' +\n                                'server-rendered content. This is likely caused by incorrect ' +\n                                'HTML markup, for example nesting block-level elements inside ' +\n                                '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                'full client-side render.');\n                        }\n                    }\n                    // either not server-rendered, or hydration failed.\n                    // create an empty node and replace it\n                    oldVnode = emptyNodeAt(oldVnode);\n                }\n                // replacing existing element\n                var oldElm = oldVnode.elm;\n                var parentElm = nodeOps.parentNode(oldElm);\n                // create new node\n                createElm(vnode, insertedVnodeQueue, \n                // extremely rare edge case: do not insert if old element is in a\n                // leaving transition. Only happens when combining transition +\n                // keep-alive + HOCs. (#4590)\n                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                // update parent placeholder node element, recursively\n                if (isDef(vnode.parent)) {\n                    var ancestor = vnode.parent;\n                    var patchable = isPatchable(vnode);\n                    while (ancestor) {\n                        for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {\n                            cbs.destroy[i_8](ancestor);\n                        }\n                        ancestor.elm = vnode.elm;\n                        if (patchable) {\n                            for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {\n                                cbs.create[i_9](emptyNode, ancestor);\n                            }\n                            // #6513\n                            // invoke insert hooks that may have been merged by create hooks.\n                            // e.g. for directives that uses the \"inserted\" hook.\n                            var insert_1 = ancestor.data.hook.insert;\n                            if (insert_1.merged) {\n                                // start at index 1 to avoid re-invoking component mounted hook\n                                // clone insert hooks to avoid being mutated during iteration.\n                                // e.g. for customed directives under transition group.\n                                var cloned = insert_1.fns.slice(1);\n                                for (var i_10 = 0; i_10 < cloned.length; i_10++) {\n                                    cloned[i_10]();\n                                }\n                            }\n                        }\n                        else {\n                            registerRef(ancestor);\n                        }\n                        ancestor = ancestor.parent;\n                    }\n                }\n                // destroy old node\n                if (isDef(parentElm)) {\n                    removeVnodes([oldVnode], 0, 0);\n                }\n                else if (isDef(oldVnode.tag)) {\n                    invokeDestroyHook(oldVnode);\n                }\n            }\n        }\n        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n        return vnode.elm;\n    };\n}\n\nvar directives = {\n    create: updateDirectives,\n    update: updateDirectives,\n    destroy: function unbindDirectives(vnode) {\n        // @ts-expect-error emptyNode is not VNodeWithData\n        updateDirectives(vnode, emptyNode);\n    }\n};\nfunction updateDirectives(oldVnode, vnode) {\n    if (oldVnode.data.directives || vnode.data.directives) {\n        _update(oldVnode, vnode);\n    }\n}\nfunction _update(oldVnode, vnode) {\n    var isCreate = oldVnode === emptyNode;\n    var isDestroy = vnode === emptyNode;\n    var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n    var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n    var dirsWithInsert = [];\n    var dirsWithPostpatch = [];\n    var key, oldDir, dir;\n    for (key in newDirs) {\n        oldDir = oldDirs[key];\n        dir = newDirs[key];\n        if (!oldDir) {\n            // new directive, bind\n            callHook(dir, 'bind', vnode, oldVnode);\n            if (dir.def && dir.def.inserted) {\n                dirsWithInsert.push(dir);\n            }\n        }\n        else {\n            // existing directive, update\n            dir.oldValue = oldDir.value;\n            dir.oldArg = oldDir.arg;\n            callHook(dir, 'update', vnode, oldVnode);\n            if (dir.def && dir.def.componentUpdated) {\n                dirsWithPostpatch.push(dir);\n            }\n        }\n    }\n    if (dirsWithInsert.length) {\n        var callInsert = function () {\n            for (var i = 0; i < dirsWithInsert.length; i++) {\n                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n            }\n        };\n        if (isCreate) {\n            mergeVNodeHook(vnode, 'insert', callInsert);\n        }\n        else {\n            callInsert();\n        }\n    }\n    if (dirsWithPostpatch.length) {\n        mergeVNodeHook(vnode, 'postpatch', function () {\n            for (var i = 0; i < dirsWithPostpatch.length; i++) {\n                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n            }\n        });\n    }\n    if (!isCreate) {\n        for (key in oldDirs) {\n            if (!newDirs[key]) {\n                // no longer present, unbind\n                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n            }\n        }\n    }\n}\nvar emptyModifiers = Object.create(null);\nfunction normalizeDirectives(dirs, vm) {\n    var res = Object.create(null);\n    if (!dirs) {\n        // $flow-disable-line\n        return res;\n    }\n    var i, dir;\n    for (i = 0; i < dirs.length; i++) {\n        dir = dirs[i];\n        if (!dir.modifiers) {\n            // $flow-disable-line\n            dir.modifiers = emptyModifiers;\n        }\n        res[getRawDirName(dir)] = dir;\n        if (vm._setupState && vm._setupState.__sfc) {\n            var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n            if (typeof setupDef === 'function') {\n                dir.def = {\n                    bind: setupDef,\n                    update: setupDef,\n                };\n            }\n            else {\n                dir.def = setupDef;\n            }\n        }\n        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n    }\n    // $flow-disable-line\n    return res;\n}\nfunction getRawDirName(dir) {\n    return (dir.rawName || \"\".concat(dir.name, \".\").concat(Object.keys(dir.modifiers || {}).join('.')));\n}\nfunction callHook(dir, hook, vnode, oldVnode, isDestroy) {\n    var fn = dir.def && dir.def[hook];\n    if (fn) {\n        try {\n            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n        }\n        catch (e) {\n            handleError(e, vnode.context, \"directive \".concat(dir.name, \" \").concat(hook, \" hook\"));\n        }\n    }\n}\n\nvar baseModules = [ref, directives];\n\nfunction updateAttrs(oldVnode, vnode) {\n    var opts = vnode.componentOptions;\n    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n        return;\n    }\n    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n        return;\n    }\n    var key, cur, old;\n    var elm = vnode.elm;\n    var oldAttrs = oldVnode.data.attrs || {};\n    var attrs = vnode.data.attrs || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n        attrs = vnode.data.attrs = extend({}, attrs);\n    }\n    for (key in attrs) {\n        cur = attrs[key];\n        old = oldAttrs[key];\n        if (old !== cur) {\n            setAttr(elm, key, cur, vnode.data.pre);\n        }\n    }\n    // #4391: in IE9, setting type can reset value for input[type=radio]\n    // #6666: IE/Edge forces progress value down to 1 before setting a max\n    /* istanbul ignore if */\n    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n        setAttr(elm, 'value', attrs.value);\n    }\n    for (key in oldAttrs) {\n        if (isUndef(attrs[key])) {\n            if (isXlink(key)) {\n                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n            }\n            else if (!isEnumeratedAttr(key)) {\n                elm.removeAttribute(key);\n            }\n        }\n    }\n}\nfunction setAttr(el, key, value, isInPre) {\n    if (isInPre || el.tagName.indexOf('-') > -1) {\n        baseSetAttr(el, key, value);\n    }\n    else if (isBooleanAttr(key)) {\n        // set attribute for blank value\n        // e.g. <option disabled>Select one</option>\n        if (isFalsyAttrValue(value)) {\n            el.removeAttribute(key);\n        }\n        else {\n            // technically allowfullscreen is a boolean attribute for <iframe>,\n            // but Flash expects a value of \"true\" when used on <embed> tag\n            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n            el.setAttribute(key, value);\n        }\n    }\n    else if (isEnumeratedAttr(key)) {\n        el.setAttribute(key, convertEnumeratedValue(key, value));\n    }\n    else if (isXlink(key)) {\n        if (isFalsyAttrValue(value)) {\n            el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n        }\n        else {\n            el.setAttributeNS(xlinkNS, key, value);\n        }\n    }\n    else {\n        baseSetAttr(el, key, value);\n    }\n}\nfunction baseSetAttr(el, key, value) {\n    if (isFalsyAttrValue(value)) {\n        el.removeAttribute(key);\n    }\n    else {\n        // #7138: IE10 & 11 fires input event when setting placeholder on\n        // <textarea>... block the first input event and remove the blocker\n        // immediately.\n        /* istanbul ignore if */\n        if (isIE &&\n            !isIE9 &&\n            el.tagName === 'TEXTAREA' &&\n            key === 'placeholder' &&\n            value !== '' &&\n            !el.__ieph) {\n            var blocker_1 = function (e) {\n                e.stopImmediatePropagation();\n                el.removeEventListener('input', blocker_1);\n            };\n            el.addEventListener('input', blocker_1);\n            // $flow-disable-line\n            el.__ieph = true; /* IE placeholder patched */\n        }\n        el.setAttribute(key, value);\n    }\n}\nvar attrs = {\n    create: updateAttrs,\n    update: updateAttrs\n};\n\nfunction updateClass(oldVnode, vnode) {\n    var el = vnode.elm;\n    var data = vnode.data;\n    var oldData = oldVnode.data;\n    if (isUndef(data.staticClass) &&\n        isUndef(data.class) &&\n        (isUndef(oldData) ||\n            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n        return;\n    }\n    var cls = genClassForVnode(vnode);\n    // handle transition classes\n    var transitionClass = el._transitionClasses;\n    if (isDef(transitionClass)) {\n        cls = concat(cls, stringifyClass(transitionClass));\n    }\n    // set the class\n    if (cls !== el._prevClass) {\n        el.setAttribute('class', cls);\n        el._prevClass = cls;\n    }\n}\nvar klass = {\n    create: updateClass,\n    update: updateClass\n};\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents(on) {\n    /* istanbul ignore if */\n    if (isDef(on[RANGE_TOKEN])) {\n        // IE input[type=range] only supports `change` event\n        var event_1 = isIE ? 'change' : 'input';\n        on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);\n        delete on[RANGE_TOKEN];\n    }\n    // This was originally intended to fix #4521 but no longer necessary\n    // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n    /* istanbul ignore if */\n    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n        delete on[CHECKBOX_RADIO_TOKEN];\n    }\n}\nvar target;\nfunction createOnceHandler(event, handler, capture) {\n    var _target = target; // save current target element in closure\n    return function onceHandler() {\n        var res = handler.apply(null, arguments);\n        if (res !== null) {\n            remove(event, onceHandler, capture, _target);\n        }\n    };\n}\n// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n// implementation and does not fire microtasks in between event propagation, so\n// safe to exclude.\nvar useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\nfunction add(name, handler, capture, passive) {\n    // async edge case #6566: inner click event triggers patch, event handler\n    // attached to outer element during patch, and triggered again. This\n    // happens because browsers fire microtask ticks between event propagation.\n    // the solution is simple: we save the timestamp when a handler is attached,\n    // and the handler would only fire if the event passed to it was fired\n    // AFTER it was attached.\n    if (useMicrotaskFix) {\n        var attachedTimestamp_1 = currentFlushTimestamp;\n        var original_1 = handler;\n        //@ts-expect-error\n        handler = original_1._wrapper = function (e) {\n            if (\n            // no bubbling, should always fire.\n            // this is just a safety net in case event.timeStamp is unreliable in\n            // certain weird environments...\n            e.target === e.currentTarget ||\n                // event is fired after handler attachment\n                e.timeStamp >= attachedTimestamp_1 ||\n                // bail for environments that have buggy event.timeStamp implementations\n                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                // #9681 QtWebEngine event.timeStamp is negative value\n                e.timeStamp <= 0 ||\n                // #9448 bail if event is fired in another document in a multi-page\n                // electron/nw.js app, since event.timeStamp will be using a different\n                // starting reference\n                e.target.ownerDocument !== document) {\n                return original_1.apply(this, arguments);\n            }\n        };\n    }\n    target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);\n}\nfunction remove(name, handler, capture, _target) {\n    (_target || target).removeEventListener(name, \n    //@ts-expect-error\n    handler._wrapper || handler, capture);\n}\nfunction updateDOMListeners(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n        return;\n    }\n    var on = vnode.data.on || {};\n    var oldOn = oldVnode.data.on || {};\n    // vnode is empty when removing all listeners,\n    // and use old vnode dom element\n    target = vnode.elm || oldVnode.elm;\n    normalizeEvents(on);\n    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n    target = undefined;\n}\nvar events = {\n    create: updateDOMListeners,\n    update: updateDOMListeners,\n    // @ts-expect-error emptyNode has actually data\n    destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }\n};\n\nvar svgContainer;\nfunction updateDOMProps(oldVnode, vnode) {\n    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n        return;\n    }\n    var key, cur;\n    var elm = vnode.elm;\n    var oldProps = oldVnode.data.domProps || {};\n    var props = vnode.data.domProps || {};\n    // clone observed objects, as the user probably wants to mutate it\n    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n        props = vnode.data.domProps = extend({}, props);\n    }\n    for (key in oldProps) {\n        if (!(key in props)) {\n            elm[key] = '';\n        }\n    }\n    for (key in props) {\n        cur = props[key];\n        // ignore children if the node has textContent or innerHTML,\n        // as these will throw away existing DOM nodes and cause removal errors\n        // on subsequent patches (#3360)\n        if (key === 'textContent' || key === 'innerHTML') {\n            if (vnode.children)\n                vnode.children.length = 0;\n            if (cur === oldProps[key])\n                continue;\n            // #6601 work around Chrome version <= 55 bug where single textNode\n            // replaced by innerHTML/textContent retains its parentNode property\n            if (elm.childNodes.length === 1) {\n                elm.removeChild(elm.childNodes[0]);\n            }\n        }\n        if (key === 'value' && elm.tagName !== 'PROGRESS') {\n            // store value as _value as well since\n            // non-string values will be stringified\n            elm._value = cur;\n            // avoid resetting cursor position when value is the same\n            var strCur = isUndef(cur) ? '' : String(cur);\n            if (shouldUpdateValue(elm, strCur)) {\n                elm.value = strCur;\n            }\n        }\n        else if (key === 'innerHTML' &&\n            isSVG(elm.tagName) &&\n            isUndef(elm.innerHTML)) {\n            // IE doesn't support innerHTML for SVG elements\n            svgContainer = svgContainer || document.createElement('div');\n            svgContainer.innerHTML = \"<svg>\".concat(cur, \"</svg>\");\n            var svg = svgContainer.firstChild;\n            while (elm.firstChild) {\n                elm.removeChild(elm.firstChild);\n            }\n            while (svg.firstChild) {\n                elm.appendChild(svg.firstChild);\n            }\n        }\n        else if (\n        // skip the update if old and new VDOM state is the same.\n        // `value` is handled separately because the DOM value may be temporarily\n        // out of sync with VDOM state due to focus, composition and modifiers.\n        // This  #4521 by skipping the unnecessary `checked` update.\n        cur !== oldProps[key]) {\n            // some property updates can throw\n            // e.g. `value` on <progress> w/ non-finite value\n            try {\n                elm[key] = cur;\n            }\n            catch (e) { }\n        }\n    }\n}\nfunction shouldUpdateValue(elm, checkVal) {\n    return (\n    //@ts-expect-error\n    !elm.composing &&\n        (elm.tagName === 'OPTION' ||\n            isNotInFocusAndDirty(elm, checkVal) ||\n            isDirtyWithModifiers(elm, checkVal)));\n}\nfunction isNotInFocusAndDirty(elm, checkVal) {\n    // return true when textbox (.number and .trim) loses focus and its value is\n    // not equal to the updated value\n    var notInFocus = true;\n    // #6157\n    // work around IE bug when accessing document.activeElement in an iframe\n    try {\n        notInFocus = document.activeElement !== elm;\n    }\n    catch (e) { }\n    return notInFocus && elm.value !== checkVal;\n}\nfunction isDirtyWithModifiers(elm, newVal) {\n    var value = elm.value;\n    var modifiers = elm._vModifiers; // injected by v-model runtime\n    if (isDef(modifiers)) {\n        if (modifiers.number) {\n            return toNumber(value) !== toNumber(newVal);\n        }\n        if (modifiers.trim) {\n            return value.trim() !== newVal.trim();\n        }\n    }\n    return value !== newVal;\n}\nvar domProps = {\n    create: updateDOMProps,\n    update: updateDOMProps\n};\n\nvar parseStyleText = cached(function (cssText) {\n    var res = {};\n    var listDelimiter = /;(?![^(]*\\))/g;\n    var propertyDelimiter = /:(.+)/;\n    cssText.split(listDelimiter).forEach(function (item) {\n        if (item) {\n            var tmp = item.split(propertyDelimiter);\n            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n        }\n    });\n    return res;\n});\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData(data) {\n    var style = normalizeStyleBinding(data.style);\n    // static style is pre-processed into an object during compilation\n    // and is always a fresh object, so it's safe to merge into it\n    return data.staticStyle ? extend(data.staticStyle, style) : style;\n}\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding(bindingStyle) {\n    if (Array.isArray(bindingStyle)) {\n        return toObject(bindingStyle);\n    }\n    if (typeof bindingStyle === 'string') {\n        return parseStyleText(bindingStyle);\n    }\n    return bindingStyle;\n}\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle(vnode, checkChild) {\n    var res = {};\n    var styleData;\n    if (checkChild) {\n        var childNode = vnode;\n        while (childNode.componentInstance) {\n            childNode = childNode.componentInstance._vnode;\n            if (childNode &&\n                childNode.data &&\n                (styleData = normalizeStyleData(childNode.data))) {\n                extend(res, styleData);\n            }\n        }\n    }\n    if ((styleData = normalizeStyleData(vnode.data))) {\n        extend(res, styleData);\n    }\n    var parentNode = vnode;\n    // @ts-expect-error parentNode.parent not VNodeWithData\n    while ((parentNode = parentNode.parent)) {\n        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n            extend(res, styleData);\n        }\n    }\n    return res;\n}\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n    /* istanbul ignore if */\n    if (cssVarRE.test(name)) {\n        el.style.setProperty(name, val);\n    }\n    else if (importantRE.test(val)) {\n        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n    }\n    else {\n        var normalizedName = normalize(name);\n        if (Array.isArray(val)) {\n            // Support values array created by autoprefixer, e.g.\n            // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n            // Set them one by one, and the browser will only set those it can recognize\n            for (var i = 0, len = val.length; i < len; i++) {\n                el.style[normalizedName] = val[i];\n            }\n        }\n        else {\n            el.style[normalizedName] = val;\n        }\n    }\n};\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n    emptyStyle = emptyStyle || document.createElement('div').style;\n    prop = camelize(prop);\n    if (prop !== 'filter' && prop in emptyStyle) {\n        return prop;\n    }\n    var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n    for (var i = 0; i < vendorNames.length; i++) {\n        var name_1 = vendorNames[i] + capName;\n        if (name_1 in emptyStyle) {\n            return name_1;\n        }\n    }\n});\nfunction updateStyle(oldVnode, vnode) {\n    var data = vnode.data;\n    var oldData = oldVnode.data;\n    if (isUndef(data.staticStyle) &&\n        isUndef(data.style) &&\n        isUndef(oldData.staticStyle) &&\n        isUndef(oldData.style)) {\n        return;\n    }\n    var cur, name;\n    var el = vnode.elm;\n    var oldStaticStyle = oldData.staticStyle;\n    var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n    // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n    var oldStyle = oldStaticStyle || oldStyleBinding;\n    var style = normalizeStyleBinding(vnode.data.style) || {};\n    // store normalized style under a different key for next diff\n    // make sure to clone it if it's reactive, since the user likely wants\n    // to mutate it.\n    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n    var newStyle = getStyle(vnode, true);\n    for (name in oldStyle) {\n        if (isUndef(newStyle[name])) {\n            setProp(el, name, '');\n        }\n    }\n    for (name in newStyle) {\n        cur = newStyle[name];\n        // ie9 setting to null has no effect, must use empty string\n        setProp(el, name, cur == null ? '' : cur);\n    }\n}\nvar style = {\n    create: updateStyle,\n    update: updateStyle\n};\n\nvar whitespaceRE = /\\s+/;\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });\n        }\n        else {\n            el.classList.add(cls);\n        }\n    }\n    else {\n        var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n        if (cur.indexOf(' ' + cls + ' ') < 0) {\n            el.setAttribute('class', (cur + cls).trim());\n        }\n    }\n}\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass(el, cls) {\n    /* istanbul ignore if */\n    if (!cls || !(cls = cls.trim())) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (el.classList) {\n        if (cls.indexOf(' ') > -1) {\n            cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });\n        }\n        else {\n            el.classList.remove(cls);\n        }\n        if (!el.classList.length) {\n            el.removeAttribute('class');\n        }\n    }\n    else {\n        var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n        var tar = ' ' + cls + ' ';\n        while (cur.indexOf(tar) >= 0) {\n            cur = cur.replace(tar, ' ');\n        }\n        cur = cur.trim();\n        if (cur) {\n            el.setAttribute('class', cur);\n        }\n        else {\n            el.removeAttribute('class');\n        }\n    }\n}\n\nfunction resolveTransition(def) {\n    if (!def) {\n        return;\n    }\n    /* istanbul ignore else */\n    if (typeof def === 'object') {\n        var res = {};\n        if (def.css !== false) {\n            extend(res, autoCssTransition(def.name || 'v'));\n        }\n        extend(res, def);\n        return res;\n    }\n    else if (typeof def === 'string') {\n        return autoCssTransition(def);\n    }\n}\nvar autoCssTransition = cached(function (name) {\n    return {\n        enterClass: \"\".concat(name, \"-enter\"),\n        enterToClass: \"\".concat(name, \"-enter-to\"),\n        enterActiveClass: \"\".concat(name, \"-enter-active\"),\n        leaveClass: \"\".concat(name, \"-leave\"),\n        leaveToClass: \"\".concat(name, \"-leave-to\"),\n        leaveActiveClass: \"\".concat(name, \"-leave-active\")\n    };\n});\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n    /* istanbul ignore if */\n    if (window.ontransitionend === undefined &&\n        window.onwebkittransitionend !== undefined) {\n        transitionProp = 'WebkitTransition';\n        transitionEndEvent = 'webkitTransitionEnd';\n    }\n    if (window.onanimationend === undefined &&\n        window.onwebkitanimationend !== undefined) {\n        animationProp = 'WebkitAnimation';\n        animationEndEvent = 'webkitAnimationEnd';\n    }\n}\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n    ? window.requestAnimationFrame\n        ? window.requestAnimationFrame.bind(window)\n        : setTimeout\n    : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };\nfunction nextFrame(fn) {\n    raf(function () {\n        // @ts-expect-error\n        raf(fn);\n    });\n}\nfunction addTransitionClass(el, cls) {\n    var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n    if (transitionClasses.indexOf(cls) < 0) {\n        transitionClasses.push(cls);\n        addClass(el, cls);\n    }\n}\nfunction removeTransitionClass(el, cls) {\n    if (el._transitionClasses) {\n        remove$2(el._transitionClasses, cls);\n    }\n    removeClass(el, cls);\n}\nfunction whenTransitionEnds(el, expectedType, cb) {\n    var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;\n    if (!type)\n        return cb();\n    var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n    var ended = 0;\n    var end = function () {\n        el.removeEventListener(event, onEnd);\n        cb();\n    };\n    var onEnd = function (e) {\n        if (e.target === el) {\n            if (++ended >= propCount) {\n                end();\n            }\n        }\n    };\n    setTimeout(function () {\n        if (ended < propCount) {\n            end();\n        }\n    }, timeout + 1);\n    el.addEventListener(event, onEnd);\n}\nvar transformRE = /\\b(transform|all)(,|$)/;\nfunction getTransitionInfo(el, expectedType) {\n    var styles = window.getComputedStyle(el);\n    // JSDOM may return undefined for transition properties\n    var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n    var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n    var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n    var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n    var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n    var animationTimeout = getTimeout(animationDelays, animationDurations);\n    var type;\n    var timeout = 0;\n    var propCount = 0;\n    /* istanbul ignore if */\n    if (expectedType === TRANSITION) {\n        if (transitionTimeout > 0) {\n            type = TRANSITION;\n            timeout = transitionTimeout;\n            propCount = transitionDurations.length;\n        }\n    }\n    else if (expectedType === ANIMATION) {\n        if (animationTimeout > 0) {\n            type = ANIMATION;\n            timeout = animationTimeout;\n            propCount = animationDurations.length;\n        }\n    }\n    else {\n        timeout = Math.max(transitionTimeout, animationTimeout);\n        type =\n            timeout > 0\n                ? transitionTimeout > animationTimeout\n                    ? TRANSITION\n                    : ANIMATION\n                : null;\n        propCount = type\n            ? type === TRANSITION\n                ? transitionDurations.length\n                : animationDurations.length\n            : 0;\n    }\n    var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n    return {\n        type: type,\n        timeout: timeout,\n        propCount: propCount,\n        hasTransform: hasTransform\n    };\n}\nfunction getTimeout(delays, durations) {\n    /* istanbul ignore next */\n    while (delays.length < durations.length) {\n        delays = delays.concat(delays);\n    }\n    return Math.max.apply(null, durations.map(function (d, i) {\n        return toMs(d) + toMs(delays[i]);\n    }));\n}\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n// in a locale-dependent way, using a comma instead of a dot.\n// If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n// as a floor function) causing unexpected behaviors\nfunction toMs(s) {\n    return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n}\n\nfunction enter(vnode, toggleDisplay) {\n    var el = vnode.elm;\n    // call leave callback now\n    if (isDef(el._leaveCb)) {\n        el._leaveCb.cancelled = true;\n        el._leaveCb();\n    }\n    var data = resolveTransition(vnode.data.transition);\n    if (isUndef(data)) {\n        return;\n    }\n    /* istanbul ignore if */\n    if (isDef(el._enterCb) || el.nodeType !== 1) {\n        return;\n    }\n    var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;\n    // activeInstance will always be the <transition> component managing this\n    // transition. One edge case to check is when the <transition> is placed\n    // as the root node of a child component. In that case we need to check\n    // <transition>'s parent for appear check.\n    var context = activeInstance;\n    var transitionNode = activeInstance.$vnode;\n    while (transitionNode && transitionNode.parent) {\n        context = transitionNode.context;\n        transitionNode = transitionNode.parent;\n    }\n    var isAppear = !context._isMounted || !vnode.isRootInsert;\n    if (isAppear && !appear && appear !== '') {\n        return;\n    }\n    var startClass = isAppear && appearClass ? appearClass : enterClass;\n    var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n    var toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n    var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n    var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n    var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n    var enterCancelledHook = isAppear\n        ? appearCancelled || enterCancelled\n        : enterCancelled;\n    var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n    if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n        checkDuration(explicitEnterDuration, 'enter', vnode);\n    }\n    var expectsCSS = css !== false && !isIE9;\n    var userWantsControl = getHookArgumentsLength(enterHook);\n    var cb = (el._enterCb = once(function () {\n        if (expectsCSS) {\n            removeTransitionClass(el, toClass);\n            removeTransitionClass(el, activeClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, startClass);\n            }\n            enterCancelledHook && enterCancelledHook(el);\n        }\n        else {\n            afterEnterHook && afterEnterHook(el);\n        }\n        el._enterCb = null;\n    }));\n    if (!vnode.data.show) {\n        // remove pending leave element on enter by injecting an insert hook\n        mergeVNodeHook(vnode, 'insert', function () {\n            var parent = el.parentNode;\n            var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n            if (pendingNode &&\n                pendingNode.tag === vnode.tag &&\n                pendingNode.elm._leaveCb) {\n                pendingNode.elm._leaveCb();\n            }\n            enterHook && enterHook(el, cb);\n        });\n    }\n    // start enter transition\n    beforeEnterHook && beforeEnterHook(el);\n    if (expectsCSS) {\n        addTransitionClass(el, startClass);\n        addTransitionClass(el, activeClass);\n        nextFrame(function () {\n            removeTransitionClass(el, startClass);\n            // @ts-expect-error\n            if (!cb.cancelled) {\n                addTransitionClass(el, toClass);\n                if (!userWantsControl) {\n                    if (isValidDuration(explicitEnterDuration)) {\n                        setTimeout(cb, explicitEnterDuration);\n                    }\n                    else {\n                        whenTransitionEnds(el, type, cb);\n                    }\n                }\n            }\n        });\n    }\n    if (vnode.data.show) {\n        toggleDisplay && toggleDisplay();\n        enterHook && enterHook(el, cb);\n    }\n    if (!expectsCSS && !userWantsControl) {\n        cb();\n    }\n}\nfunction leave(vnode, rm) {\n    var el = vnode.elm;\n    // call enter callback now\n    if (isDef(el._enterCb)) {\n        el._enterCb.cancelled = true;\n        el._enterCb();\n    }\n    var data = resolveTransition(vnode.data.transition);\n    if (isUndef(data) || el.nodeType !== 1) {\n        return rm();\n    }\n    /* istanbul ignore if */\n    if (isDef(el._leaveCb)) {\n        return;\n    }\n    var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;\n    var expectsCSS = css !== false && !isIE9;\n    var userWantsControl = getHookArgumentsLength(leave);\n    var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n    if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {\n        checkDuration(explicitLeaveDuration, 'leave', vnode);\n    }\n    var cb = (el._leaveCb = once(function () {\n        if (el.parentNode && el.parentNode._pending) {\n            el.parentNode._pending[vnode.key] = null;\n        }\n        if (expectsCSS) {\n            removeTransitionClass(el, leaveToClass);\n            removeTransitionClass(el, leaveActiveClass);\n        }\n        // @ts-expect-error\n        if (cb.cancelled) {\n            if (expectsCSS) {\n                removeTransitionClass(el, leaveClass);\n            }\n            leaveCancelled && leaveCancelled(el);\n        }\n        else {\n            rm();\n            afterLeave && afterLeave(el);\n        }\n        el._leaveCb = null;\n    }));\n    if (delayLeave) {\n        delayLeave(performLeave);\n    }\n    else {\n        performLeave();\n    }\n    function performLeave() {\n        // the delayed leave may have already been cancelled\n        // @ts-expect-error\n        if (cb.cancelled) {\n            return;\n        }\n        // record leaving element\n        if (!vnode.data.show && el.parentNode) {\n            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                vnode;\n        }\n        beforeLeave && beforeLeave(el);\n        if (expectsCSS) {\n            addTransitionClass(el, leaveClass);\n            addTransitionClass(el, leaveActiveClass);\n            nextFrame(function () {\n                removeTransitionClass(el, leaveClass);\n                // @ts-expect-error\n                if (!cb.cancelled) {\n                    addTransitionClass(el, leaveToClass);\n                    if (!userWantsControl) {\n                        if (isValidDuration(explicitLeaveDuration)) {\n                            setTimeout(cb, explicitLeaveDuration);\n                        }\n                        else {\n                            whenTransitionEnds(el, type, cb);\n                        }\n                    }\n                }\n            });\n        }\n        leave && leave(el, cb);\n        if (!expectsCSS && !userWantsControl) {\n            cb();\n        }\n    }\n}\n// only used in dev mode\nfunction checkDuration(val, name, vnode) {\n    if (typeof val !== 'number') {\n        warn(\"<transition> explicit \".concat(name, \" duration is not a valid number - \") +\n            \"got \".concat(JSON.stringify(val), \".\"), vnode.context);\n    }\n    else if (isNaN(val)) {\n        warn(\"<transition> explicit \".concat(name, \" duration is NaN - \") +\n            'the duration expression might be incorrect.', vnode.context);\n    }\n}\nfunction isValidDuration(val) {\n    return typeof val === 'number' && !isNaN(val);\n}\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength(fn) {\n    if (isUndef(fn)) {\n        return false;\n    }\n    // @ts-expect-error\n    var invokerFns = fn.fns;\n    if (isDef(invokerFns)) {\n        // invoker\n        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n    }\n    else {\n        // @ts-expect-error\n        return (fn._length || fn.length) > 1;\n    }\n}\nfunction _enter(_, vnode) {\n    if (vnode.data.show !== true) {\n        enter(vnode);\n    }\n}\nvar transition = inBrowser\n    ? {\n        create: _enter,\n        activate: _enter,\n        remove: function (vnode, rm) {\n            /* istanbul ignore else */\n            if (vnode.data.show !== true) {\n                // @ts-expect-error\n                leave(vnode, rm);\n            }\n            else {\n                rm();\n            }\n        }\n    }\n    : {};\n\nvar platformModules = [attrs, klass, events, domProps, style, transition];\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n/* istanbul ignore if */\nif (isIE9) {\n    // http://www.matts411.com/post/internet-explorer-9-oninput/\n    document.addEventListener('selectionchange', function () {\n        var el = document.activeElement;\n        // @ts-expect-error\n        if (el && el.vmodel) {\n            trigger(el, 'input');\n        }\n    });\n}\nvar directive = {\n    inserted: function (el, binding, vnode, oldVnode) {\n        if (vnode.tag === 'select') {\n            // #6903\n            if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                mergeVNodeHook(vnode, 'postpatch', function () {\n                    directive.componentUpdated(el, binding, vnode);\n                });\n            }\n            else {\n                setSelected(el, binding, vnode.context);\n            }\n            el._vOptions = [].map.call(el.options, getValue);\n        }\n        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n            el._vModifiers = binding.modifiers;\n            if (!binding.modifiers.lazy) {\n                el.addEventListener('compositionstart', onCompositionStart);\n                el.addEventListener('compositionend', onCompositionEnd);\n                // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                // switching focus before confirming composition choice\n                // this also fixes the issue where some browsers e.g. iOS Chrome\n                // fires \"change\" instead of \"input\" on autocomplete.\n                el.addEventListener('change', onCompositionEnd);\n                /* istanbul ignore if */\n                if (isIE9) {\n                    el.vmodel = true;\n                }\n            }\n        }\n    },\n    componentUpdated: function (el, binding, vnode) {\n        if (vnode.tag === 'select') {\n            setSelected(el, binding, vnode.context);\n            // in case the options rendered by v-for have changed,\n            // it's possible that the value is out-of-sync with the rendered options.\n            // detect such cases and filter out values that no longer has a matching\n            // option in the DOM.\n            var prevOptions_1 = el._vOptions;\n            var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));\n            if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {\n                // trigger change event if\n                // no matching option found for at least one value\n                var needReset = el.multiple\n                    ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })\n                    : binding.value !== binding.oldValue &&\n                        hasNoMatchingOption(binding.value, curOptions_1);\n                if (needReset) {\n                    trigger(el, 'change');\n                }\n            }\n        }\n    }\n};\nfunction setSelected(el, binding, vm) {\n    actuallySetSelected(el, binding, vm);\n    /* istanbul ignore if */\n    if (isIE || isEdge) {\n        setTimeout(function () {\n            actuallySetSelected(el, binding, vm);\n        }, 0);\n    }\n}\nfunction actuallySetSelected(el, binding, vm) {\n    var value = binding.value;\n    var isMultiple = el.multiple;\n    if (isMultiple && !Array.isArray(value)) {\n        process.env.NODE_ENV !== 'production' &&\n            warn(\"<select multiple v-model=\\\"\".concat(binding.expression, \"\\\"> \") +\n                \"expects an Array value for its binding, but got \".concat(Object.prototype.toString\n                    .call(value)\n                    .slice(8, -1)), vm);\n        return;\n    }\n    var selected, option;\n    for (var i = 0, l = el.options.length; i < l; i++) {\n        option = el.options[i];\n        if (isMultiple) {\n            selected = looseIndexOf(value, getValue(option)) > -1;\n            if (option.selected !== selected) {\n                option.selected = selected;\n            }\n        }\n        else {\n            if (looseEqual(getValue(option), value)) {\n                if (el.selectedIndex !== i) {\n                    el.selectedIndex = i;\n                }\n                return;\n            }\n        }\n    }\n    if (!isMultiple) {\n        el.selectedIndex = -1;\n    }\n}\nfunction hasNoMatchingOption(value, options) {\n    return options.every(function (o) { return !looseEqual(o, value); });\n}\nfunction getValue(option) {\n    return '_value' in option ? option._value : option.value;\n}\nfunction onCompositionStart(e) {\n    e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n    // prevent triggering an input event for no reason\n    if (!e.target.composing)\n        return;\n    e.target.composing = false;\n    trigger(e.target, 'input');\n}\nfunction trigger(el, type) {\n    var e = document.createEvent('HTMLEvents');\n    e.initEvent(type, true, true);\n    el.dispatchEvent(e);\n}\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode(vnode) {\n    // @ts-expect-error\n    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n        ? locateNode(vnode.componentInstance._vnode)\n        : vnode;\n}\nvar show = {\n    bind: function (el, _a, vnode) {\n        var value = _a.value;\n        vnode = locateNode(vnode);\n        var transition = vnode.data && vnode.data.transition;\n        var originalDisplay = (el.__vOriginalDisplay =\n            el.style.display === 'none' ? '' : el.style.display);\n        if (value && transition) {\n            vnode.data.show = true;\n            enter(vnode, function () {\n                el.style.display = originalDisplay;\n            });\n        }\n        else {\n            el.style.display = value ? originalDisplay : 'none';\n        }\n    },\n    update: function (el, _a, vnode) {\n        var value = _a.value, oldValue = _a.oldValue;\n        /* istanbul ignore if */\n        if (!value === !oldValue)\n            return;\n        vnode = locateNode(vnode);\n        var transition = vnode.data && vnode.data.transition;\n        if (transition) {\n            vnode.data.show = true;\n            if (value) {\n                enter(vnode, function () {\n                    el.style.display = el.__vOriginalDisplay;\n                });\n            }\n            else {\n                leave(vnode, function () {\n                    el.style.display = 'none';\n                });\n            }\n        }\n        else {\n            el.style.display = value ? el.__vOriginalDisplay : 'none';\n        }\n    },\n    unbind: function (el, binding, vnode, oldVnode, isDestroy) {\n        if (!isDestroy) {\n            el.style.display = el.__vOriginalDisplay;\n        }\n    }\n};\n\nvar platformDirectives = {\n    model: directive,\n    show: show\n};\n\n// Provides transition support for a single element/component.\nvar transitionProps = {\n    name: String,\n    appear: Boolean,\n    css: Boolean,\n    mode: String,\n    type: String,\n    enterClass: String,\n    leaveClass: String,\n    enterToClass: String,\n    leaveToClass: String,\n    enterActiveClass: String,\n    leaveActiveClass: String,\n    appearClass: String,\n    appearActiveClass: String,\n    appearToClass: String,\n    duration: [Number, String, Object]\n};\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild(vnode) {\n    var compOptions = vnode && vnode.componentOptions;\n    if (compOptions && compOptions.Ctor.options.abstract) {\n        return getRealChild(getFirstComponentChild(compOptions.children));\n    }\n    else {\n        return vnode;\n    }\n}\nfunction extractTransitionData(comp) {\n    var data = {};\n    var options = comp.$options;\n    // props\n    for (var key in options.propsData) {\n        data[key] = comp[key];\n    }\n    // events.\n    // extract listeners and pass them directly to the transition methods\n    var listeners = options._parentListeners;\n    for (var key in listeners) {\n        data[camelize(key)] = listeners[key];\n    }\n    return data;\n}\nfunction placeholder(h, rawChild) {\n    // @ts-expect-error\n    if (/\\d-keep-alive$/.test(rawChild.tag)) {\n        return h('keep-alive', {\n            props: rawChild.componentOptions.propsData\n        });\n    }\n}\nfunction hasParentTransition(vnode) {\n    while ((vnode = vnode.parent)) {\n        if (vnode.data.transition) {\n            return true;\n        }\n    }\n}\nfunction isSameChild(child, oldChild) {\n    return oldChild.key === child.key && oldChild.tag === child.tag;\n}\nvar isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\nvar isVShowDirective = function (d) { return d.name === 'show'; };\nvar Transition = {\n    name: 'transition',\n    props: transitionProps,\n    abstract: true,\n    render: function (h) {\n        var _this = this;\n        var children = this.$slots.default;\n        if (!children) {\n            return;\n        }\n        // filter out text nodes (possible whitespaces)\n        children = children.filter(isNotTextNode);\n        /* istanbul ignore if */\n        if (!children.length) {\n            return;\n        }\n        // warn multiple elements\n        if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n            warn('<transition> can only be used on a single element. Use ' +\n                '<transition-group> for lists.', this.$parent);\n        }\n        var mode = this.mode;\n        // warn invalid mode\n        if (process.env.NODE_ENV !== 'production' && mode && mode !== 'in-out' && mode !== 'out-in') {\n            warn('invalid <transition> mode: ' + mode, this.$parent);\n        }\n        var rawChild = children[0];\n        // if this is a component root node and the component's\n        // parent container node also has transition, skip.\n        if (hasParentTransition(this.$vnode)) {\n            return rawChild;\n        }\n        // apply transition data to child\n        // use getRealChild() to ignore abstract components e.g. keep-alive\n        var child = getRealChild(rawChild);\n        /* istanbul ignore if */\n        if (!child) {\n            return rawChild;\n        }\n        if (this._leaving) {\n            return placeholder(h, rawChild);\n        }\n        // ensure a key that is unique to the vnode type and to this transition\n        // component instance. This key will be used to remove pending leaving nodes\n        // during entering.\n        var id = \"__transition-\".concat(this._uid, \"-\");\n        child.key =\n            child.key == null\n                ? child.isComment\n                    ? id + 'comment'\n                    : id + child.tag\n                : isPrimitive(child.key)\n                    ? String(child.key).indexOf(id) === 0\n                        ? child.key\n                        : id + child.key\n                    : child.key;\n        var data = ((child.data || (child.data = {})).transition =\n            extractTransitionData(this));\n        var oldRawChild = this._vnode;\n        var oldChild = getRealChild(oldRawChild);\n        // mark v-show\n        // so that the transition module can hand over the control to the directive\n        if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n            child.data.show = true;\n        }\n        if (oldChild &&\n            oldChild.data &&\n            !isSameChild(child, oldChild) &&\n            !isAsyncPlaceholder(oldChild) &&\n            // #6687 component root is a comment node\n            !(oldChild.componentInstance &&\n                oldChild.componentInstance._vnode.isComment)) {\n            // replace old child transition data with fresh one\n            // important for dynamic transitions!\n            var oldData = (oldChild.data.transition = extend({}, data));\n            // handle transition mode\n            if (mode === 'out-in') {\n                // return placeholder node and queue update when leave finishes\n                this._leaving = true;\n                mergeVNodeHook(oldData, 'afterLeave', function () {\n                    _this._leaving = false;\n                    _this.$forceUpdate();\n                });\n                return placeholder(h, rawChild);\n            }\n            else if (mode === 'in-out') {\n                if (isAsyncPlaceholder(child)) {\n                    return oldRawChild;\n                }\n                var delayedLeave_1;\n                var performLeave = function () {\n                    delayedLeave_1();\n                };\n                mergeVNodeHook(data, 'afterEnter', performLeave);\n                mergeVNodeHook(data, 'enterCancelled', performLeave);\n                mergeVNodeHook(oldData, 'delayLeave', function (leave) {\n                    delayedLeave_1 = leave;\n                });\n            }\n        }\n        return rawChild;\n    }\n};\n\n// Provides transition support for list items.\nvar props = extend({\n    tag: String,\n    moveClass: String\n}, transitionProps);\ndelete props.mode;\nvar TransitionGroup = {\n    props: props,\n    beforeMount: function () {\n        var _this = this;\n        var update = this._update;\n        this._update = function (vnode, hydrating) {\n            var restoreActiveInstance = setActiveInstance(_this);\n            // force removing pass\n            _this.__patch__(_this._vnode, _this.kept, false, // hydrating\n            true // removeOnly (!important, avoids unnecessary moves)\n            );\n            _this._vnode = _this.kept;\n            restoreActiveInstance();\n            update.call(_this, vnode, hydrating);\n        };\n    },\n    render: function (h) {\n        var tag = this.tag || this.$vnode.data.tag || 'span';\n        var map = Object.create(null);\n        var prevChildren = (this.prevChildren = this.children);\n        var rawChildren = this.$slots.default || [];\n        var children = (this.children = []);\n        var transitionData = extractTransitionData(this);\n        for (var i = 0; i < rawChildren.length; i++) {\n            var c = rawChildren[i];\n            if (c.tag) {\n                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                    children.push(c);\n                    map[c.key] = c;\n                    (c.data || (c.data = {})).transition = transitionData;\n                }\n                else if (process.env.NODE_ENV !== 'production') {\n                    var opts = c.componentOptions;\n                    var name_1 = opts\n                        ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                        : c.tag;\n                    warn(\"<transition-group> children must be keyed: <\".concat(name_1, \">\"));\n                }\n            }\n        }\n        if (prevChildren) {\n            var kept = [];\n            var removed = [];\n            for (var i = 0; i < prevChildren.length; i++) {\n                var c = prevChildren[i];\n                c.data.transition = transitionData;\n                // @ts-expect-error .getBoundingClientRect is not typed in Node\n                c.data.pos = c.elm.getBoundingClientRect();\n                if (map[c.key]) {\n                    kept.push(c);\n                }\n                else {\n                    removed.push(c);\n                }\n            }\n            this.kept = h(tag, null, kept);\n            this.removed = removed;\n        }\n        return h(tag, null, children);\n    },\n    updated: function () {\n        var children = this.prevChildren;\n        var moveClass = this.moveClass || (this.name || 'v') + '-move';\n        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n            return;\n        }\n        // we divide the work into three loops to avoid mixing DOM reads and writes\n        // in each iteration - which helps prevent layout thrashing.\n        children.forEach(callPendingCbs);\n        children.forEach(recordPosition);\n        children.forEach(applyTranslation);\n        // force reflow to put everything in position\n        // assign to this to avoid being removed in tree-shaking\n        // $flow-disable-line\n        this._reflow = document.body.offsetHeight;\n        children.forEach(function (c) {\n            if (c.data.moved) {\n                var el_1 = c.elm;\n                var s = el_1.style;\n                addTransitionClass(el_1, moveClass);\n                s.transform = s.WebkitTransform = s.transitionDuration = '';\n                el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {\n                    if (e && e.target !== el_1) {\n                        return;\n                    }\n                    if (!e || /transform$/.test(e.propertyName)) {\n                        el_1.removeEventListener(transitionEndEvent, cb);\n                        el_1._moveCb = null;\n                        removeTransitionClass(el_1, moveClass);\n                    }\n                }));\n            }\n        });\n    },\n    methods: {\n        hasMove: function (el, moveClass) {\n            /* istanbul ignore if */\n            if (!hasTransition) {\n                return false;\n            }\n            /* istanbul ignore if */\n            if (this._hasMove) {\n                return this._hasMove;\n            }\n            // Detect whether an element with the move class applied has\n            // CSS transitions. Since the element may be inside an entering\n            // transition at this very moment, we make a clone of it and remove\n            // all other transition classes applied to ensure only the move class\n            // is applied.\n            var clone = el.cloneNode();\n            if (el._transitionClasses) {\n                el._transitionClasses.forEach(function (cls) {\n                    removeClass(clone, cls);\n                });\n            }\n            addClass(clone, moveClass);\n            clone.style.display = 'none';\n            this.$el.appendChild(clone);\n            var info = getTransitionInfo(clone);\n            this.$el.removeChild(clone);\n            return (this._hasMove = info.hasTransform);\n        }\n    }\n};\nfunction callPendingCbs(c) {\n    /* istanbul ignore if */\n    if (c.elm._moveCb) {\n        c.elm._moveCb();\n    }\n    /* istanbul ignore if */\n    if (c.elm._enterCb) {\n        c.elm._enterCb();\n    }\n}\nfunction recordPosition(c) {\n    c.data.newPos = c.elm.getBoundingClientRect();\n}\nfunction applyTranslation(c) {\n    var oldPos = c.data.pos;\n    var newPos = c.data.newPos;\n    var dx = oldPos.left - newPos.left;\n    var dy = oldPos.top - newPos.top;\n    if (dx || dy) {\n        c.data.moved = true;\n        var s = c.elm.style;\n        s.transform = s.WebkitTransform = \"translate(\".concat(dx, \"px,\").concat(dy, \"px)\");\n        s.transitionDuration = '0s';\n    }\n}\n\nvar platformComponents = {\n    Transition: Transition,\n    TransitionGroup: TransitionGroup\n};\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n// public mount method\nVue.prototype.$mount = function (el, hydrating) {\n    el = el && inBrowser ? query(el) : undefined;\n    return mountComponent(this, el, hydrating);\n};\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n    setTimeout(function () {\n        if (config.devtools) {\n            if (devtools) {\n                devtools.emit('init', Vue);\n            }\n            else if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n                // @ts-expect-error\n                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                    'https://github.com/vuejs/vue-devtools');\n            }\n        }\n        if (process.env.NODE_ENV !== 'production' &&\n            process.env.NODE_ENV !== 'test' &&\n            config.productionTip !== false &&\n            typeof console !== 'undefined') {\n            // @ts-expect-error\n            console[console.info ? 'info' : 'log'](\"You are running Vue in development mode.\\n\" +\n                \"Make sure to turn on production mode when deploying for production.\\n\" +\n                \"See more tips at https://vuejs.org/guide/deployment.html\");\n        }\n    }, 0);\n}\n\nexport { EffectScope, computed, customRef, Vue as default, defineAsyncComponent, defineComponent, del, effectScope, getCurrentInstance, getCurrentScope, h, inject, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, mergeDefaults, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref$1 as ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useListeners, useSlots, version, watch, watchEffect, watchPostEffect, watchSyncEffect };\n"
  },
  {
    "path": "web/assets/vue/vue.runtime.js",
    "content": "/*!\n * Vue.js v2.7.16\n * (c) 2014-2023 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vue = factory());\n})(this, (function () { 'use strict';\n\n  var emptyObject = Object.freeze({});\n  var isArray = Array.isArray;\n  // These helpers produce better VM code in JS engines due to their\n  // explicitness and function inlining.\n  function isUndef(v) {\n      return v === undefined || v === null;\n  }\n  function isDef(v) {\n      return v !== undefined && v !== null;\n  }\n  function isTrue(v) {\n      return v === true;\n  }\n  function isFalse(v) {\n      return v === false;\n  }\n  /**\n   * Check if value is primitive.\n   */\n  function isPrimitive(value) {\n      return (typeof value === 'string' ||\n          typeof value === 'number' ||\n          // $flow-disable-line\n          typeof value === 'symbol' ||\n          typeof value === 'boolean');\n  }\n  function isFunction(value) {\n      return typeof value === 'function';\n  }\n  /**\n   * Quick object check - this is primarily used to tell\n   * objects from primitive values when we know the value\n   * is a JSON-compliant type.\n   */\n  function isObject(obj) {\n      return obj !== null && typeof obj === 'object';\n  }\n  /**\n   * Get the raw type string of a value, e.g., [object Object].\n   */\n  var _toString = Object.prototype.toString;\n  function toRawType(value) {\n      return _toString.call(value).slice(8, -1);\n  }\n  /**\n   * Strict object type check. Only returns true\n   * for plain JavaScript objects.\n   */\n  function isPlainObject(obj) {\n      return _toString.call(obj) === '[object Object]';\n  }\n  function isRegExp(v) {\n      return _toString.call(v) === '[object RegExp]';\n  }\n  /**\n   * Check if val is a valid array index.\n   */\n  function isValidArrayIndex(val) {\n      var n = parseFloat(String(val));\n      return n >= 0 && Math.floor(n) === n && isFinite(val);\n  }\n  function isPromise(val) {\n      return (isDef(val) &&\n          typeof val.then === 'function' &&\n          typeof val.catch === 'function');\n  }\n  /**\n   * Convert a value to a string that is actually rendered.\n   */\n  function toString(val) {\n      return val == null\n          ? ''\n          : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n              ? JSON.stringify(val, replacer, 2)\n              : String(val);\n  }\n  function replacer(_key, val) {\n      // avoid circular deps from v3\n      if (val && val.__v_isRef) {\n          return val.value;\n      }\n      return val;\n  }\n  /**\n   * Convert an input value to a number for persistence.\n   * If the conversion fails, return original string.\n   */\n  function toNumber(val) {\n      var n = parseFloat(val);\n      return isNaN(n) ? val : n;\n  }\n  /**\n   * Make a map and return a function for checking if a key\n   * is in that map.\n   */\n  function makeMap(str, expectsLowerCase) {\n      var map = Object.create(null);\n      var list = str.split(',');\n      for (var i = 0; i < list.length; i++) {\n          map[list[i]] = true;\n      }\n      return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };\n  }\n  /**\n   * Check if a tag is a built-in tag.\n   */\n  var isBuiltInTag = makeMap('slot,component', true);\n  /**\n   * Check if an attribute is a reserved attribute.\n   */\n  var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n  /**\n   * Remove an item from an array.\n   */\n  function remove$2(arr, item) {\n      var len = arr.length;\n      if (len) {\n          // fast path for the only / last item\n          if (item === arr[len - 1]) {\n              arr.length = len - 1;\n              return;\n          }\n          var index = arr.indexOf(item);\n          if (index > -1) {\n              return arr.splice(index, 1);\n          }\n      }\n  }\n  /**\n   * Check whether an object has the property.\n   */\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  function hasOwn(obj, key) {\n      return hasOwnProperty.call(obj, key);\n  }\n  /**\n   * Create a cached version of a pure function.\n   */\n  function cached(fn) {\n      var cache = Object.create(null);\n      return function cachedFn(str) {\n          var hit = cache[str];\n          return hit || (cache[str] = fn(str));\n      };\n  }\n  /**\n   * Camelize a hyphen-delimited string.\n   */\n  var camelizeRE = /-(\\w)/g;\n  var camelize = cached(function (str) {\n      return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n  });\n  /**\n   * Capitalize a string.\n   */\n  var capitalize = cached(function (str) {\n      return str.charAt(0).toUpperCase() + str.slice(1);\n  });\n  /**\n   * Hyphenate a camelCase string.\n   */\n  var hyphenateRE = /\\B([A-Z])/g;\n  var hyphenate = cached(function (str) {\n      return str.replace(hyphenateRE, '-$1').toLowerCase();\n  });\n  /**\n   * Simple bind polyfill for environments that do not support it,\n   * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n   * since native bind is now performant enough in most browsers.\n   * But removing it would mean breaking code that was able to run in\n   * PhantomJS 1.x, so this must be kept for backward compatibility.\n   */\n  /* istanbul ignore next */\n  function polyfillBind(fn, ctx) {\n      function boundFn(a) {\n          var l = arguments.length;\n          return l\n              ? l > 1\n                  ? fn.apply(ctx, arguments)\n                  : fn.call(ctx, a)\n              : fn.call(ctx);\n      }\n      boundFn._length = fn.length;\n      return boundFn;\n  }\n  function nativeBind(fn, ctx) {\n      return fn.bind(ctx);\n  }\n  // @ts-expect-error bind cannot be `undefined`\n  var bind = Function.prototype.bind ? nativeBind : polyfillBind;\n  /**\n   * Convert an Array-like object to a real Array.\n   */\n  function toArray(list, start) {\n      start = start || 0;\n      var i = list.length - start;\n      var ret = new Array(i);\n      while (i--) {\n          ret[i] = list[i + start];\n      }\n      return ret;\n  }\n  /**\n   * Mix properties into target object.\n   */\n  function extend(to, _from) {\n      for (var key in _from) {\n          to[key] = _from[key];\n      }\n      return to;\n  }\n  /**\n   * Merge an Array of Objects into a single Object.\n   */\n  function toObject(arr) {\n      var res = {};\n      for (var i = 0; i < arr.length; i++) {\n          if (arr[i]) {\n              extend(res, arr[i]);\n          }\n      }\n      return res;\n  }\n  /* eslint-disable no-unused-vars */\n  /**\n   * Perform no operation.\n   * Stubbing args to make Flow happy without leaving useless transpiled code\n   * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n   */\n  function noop(a, b, c) { }\n  /**\n   * Always return false.\n   */\n  var no = function (a, b, c) { return false; };\n  /* eslint-enable no-unused-vars */\n  /**\n   * Return the same value.\n   */\n  var identity = function (_) { return _; };\n  /**\n   * Check if two values are loosely equal - that is,\n   * if they are plain objects, do they have the same shape?\n   */\n  function looseEqual(a, b) {\n      if (a === b)\n          return true;\n      var isObjectA = isObject(a);\n      var isObjectB = isObject(b);\n      if (isObjectA && isObjectB) {\n          try {\n              var isArrayA = Array.isArray(a);\n              var isArrayB = Array.isArray(b);\n              if (isArrayA && isArrayB) {\n                  return (a.length === b.length &&\n                      a.every(function (e, i) {\n                          return looseEqual(e, b[i]);\n                      }));\n              }\n              else if (a instanceof Date && b instanceof Date) {\n                  return a.getTime() === b.getTime();\n              }\n              else if (!isArrayA && !isArrayB) {\n                  var keysA = Object.keys(a);\n                  var keysB = Object.keys(b);\n                  return (keysA.length === keysB.length &&\n                      keysA.every(function (key) {\n                          return looseEqual(a[key], b[key]);\n                      }));\n              }\n              else {\n                  /* istanbul ignore next */\n                  return false;\n              }\n          }\n          catch (e) {\n              /* istanbul ignore next */\n              return false;\n          }\n      }\n      else if (!isObjectA && !isObjectB) {\n          return String(a) === String(b);\n      }\n      else {\n          return false;\n      }\n  }\n  /**\n   * Return the first index at which a loosely equal value can be\n   * found in the array (if value is a plain object, the array must\n   * contain an object of the same shape), or -1 if it is not present.\n   */\n  function looseIndexOf(arr, val) {\n      for (var i = 0; i < arr.length; i++) {\n          if (looseEqual(arr[i], val))\n              return i;\n      }\n      return -1;\n  }\n  /**\n   * Ensure a function is called only once.\n   */\n  function once(fn) {\n      var called = false;\n      return function () {\n          if (!called) {\n              called = true;\n              fn.apply(this, arguments);\n          }\n      };\n  }\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill\n  function hasChanged(x, y) {\n      if (x === y) {\n          return x === 0 && 1 / x !== 1 / y;\n      }\n      else {\n          return x === x || y === y;\n      }\n  }\n\n  var SSR_ATTR = 'data-server-rendered';\n  var ASSET_TYPES = ['component', 'directive', 'filter'];\n  var LIFECYCLE_HOOKS = [\n      'beforeCreate',\n      'created',\n      'beforeMount',\n      'mounted',\n      'beforeUpdate',\n      'updated',\n      'beforeDestroy',\n      'destroyed',\n      'activated',\n      'deactivated',\n      'errorCaptured',\n      'serverPrefetch',\n      'renderTracked',\n      'renderTriggered'\n  ];\n\n  var config = {\n      /**\n       * Option merge strategies (used in core/util/options)\n       */\n      // $flow-disable-line\n      optionMergeStrategies: Object.create(null),\n      /**\n       * Whether to suppress warnings.\n       */\n      silent: false,\n      /**\n       * Show production mode tip message on boot?\n       */\n      productionTip: true,\n      /**\n       * Whether to enable devtools\n       */\n      devtools: true,\n      /**\n       * Whether to record perf\n       */\n      performance: false,\n      /**\n       * Error handler for watcher errors\n       */\n      errorHandler: null,\n      /**\n       * Warn handler for watcher warns\n       */\n      warnHandler: null,\n      /**\n       * Ignore certain custom elements\n       */\n      ignoredElements: [],\n      /**\n       * Custom user key aliases for v-on\n       */\n      // $flow-disable-line\n      keyCodes: Object.create(null),\n      /**\n       * Check if a tag is reserved so that it cannot be registered as a\n       * component. This is platform-dependent and may be overwritten.\n       */\n      isReservedTag: no,\n      /**\n       * Check if an attribute is reserved so that it cannot be used as a component\n       * prop. This is platform-dependent and may be overwritten.\n       */\n      isReservedAttr: no,\n      /**\n       * Check if a tag is an unknown element.\n       * Platform-dependent.\n       */\n      isUnknownElement: no,\n      /**\n       * Get the namespace of an element\n       */\n      getTagNamespace: noop,\n      /**\n       * Parse the real tag name for the specific platform.\n       */\n      parsePlatformTagName: identity,\n      /**\n       * Check if an attribute must be bound using property, e.g. value\n       * Platform-dependent.\n       */\n      mustUseProp: no,\n      /**\n       * Perform updates asynchronously. Intended to be used by Vue Test Utils\n       * This will significantly reduce performance if set to false.\n       */\n      async: true,\n      /**\n       * Exposed for legacy reasons\n       */\n      _lifecycleHooks: LIFECYCLE_HOOKS\n  };\n\n  /**\n   * unicode letters used for parsing html tags, component names and property paths.\n   * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n   * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n   */\n  var unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n  /**\n   * Check if a string starts with $ or _\n   */\n  function isReserved(str) {\n      var c = (str + '').charCodeAt(0);\n      return c === 0x24 || c === 0x5f;\n  }\n  /**\n   * Define a property.\n   */\n  function def(obj, key, val, enumerable) {\n      Object.defineProperty(obj, key, {\n          value: val,\n          enumerable: !!enumerable,\n          writable: true,\n          configurable: true\n      });\n  }\n  /**\n   * Parse simple path.\n   */\n  var bailRE = new RegExp(\"[^\".concat(unicodeRegExp.source, \".$_\\\\d]\"));\n  function parsePath(path) {\n      if (bailRE.test(path)) {\n          return;\n      }\n      var segments = path.split('.');\n      return function (obj) {\n          for (var i = 0; i < segments.length; i++) {\n              if (!obj)\n                  return;\n              obj = obj[segments[i]];\n          }\n          return obj;\n      };\n  }\n\n  // can we use __proto__?\n  var hasProto = '__proto__' in {};\n  // Browser environment sniffing\n  var inBrowser = typeof window !== 'undefined';\n  var UA = inBrowser && window.navigator.userAgent.toLowerCase();\n  var isIE = UA && /msie|trident/.test(UA);\n  var isIE9 = UA && UA.indexOf('msie 9.0') > 0;\n  var isEdge = UA && UA.indexOf('edge/') > 0;\n  UA && UA.indexOf('android') > 0;\n  var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\n  UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n  UA && /phantomjs/.test(UA);\n  var isFF = UA && UA.match(/firefox\\/(\\d+)/);\n  // Firefox has a \"watch\" function on Object.prototype...\n  // @ts-expect-error firebox support\n  var nativeWatch = {}.watch;\n  var supportsPassive = false;\n  if (inBrowser) {\n      try {\n          var opts = {};\n          Object.defineProperty(opts, 'passive', {\n              get: function () {\n                  /* istanbul ignore next */\n                  supportsPassive = true;\n              }\n          }); // https://github.com/facebook/flow/issues/285\n          window.addEventListener('test-passive', null, opts);\n      }\n      catch (e) { }\n  }\n  // this needs to be lazy-evaled because vue may be required before\n  // vue-server-renderer can set VUE_ENV\n  var _isServer;\n  var isServerRendering = function () {\n      if (_isServer === undefined) {\n          /* istanbul ignore if */\n          if (!inBrowser && typeof global !== 'undefined') {\n              // detect presence of vue-server-renderer and avoid\n              // Webpack shimming the process\n              _isServer =\n                  global['process'] && global['process'].env.VUE_ENV === 'server';\n          }\n          else {\n              _isServer = false;\n          }\n      }\n      return _isServer;\n  };\n  // detect devtools\n  var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n  /* istanbul ignore next */\n  function isNative(Ctor) {\n      return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\n  }\n  var hasSymbol = typeof Symbol !== 'undefined' &&\n      isNative(Symbol) &&\n      typeof Reflect !== 'undefined' &&\n      isNative(Reflect.ownKeys);\n  var _Set; // $flow-disable-line\n  /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {\n      // use native Set when available.\n      _Set = Set;\n  }\n  else {\n      // a non-standard Set polyfill that only works with primitive keys.\n      _Set = /** @class */ (function () {\n          function Set() {\n              this.set = Object.create(null);\n          }\n          Set.prototype.has = function (key) {\n              return this.set[key] === true;\n          };\n          Set.prototype.add = function (key) {\n              this.set[key] = true;\n          };\n          Set.prototype.clear = function () {\n              this.set = Object.create(null);\n          };\n          return Set;\n      }());\n  }\n\n  var currentInstance = null;\n  /**\n   * This is exposed for compatibility with v3 (e.g. some functions in VueUse\n   * relies on it). Do not use this internally, just use `currentInstance`.\n   *\n   * @internal this function needs manual type declaration because it relies\n   * on previously manually authored types from Vue 2\n   */\n  function getCurrentInstance() {\n      return currentInstance && { proxy: currentInstance };\n  }\n  /**\n   * @internal\n   */\n  function setCurrentInstance(vm) {\n      if (vm === void 0) { vm = null; }\n      if (!vm)\n          currentInstance && currentInstance._scope.off();\n      currentInstance = vm;\n      vm && vm._scope.on();\n  }\n\n  /**\n   * @internal\n   */\n  var VNode = /** @class */ (function () {\n      function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {\n          this.tag = tag;\n          this.data = data;\n          this.children = children;\n          this.text = text;\n          this.elm = elm;\n          this.ns = undefined;\n          this.context = context;\n          this.fnContext = undefined;\n          this.fnOptions = undefined;\n          this.fnScopeId = undefined;\n          this.key = data && data.key;\n          this.componentOptions = componentOptions;\n          this.componentInstance = undefined;\n          this.parent = undefined;\n          this.raw = false;\n          this.isStatic = false;\n          this.isRootInsert = true;\n          this.isComment = false;\n          this.isCloned = false;\n          this.isOnce = false;\n          this.asyncFactory = asyncFactory;\n          this.asyncMeta = undefined;\n          this.isAsyncPlaceholder = false;\n      }\n      Object.defineProperty(VNode.prototype, \"child\", {\n          // DEPRECATED: alias for componentInstance for backwards compat.\n          /* istanbul ignore next */\n          get: function () {\n              return this.componentInstance;\n          },\n          enumerable: false,\n          configurable: true\n      });\n      return VNode;\n  }());\n  var createEmptyVNode = function (text) {\n      if (text === void 0) { text = ''; }\n      var node = new VNode();\n      node.text = text;\n      node.isComment = true;\n      return node;\n  };\n  function createTextVNode(val) {\n      return new VNode(undefined, undefined, undefined, String(val));\n  }\n  // optimized shallow clone\n  // used for static nodes and slot nodes because they may be reused across\n  // multiple renders, cloning them avoids errors when DOM manipulations rely\n  // on their elm reference.\n  function cloneVNode(vnode) {\n      var cloned = new VNode(vnode.tag, vnode.data, \n      // #7975\n      // clone children array to avoid mutating original in case of cloning\n      // a child.\n      vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);\n      cloned.ns = vnode.ns;\n      cloned.isStatic = vnode.isStatic;\n      cloned.key = vnode.key;\n      cloned.isComment = vnode.isComment;\n      cloned.fnContext = vnode.fnContext;\n      cloned.fnOptions = vnode.fnOptions;\n      cloned.fnScopeId = vnode.fnScopeId;\n      cloned.asyncMeta = vnode.asyncMeta;\n      cloned.isCloned = true;\n      return cloned;\n  }\n\n  /******************************************************************************\n  Copyright (c) Microsoft Corporation.\n\n  Permission to use, copy, modify, and/or distribute this software for any\n  purpose with or without fee is hereby granted.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n  PERFORMANCE OF THIS SOFTWARE.\n  ***************************************************************************** */\n\n  var __assign = function() {\n      __assign = Object.assign || function __assign(t) {\n          for (var s, i = 1, n = arguments.length; i < n; i++) {\n              s = arguments[i];\n              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n          }\n          return t;\n      };\n      return __assign.apply(this, arguments);\n  };\n\n  typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n      var e = new Error(message);\n      return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n  };\n\n  var uid$2 = 0;\n  var pendingCleanupDeps = [];\n  var cleanupDeps = function () {\n      for (var i = 0; i < pendingCleanupDeps.length; i++) {\n          var dep = pendingCleanupDeps[i];\n          dep.subs = dep.subs.filter(function (s) { return s; });\n          dep._pending = false;\n      }\n      pendingCleanupDeps.length = 0;\n  };\n  /**\n   * A dep is an observable that can have multiple\n   * directives subscribing to it.\n   * @internal\n   */\n  var Dep = /** @class */ (function () {\n      function Dep() {\n          // pending subs cleanup\n          this._pending = false;\n          this.id = uid$2++;\n          this.subs = [];\n      }\n      Dep.prototype.addSub = function (sub) {\n          this.subs.push(sub);\n      };\n      Dep.prototype.removeSub = function (sub) {\n          // #12696 deps with massive amount of subscribers are extremely slow to\n          // clean up in Chromium\n          // to workaround this, we unset the sub for now, and clear them on\n          // next scheduler flush.\n          this.subs[this.subs.indexOf(sub)] = null;\n          if (!this._pending) {\n              this._pending = true;\n              pendingCleanupDeps.push(this);\n          }\n      };\n      Dep.prototype.depend = function (info) {\n          if (Dep.target) {\n              Dep.target.addDep(this);\n              if (info && Dep.target.onTrack) {\n                  Dep.target.onTrack(__assign({ effect: Dep.target }, info));\n              }\n          }\n      };\n      Dep.prototype.notify = function (info) {\n          // stabilize the subscriber list first\n          var subs = this.subs.filter(function (s) { return s; });\n          if (!config.async) {\n              // subs aren't sorted in scheduler if not running async\n              // we need to sort them now to make sure they fire in correct\n              // order\n              subs.sort(function (a, b) { return a.id - b.id; });\n          }\n          for (var i = 0, l = subs.length; i < l; i++) {\n              var sub = subs[i];\n              if (info) {\n                  sub.onTrigger &&\n                      sub.onTrigger(__assign({ effect: subs[i] }, info));\n              }\n              sub.update();\n          }\n      };\n      return Dep;\n  }());\n  // The current target watcher being evaluated.\n  // This is globally unique because only one watcher\n  // can be evaluated at a time.\n  Dep.target = null;\n  var targetStack = [];\n  function pushTarget(target) {\n      targetStack.push(target);\n      Dep.target = target;\n  }\n  function popTarget() {\n      targetStack.pop();\n      Dep.target = targetStack[targetStack.length - 1];\n  }\n\n  /*\n   * not type checking this file because flow doesn't play well with\n   * dynamically accessing methods on Array prototype\n   */\n  var arrayProto = Array.prototype;\n  var arrayMethods = Object.create(arrayProto);\n  var methodsToPatch = [\n      'push',\n      'pop',\n      'shift',\n      'unshift',\n      'splice',\n      'sort',\n      'reverse'\n  ];\n  /**\n   * Intercept mutating methods and emit events\n   */\n  methodsToPatch.forEach(function (method) {\n      // cache original method\n      var original = arrayProto[method];\n      def(arrayMethods, method, function mutator() {\n          var args = [];\n          for (var _i = 0; _i < arguments.length; _i++) {\n              args[_i] = arguments[_i];\n          }\n          var result = original.apply(this, args);\n          var ob = this.__ob__;\n          var inserted;\n          switch (method) {\n              case 'push':\n              case 'unshift':\n                  inserted = args;\n                  break;\n              case 'splice':\n                  inserted = args.slice(2);\n                  break;\n          }\n          if (inserted)\n              ob.observeArray(inserted);\n          // notify change\n          {\n              ob.dep.notify({\n                  type: \"array mutation\" /* TriggerOpTypes.ARRAY_MUTATION */,\n                  target: this,\n                  key: method\n              });\n          }\n          return result;\n      });\n  });\n\n  var arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n  var NO_INITIAL_VALUE = {};\n  /**\n   * In some cases we may want to disable observation inside a component's\n   * update computation.\n   */\n  var shouldObserve = true;\n  function toggleObserving(value) {\n      shouldObserve = value;\n  }\n  // ssr mock dep\n  var mockDep = {\n      notify: noop,\n      depend: noop,\n      addSub: noop,\n      removeSub: noop\n  };\n  /**\n   * Observer class that is attached to each observed\n   * object. Once attached, the observer converts the target\n   * object's property keys into getter/setters that\n   * collect dependencies and dispatch updates.\n   */\n  var Observer = /** @class */ (function () {\n      function Observer(value, shallow, mock) {\n          if (shallow === void 0) { shallow = false; }\n          if (mock === void 0) { mock = false; }\n          this.value = value;\n          this.shallow = shallow;\n          this.mock = mock;\n          // this.value = value\n          this.dep = mock ? mockDep : new Dep();\n          this.vmCount = 0;\n          def(value, '__ob__', this);\n          if (isArray(value)) {\n              if (!mock) {\n                  if (hasProto) {\n                      value.__proto__ = arrayMethods;\n                      /* eslint-enable no-proto */\n                  }\n                  else {\n                      for (var i = 0, l = arrayKeys.length; i < l; i++) {\n                          var key = arrayKeys[i];\n                          def(value, key, arrayMethods[key]);\n                      }\n                  }\n              }\n              if (!shallow) {\n                  this.observeArray(value);\n              }\n          }\n          else {\n              /**\n               * Walk through all properties and convert them into\n               * getter/setters. This method should only be called when\n               * value type is Object.\n               */\n              var keys = Object.keys(value);\n              for (var i = 0; i < keys.length; i++) {\n                  var key = keys[i];\n                  defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);\n              }\n          }\n      }\n      /**\n       * Observe a list of Array items.\n       */\n      Observer.prototype.observeArray = function (value) {\n          for (var i = 0, l = value.length; i < l; i++) {\n              observe(value[i], false, this.mock);\n          }\n      };\n      return Observer;\n  }());\n  // helpers\n  /**\n   * Attempt to create an observer instance for a value,\n   * returns the new observer if successfully observed,\n   * or the existing observer if the value already has one.\n   */\n  function observe(value, shallow, ssrMockReactivity) {\n      if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n          return value.__ob__;\n      }\n      if (shouldObserve &&\n          (ssrMockReactivity || !isServerRendering()) &&\n          (isArray(value) || isPlainObject(value)) &&\n          Object.isExtensible(value) &&\n          !value.__v_skip /* ReactiveFlags.SKIP */ &&\n          !isRef(value) &&\n          !(value instanceof VNode)) {\n          return new Observer(value, shallow, ssrMockReactivity);\n      }\n  }\n  /**\n   * Define a reactive property on an Object.\n   */\n  function defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {\n      if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }\n      var dep = new Dep();\n      var property = Object.getOwnPropertyDescriptor(obj, key);\n      if (property && property.configurable === false) {\n          return;\n      }\n      // cater for pre-defined getter/setters\n      var getter = property && property.get;\n      var setter = property && property.set;\n      if ((!getter || setter) &&\n          (val === NO_INITIAL_VALUE || arguments.length === 2)) {\n          val = obj[key];\n      }\n      var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);\n      Object.defineProperty(obj, key, {\n          enumerable: true,\n          configurable: true,\n          get: function reactiveGetter() {\n              var value = getter ? getter.call(obj) : val;\n              if (Dep.target) {\n                  {\n                      dep.depend({\n                          target: obj,\n                          type: \"get\" /* TrackOpTypes.GET */,\n                          key: key\n                      });\n                  }\n                  if (childOb) {\n                      childOb.dep.depend();\n                      if (isArray(value)) {\n                          dependArray(value);\n                      }\n                  }\n              }\n              return isRef(value) && !shallow ? value.value : value;\n          },\n          set: function reactiveSetter(newVal) {\n              var value = getter ? getter.call(obj) : val;\n              if (!hasChanged(value, newVal)) {\n                  return;\n              }\n              if (customSetter) {\n                  customSetter();\n              }\n              if (setter) {\n                  setter.call(obj, newVal);\n              }\n              else if (getter) {\n                  // #7981: for accessor properties without setter\n                  return;\n              }\n              else if (!shallow && isRef(value) && !isRef(newVal)) {\n                  value.value = newVal;\n                  return;\n              }\n              else {\n                  val = newVal;\n              }\n              childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);\n              {\n                  dep.notify({\n                      type: \"set\" /* TriggerOpTypes.SET */,\n                      target: obj,\n                      key: key,\n                      newValue: newVal,\n                      oldValue: value\n                  });\n              }\n          }\n      });\n      return dep;\n  }\n  function set(target, key, val) {\n      if ((isUndef(target) || isPrimitive(target))) {\n          warn(\"Cannot set reactive property on undefined, null, or primitive value: \".concat(target));\n      }\n      if (isReadonly(target)) {\n          warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          return;\n      }\n      var ob = target.__ob__;\n      if (isArray(target) && isValidArrayIndex(key)) {\n          target.length = Math.max(target.length, key);\n          target.splice(key, 1, val);\n          // when mocking for SSR, array methods are not hijacked\n          if (ob && !ob.shallow && ob.mock) {\n              observe(val, false, true);\n          }\n          return val;\n      }\n      if (key in target && !(key in Object.prototype)) {\n          target[key] = val;\n          return val;\n      }\n      if (target._isVue || (ob && ob.vmCount)) {\n          warn('Avoid adding reactive properties to a Vue instance or its root $data ' +\n                  'at runtime - declare it upfront in the data option.');\n          return val;\n      }\n      if (!ob) {\n          target[key] = val;\n          return val;\n      }\n      defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);\n      {\n          ob.dep.notify({\n              type: \"add\" /* TriggerOpTypes.ADD */,\n              target: target,\n              key: key,\n              newValue: val,\n              oldValue: undefined\n          });\n      }\n      return val;\n  }\n  function del(target, key) {\n      if ((isUndef(target) || isPrimitive(target))) {\n          warn(\"Cannot delete reactive property on undefined, null, or primitive value: \".concat(target));\n      }\n      if (isArray(target) && isValidArrayIndex(key)) {\n          target.splice(key, 1);\n          return;\n      }\n      var ob = target.__ob__;\n      if (target._isVue || (ob && ob.vmCount)) {\n          warn('Avoid deleting properties on a Vue instance or its root $data ' +\n                  '- just set it to null.');\n          return;\n      }\n      if (isReadonly(target)) {\n          warn(\"Delete operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          return;\n      }\n      if (!hasOwn(target, key)) {\n          return;\n      }\n      delete target[key];\n      if (!ob) {\n          return;\n      }\n      {\n          ob.dep.notify({\n              type: \"delete\" /* TriggerOpTypes.DELETE */,\n              target: target,\n              key: key\n          });\n      }\n  }\n  /**\n   * Collect dependencies on array elements when the array is touched, since\n   * we cannot intercept array element access like property getters.\n   */\n  function dependArray(value) {\n      for (var e = void 0, i = 0, l = value.length; i < l; i++) {\n          e = value[i];\n          if (e && e.__ob__) {\n              e.__ob__.dep.depend();\n          }\n          if (isArray(e)) {\n              dependArray(e);\n          }\n      }\n  }\n\n  function reactive(target) {\n      makeReactive(target, false);\n      return target;\n  }\n  /**\n   * Return a shallowly-reactive copy of the original object, where only the root\n   * level properties are reactive. It also does not auto-unwrap refs (even at the\n   * root level).\n   */\n  function shallowReactive(target) {\n      makeReactive(target, true);\n      def(target, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n      return target;\n  }\n  function makeReactive(target, shallow) {\n      // if trying to observe a readonly proxy, return the readonly version.\n      if (!isReadonly(target)) {\n          {\n              if (isArray(target)) {\n                  warn(\"Avoid using Array as root value for \".concat(shallow ? \"shallowReactive()\" : \"reactive()\", \" as it cannot be tracked in watch() or watchEffect(). Use \").concat(shallow ? \"shallowRef()\" : \"ref()\", \" instead. This is a Vue-2-only limitation.\"));\n              }\n              var existingOb = target && target.__ob__;\n              if (existingOb && existingOb.shallow !== shallow) {\n                  warn(\"Target is already a \".concat(existingOb.shallow ? \"\" : \"non-\", \"shallow reactive object, and cannot be converted to \").concat(shallow ? \"\" : \"non-\", \"shallow.\"));\n              }\n          }\n          var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);\n          if (!ob) {\n              if (target == null || isPrimitive(target)) {\n                  warn(\"value cannot be made reactive: \".concat(String(target)));\n              }\n              if (isCollectionType(target)) {\n                  warn(\"Vue 2 does not support reactive collection types such as Map or Set.\");\n              }\n          }\n      }\n  }\n  function isReactive(value) {\n      if (isReadonly(value)) {\n          return isReactive(value[\"__v_raw\" /* ReactiveFlags.RAW */]);\n      }\n      return !!(value && value.__ob__);\n  }\n  function isShallow(value) {\n      return !!(value && value.__v_isShallow);\n  }\n  function isReadonly(value) {\n      return !!(value && value.__v_isReadonly);\n  }\n  function isProxy(value) {\n      return isReactive(value) || isReadonly(value);\n  }\n  function toRaw(observed) {\n      var raw = observed && observed[\"__v_raw\" /* ReactiveFlags.RAW */];\n      return raw ? toRaw(raw) : observed;\n  }\n  function markRaw(value) {\n      // non-extensible objects won't be observed anyway\n      if (Object.isExtensible(value)) {\n          def(value, \"__v_skip\" /* ReactiveFlags.SKIP */, true);\n      }\n      return value;\n  }\n  /**\n   * @internal\n   */\n  function isCollectionType(value) {\n      var type = toRawType(value);\n      return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');\n  }\n\n  /**\n   * @internal\n   */\n  var RefFlag = \"__v_isRef\";\n  function isRef(r) {\n      return !!(r && r.__v_isRef === true);\n  }\n  function ref$1(value) {\n      return createRef(value, false);\n  }\n  function shallowRef(value) {\n      return createRef(value, true);\n  }\n  function createRef(rawValue, shallow) {\n      if (isRef(rawValue)) {\n          return rawValue;\n      }\n      var ref = {};\n      def(ref, RefFlag, true);\n      def(ref, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, shallow);\n      def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));\n      return ref;\n  }\n  function triggerRef(ref) {\n      if (!ref.dep) {\n          warn(\"received object is not a triggerable ref.\");\n      }\n      {\n          ref.dep &&\n              ref.dep.notify({\n                  type: \"set\" /* TriggerOpTypes.SET */,\n                  target: ref,\n                  key: 'value'\n              });\n      }\n  }\n  function unref(ref) {\n      return isRef(ref) ? ref.value : ref;\n  }\n  function proxyRefs(objectWithRefs) {\n      if (isReactive(objectWithRefs)) {\n          return objectWithRefs;\n      }\n      var proxy = {};\n      var keys = Object.keys(objectWithRefs);\n      for (var i = 0; i < keys.length; i++) {\n          proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);\n      }\n      return proxy;\n  }\n  function proxyWithRefUnwrap(target, source, key) {\n      Object.defineProperty(target, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              var val = source[key];\n              if (isRef(val)) {\n                  return val.value;\n              }\n              else {\n                  var ob = val && val.__ob__;\n                  if (ob)\n                      ob.dep.depend();\n                  return val;\n              }\n          },\n          set: function (value) {\n              var oldValue = source[key];\n              if (isRef(oldValue) && !isRef(value)) {\n                  oldValue.value = value;\n              }\n              else {\n                  source[key] = value;\n              }\n          }\n      });\n  }\n  function customRef(factory) {\n      var dep = new Dep();\n      var _a = factory(function () {\n          {\n              dep.depend({\n                  target: ref,\n                  type: \"get\" /* TrackOpTypes.GET */,\n                  key: 'value'\n              });\n          }\n      }, function () {\n          {\n              dep.notify({\n                  target: ref,\n                  type: \"set\" /* TriggerOpTypes.SET */,\n                  key: 'value'\n              });\n          }\n      }), get = _a.get, set = _a.set;\n      var ref = {\n          get value() {\n              return get();\n          },\n          set value(newVal) {\n              set(newVal);\n          }\n      };\n      def(ref, RefFlag, true);\n      return ref;\n  }\n  function toRefs(object) {\n      if (!isReactive(object)) {\n          warn(\"toRefs() expects a reactive object but received a plain one.\");\n      }\n      var ret = isArray(object) ? new Array(object.length) : {};\n      for (var key in object) {\n          ret[key] = toRef(object, key);\n      }\n      return ret;\n  }\n  function toRef(object, key, defaultValue) {\n      var val = object[key];\n      if (isRef(val)) {\n          return val;\n      }\n      var ref = {\n          get value() {\n              var val = object[key];\n              return val === undefined ? defaultValue : val;\n          },\n          set value(newVal) {\n              object[key] = newVal;\n          }\n      };\n      def(ref, RefFlag, true);\n      return ref;\n  }\n\n  var rawToReadonlyFlag = \"__v_rawToReadonly\";\n  var rawToShallowReadonlyFlag = \"__v_rawToShallowReadonly\";\n  function readonly(target) {\n      return createReadonly(target, false);\n  }\n  function createReadonly(target, shallow) {\n      if (!isPlainObject(target)) {\n          {\n              if (isArray(target)) {\n                  warn(\"Vue 2 does not support readonly arrays.\");\n              }\n              else if (isCollectionType(target)) {\n                  warn(\"Vue 2 does not support readonly collection types such as Map or Set.\");\n              }\n              else {\n                  warn(\"value cannot be made readonly: \".concat(typeof target));\n              }\n          }\n          return target;\n      }\n      if (!Object.isExtensible(target)) {\n          warn(\"Vue 2 does not support creating readonly proxy for non-extensible object.\");\n      }\n      // already a readonly object\n      if (isReadonly(target)) {\n          return target;\n      }\n      // already has a readonly proxy\n      var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;\n      var existingProxy = target[existingFlag];\n      if (existingProxy) {\n          return existingProxy;\n      }\n      var proxy = Object.create(Object.getPrototypeOf(target));\n      def(target, existingFlag, proxy);\n      def(proxy, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, true);\n      def(proxy, \"__v_raw\" /* ReactiveFlags.RAW */, target);\n      if (isRef(target)) {\n          def(proxy, RefFlag, true);\n      }\n      if (shallow || isShallow(target)) {\n          def(proxy, \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */, true);\n      }\n      var keys = Object.keys(target);\n      for (var i = 0; i < keys.length; i++) {\n          defineReadonlyProperty(proxy, target, keys[i], shallow);\n      }\n      return proxy;\n  }\n  function defineReadonlyProperty(proxy, target, key, shallow) {\n      Object.defineProperty(proxy, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              var val = target[key];\n              return shallow || !isPlainObject(val) ? val : readonly(val);\n          },\n          set: function () {\n              warn(\"Set operation on key \\\"\".concat(key, \"\\\" failed: target is readonly.\"));\n          }\n      });\n  }\n  /**\n   * Returns a reactive-copy of the original object, where only the root level\n   * properties are readonly, and does NOT unwrap refs nor recursively convert\n   * returned properties.\n   * This is used for creating the props proxy object for stateful components.\n   */\n  function shallowReadonly(target) {\n      return createReadonly(target, true);\n  }\n\n  function computed(getterOrOptions, debugOptions) {\n      var getter;\n      var setter;\n      var onlyGetter = isFunction(getterOrOptions);\n      if (onlyGetter) {\n          getter = getterOrOptions;\n          setter = function () {\n                  warn('Write operation failed: computed value is readonly');\n              }\n              ;\n      }\n      else {\n          getter = getterOrOptions.get;\n          setter = getterOrOptions.set;\n      }\n      var watcher = isServerRendering()\n          ? null\n          : new Watcher(currentInstance, getter, noop, { lazy: true });\n      if (watcher && debugOptions) {\n          watcher.onTrack = debugOptions.onTrack;\n          watcher.onTrigger = debugOptions.onTrigger;\n      }\n      var ref = {\n          // some libs rely on the presence effect for checking computed refs\n          // from normal refs, but the implementation doesn't matter\n          effect: watcher,\n          get value() {\n              if (watcher) {\n                  if (watcher.dirty) {\n                      watcher.evaluate();\n                  }\n                  if (Dep.target) {\n                      if (Dep.target.onTrack) {\n                          Dep.target.onTrack({\n                              effect: Dep.target,\n                              target: ref,\n                              type: \"get\" /* TrackOpTypes.GET */,\n                              key: 'value'\n                          });\n                      }\n                      watcher.depend();\n                  }\n                  return watcher.value;\n              }\n              else {\n                  return getter();\n              }\n          },\n          set value(newVal) {\n              setter(newVal);\n          }\n      };\n      def(ref, RefFlag, true);\n      def(ref, \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */, onlyGetter);\n      return ref;\n  }\n\n  var WATCHER = \"watcher\";\n  var WATCHER_CB = \"\".concat(WATCHER, \" callback\");\n  var WATCHER_GETTER = \"\".concat(WATCHER, \" getter\");\n  var WATCHER_CLEANUP = \"\".concat(WATCHER, \" cleanup\");\n  // Simple effect.\n  function watchEffect(effect, options) {\n      return doWatch(effect, null, options);\n  }\n  function watchPostEffect(effect, options) {\n      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'post' }) ));\n  }\n  function watchSyncEffect(effect, options) {\n      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'sync' }) ));\n  }\n  // initial value for watchers to trigger on undefined initial values\n  var INITIAL_WATCHER_VALUE = {};\n  // implementation\n  function watch(source, cb, options) {\n      if (typeof cb !== 'function') {\n          warn(\"`watch(fn, options?)` signature has been moved to a separate API. \" +\n              \"Use `watchEffect(fn, options?)` instead. `watch` now only \" +\n              \"supports `watch(source, cb, options?) signature.\");\n      }\n      return doWatch(source, cb, options);\n  }\n  function doWatch(source, cb, _a) {\n      var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;\n      if (!cb) {\n          if (immediate !== undefined) {\n              warn(\"watch() \\\"immediate\\\" option is only respected when using the \" +\n                  \"watch(source, callback, options?) signature.\");\n          }\n          if (deep !== undefined) {\n              warn(\"watch() \\\"deep\\\" option is only respected when using the \" +\n                  \"watch(source, callback, options?) signature.\");\n          }\n      }\n      var warnInvalidSource = function (s) {\n          warn(\"Invalid watch source: \".concat(s, \". A watch source can only be a getter/effect \") +\n              \"function, a ref, a reactive object, or an array of these types.\");\n      };\n      var instance = currentInstance;\n      var call = function (fn, type, args) {\n          if (args === void 0) { args = null; }\n          var res = invokeWithErrorHandling(fn, null, args, instance, type);\n          if (deep && res && res.__ob__)\n              res.__ob__.dep.depend();\n          return res;\n      };\n      var getter;\n      var forceTrigger = false;\n      var isMultiSource = false;\n      if (isRef(source)) {\n          getter = function () { return source.value; };\n          forceTrigger = isShallow(source);\n      }\n      else if (isReactive(source)) {\n          getter = function () {\n              source.__ob__.dep.depend();\n              return source;\n          };\n          deep = true;\n      }\n      else if (isArray(source)) {\n          isMultiSource = true;\n          forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });\n          getter = function () {\n              return source.map(function (s) {\n                  if (isRef(s)) {\n                      return s.value;\n                  }\n                  else if (isReactive(s)) {\n                      s.__ob__.dep.depend();\n                      return traverse(s);\n                  }\n                  else if (isFunction(s)) {\n                      return call(s, WATCHER_GETTER);\n                  }\n                  else {\n                      warnInvalidSource(s);\n                  }\n              });\n          };\n      }\n      else if (isFunction(source)) {\n          if (cb) {\n              // getter with cb\n              getter = function () { return call(source, WATCHER_GETTER); };\n          }\n          else {\n              // no cb -> simple effect\n              getter = function () {\n                  if (instance && instance._isDestroyed) {\n                      return;\n                  }\n                  if (cleanup) {\n                      cleanup();\n                  }\n                  return call(source, WATCHER, [onCleanup]);\n              };\n          }\n      }\n      else {\n          getter = noop;\n          warnInvalidSource(source);\n      }\n      if (cb && deep) {\n          var baseGetter_1 = getter;\n          getter = function () { return traverse(baseGetter_1()); };\n      }\n      var cleanup;\n      var onCleanup = function (fn) {\n          cleanup = watcher.onStop = function () {\n              call(fn, WATCHER_CLEANUP);\n          };\n      };\n      // in SSR there is no need to setup an actual effect, and it should be noop\n      // unless it's eager\n      if (isServerRendering()) {\n          // we will also not call the invalidate callback (+ runner is not set up)\n          onCleanup = noop;\n          if (!cb) {\n              getter();\n          }\n          else if (immediate) {\n              call(cb, WATCHER_CB, [\n                  getter(),\n                  isMultiSource ? [] : undefined,\n                  onCleanup\n              ]);\n          }\n          return noop;\n      }\n      var watcher = new Watcher(currentInstance, getter, noop, {\n          lazy: true\n      });\n      watcher.noRecurse = !cb;\n      var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\n      // overwrite default run\n      watcher.run = function () {\n          if (!watcher.active) {\n              return;\n          }\n          if (cb) {\n              // watch(source, cb)\n              var newValue = watcher.get();\n              if (deep ||\n                  forceTrigger ||\n                  (isMultiSource\n                      ? newValue.some(function (v, i) {\n                          return hasChanged(v, oldValue[i]);\n                      })\n                      : hasChanged(newValue, oldValue))) {\n                  // cleanup before running cb again\n                  if (cleanup) {\n                      cleanup();\n                  }\n                  call(cb, WATCHER_CB, [\n                      newValue,\n                      // pass undefined as the old value when it's changed for the first time\n                      oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\n                      onCleanup\n                  ]);\n                  oldValue = newValue;\n              }\n          }\n          else {\n              // watchEffect\n              watcher.get();\n          }\n      };\n      if (flush === 'sync') {\n          watcher.update = watcher.run;\n      }\n      else if (flush === 'post') {\n          watcher.post = true;\n          watcher.update = function () { return queueWatcher(watcher); };\n      }\n      else {\n          // pre\n          watcher.update = function () {\n              if (instance && instance === currentInstance && !instance._isMounted) {\n                  // pre-watcher triggered before\n                  var buffer = instance._preWatchers || (instance._preWatchers = []);\n                  if (buffer.indexOf(watcher) < 0)\n                      buffer.push(watcher);\n              }\n              else {\n                  queueWatcher(watcher);\n              }\n          };\n      }\n      {\n          watcher.onTrack = onTrack;\n          watcher.onTrigger = onTrigger;\n      }\n      // initial run\n      if (cb) {\n          if (immediate) {\n              watcher.run();\n          }\n          else {\n              oldValue = watcher.get();\n          }\n      }\n      else if (flush === 'post' && instance) {\n          instance.$once('hook:mounted', function () { return watcher.get(); });\n      }\n      else {\n          watcher.get();\n      }\n      return function () {\n          watcher.teardown();\n      };\n  }\n\n  var activeEffectScope;\n  var EffectScope = /** @class */ (function () {\n      function EffectScope(detached) {\n          if (detached === void 0) { detached = false; }\n          this.detached = detached;\n          /**\n           * @internal\n           */\n          this.active = true;\n          /**\n           * @internal\n           */\n          this.effects = [];\n          /**\n           * @internal\n           */\n          this.cleanups = [];\n          this.parent = activeEffectScope;\n          if (!detached && activeEffectScope) {\n              this.index =\n                  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n          }\n      }\n      EffectScope.prototype.run = function (fn) {\n          if (this.active) {\n              var currentEffectScope = activeEffectScope;\n              try {\n                  activeEffectScope = this;\n                  return fn();\n              }\n              finally {\n                  activeEffectScope = currentEffectScope;\n              }\n          }\n          else {\n              warn(\"cannot run an inactive effect scope.\");\n          }\n      };\n      /**\n       * This should only be called on non-detached scopes\n       * @internal\n       */\n      EffectScope.prototype.on = function () {\n          activeEffectScope = this;\n      };\n      /**\n       * This should only be called on non-detached scopes\n       * @internal\n       */\n      EffectScope.prototype.off = function () {\n          activeEffectScope = this.parent;\n      };\n      EffectScope.prototype.stop = function (fromParent) {\n          if (this.active) {\n              var i = void 0, l = void 0;\n              for (i = 0, l = this.effects.length; i < l; i++) {\n                  this.effects[i].teardown();\n              }\n              for (i = 0, l = this.cleanups.length; i < l; i++) {\n                  this.cleanups[i]();\n              }\n              if (this.scopes) {\n                  for (i = 0, l = this.scopes.length; i < l; i++) {\n                      this.scopes[i].stop(true);\n                  }\n              }\n              // nested scope, dereference from parent to avoid memory leaks\n              if (!this.detached && this.parent && !fromParent) {\n                  // optimized O(1) removal\n                  var last = this.parent.scopes.pop();\n                  if (last && last !== this) {\n                      this.parent.scopes[this.index] = last;\n                      last.index = this.index;\n                  }\n              }\n              this.parent = undefined;\n              this.active = false;\n          }\n      };\n      return EffectScope;\n  }());\n  function effectScope(detached) {\n      return new EffectScope(detached);\n  }\n  /**\n   * @internal\n   */\n  function recordEffectScope(effect, scope) {\n      if (scope === void 0) { scope = activeEffectScope; }\n      if (scope && scope.active) {\n          scope.effects.push(effect);\n      }\n  }\n  function getCurrentScope() {\n      return activeEffectScope;\n  }\n  function onScopeDispose(fn) {\n      if (activeEffectScope) {\n          activeEffectScope.cleanups.push(fn);\n      }\n      else {\n          warn(\"onScopeDispose() is called when there is no active effect scope\" +\n              \" to be associated with.\");\n      }\n  }\n\n  function provide(key, value) {\n      if (!currentInstance) {\n          {\n              warn(\"provide() can only be used inside setup().\");\n          }\n      }\n      else {\n          // TS doesn't allow symbol as index type\n          resolveProvided(currentInstance)[key] = value;\n      }\n  }\n  function resolveProvided(vm) {\n      // by default an instance inherits its parent's provides object\n      // but when it needs to provide values of its own, it creates its\n      // own provides object using parent provides object as prototype.\n      // this way in `inject` we can simply look up injections from direct\n      // parent and let the prototype chain do the work.\n      var existing = vm._provided;\n      var parentProvides = vm.$parent && vm.$parent._provided;\n      if (parentProvides === existing) {\n          return (vm._provided = Object.create(parentProvides));\n      }\n      else {\n          return existing;\n      }\n  }\n  function inject(key, defaultValue, treatDefaultAsFactory) {\n      if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }\n      // fallback to `currentRenderingInstance` so that this can be called in\n      // a functional component\n      var instance = currentInstance;\n      if (instance) {\n          // #2400\n          // to support `app.use` plugins,\n          // fallback to appContext's `provides` if the instance is at root\n          var provides = instance.$parent && instance.$parent._provided;\n          if (provides && key in provides) {\n              // TS doesn't allow symbol as index type\n              return provides[key];\n          }\n          else if (arguments.length > 1) {\n              return treatDefaultAsFactory && isFunction(defaultValue)\n                  ? defaultValue.call(instance)\n                  : defaultValue;\n          }\n          else {\n              warn(\"injection \\\"\".concat(String(key), \"\\\" not found.\"));\n          }\n      }\n      else {\n          warn(\"inject() can only be used inside setup() or functional components.\");\n      }\n  }\n\n  var normalizeEvent = cached(function (name) {\n      var passive = name.charAt(0) === '&';\n      name = passive ? name.slice(1) : name;\n      var once = name.charAt(0) === '~'; // Prefixed last, checked first\n      name = once ? name.slice(1) : name;\n      var capture = name.charAt(0) === '!';\n      name = capture ? name.slice(1) : name;\n      return {\n          name: name,\n          once: once,\n          capture: capture,\n          passive: passive\n      };\n  });\n  function createFnInvoker(fns, vm) {\n      function invoker() {\n          var fns = invoker.fns;\n          if (isArray(fns)) {\n              var cloned = fns.slice();\n              for (var i = 0; i < cloned.length; i++) {\n                  invokeWithErrorHandling(cloned[i], null, arguments, vm, \"v-on handler\");\n              }\n          }\n          else {\n              // return handler return value for single handlers\n              return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\");\n          }\n      }\n      invoker.fns = fns;\n      return invoker;\n  }\n  function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {\n      var name, cur, old, event;\n      for (name in on) {\n          cur = on[name];\n          old = oldOn[name];\n          event = normalizeEvent(name);\n          if (isUndef(cur)) {\n              warn(\"Invalid handler for event \\\"\".concat(event.name, \"\\\": got \") + String(cur), vm);\n          }\n          else if (isUndef(old)) {\n              if (isUndef(cur.fns)) {\n                  cur = on[name] = createFnInvoker(cur, vm);\n              }\n              if (isTrue(event.once)) {\n                  cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n              }\n              add(event.name, cur, event.capture, event.passive, event.params);\n          }\n          else if (cur !== old) {\n              old.fns = cur;\n              on[name] = old;\n          }\n      }\n      for (name in oldOn) {\n          if (isUndef(on[name])) {\n              event = normalizeEvent(name);\n              remove(event.name, oldOn[name], event.capture);\n          }\n      }\n  }\n\n  function mergeVNodeHook(def, hookKey, hook) {\n      if (def instanceof VNode) {\n          def = def.data.hook || (def.data.hook = {});\n      }\n      var invoker;\n      var oldHook = def[hookKey];\n      function wrappedHook() {\n          hook.apply(this, arguments);\n          // important: remove merged hook to ensure it's called only once\n          // and prevent memory leak\n          remove$2(invoker.fns, wrappedHook);\n      }\n      if (isUndef(oldHook)) {\n          // no existing hook\n          invoker = createFnInvoker([wrappedHook]);\n      }\n      else {\n          /* istanbul ignore if */\n          if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n              // already a merged invoker\n              invoker = oldHook;\n              invoker.fns.push(wrappedHook);\n          }\n          else {\n              // existing plain hook\n              invoker = createFnInvoker([oldHook, wrappedHook]);\n          }\n      }\n      invoker.merged = true;\n      def[hookKey] = invoker;\n  }\n\n  function extractPropsFromVNodeData(data, Ctor, tag) {\n      // we are only extracting raw values here.\n      // validation and default values are handled in the child\n      // component itself.\n      var propOptions = Ctor.options.props;\n      if (isUndef(propOptions)) {\n          return;\n      }\n      var res = {};\n      var attrs = data.attrs, props = data.props;\n      if (isDef(attrs) || isDef(props)) {\n          for (var key in propOptions) {\n              var altKey = hyphenate(key);\n              {\n                  var keyInLowerCase = key.toLowerCase();\n                  if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {\n                      tip(\"Prop \\\"\".concat(keyInLowerCase, \"\\\" is passed to component \") +\n                          \"\".concat(formatComponentName(\n                          // @ts-expect-error tag is string\n                          tag || Ctor), \", but the declared prop name is\") +\n                          \" \\\"\".concat(key, \"\\\". \") +\n                          \"Note that HTML attributes are case-insensitive and camelCased \" +\n                          \"props need to use their kebab-case equivalents when using in-DOM \" +\n                          \"templates. You should probably use \\\"\".concat(altKey, \"\\\" instead of \\\"\").concat(key, \"\\\".\"));\n                  }\n              }\n              checkProp(res, props, key, altKey, true) ||\n                  checkProp(res, attrs, key, altKey, false);\n          }\n      }\n      return res;\n  }\n  function checkProp(res, hash, key, altKey, preserve) {\n      if (isDef(hash)) {\n          if (hasOwn(hash, key)) {\n              res[key] = hash[key];\n              if (!preserve) {\n                  delete hash[key];\n              }\n              return true;\n          }\n          else if (hasOwn(hash, altKey)) {\n              res[key] = hash[altKey];\n              if (!preserve) {\n                  delete hash[altKey];\n              }\n              return true;\n          }\n      }\n      return false;\n  }\n\n  // The template compiler attempts to minimize the need for normalization by\n  // statically analyzing the template at compile time.\n  //\n  // For plain HTML markup, normalization can be completely skipped because the\n  // generated render function is guaranteed to return Array<VNode>. There are\n  // two cases where extra normalization is needed:\n  // 1. When the children contains components - because a functional component\n  // may return an Array instead of a single root. In this case, just a simple\n  // normalization is needed - if any child is an Array, we flatten the whole\n  // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n  // because functional components already normalize their own children.\n  function simpleNormalizeChildren(children) {\n      for (var i = 0; i < children.length; i++) {\n          if (isArray(children[i])) {\n              return Array.prototype.concat.apply([], children);\n          }\n      }\n      return children;\n  }\n  // 2. When the children contains constructs that always generated nested Arrays,\n  // e.g. <template>, <slot>, v-for, or when the children is provided by user\n  // with hand-written render functions / JSX. In such cases a full normalization\n  // is needed to cater to all possible types of children values.\n  function normalizeChildren(children) {\n      return isPrimitive(children)\n          ? [createTextVNode(children)]\n          : isArray(children)\n              ? normalizeArrayChildren(children)\n              : undefined;\n  }\n  function isTextNode(node) {\n      return isDef(node) && isDef(node.text) && isFalse(node.isComment);\n  }\n  function normalizeArrayChildren(children, nestedIndex) {\n      var res = [];\n      var i, c, lastIndex, last;\n      for (i = 0; i < children.length; i++) {\n          c = children[i];\n          if (isUndef(c) || typeof c === 'boolean')\n              continue;\n          lastIndex = res.length - 1;\n          last = res[lastIndex];\n          //  nested\n          if (isArray(c)) {\n              if (c.length > 0) {\n                  c = normalizeArrayChildren(c, \"\".concat(nestedIndex || '', \"_\").concat(i));\n                  // merge adjacent text nodes\n                  if (isTextNode(c[0]) && isTextNode(last)) {\n                      res[lastIndex] = createTextVNode(last.text + c[0].text);\n                      c.shift();\n                  }\n                  res.push.apply(res, c);\n              }\n          }\n          else if (isPrimitive(c)) {\n              if (isTextNode(last)) {\n                  // merge adjacent text nodes\n                  // this is necessary for SSR hydration because text nodes are\n                  // essentially merged when rendered to HTML strings\n                  res[lastIndex] = createTextVNode(last.text + c);\n              }\n              else if (c !== '') {\n                  // convert primitive to vnode\n                  res.push(createTextVNode(c));\n              }\n          }\n          else {\n              if (isTextNode(c) && isTextNode(last)) {\n                  // merge adjacent text nodes\n                  res[lastIndex] = createTextVNode(last.text + c.text);\n              }\n              else {\n                  // default key for nested array children (likely generated by v-for)\n                  if (isTrue(children._isVList) &&\n                      isDef(c.tag) &&\n                      isUndef(c.key) &&\n                      isDef(nestedIndex)) {\n                      c.key = \"__vlist\".concat(nestedIndex, \"_\").concat(i, \"__\");\n                  }\n                  res.push(c);\n              }\n          }\n      }\n      return res;\n  }\n\n  /**\n   * Runtime helper for rendering v-for lists.\n   */\n  function renderList(val, render) {\n      var ret = null, i, l, keys, key;\n      if (isArray(val) || typeof val === 'string') {\n          ret = new Array(val.length);\n          for (i = 0, l = val.length; i < l; i++) {\n              ret[i] = render(val[i], i);\n          }\n      }\n      else if (typeof val === 'number') {\n          ret = new Array(val);\n          for (i = 0; i < val; i++) {\n              ret[i] = render(i + 1, i);\n          }\n      }\n      else if (isObject(val)) {\n          if (hasSymbol && val[Symbol.iterator]) {\n              ret = [];\n              var iterator = val[Symbol.iterator]();\n              var result = iterator.next();\n              while (!result.done) {\n                  ret.push(render(result.value, ret.length));\n                  result = iterator.next();\n              }\n          }\n          else {\n              keys = Object.keys(val);\n              ret = new Array(keys.length);\n              for (i = 0, l = keys.length; i < l; i++) {\n                  key = keys[i];\n                  ret[i] = render(val[key], key, i);\n              }\n          }\n      }\n      if (!isDef(ret)) {\n          ret = [];\n      }\n      ret._isVList = true;\n      return ret;\n  }\n\n  /**\n   * Runtime helper for rendering <slot>\n   */\n  function renderSlot(name, fallbackRender, props, bindObject) {\n      var scopedSlotFn = this.$scopedSlots[name];\n      var nodes;\n      if (scopedSlotFn) {\n          // scoped slot\n          props = props || {};\n          if (bindObject) {\n              if (!isObject(bindObject)) {\n                  warn('slot v-bind without argument expects an Object', this);\n              }\n              props = extend(extend({}, bindObject), props);\n          }\n          nodes =\n              scopedSlotFn(props) ||\n                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n      }\n      else {\n          nodes =\n              this.$slots[name] ||\n                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);\n      }\n      var target = props && props.slot;\n      if (target) {\n          return this.$createElement('template', { slot: target }, nodes);\n      }\n      else {\n          return nodes;\n      }\n  }\n\n  /**\n   * Runtime helper for resolving filters\n   */\n  function resolveFilter(id) {\n      return resolveAsset(this.$options, 'filters', id, true) || identity;\n  }\n\n  function isKeyNotMatch(expect, actual) {\n      if (isArray(expect)) {\n          return expect.indexOf(actual) === -1;\n      }\n      else {\n          return expect !== actual;\n      }\n  }\n  /**\n   * Runtime helper for checking keyCodes from config.\n   * exposed as Vue.prototype._k\n   * passing in eventKeyName as last argument separately for backwards compat\n   */\n  function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {\n      var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n      if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n          return isKeyNotMatch(builtInKeyName, eventKeyName);\n      }\n      else if (mappedKeyCode) {\n          return isKeyNotMatch(mappedKeyCode, eventKeyCode);\n      }\n      else if (eventKeyName) {\n          return hyphenate(eventKeyName) !== key;\n      }\n      return eventKeyCode === undefined;\n  }\n\n  /**\n   * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n   */\n  function bindObjectProps(data, tag, value, asProp, isSync) {\n      if (value) {\n          if (!isObject(value)) {\n              warn('v-bind without argument expects an Object or Array value', this);\n          }\n          else {\n              if (isArray(value)) {\n                  value = toObject(value);\n              }\n              var hash = void 0;\n              var _loop_1 = function (key) {\n                  if (key === 'class' || key === 'style' || isReservedAttribute(key)) {\n                      hash = data;\n                  }\n                  else {\n                      var type = data.attrs && data.attrs.type;\n                      hash =\n                          asProp || config.mustUseProp(tag, type, key)\n                              ? data.domProps || (data.domProps = {})\n                              : data.attrs || (data.attrs = {});\n                  }\n                  var camelizedKey = camelize(key);\n                  var hyphenatedKey = hyphenate(key);\n                  if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n                      hash[key] = value[key];\n                      if (isSync) {\n                          var on = data.on || (data.on = {});\n                          on[\"update:\".concat(key)] = function ($event) {\n                              value[key] = $event;\n                          };\n                      }\n                  }\n              };\n              for (var key in value) {\n                  _loop_1(key);\n              }\n          }\n      }\n      return data;\n  }\n\n  /**\n   * Runtime helper for rendering static trees.\n   */\n  function renderStatic(index, isInFor) {\n      var cached = this._staticTrees || (this._staticTrees = []);\n      var tree = cached[index];\n      // if has already-rendered static tree and not inside v-for,\n      // we can reuse the same tree.\n      if (tree && !isInFor) {\n          return tree;\n      }\n      // otherwise, render a fresh tree.\n      tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates\n      );\n      markStatic(tree, \"__static__\".concat(index), false);\n      return tree;\n  }\n  /**\n   * Runtime helper for v-once.\n   * Effectively it means marking the node as static with a unique key.\n   */\n  function markOnce(tree, index, key) {\n      markStatic(tree, \"__once__\".concat(index).concat(key ? \"_\".concat(key) : \"\"), true);\n      return tree;\n  }\n  function markStatic(tree, key, isOnce) {\n      if (isArray(tree)) {\n          for (var i = 0; i < tree.length; i++) {\n              if (tree[i] && typeof tree[i] !== 'string') {\n                  markStaticNode(tree[i], \"\".concat(key, \"_\").concat(i), isOnce);\n              }\n          }\n      }\n      else {\n          markStaticNode(tree, key, isOnce);\n      }\n  }\n  function markStaticNode(node, key, isOnce) {\n      node.isStatic = true;\n      node.key = key;\n      node.isOnce = isOnce;\n  }\n\n  function bindObjectListeners(data, value) {\n      if (value) {\n          if (!isPlainObject(value)) {\n              warn('v-on without argument expects an Object value', this);\n          }\n          else {\n              var on = (data.on = data.on ? extend({}, data.on) : {});\n              for (var key in value) {\n                  var existing = on[key];\n                  var ours = value[key];\n                  on[key] = existing ? [].concat(existing, ours) : ours;\n              }\n          }\n      }\n      return data;\n  }\n\n  function resolveScopedSlots(fns, res, \n  // the following are added in 2.6\n  hasDynamicKeys, contentHashKey) {\n      res = res || { $stable: !hasDynamicKeys };\n      for (var i = 0; i < fns.length; i++) {\n          var slot = fns[i];\n          if (isArray(slot)) {\n              resolveScopedSlots(slot, res, hasDynamicKeys);\n          }\n          else if (slot) {\n              // marker for reverse proxying v-slot without scope on this.$slots\n              // @ts-expect-error\n              if (slot.proxy) {\n                  // @ts-expect-error\n                  slot.fn.proxy = true;\n              }\n              res[slot.key] = slot.fn;\n          }\n      }\n      if (contentHashKey) {\n          res.$key = contentHashKey;\n      }\n      return res;\n  }\n\n  // helper to process dynamic keys for dynamic arguments in v-bind and v-on.\n  function bindDynamicKeys(baseObj, values) {\n      for (var i = 0; i < values.length; i += 2) {\n          var key = values[i];\n          if (typeof key === 'string' && key) {\n              baseObj[values[i]] = values[i + 1];\n          }\n          else if (key !== '' && key !== null) {\n              // null is a special value for explicitly removing a binding\n              warn(\"Invalid value for dynamic directive argument (expected string or null): \".concat(key), this);\n          }\n      }\n      return baseObj;\n  }\n  // helper to dynamically append modifier runtime markers to event names.\n  // ensure only append when value is already string, otherwise it will be cast\n  // to string and cause the type check to miss.\n  function prependModifier(value, symbol) {\n      return typeof value === 'string' ? symbol + value : value;\n  }\n\n  function installRenderHelpers(target) {\n      target._o = markOnce;\n      target._n = toNumber;\n      target._s = toString;\n      target._l = renderList;\n      target._t = renderSlot;\n      target._q = looseEqual;\n      target._i = looseIndexOf;\n      target._m = renderStatic;\n      target._f = resolveFilter;\n      target._k = checkKeyCodes;\n      target._b = bindObjectProps;\n      target._v = createTextVNode;\n      target._e = createEmptyVNode;\n      target._u = resolveScopedSlots;\n      target._g = bindObjectListeners;\n      target._d = bindDynamicKeys;\n      target._p = prependModifier;\n  }\n\n  /**\n   * Runtime helper for resolving raw children VNodes into a slot object.\n   */\n  function resolveSlots(children, context) {\n      if (!children || !children.length) {\n          return {};\n      }\n      var slots = {};\n      for (var i = 0, l = children.length; i < l; i++) {\n          var child = children[i];\n          var data = child.data;\n          // remove slot attribute if the node is resolved as a Vue slot node\n          if (data && data.attrs && data.attrs.slot) {\n              delete data.attrs.slot;\n          }\n          // named slots should only be respected if the vnode was rendered in the\n          // same context.\n          if ((child.context === context || child.fnContext === context) &&\n              data &&\n              data.slot != null) {\n              var name_1 = data.slot;\n              var slot = slots[name_1] || (slots[name_1] = []);\n              if (child.tag === 'template') {\n                  slot.push.apply(slot, child.children || []);\n              }\n              else {\n                  slot.push(child);\n              }\n          }\n          else {\n              (slots.default || (slots.default = [])).push(child);\n          }\n      }\n      // ignore slots that contains only whitespace\n      for (var name_2 in slots) {\n          if (slots[name_2].every(isWhitespace)) {\n              delete slots[name_2];\n          }\n      }\n      return slots;\n  }\n  function isWhitespace(node) {\n      return (node.isComment && !node.asyncFactory) || node.text === ' ';\n  }\n\n  function isAsyncPlaceholder(node) {\n      // @ts-expect-error not really boolean type\n      return node.isComment && node.asyncFactory;\n  }\n\n  function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {\n      var res;\n      var hasNormalSlots = Object.keys(normalSlots).length > 0;\n      var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;\n      var key = scopedSlots && scopedSlots.$key;\n      if (!scopedSlots) {\n          res = {};\n      }\n      else if (scopedSlots._normalized) {\n          // fast path 1: child component re-render only, parent did not change\n          return scopedSlots._normalized;\n      }\n      else if (isStable &&\n          prevScopedSlots &&\n          prevScopedSlots !== emptyObject &&\n          key === prevScopedSlots.$key &&\n          !hasNormalSlots &&\n          !prevScopedSlots.$hasNormal) {\n          // fast path 2: stable scoped slots w/ no normal slots to proxy,\n          // only need to normalize once\n          return prevScopedSlots;\n      }\n      else {\n          res = {};\n          for (var key_1 in scopedSlots) {\n              if (scopedSlots[key_1] && key_1[0] !== '$') {\n                  res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);\n              }\n          }\n      }\n      // expose normal slots on scopedSlots\n      for (var key_2 in normalSlots) {\n          if (!(key_2 in res)) {\n              res[key_2] = proxyNormalSlot(normalSlots, key_2);\n          }\n      }\n      // avoriaz seems to mock a non-extensible $scopedSlots object\n      // and when that is passed down this would cause an error\n      if (scopedSlots && Object.isExtensible(scopedSlots)) {\n          scopedSlots._normalized = res;\n      }\n      def(res, '$stable', isStable);\n      def(res, '$key', key);\n      def(res, '$hasNormal', hasNormalSlots);\n      return res;\n  }\n  function normalizeScopedSlot(vm, normalSlots, key, fn) {\n      var normalized = function () {\n          var cur = currentInstance;\n          setCurrentInstance(vm);\n          var res = arguments.length ? fn.apply(null, arguments) : fn({});\n          res =\n              res && typeof res === 'object' && !isArray(res)\n                  ? [res] // single vnode\n                  : normalizeChildren(res);\n          var vnode = res && res[0];\n          setCurrentInstance(cur);\n          return res &&\n              (!vnode ||\n                  (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391\n              ? undefined\n              : res;\n      };\n      // this is a slot using the new v-slot syntax without scope. although it is\n      // compiled as a scoped slot, render fn users would expect it to be present\n      // on this.$slots because the usage is semantically a normal slot.\n      if (fn.proxy) {\n          Object.defineProperty(normalSlots, key, {\n              get: normalized,\n              enumerable: true,\n              configurable: true\n          });\n      }\n      return normalized;\n  }\n  function proxyNormalSlot(slots, key) {\n      return function () { return slots[key]; };\n  }\n\n  function initSetup(vm) {\n      var options = vm.$options;\n      var setup = options.setup;\n      if (setup) {\n          var ctx = (vm._setupContext = createSetupContext(vm));\n          setCurrentInstance(vm);\n          pushTarget();\n          var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, \"setup\");\n          popTarget();\n          setCurrentInstance();\n          if (isFunction(setupResult)) {\n              // render function\n              // @ts-ignore\n              options.render = setupResult;\n          }\n          else if (isObject(setupResult)) {\n              // bindings\n              if (setupResult instanceof VNode) {\n                  warn(\"setup() should not return VNodes directly - \" +\n                      \"return a render function instead.\");\n              }\n              vm._setupState = setupResult;\n              // __sfc indicates compiled bindings from <script setup>\n              if (!setupResult.__sfc) {\n                  for (var key in setupResult) {\n                      if (!isReserved(key)) {\n                          proxyWithRefUnwrap(vm, setupResult, key);\n                      }\n                      else {\n                          warn(\"Avoid using variables that start with _ or $ in setup().\");\n                      }\n                  }\n              }\n              else {\n                  // exposed for compiled render fn\n                  var proxy = (vm._setupProxy = {});\n                  for (var key in setupResult) {\n                      if (key !== '__sfc') {\n                          proxyWithRefUnwrap(proxy, setupResult, key);\n                      }\n                  }\n              }\n          }\n          else if (setupResult !== undefined) {\n              warn(\"setup() should return an object. Received: \".concat(setupResult === null ? 'null' : typeof setupResult));\n          }\n      }\n  }\n  function createSetupContext(vm) {\n      var exposeCalled = false;\n      return {\n          get attrs() {\n              if (!vm._attrsProxy) {\n                  var proxy = (vm._attrsProxy = {});\n                  def(proxy, '_v_attr_proxy', true);\n                  syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');\n              }\n              return vm._attrsProxy;\n          },\n          get listeners() {\n              if (!vm._listenersProxy) {\n                  var proxy = (vm._listenersProxy = {});\n                  syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');\n              }\n              return vm._listenersProxy;\n          },\n          get slots() {\n              return initSlotsProxy(vm);\n          },\n          emit: bind(vm.$emit, vm),\n          expose: function (exposed) {\n              {\n                  if (exposeCalled) {\n                      warn(\"expose() should be called only once per setup().\", vm);\n                  }\n                  exposeCalled = true;\n              }\n              if (exposed) {\n                  Object.keys(exposed).forEach(function (key) {\n                      return proxyWithRefUnwrap(vm, exposed, key);\n                  });\n              }\n          }\n      };\n  }\n  function syncSetupProxy(to, from, prev, instance, type) {\n      var changed = false;\n      for (var key in from) {\n          if (!(key in to)) {\n              changed = true;\n              defineProxyAttr(to, key, instance, type);\n          }\n          else if (from[key] !== prev[key]) {\n              changed = true;\n          }\n      }\n      for (var key in to) {\n          if (!(key in from)) {\n              changed = true;\n              delete to[key];\n          }\n      }\n      return changed;\n  }\n  function defineProxyAttr(proxy, key, instance, type) {\n      Object.defineProperty(proxy, key, {\n          enumerable: true,\n          configurable: true,\n          get: function () {\n              return instance[type][key];\n          }\n      });\n  }\n  function initSlotsProxy(vm) {\n      if (!vm._slotsProxy) {\n          syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);\n      }\n      return vm._slotsProxy;\n  }\n  function syncSetupSlots(to, from) {\n      for (var key in from) {\n          to[key] = from[key];\n      }\n      for (var key in to) {\n          if (!(key in from)) {\n              delete to[key];\n          }\n      }\n  }\n  /**\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useSlots() {\n      return getContext().slots;\n  }\n  /**\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useAttrs() {\n      return getContext().attrs;\n  }\n  /**\n   * Vue 2 only\n   * @internal use manual type def because public setup context type relies on\n   * legacy VNode types\n   */\n  function useListeners() {\n      return getContext().listeners;\n  }\n  function getContext() {\n      if (!currentInstance) {\n          warn(\"useContext() called without active instance.\");\n      }\n      var vm = currentInstance;\n      return vm._setupContext || (vm._setupContext = createSetupContext(vm));\n  }\n  /**\n   * Runtime helper for merging default declarations. Imported by compiled code\n   * only.\n   * @internal\n   */\n  function mergeDefaults(raw, defaults) {\n      var props = isArray(raw)\n          ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})\n          : raw;\n      for (var key in defaults) {\n          var opt = props[key];\n          if (opt) {\n              if (isArray(opt) || isFunction(opt)) {\n                  props[key] = { type: opt, default: defaults[key] };\n              }\n              else {\n                  opt.default = defaults[key];\n              }\n          }\n          else if (opt === null) {\n              props[key] = { default: defaults[key] };\n          }\n          else {\n              warn(\"props default key \\\"\".concat(key, \"\\\" has no corresponding declaration.\"));\n          }\n      }\n      return props;\n  }\n\n  function initRender(vm) {\n      vm._vnode = null; // the root of the child tree\n      vm._staticTrees = null; // v-once cached trees\n      var options = vm.$options;\n      var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree\n      var renderContext = parentVnode && parentVnode.context;\n      vm.$slots = resolveSlots(options._renderChildren, renderContext);\n      vm.$scopedSlots = parentVnode\n          ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)\n          : emptyObject;\n      // bind the createElement fn to this instance\n      // so that we get proper render context inside it.\n      // args order: tag, data, children, normalizationType, alwaysNormalize\n      // internal version is used by render functions compiled from templates\n      // @ts-expect-error\n      vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };\n      // normalization is always applied for the public version, used in\n      // user-written render functions.\n      // @ts-expect-error\n      vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };\n      // $attrs & $listeners are exposed for easier HOC creation.\n      // they need to be reactive so that HOCs using them are always updated\n      var parentData = parentVnode && parentVnode.data;\n      /* istanbul ignore else */\n      {\n          defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {\n              !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n          }, true);\n          defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {\n              !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n          }, true);\n      }\n  }\n  var currentRenderingInstance = null;\n  function renderMixin(Vue) {\n      // install runtime convenience helpers\n      installRenderHelpers(Vue.prototype);\n      Vue.prototype.$nextTick = function (fn) {\n          return nextTick(fn, this);\n      };\n      Vue.prototype._render = function () {\n          var vm = this;\n          var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;\n          if (_parentVnode && vm._isMounted) {\n              vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);\n              if (vm._slotsProxy) {\n                  syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);\n              }\n          }\n          // set parent vnode. this allows render functions to have access\n          // to the data on the placeholder node.\n          vm.$vnode = _parentVnode;\n          // render self\n          var prevInst = currentInstance;\n          var prevRenderInst = currentRenderingInstance;\n          var vnode;\n          try {\n              setCurrentInstance(vm);\n              currentRenderingInstance = vm;\n              vnode = render.call(vm._renderProxy, vm.$createElement);\n          }\n          catch (e) {\n              handleError(e, vm, \"render\");\n              // return error render result,\n              // or previous vnode to prevent render error causing blank component\n              /* istanbul ignore else */\n              if (vm.$options.renderError) {\n                  try {\n                      vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n                  }\n                  catch (e) {\n                      handleError(e, vm, \"renderError\");\n                      vnode = vm._vnode;\n                  }\n              }\n              else {\n                  vnode = vm._vnode;\n              }\n          }\n          finally {\n              currentRenderingInstance = prevRenderInst;\n              setCurrentInstance(prevInst);\n          }\n          // if the returned array contains only a single node, allow it\n          if (isArray(vnode) && vnode.length === 1) {\n              vnode = vnode[0];\n          }\n          // return empty vnode in case the render function errored out\n          if (!(vnode instanceof VNode)) {\n              if (isArray(vnode)) {\n                  warn('Multiple root nodes returned from render function. Render function ' +\n                      'should return a single root node.', vm);\n              }\n              vnode = createEmptyVNode();\n          }\n          // set parent\n          vnode.parent = _parentVnode;\n          return vnode;\n      };\n  }\n\n  function ensureCtor(comp, base) {\n      if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {\n          comp = comp.default;\n      }\n      return isObject(comp) ? base.extend(comp) : comp;\n  }\n  function createAsyncPlaceholder(factory, data, context, children, tag) {\n      var node = createEmptyVNode();\n      node.asyncFactory = factory;\n      node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n      return node;\n  }\n  function resolveAsyncComponent(factory, baseCtor) {\n      if (isTrue(factory.error) && isDef(factory.errorComp)) {\n          return factory.errorComp;\n      }\n      if (isDef(factory.resolved)) {\n          return factory.resolved;\n      }\n      var owner = currentRenderingInstance;\n      if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n          // already pending\n          factory.owners.push(owner);\n      }\n      if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n          return factory.loadingComp;\n      }\n      if (owner && !isDef(factory.owners)) {\n          var owners_1 = (factory.owners = [owner]);\n          var sync_1 = true;\n          var timerLoading_1 = null;\n          var timerTimeout_1 = null;\n          owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });\n          var forceRender_1 = function (renderCompleted) {\n              for (var i = 0, l = owners_1.length; i < l; i++) {\n                  owners_1[i].$forceUpdate();\n              }\n              if (renderCompleted) {\n                  owners_1.length = 0;\n                  if (timerLoading_1 !== null) {\n                      clearTimeout(timerLoading_1);\n                      timerLoading_1 = null;\n                  }\n                  if (timerTimeout_1 !== null) {\n                      clearTimeout(timerTimeout_1);\n                      timerTimeout_1 = null;\n                  }\n              }\n          };\n          var resolve = once(function (res) {\n              // cache resolved\n              factory.resolved = ensureCtor(res, baseCtor);\n              // invoke callbacks only if this is not a synchronous resolve\n              // (async resolves are shimmed as synchronous during SSR)\n              if (!sync_1) {\n                  forceRender_1(true);\n              }\n              else {\n                  owners_1.length = 0;\n              }\n          });\n          var reject_1 = once(function (reason) {\n              warn(\"Failed to resolve async component: \".concat(String(factory)) +\n                      (reason ? \"\\nReason: \".concat(reason) : ''));\n              if (isDef(factory.errorComp)) {\n                  factory.error = true;\n                  forceRender_1(true);\n              }\n          });\n          var res_1 = factory(resolve, reject_1);\n          if (isObject(res_1)) {\n              if (isPromise(res_1)) {\n                  // () => Promise\n                  if (isUndef(factory.resolved)) {\n                      res_1.then(resolve, reject_1);\n                  }\n              }\n              else if (isPromise(res_1.component)) {\n                  res_1.component.then(resolve, reject_1);\n                  if (isDef(res_1.error)) {\n                      factory.errorComp = ensureCtor(res_1.error, baseCtor);\n                  }\n                  if (isDef(res_1.loading)) {\n                      factory.loadingComp = ensureCtor(res_1.loading, baseCtor);\n                      if (res_1.delay === 0) {\n                          factory.loading = true;\n                      }\n                      else {\n                          // @ts-expect-error NodeJS timeout type\n                          timerLoading_1 = setTimeout(function () {\n                              timerLoading_1 = null;\n                              if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                                  factory.loading = true;\n                                  forceRender_1(false);\n                              }\n                          }, res_1.delay || 200);\n                      }\n                  }\n                  if (isDef(res_1.timeout)) {\n                      // @ts-expect-error NodeJS timeout type\n                      timerTimeout_1 = setTimeout(function () {\n                          timerTimeout_1 = null;\n                          if (isUndef(factory.resolved)) {\n                              reject_1(\"timeout (\".concat(res_1.timeout, \"ms)\") );\n                          }\n                      }, res_1.timeout);\n                  }\n              }\n          }\n          sync_1 = false;\n          // return in case resolved synchronously\n          return factory.loading ? factory.loadingComp : factory.resolved;\n      }\n  }\n\n  function getFirstComponentChild(children) {\n      if (isArray(children)) {\n          for (var i = 0; i < children.length; i++) {\n              var c = children[i];\n              if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n                  return c;\n              }\n          }\n      }\n  }\n\n  var SIMPLE_NORMALIZE = 1;\n  var ALWAYS_NORMALIZE = 2;\n  // wrapper function for providing a more flexible interface\n  // without getting yelled at by flow\n  function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {\n      if (isArray(data) || isPrimitive(data)) {\n          normalizationType = children;\n          children = data;\n          data = undefined;\n      }\n      if (isTrue(alwaysNormalize)) {\n          normalizationType = ALWAYS_NORMALIZE;\n      }\n      return _createElement(context, tag, data, children, normalizationType);\n  }\n  function _createElement(context, tag, data, children, normalizationType) {\n      if (isDef(data) && isDef(data.__ob__)) {\n          warn(\"Avoid using observed data object as vnode data: \".concat(JSON.stringify(data), \"\\n\") + 'Always create fresh vnode data objects in each render!', context);\n          return createEmptyVNode();\n      }\n      // object syntax in v-bind\n      if (isDef(data) && isDef(data.is)) {\n          tag = data.is;\n      }\n      if (!tag) {\n          // in case of component :is set to falsy value\n          return createEmptyVNode();\n      }\n      // warn against non-primitive key\n      if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {\n          warn('Avoid using non-primitive value as key, ' +\n              'use string/number value instead.', context);\n      }\n      // support single function children as default scoped slot\n      if (isArray(children) && isFunction(children[0])) {\n          data = data || {};\n          data.scopedSlots = { default: children[0] };\n          children.length = 0;\n      }\n      if (normalizationType === ALWAYS_NORMALIZE) {\n          children = normalizeChildren(children);\n      }\n      else if (normalizationType === SIMPLE_NORMALIZE) {\n          children = simpleNormalizeChildren(children);\n      }\n      var vnode, ns;\n      if (typeof tag === 'string') {\n          var Ctor = void 0;\n          ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n          if (config.isReservedTag(tag)) {\n              // platform built-in elements\n              if (isDef(data) &&\n                  isDef(data.nativeOn) &&\n                  data.tag !== 'component') {\n                  warn(\"The .native modifier for v-on is only valid on components but it was used on <\".concat(tag, \">.\"), context);\n              }\n              vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);\n          }\n          else if ((!data || !data.pre) &&\n              isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {\n              // component\n              vnode = createComponent(Ctor, data, context, children, tag);\n          }\n          else {\n              // unknown or unlisted namespaced elements\n              // check at runtime because it may get assigned a namespace when its\n              // parent normalizes children\n              vnode = new VNode(tag, data, children, undefined, undefined, context);\n          }\n      }\n      else {\n          // direct component options / constructor\n          vnode = createComponent(tag, data, context, children);\n      }\n      if (isArray(vnode)) {\n          return vnode;\n      }\n      else if (isDef(vnode)) {\n          if (isDef(ns))\n              applyNS(vnode, ns);\n          if (isDef(data))\n              registerDeepBindings(data);\n          return vnode;\n      }\n      else {\n          return createEmptyVNode();\n      }\n  }\n  function applyNS(vnode, ns, force) {\n      vnode.ns = ns;\n      if (vnode.tag === 'foreignObject') {\n          // use default namespace inside foreignObject\n          ns = undefined;\n          force = true;\n      }\n      if (isDef(vnode.children)) {\n          for (var i = 0, l = vnode.children.length; i < l; i++) {\n              var child = vnode.children[i];\n              if (isDef(child.tag) &&\n                  (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n                  applyNS(child, ns, force);\n              }\n          }\n      }\n  }\n  // ref #5318\n  // necessary to ensure parent re-render when deep bindings like :style and\n  // :class are used on slot nodes\n  function registerDeepBindings(data) {\n      if (isObject(data.style)) {\n          traverse(data.style);\n      }\n      if (isObject(data.class)) {\n          traverse(data.class);\n      }\n  }\n\n  /**\n   * @internal this function needs manual public type declaration because it relies\n   * on previously manually authored types from Vue 2\n   */\n  function h(type, props, children) {\n      if (!currentInstance) {\n          warn(\"globally imported h() can only be invoked when there is an active \" +\n                  \"component instance, e.g. synchronously in a component's render or setup function.\");\n      }\n      return createElement$1(currentInstance, type, props, children, 2, true);\n  }\n\n  function handleError(err, vm, info) {\n      // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n      // See: https://github.com/vuejs/vuex/issues/1505\n      pushTarget();\n      try {\n          if (vm) {\n              var cur = vm;\n              while ((cur = cur.$parent)) {\n                  var hooks = cur.$options.errorCaptured;\n                  if (hooks) {\n                      for (var i = 0; i < hooks.length; i++) {\n                          try {\n                              var capture = hooks[i].call(cur, err, vm, info) === false;\n                              if (capture)\n                                  return;\n                          }\n                          catch (e) {\n                              globalHandleError(e, cur, 'errorCaptured hook');\n                          }\n                      }\n                  }\n              }\n          }\n          globalHandleError(err, vm, info);\n      }\n      finally {\n          popTarget();\n      }\n  }\n  function invokeWithErrorHandling(handler, context, args, vm, info) {\n      var res;\n      try {\n          res = args ? handler.apply(context, args) : handler.call(context);\n          if (res && !res._isVue && isPromise(res) && !res._handled) {\n              res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n              res._handled = true;\n          }\n      }\n      catch (e) {\n          handleError(e, vm, info);\n      }\n      return res;\n  }\n  function globalHandleError(err, vm, info) {\n      if (config.errorHandler) {\n          try {\n              return config.errorHandler.call(null, err, vm, info);\n          }\n          catch (e) {\n              // if the user intentionally throws the original error in the handler,\n              // do not log it twice\n              if (e !== err) {\n                  logError(e, null, 'config.errorHandler');\n              }\n          }\n      }\n      logError(err, vm, info);\n  }\n  function logError(err, vm, info) {\n      {\n          warn(\"Error in \".concat(info, \": \\\"\").concat(err.toString(), \"\\\"\"), vm);\n      }\n      /* istanbul ignore else */\n      if (inBrowser && typeof console !== 'undefined') {\n          console.error(err);\n      }\n      else {\n          throw err;\n      }\n  }\n\n  /* globals MutationObserver */\n  var isUsingMicroTask = false;\n  var callbacks = [];\n  var pending = false;\n  function flushCallbacks() {\n      pending = false;\n      var copies = callbacks.slice(0);\n      callbacks.length = 0;\n      for (var i = 0; i < copies.length; i++) {\n          copies[i]();\n      }\n  }\n  // Here we have async deferring wrappers using microtasks.\n  // In 2.5 we used (macro) tasks (in combination with microtasks).\n  // However, it has subtle problems when state is changed right before repaint\n  // (e.g. #6813, out-in transitions).\n  // Also, using (macro) tasks in event handler would cause some weird behaviors\n  // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n  // So we now use microtasks everywhere, again.\n  // A major drawback of this tradeoff is that there are some scenarios\n  // where microtasks have too high a priority and fire in between supposedly\n  // sequential events (e.g. #4521, #6690, which have workarounds)\n  // or even between bubbling of the same event (#6566).\n  var timerFunc;\n  // The nextTick behavior leverages the microtask queue, which can be accessed\n  // via either native Promise.then or MutationObserver.\n  // MutationObserver has wider support, however it is seriously bugged in\n  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n  // completely stops working after triggering a few times... so, if native\n  // Promise is available, we will use it:\n  /* istanbul ignore next, $flow-disable-line */\n  if (typeof Promise !== 'undefined' && isNative(Promise)) {\n      var p_1 = Promise.resolve();\n      timerFunc = function () {\n          p_1.then(flushCallbacks);\n          // In problematic UIWebViews, Promise.then doesn't completely break, but\n          // it can get stuck in a weird state where callbacks are pushed into the\n          // microtask queue but the queue isn't being flushed, until the browser\n          // needs to do some other work, e.g. handle a timer. Therefore we can\n          // \"force\" the microtask queue to be flushed by adding an empty timer.\n          if (isIOS)\n              setTimeout(noop);\n      };\n      isUsingMicroTask = true;\n  }\n  else if (!isIE &&\n      typeof MutationObserver !== 'undefined' &&\n      (isNative(MutationObserver) ||\n          // PhantomJS and iOS 7.x\n          MutationObserver.toString() === '[object MutationObserverConstructor]')) {\n      // Use MutationObserver where native Promise is not available,\n      // e.g. PhantomJS, iOS7, Android 4.4\n      // (#6466 MutationObserver is unreliable in IE11)\n      var counter_1 = 1;\n      var observer = new MutationObserver(flushCallbacks);\n      var textNode_1 = document.createTextNode(String(counter_1));\n      observer.observe(textNode_1, {\n          characterData: true\n      });\n      timerFunc = function () {\n          counter_1 = (counter_1 + 1) % 2;\n          textNode_1.data = String(counter_1);\n      };\n      isUsingMicroTask = true;\n  }\n  else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n      // Fallback to setImmediate.\n      // Technically it leverages the (macro) task queue,\n      // but it is still a better choice than setTimeout.\n      timerFunc = function () {\n          setImmediate(flushCallbacks);\n      };\n  }\n  else {\n      // Fallback to setTimeout.\n      timerFunc = function () {\n          setTimeout(flushCallbacks, 0);\n      };\n  }\n  /**\n   * @internal\n   */\n  function nextTick(cb, ctx) {\n      var _resolve;\n      callbacks.push(function () {\n          if (cb) {\n              try {\n                  cb.call(ctx);\n              }\n              catch (e) {\n                  handleError(e, ctx, 'nextTick');\n              }\n          }\n          else if (_resolve) {\n              _resolve(ctx);\n          }\n      });\n      if (!pending) {\n          pending = true;\n          timerFunc();\n      }\n      // $flow-disable-line\n      if (!cb && typeof Promise !== 'undefined') {\n          return new Promise(function (resolve) {\n              _resolve = resolve;\n          });\n      }\n  }\n\n  function useCssModule(name) {\n      /* istanbul ignore else */\n      {\n          {\n              warn(\"useCssModule() is not supported in the global build.\");\n          }\n          return emptyObject;\n      }\n  }\n\n  /**\n   * Runtime helper for SFC's CSS variable injection feature.\n   * @private\n   */\n  function useCssVars(getter) {\n      if (!inBrowser && !false)\n          return;\n      var instance = currentInstance;\n      if (!instance) {\n          warn(\"useCssVars is called without current active component instance.\");\n          return;\n      }\n      watchPostEffect(function () {\n          var el = instance.$el;\n          var vars = getter(instance, instance._setupProxy);\n          if (el && el.nodeType === 1) {\n              var style = el.style;\n              for (var key in vars) {\n                  style.setProperty(\"--\".concat(key), vars[key]);\n              }\n          }\n      });\n  }\n\n  /**\n   * v3-compatible async component API.\n   * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts\n   * because it relies on existing manual types\n   */\n  function defineAsyncComponent(source) {\n      if (isFunction(source)) {\n          source = { loader: source };\n      }\n      var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out\n      _b = source.suspensible, // undefined = never times out\n      suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true\n      userOnError = source.onError;\n      if (suspensible) {\n          warn(\"The suspensible option for async components is not supported in Vue2. It is ignored.\");\n      }\n      var pendingRequest = null;\n      var retries = 0;\n      var retry = function () {\n          retries++;\n          pendingRequest = null;\n          return load();\n      };\n      var load = function () {\n          var thisRequest;\n          return (pendingRequest ||\n              (thisRequest = pendingRequest =\n                  loader()\n                      .catch(function (err) {\n                      err = err instanceof Error ? err : new Error(String(err));\n                      if (userOnError) {\n                          return new Promise(function (resolve, reject) {\n                              var userRetry = function () { return resolve(retry()); };\n                              var userFail = function () { return reject(err); };\n                              userOnError(err, userRetry, userFail, retries + 1);\n                          });\n                      }\n                      else {\n                          throw err;\n                      }\n                  })\n                      .then(function (comp) {\n                      if (thisRequest !== pendingRequest && pendingRequest) {\n                          return pendingRequest;\n                      }\n                      if (!comp) {\n                          warn(\"Async component loader resolved to undefined. \" +\n                              \"If you are using retry(), make sure to return its return value.\");\n                      }\n                      // interop module default\n                      if (comp &&\n                          (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\n                          comp = comp.default;\n                      }\n                      if (comp && !isObject(comp) && !isFunction(comp)) {\n                          throw new Error(\"Invalid async component load result: \".concat(comp));\n                      }\n                      return comp;\n                  })));\n      };\n      return function () {\n          var component = load();\n          return {\n              component: component,\n              delay: delay,\n              timeout: timeout,\n              error: errorComponent,\n              loading: loadingComponent\n          };\n      };\n  }\n\n  function createLifeCycle(hookName) {\n      return function (fn, target) {\n          if (target === void 0) { target = currentInstance; }\n          if (!target) {\n              warn(\"\".concat(formatName(hookName), \" is called when there is no active component instance to be \") +\n                      \"associated with. \" +\n                      \"Lifecycle injection APIs can only be used during execution of setup().\");\n              return;\n          }\n          return injectHook(target, hookName, fn);\n      };\n  }\n  function formatName(name) {\n      if (name === 'beforeDestroy') {\n          name = 'beforeUnmount';\n      }\n      else if (name === 'destroyed') {\n          name = 'unmounted';\n      }\n      return \"on\".concat(name[0].toUpperCase() + name.slice(1));\n  }\n  function injectHook(instance, hookName, fn) {\n      var options = instance.$options;\n      options[hookName] = mergeLifecycleHook(options[hookName], fn);\n  }\n  var onBeforeMount = createLifeCycle('beforeMount');\n  var onMounted = createLifeCycle('mounted');\n  var onBeforeUpdate = createLifeCycle('beforeUpdate');\n  var onUpdated = createLifeCycle('updated');\n  var onBeforeUnmount = createLifeCycle('beforeDestroy');\n  var onUnmounted = createLifeCycle('destroyed');\n  var onActivated = createLifeCycle('activated');\n  var onDeactivated = createLifeCycle('deactivated');\n  var onServerPrefetch = createLifeCycle('serverPrefetch');\n  var onRenderTracked = createLifeCycle('renderTracked');\n  var onRenderTriggered = createLifeCycle('renderTriggered');\n  var injectErrorCapturedHook = createLifeCycle('errorCaptured');\n  function onErrorCaptured(hook, target) {\n      if (target === void 0) { target = currentInstance; }\n      injectErrorCapturedHook(hook, target);\n  }\n\n  /**\n   * Note: also update dist/vue.runtime.mjs when adding new exports to this file.\n   */\n  var version = '2.7.16';\n  /**\n   * @internal type is manually declared in <root>/types/v3-define-component.d.ts\n   */\n  function defineComponent(options) {\n      return options;\n  }\n\n  var vca = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    version: version,\n    defineComponent: defineComponent,\n    ref: ref$1,\n    shallowRef: shallowRef,\n    isRef: isRef,\n    toRef: toRef,\n    toRefs: toRefs,\n    unref: unref,\n    proxyRefs: proxyRefs,\n    customRef: customRef,\n    triggerRef: triggerRef,\n    reactive: reactive,\n    isReactive: isReactive,\n    isReadonly: isReadonly,\n    isShallow: isShallow,\n    isProxy: isProxy,\n    shallowReactive: shallowReactive,\n    markRaw: markRaw,\n    toRaw: toRaw,\n    readonly: readonly,\n    shallowReadonly: shallowReadonly,\n    computed: computed,\n    watch: watch,\n    watchEffect: watchEffect,\n    watchPostEffect: watchPostEffect,\n    watchSyncEffect: watchSyncEffect,\n    EffectScope: EffectScope,\n    effectScope: effectScope,\n    onScopeDispose: onScopeDispose,\n    getCurrentScope: getCurrentScope,\n    provide: provide,\n    inject: inject,\n    h: h,\n    getCurrentInstance: getCurrentInstance,\n    useSlots: useSlots,\n    useAttrs: useAttrs,\n    useListeners: useListeners,\n    mergeDefaults: mergeDefaults,\n    nextTick: nextTick,\n    set: set,\n    del: del,\n    useCssModule: useCssModule,\n    useCssVars: useCssVars,\n    defineAsyncComponent: defineAsyncComponent,\n    onBeforeMount: onBeforeMount,\n    onMounted: onMounted,\n    onBeforeUpdate: onBeforeUpdate,\n    onUpdated: onUpdated,\n    onBeforeUnmount: onBeforeUnmount,\n    onUnmounted: onUnmounted,\n    onActivated: onActivated,\n    onDeactivated: onDeactivated,\n    onServerPrefetch: onServerPrefetch,\n    onRenderTracked: onRenderTracked,\n    onRenderTriggered: onRenderTriggered,\n    onErrorCaptured: onErrorCaptured\n  });\n\n  var seenObjects = new _Set();\n  /**\n   * Recursively traverse an object to evoke all converted\n   * getters, so that every nested property inside the object\n   * is collected as a \"deep\" dependency.\n   */\n  function traverse(val) {\n      _traverse(val, seenObjects);\n      seenObjects.clear();\n      return val;\n  }\n  function _traverse(val, seen) {\n      var i, keys;\n      var isA = isArray(val);\n      if ((!isA && !isObject(val)) ||\n          val.__v_skip /* ReactiveFlags.SKIP */ ||\n          Object.isFrozen(val) ||\n          val instanceof VNode) {\n          return;\n      }\n      if (val.__ob__) {\n          var depId = val.__ob__.dep.id;\n          if (seen.has(depId)) {\n              return;\n          }\n          seen.add(depId);\n      }\n      if (isA) {\n          i = val.length;\n          while (i--)\n              _traverse(val[i], seen);\n      }\n      else if (isRef(val)) {\n          _traverse(val.value, seen);\n      }\n      else {\n          keys = Object.keys(val);\n          i = keys.length;\n          while (i--)\n              _traverse(val[keys[i]], seen);\n      }\n  }\n\n  var uid$1 = 0;\n  /**\n   * A watcher parses an expression, collects dependencies,\n   * and fires callback when the expression value changes.\n   * This is used for both the $watch() api and directives.\n   * @internal\n   */\n  var Watcher = /** @class */ (function () {\n      function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {\n          recordEffectScope(this, \n          // if the active effect scope is manually created (not a component scope),\n          // prioritize it\n          activeEffectScope && !activeEffectScope._vm\n              ? activeEffectScope\n              : vm\n                  ? vm._scope\n                  : undefined);\n          if ((this.vm = vm) && isRenderWatcher) {\n              vm._watcher = this;\n          }\n          // options\n          if (options) {\n              this.deep = !!options.deep;\n              this.user = !!options.user;\n              this.lazy = !!options.lazy;\n              this.sync = !!options.sync;\n              this.before = options.before;\n              {\n                  this.onTrack = options.onTrack;\n                  this.onTrigger = options.onTrigger;\n              }\n          }\n          else {\n              this.deep = this.user = this.lazy = this.sync = false;\n          }\n          this.cb = cb;\n          this.id = ++uid$1; // uid for batching\n          this.active = true;\n          this.post = false;\n          this.dirty = this.lazy; // for lazy watchers\n          this.deps = [];\n          this.newDeps = [];\n          this.depIds = new _Set();\n          this.newDepIds = new _Set();\n          this.expression = expOrFn.toString() ;\n          // parse expression for getter\n          if (isFunction(expOrFn)) {\n              this.getter = expOrFn;\n          }\n          else {\n              this.getter = parsePath(expOrFn);\n              if (!this.getter) {\n                  this.getter = noop;\n                  warn(\"Failed watching path: \\\"\".concat(expOrFn, \"\\\" \") +\n                          'Watcher only accepts simple dot-delimited paths. ' +\n                          'For full control, use a function instead.', vm);\n              }\n          }\n          this.value = this.lazy ? undefined : this.get();\n      }\n      /**\n       * Evaluate the getter, and re-collect dependencies.\n       */\n      Watcher.prototype.get = function () {\n          pushTarget(this);\n          var value;\n          var vm = this.vm;\n          try {\n              value = this.getter.call(vm, vm);\n          }\n          catch (e) {\n              if (this.user) {\n                  handleError(e, vm, \"getter for watcher \\\"\".concat(this.expression, \"\\\"\"));\n              }\n              else {\n                  throw e;\n              }\n          }\n          finally {\n              // \"touch\" every property so they are all tracked as\n              // dependencies for deep watching\n              if (this.deep) {\n                  traverse(value);\n              }\n              popTarget();\n              this.cleanupDeps();\n          }\n          return value;\n      };\n      /**\n       * Add a dependency to this directive.\n       */\n      Watcher.prototype.addDep = function (dep) {\n          var id = dep.id;\n          if (!this.newDepIds.has(id)) {\n              this.newDepIds.add(id);\n              this.newDeps.push(dep);\n              if (!this.depIds.has(id)) {\n                  dep.addSub(this);\n              }\n          }\n      };\n      /**\n       * Clean up for dependency collection.\n       */\n      Watcher.prototype.cleanupDeps = function () {\n          var i = this.deps.length;\n          while (i--) {\n              var dep = this.deps[i];\n              if (!this.newDepIds.has(dep.id)) {\n                  dep.removeSub(this);\n              }\n          }\n          var tmp = this.depIds;\n          this.depIds = this.newDepIds;\n          this.newDepIds = tmp;\n          this.newDepIds.clear();\n          tmp = this.deps;\n          this.deps = this.newDeps;\n          this.newDeps = tmp;\n          this.newDeps.length = 0;\n      };\n      /**\n       * Subscriber interface.\n       * Will be called when a dependency changes.\n       */\n      Watcher.prototype.update = function () {\n          /* istanbul ignore else */\n          if (this.lazy) {\n              this.dirty = true;\n          }\n          else if (this.sync) {\n              this.run();\n          }\n          else {\n              queueWatcher(this);\n          }\n      };\n      /**\n       * Scheduler job interface.\n       * Will be called by the scheduler.\n       */\n      Watcher.prototype.run = function () {\n          if (this.active) {\n              var value = this.get();\n              if (value !== this.value ||\n                  // Deep watchers and watchers on Object/Arrays should fire even\n                  // when the value is the same, because the value may\n                  // have mutated.\n                  isObject(value) ||\n                  this.deep) {\n                  // set new value\n                  var oldValue = this.value;\n                  this.value = value;\n                  if (this.user) {\n                      var info = \"callback for watcher \\\"\".concat(this.expression, \"\\\"\");\n                      invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);\n                  }\n                  else {\n                      this.cb.call(this.vm, value, oldValue);\n                  }\n              }\n          }\n      };\n      /**\n       * Evaluate the value of the watcher.\n       * This only gets called for lazy watchers.\n       */\n      Watcher.prototype.evaluate = function () {\n          this.value = this.get();\n          this.dirty = false;\n      };\n      /**\n       * Depend on all deps collected by this watcher.\n       */\n      Watcher.prototype.depend = function () {\n          var i = this.deps.length;\n          while (i--) {\n              this.deps[i].depend();\n          }\n      };\n      /**\n       * Remove self from all dependencies' subscriber list.\n       */\n      Watcher.prototype.teardown = function () {\n          if (this.vm && !this.vm._isBeingDestroyed) {\n              remove$2(this.vm._scope.effects, this);\n          }\n          if (this.active) {\n              var i = this.deps.length;\n              while (i--) {\n                  this.deps[i].removeSub(this);\n              }\n              this.active = false;\n              if (this.onStop) {\n                  this.onStop();\n              }\n          }\n      };\n      return Watcher;\n  }());\n\n  var mark;\n  var measure;\n  {\n      var perf_1 = inBrowser && window.performance;\n      /* istanbul ignore if */\n      if (perf_1 &&\n          // @ts-ignore\n          perf_1.mark &&\n          // @ts-ignore\n          perf_1.measure &&\n          // @ts-ignore\n          perf_1.clearMarks &&\n          // @ts-ignore\n          perf_1.clearMeasures) {\n          mark = function (tag) { return perf_1.mark(tag); };\n          measure = function (name, startTag, endTag) {\n              perf_1.measure(name, startTag, endTag);\n              perf_1.clearMarks(startTag);\n              perf_1.clearMarks(endTag);\n              // perf.clearMeasures(name)\n          };\n      }\n  }\n\n  function initEvents(vm) {\n      vm._events = Object.create(null);\n      vm._hasHookEvent = false;\n      // init parent attached events\n      var listeners = vm.$options._parentListeners;\n      if (listeners) {\n          updateComponentListeners(vm, listeners);\n      }\n  }\n  var target$1;\n  function add$1(event, fn) {\n      target$1.$on(event, fn);\n  }\n  function remove$1(event, fn) {\n      target$1.$off(event, fn);\n  }\n  function createOnceHandler$1(event, fn) {\n      var _target = target$1;\n      return function onceHandler() {\n          var res = fn.apply(null, arguments);\n          if (res !== null) {\n              _target.$off(event, onceHandler);\n          }\n      };\n  }\n  function updateComponentListeners(vm, listeners, oldListeners) {\n      target$1 = vm;\n      updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);\n      target$1 = undefined;\n  }\n  function eventsMixin(Vue) {\n      var hookRE = /^hook:/;\n      Vue.prototype.$on = function (event, fn) {\n          var vm = this;\n          if (isArray(event)) {\n              for (var i = 0, l = event.length; i < l; i++) {\n                  vm.$on(event[i], fn);\n              }\n          }\n          else {\n              (vm._events[event] || (vm._events[event] = [])).push(fn);\n              // optimize hook:event cost by using a boolean flag marked at registration\n              // instead of a hash lookup\n              if (hookRE.test(event)) {\n                  vm._hasHookEvent = true;\n              }\n          }\n          return vm;\n      };\n      Vue.prototype.$once = function (event, fn) {\n          var vm = this;\n          function on() {\n              vm.$off(event, on);\n              fn.apply(vm, arguments);\n          }\n          on.fn = fn;\n          vm.$on(event, on);\n          return vm;\n      };\n      Vue.prototype.$off = function (event, fn) {\n          var vm = this;\n          // all\n          if (!arguments.length) {\n              vm._events = Object.create(null);\n              return vm;\n          }\n          // array of events\n          if (isArray(event)) {\n              for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {\n                  vm.$off(event[i_1], fn);\n              }\n              return vm;\n          }\n          // specific event\n          var cbs = vm._events[event];\n          if (!cbs) {\n              return vm;\n          }\n          if (!fn) {\n              vm._events[event] = null;\n              return vm;\n          }\n          // specific handler\n          var cb;\n          var i = cbs.length;\n          while (i--) {\n              cb = cbs[i];\n              if (cb === fn || cb.fn === fn) {\n                  cbs.splice(i, 1);\n                  break;\n              }\n          }\n          return vm;\n      };\n      Vue.prototype.$emit = function (event) {\n          var vm = this;\n          {\n              var lowerCaseEvent = event.toLowerCase();\n              if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n                  tip(\"Event \\\"\".concat(lowerCaseEvent, \"\\\" is emitted in component \") +\n                      \"\".concat(formatComponentName(vm), \" but the handler is registered for \\\"\").concat(event, \"\\\". \") +\n                      \"Note that HTML attributes are case-insensitive and you cannot use \" +\n                      \"v-on to listen to camelCase events when using in-DOM templates. \" +\n                      \"You should probably use \\\"\".concat(hyphenate(event), \"\\\" instead of \\\"\").concat(event, \"\\\".\"));\n              }\n          }\n          var cbs = vm._events[event];\n          if (cbs) {\n              cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n              var args = toArray(arguments, 1);\n              var info = \"event handler for \\\"\".concat(event, \"\\\"\");\n              for (var i = 0, l = cbs.length; i < l; i++) {\n                  invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n              }\n          }\n          return vm;\n      };\n  }\n\n  var activeInstance = null;\n  var isUpdatingChildComponent = false;\n  function setActiveInstance(vm) {\n      var prevActiveInstance = activeInstance;\n      activeInstance = vm;\n      return function () {\n          activeInstance = prevActiveInstance;\n      };\n  }\n  function initLifecycle(vm) {\n      var options = vm.$options;\n      // locate first non-abstract parent\n      var parent = options.parent;\n      if (parent && !options.abstract) {\n          while (parent.$options.abstract && parent.$parent) {\n              parent = parent.$parent;\n          }\n          parent.$children.push(vm);\n      }\n      vm.$parent = parent;\n      vm.$root = parent ? parent.$root : vm;\n      vm.$children = [];\n      vm.$refs = {};\n      vm._provided = parent ? parent._provided : Object.create(null);\n      vm._watcher = null;\n      vm._inactive = null;\n      vm._directInactive = false;\n      vm._isMounted = false;\n      vm._isDestroyed = false;\n      vm._isBeingDestroyed = false;\n  }\n  function lifecycleMixin(Vue) {\n      Vue.prototype._update = function (vnode, hydrating) {\n          var vm = this;\n          var prevEl = vm.$el;\n          var prevVnode = vm._vnode;\n          var restoreActiveInstance = setActiveInstance(vm);\n          vm._vnode = vnode;\n          // Vue.prototype.__patch__ is injected in entry points\n          // based on the rendering backend used.\n          if (!prevVnode) {\n              // initial render\n              vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n          }\n          else {\n              // updates\n              vm.$el = vm.__patch__(prevVnode, vnode);\n          }\n          restoreActiveInstance();\n          // update __vue__ reference\n          if (prevEl) {\n              prevEl.__vue__ = null;\n          }\n          if (vm.$el) {\n              vm.$el.__vue__ = vm;\n          }\n          // if parent is an HOC, update its $el as well\n          var wrapper = vm;\n          while (wrapper &&\n              wrapper.$vnode &&\n              wrapper.$parent &&\n              wrapper.$vnode === wrapper.$parent._vnode) {\n              wrapper.$parent.$el = wrapper.$el;\n              wrapper = wrapper.$parent;\n          }\n          // updated hook is called by the scheduler to ensure that children are\n          // updated in a parent's updated hook.\n      };\n      Vue.prototype.$forceUpdate = function () {\n          var vm = this;\n          if (vm._watcher) {\n              vm._watcher.update();\n          }\n      };\n      Vue.prototype.$destroy = function () {\n          var vm = this;\n          if (vm._isBeingDestroyed) {\n              return;\n          }\n          callHook$1(vm, 'beforeDestroy');\n          vm._isBeingDestroyed = true;\n          // remove self from parent\n          var parent = vm.$parent;\n          if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n              remove$2(parent.$children, vm);\n          }\n          // teardown scope. this includes both the render watcher and other\n          // watchers created\n          vm._scope.stop();\n          // remove reference from data ob\n          // frozen object may not have observer.\n          if (vm._data.__ob__) {\n              vm._data.__ob__.vmCount--;\n          }\n          // call the last hook...\n          vm._isDestroyed = true;\n          // invoke destroy hooks on current rendered tree\n          vm.__patch__(vm._vnode, null);\n          // fire destroyed hook\n          callHook$1(vm, 'destroyed');\n          // turn off all instance listeners.\n          vm.$off();\n          // remove __vue__ reference\n          if (vm.$el) {\n              vm.$el.__vue__ = null;\n          }\n          // release circular reference (#6759)\n          if (vm.$vnode) {\n              vm.$vnode.parent = null;\n          }\n      };\n  }\n  function mountComponent(vm, el, hydrating) {\n      vm.$el = el;\n      if (!vm.$options.render) {\n          // @ts-expect-error invalid type\n          vm.$options.render = createEmptyVNode;\n          {\n              /* istanbul ignore if */\n              if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n                  vm.$options.el ||\n                  el) {\n                  warn('You are using the runtime-only build of Vue where the template ' +\n                      'compiler is not available. Either pre-compile the templates into ' +\n                      'render functions, or use the compiler-included build.', vm);\n              }\n              else {\n                  warn('Failed to mount component: template or render function not defined.', vm);\n              }\n          }\n      }\n      callHook$1(vm, 'beforeMount');\n      var updateComponent;\n      /* istanbul ignore if */\n      if (config.performance && mark) {\n          updateComponent = function () {\n              var name = vm._name;\n              var id = vm._uid;\n              var startTag = \"vue-perf-start:\".concat(id);\n              var endTag = \"vue-perf-end:\".concat(id);\n              mark(startTag);\n              var vnode = vm._render();\n              mark(endTag);\n              measure(\"vue \".concat(name, \" render\"), startTag, endTag);\n              mark(startTag);\n              vm._update(vnode, hydrating);\n              mark(endTag);\n              measure(\"vue \".concat(name, \" patch\"), startTag, endTag);\n          };\n      }\n      else {\n          updateComponent = function () {\n              vm._update(vm._render(), hydrating);\n          };\n      }\n      var watcherOptions = {\n          before: function () {\n              if (vm._isMounted && !vm._isDestroyed) {\n                  callHook$1(vm, 'beforeUpdate');\n              }\n          }\n      };\n      {\n          watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };\n          watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };\n      }\n      // we set this to vm._watcher inside the watcher's constructor\n      // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n      // component's mounted hook), which relies on vm._watcher being already defined\n      new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);\n      hydrating = false;\n      // flush buffer for flush: \"pre\" watchers queued in setup()\n      var preWatchers = vm._preWatchers;\n      if (preWatchers) {\n          for (var i = 0; i < preWatchers.length; i++) {\n              preWatchers[i].run();\n          }\n      }\n      // manually mounted instance, call mounted on self\n      // mounted is called for render-created child components in its inserted hook\n      if (vm.$vnode == null) {\n          vm._isMounted = true;\n          callHook$1(vm, 'mounted');\n      }\n      return vm;\n  }\n  function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {\n      {\n          isUpdatingChildComponent = true;\n      }\n      // determine whether component has slot children\n      // we need to do this before overwriting $options._renderChildren.\n      // check if there are dynamic scopedSlots (hand-written or compiled but with\n      // dynamic slot names). Static scoped slots compiled from template has the\n      // \"$stable\" marker.\n      var newScopedSlots = parentVnode.data.scopedSlots;\n      var oldScopedSlots = vm.$scopedSlots;\n      var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||\n          (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n          (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||\n          (!newScopedSlots && vm.$scopedSlots.$key));\n      // Any static slot children from the parent may have changed during parent's\n      // update. Dynamic scoped slots may also have changed. In such cases, a forced\n      // update is necessary to ensure correctness.\n      var needsForceUpdate = !!(renderChildren || // has new static slots\n          vm.$options._renderChildren || // has old static slots\n          hasDynamicScopedSlot);\n      var prevVNode = vm.$vnode;\n      vm.$options._parentVnode = parentVnode;\n      vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n      if (vm._vnode) {\n          // update child tree's parent\n          vm._vnode.parent = parentVnode;\n      }\n      vm.$options._renderChildren = renderChildren;\n      // update $attrs and $listeners hash\n      // these are also reactive so they may trigger child update if the child\n      // used them during render\n      var attrs = parentVnode.data.attrs || emptyObject;\n      if (vm._attrsProxy) {\n          // force update if attrs are accessed and has changed since it may be\n          // passed to a child component.\n          if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {\n              needsForceUpdate = true;\n          }\n      }\n      vm.$attrs = attrs;\n      // update listeners\n      listeners = listeners || emptyObject;\n      var prevListeners = vm.$options._parentListeners;\n      if (vm._listenersProxy) {\n          syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');\n      }\n      vm.$listeners = vm.$options._parentListeners = listeners;\n      updateComponentListeners(vm, listeners, prevListeners);\n      // update props\n      if (propsData && vm.$options.props) {\n          toggleObserving(false);\n          var props = vm._props;\n          var propKeys = vm.$options._propKeys || [];\n          for (var i = 0; i < propKeys.length; i++) {\n              var key = propKeys[i];\n              var propOptions = vm.$options.props; // wtf flow?\n              props[key] = validateProp(key, propOptions, propsData, vm);\n          }\n          toggleObserving(true);\n          // keep a copy of raw propsData\n          vm.$options.propsData = propsData;\n      }\n      // resolve slots + force update if has children\n      if (needsForceUpdate) {\n          vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n          vm.$forceUpdate();\n      }\n      {\n          isUpdatingChildComponent = false;\n      }\n  }\n  function isInInactiveTree(vm) {\n      while (vm && (vm = vm.$parent)) {\n          if (vm._inactive)\n              return true;\n      }\n      return false;\n  }\n  function activateChildComponent(vm, direct) {\n      if (direct) {\n          vm._directInactive = false;\n          if (isInInactiveTree(vm)) {\n              return;\n          }\n      }\n      else if (vm._directInactive) {\n          return;\n      }\n      if (vm._inactive || vm._inactive === null) {\n          vm._inactive = false;\n          for (var i = 0; i < vm.$children.length; i++) {\n              activateChildComponent(vm.$children[i]);\n          }\n          callHook$1(vm, 'activated');\n      }\n  }\n  function deactivateChildComponent(vm, direct) {\n      if (direct) {\n          vm._directInactive = true;\n          if (isInInactiveTree(vm)) {\n              return;\n          }\n      }\n      if (!vm._inactive) {\n          vm._inactive = true;\n          for (var i = 0; i < vm.$children.length; i++) {\n              deactivateChildComponent(vm.$children[i]);\n          }\n          callHook$1(vm, 'deactivated');\n      }\n  }\n  function callHook$1(vm, hook, args, setContext) {\n      if (setContext === void 0) { setContext = true; }\n      // #7573 disable dep collection when invoking lifecycle hooks\n      pushTarget();\n      var prevInst = currentInstance;\n      var prevScope = getCurrentScope();\n      setContext && setCurrentInstance(vm);\n      var handlers = vm.$options[hook];\n      var info = \"\".concat(hook, \" hook\");\n      if (handlers) {\n          for (var i = 0, j = handlers.length; i < j; i++) {\n              invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);\n          }\n      }\n      if (vm._hasHookEvent) {\n          vm.$emit('hook:' + hook);\n      }\n      if (setContext) {\n          setCurrentInstance(prevInst);\n          prevScope && prevScope.on();\n      }\n      popTarget();\n  }\n\n  var MAX_UPDATE_COUNT = 100;\n  var queue = [];\n  var activatedChildren = [];\n  var has = {};\n  var circular = {};\n  var waiting = false;\n  var flushing = false;\n  var index = 0;\n  /**\n   * Reset the scheduler's state.\n   */\n  function resetSchedulerState() {\n      index = queue.length = activatedChildren.length = 0;\n      has = {};\n      {\n          circular = {};\n      }\n      waiting = flushing = false;\n  }\n  // Async edge case #6566 requires saving the timestamp when event listeners are\n  // attached. However, calling performance.now() has a perf overhead especially\n  // if the page has thousands of event listeners. Instead, we take a timestamp\n  // every time the scheduler flushes and use that for all event listeners\n  // attached during that flush.\n  var currentFlushTimestamp = 0;\n  // Async edge case fix requires storing an event listener's attach timestamp.\n  var getNow = Date.now;\n  // Determine what event timestamp the browser is using. Annoyingly, the\n  // timestamp can either be hi-res (relative to page load) or low-res\n  // (relative to UNIX epoch), so in order to compare time we have to use the\n  // same timestamp type when saving the flush timestamp.\n  // All IE versions use low-res event timestamps, and have problematic clock\n  // implementations (#9632)\n  if (inBrowser && !isIE) {\n      var performance_1 = window.performance;\n      if (performance_1 &&\n          typeof performance_1.now === 'function' &&\n          getNow() > document.createEvent('Event').timeStamp) {\n          // if the event timestamp, although evaluated AFTER the Date.now(), is\n          // smaller than it, it means the event is using a hi-res timestamp,\n          // and we need to use the hi-res version for event listener timestamps as\n          // well.\n          getNow = function () { return performance_1.now(); };\n      }\n  }\n  var sortCompareFn = function (a, b) {\n      if (a.post) {\n          if (!b.post)\n              return 1;\n      }\n      else if (b.post) {\n          return -1;\n      }\n      return a.id - b.id;\n  };\n  /**\n   * Flush both queues and run the watchers.\n   */\n  function flushSchedulerQueue() {\n      currentFlushTimestamp = getNow();\n      flushing = true;\n      var watcher, id;\n      // Sort queue before flush.\n      // This ensures that:\n      // 1. Components are updated from parent to child. (because parent is always\n      //    created before the child)\n      // 2. A component's user watchers are run before its render watcher (because\n      //    user watchers are created before the render watcher)\n      // 3. If a component is destroyed during a parent component's watcher run,\n      //    its watchers can be skipped.\n      queue.sort(sortCompareFn);\n      // do not cache length because more watchers might be pushed\n      // as we run existing watchers\n      for (index = 0; index < queue.length; index++) {\n          watcher = queue[index];\n          if (watcher.before) {\n              watcher.before();\n          }\n          id = watcher.id;\n          has[id] = null;\n          watcher.run();\n          // in dev build, check and stop circular updates.\n          if (has[id] != null) {\n              circular[id] = (circular[id] || 0) + 1;\n              if (circular[id] > MAX_UPDATE_COUNT) {\n                  warn('You may have an infinite update loop ' +\n                      (watcher.user\n                          ? \"in watcher with expression \\\"\".concat(watcher.expression, \"\\\"\")\n                          : \"in a component render function.\"), watcher.vm);\n                  break;\n              }\n          }\n      }\n      // keep copies of post queues before resetting state\n      var activatedQueue = activatedChildren.slice();\n      var updatedQueue = queue.slice();\n      resetSchedulerState();\n      // call component updated and activated hooks\n      callActivatedHooks(activatedQueue);\n      callUpdatedHooks(updatedQueue);\n      cleanupDeps();\n      // devtool hook\n      /* istanbul ignore if */\n      if (devtools && config.devtools) {\n          devtools.emit('flush');\n      }\n  }\n  function callUpdatedHooks(queue) {\n      var i = queue.length;\n      while (i--) {\n          var watcher = queue[i];\n          var vm = watcher.vm;\n          if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n              callHook$1(vm, 'updated');\n          }\n      }\n  }\n  /**\n   * Queue a kept-alive component that was activated during patch.\n   * The queue will be processed after the entire tree has been patched.\n   */\n  function queueActivatedComponent(vm) {\n      // setting _inactive to false here so that a render function can\n      // rely on checking whether it's in an inactive tree (e.g. router-view)\n      vm._inactive = false;\n      activatedChildren.push(vm);\n  }\n  function callActivatedHooks(queue) {\n      for (var i = 0; i < queue.length; i++) {\n          queue[i]._inactive = true;\n          activateChildComponent(queue[i], true /* true */);\n      }\n  }\n  /**\n   * Push a watcher into the watcher queue.\n   * Jobs with duplicate IDs will be skipped unless it's\n   * pushed when the queue is being flushed.\n   */\n  function queueWatcher(watcher) {\n      var id = watcher.id;\n      if (has[id] != null) {\n          return;\n      }\n      if (watcher === Dep.target && watcher.noRecurse) {\n          return;\n      }\n      has[id] = true;\n      if (!flushing) {\n          queue.push(watcher);\n      }\n      else {\n          // if already flushing, splice the watcher based on its id\n          // if already past its id, it will be run next immediately.\n          var i = queue.length - 1;\n          while (i > index && queue[i].id > watcher.id) {\n              i--;\n          }\n          queue.splice(i + 1, 0, watcher);\n      }\n      // queue the flush\n      if (!waiting) {\n          waiting = true;\n          if (!config.async) {\n              flushSchedulerQueue();\n              return;\n          }\n          nextTick(flushSchedulerQueue);\n      }\n  }\n\n  function initProvide(vm) {\n      var provideOption = vm.$options.provide;\n      if (provideOption) {\n          var provided = isFunction(provideOption)\n              ? provideOption.call(vm)\n              : provideOption;\n          if (!isObject(provided)) {\n              return;\n          }\n          var source = resolveProvided(vm);\n          // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to\n          // iterate the keys ourselves.\n          var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);\n          for (var i = 0; i < keys.length; i++) {\n              var key = keys[i];\n              Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));\n          }\n      }\n  }\n  function initInjections(vm) {\n      var result = resolveInject(vm.$options.inject, vm);\n      if (result) {\n          toggleObserving(false);\n          Object.keys(result).forEach(function (key) {\n              /* istanbul ignore else */\n              {\n                  defineReactive(vm, key, result[key], function () {\n                      warn(\"Avoid mutating an injected value directly since the changes will be \" +\n                          \"overwritten whenever the provided component re-renders. \" +\n                          \"injection being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                  });\n              }\n          });\n          toggleObserving(true);\n      }\n  }\n  function resolveInject(inject, vm) {\n      if (inject) {\n          // inject is :any because flow is not smart enough to figure out cached\n          var result = Object.create(null);\n          var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);\n          for (var i = 0; i < keys.length; i++) {\n              var key = keys[i];\n              // #6574 in case the inject object is observed...\n              if (key === '__ob__')\n                  continue;\n              var provideKey = inject[key].from;\n              if (provideKey in vm._provided) {\n                  result[key] = vm._provided[provideKey];\n              }\n              else if ('default' in inject[key]) {\n                  var provideDefault = inject[key].default;\n                  result[key] = isFunction(provideDefault)\n                      ? provideDefault.call(vm)\n                      : provideDefault;\n              }\n              else {\n                  warn(\"Injection \\\"\".concat(key, \"\\\" not found\"), vm);\n              }\n          }\n          return result;\n      }\n  }\n\n  function FunctionalRenderContext(data, props, children, parent, Ctor) {\n      var _this = this;\n      var options = Ctor.options;\n      // ensure the createElement function in functional components\n      // gets a unique context - this is necessary for correct named slot check\n      var contextVm;\n      if (hasOwn(parent, '_uid')) {\n          contextVm = Object.create(parent);\n          contextVm._original = parent;\n      }\n      else {\n          // the context vm passed in is a functional context as well.\n          // in this case we want to make sure we are able to get a hold to the\n          // real context instance.\n          contextVm = parent;\n          // @ts-ignore\n          parent = parent._original;\n      }\n      var isCompiled = isTrue(options._compiled);\n      var needNormalization = !isCompiled;\n      this.data = data;\n      this.props = props;\n      this.children = children;\n      this.parent = parent;\n      this.listeners = data.on || emptyObject;\n      this.injections = resolveInject(options.inject, parent);\n      this.slots = function () {\n          if (!_this.$slots) {\n              normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));\n          }\n          return _this.$slots;\n      };\n      Object.defineProperty(this, 'scopedSlots', {\n          enumerable: true,\n          get: function () {\n              return normalizeScopedSlots(parent, data.scopedSlots, this.slots());\n          }\n      });\n      // support for compiled functional template\n      if (isCompiled) {\n          // exposing $options for renderStatic()\n          this.$options = options;\n          // pre-resolve slots for renderSlot()\n          this.$slots = this.slots();\n          this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);\n      }\n      if (options._scopeId) {\n          this._c = function (a, b, c, d) {\n              var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);\n              if (vnode && !isArray(vnode)) {\n                  vnode.fnScopeId = options._scopeId;\n                  vnode.fnContext = parent;\n              }\n              return vnode;\n          };\n      }\n      else {\n          this._c = function (a, b, c, d) {\n              return createElement$1(contextVm, a, b, c, d, needNormalization);\n          };\n      }\n  }\n  installRenderHelpers(FunctionalRenderContext.prototype);\n  function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {\n      var options = Ctor.options;\n      var props = {};\n      var propOptions = options.props;\n      if (isDef(propOptions)) {\n          for (var key in propOptions) {\n              props[key] = validateProp(key, propOptions, propsData || emptyObject);\n          }\n      }\n      else {\n          if (isDef(data.attrs))\n              mergeProps(props, data.attrs);\n          if (isDef(data.props))\n              mergeProps(props, data.props);\n      }\n      var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);\n      var vnode = options.render.call(null, renderContext._c, renderContext);\n      if (vnode instanceof VNode) {\n          return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);\n      }\n      else if (isArray(vnode)) {\n          var vnodes = normalizeChildren(vnode) || [];\n          var res = new Array(vnodes.length);\n          for (var i = 0; i < vnodes.length; i++) {\n              res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n          }\n          return res;\n      }\n  }\n  function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {\n      // #7817 clone node before setting fnContext, otherwise if the node is reused\n      // (e.g. it was from a cached normal slot) the fnContext causes named slots\n      // that should not be matched to match.\n      var clone = cloneVNode(vnode);\n      clone.fnContext = contextVm;\n      clone.fnOptions = options;\n      {\n          (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =\n              renderContext;\n      }\n      if (data.slot) {\n          (clone.data || (clone.data = {})).slot = data.slot;\n      }\n      return clone;\n  }\n  function mergeProps(to, from) {\n      for (var key in from) {\n          to[camelize(key)] = from[key];\n      }\n  }\n\n  function getComponentName(options) {\n      return options.name || options.__name || options._componentTag;\n  }\n  // inline hooks to be invoked on component VNodes during patch\n  var componentVNodeHooks = {\n      init: function (vnode, hydrating) {\n          if (vnode.componentInstance &&\n              !vnode.componentInstance._isDestroyed &&\n              vnode.data.keepAlive) {\n              // kept-alive components, treat as a patch\n              var mountedNode = vnode; // work around flow\n              componentVNodeHooks.prepatch(mountedNode, mountedNode);\n          }\n          else {\n              var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));\n              child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n          }\n      },\n      prepatch: function (oldVnode, vnode) {\n          var options = vnode.componentOptions;\n          var child = (vnode.componentInstance = oldVnode.componentInstance);\n          updateChildComponent(child, options.propsData, // updated props\n          options.listeners, // updated listeners\n          vnode, // new parent vnode\n          options.children // new children\n          );\n      },\n      insert: function (vnode) {\n          var context = vnode.context, componentInstance = vnode.componentInstance;\n          if (!componentInstance._isMounted) {\n              componentInstance._isMounted = true;\n              callHook$1(componentInstance, 'mounted');\n          }\n          if (vnode.data.keepAlive) {\n              if (context._isMounted) {\n                  // vue-router#1212\n                  // During updates, a kept-alive component's child components may\n                  // change, so directly walking the tree here may call activated hooks\n                  // on incorrect children. Instead we push them into a queue which will\n                  // be processed after the whole patch process ended.\n                  queueActivatedComponent(componentInstance);\n              }\n              else {\n                  activateChildComponent(componentInstance, true /* direct */);\n              }\n          }\n      },\n      destroy: function (vnode) {\n          var componentInstance = vnode.componentInstance;\n          if (!componentInstance._isDestroyed) {\n              if (!vnode.data.keepAlive) {\n                  componentInstance.$destroy();\n              }\n              else {\n                  deactivateChildComponent(componentInstance, true /* direct */);\n              }\n          }\n      }\n  };\n  var hooksToMerge = Object.keys(componentVNodeHooks);\n  function createComponent(Ctor, data, context, children, tag) {\n      if (isUndef(Ctor)) {\n          return;\n      }\n      var baseCtor = context.$options._base;\n      // plain options object: turn it into a constructor\n      if (isObject(Ctor)) {\n          Ctor = baseCtor.extend(Ctor);\n      }\n      // if at this stage it's not a constructor or an async component factory,\n      // reject.\n      if (typeof Ctor !== 'function') {\n          {\n              warn(\"Invalid Component definition: \".concat(String(Ctor)), context);\n          }\n          return;\n      }\n      // async component\n      var asyncFactory;\n      // @ts-expect-error\n      if (isUndef(Ctor.cid)) {\n          asyncFactory = Ctor;\n          Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n          if (Ctor === undefined) {\n              // return a placeholder node for async component, which is rendered\n              // as a comment node but preserves all the raw information for the node.\n              // the information will be used for async server-rendering and hydration.\n              return createAsyncPlaceholder(asyncFactory, data, context, children, tag);\n          }\n      }\n      data = data || {};\n      // resolve constructor options in case global mixins are applied after\n      // component constructor creation\n      resolveConstructorOptions(Ctor);\n      // transform component v-model data into props & events\n      if (isDef(data.model)) {\n          // @ts-expect-error\n          transformModel(Ctor.options, data);\n      }\n      // extract props\n      // @ts-expect-error\n      var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n      // functional component\n      // @ts-expect-error\n      if (isTrue(Ctor.options.functional)) {\n          return createFunctionalComponent(Ctor, propsData, data, context, children);\n      }\n      // extract listeners, since these needs to be treated as\n      // child component listeners instead of DOM listeners\n      var listeners = data.on;\n      // replace with listeners with .native modifier\n      // so it gets processed during parent component patch.\n      data.on = data.nativeOn;\n      // @ts-expect-error\n      if (isTrue(Ctor.options.abstract)) {\n          // abstract components do not keep anything\n          // other than props & listeners & slot\n          // work around flow\n          var slot = data.slot;\n          data = {};\n          if (slot) {\n              data.slot = slot;\n          }\n      }\n      // install component management hooks onto the placeholder node\n      installComponentHooks(data);\n      // return a placeholder vnode\n      // @ts-expect-error\n      var name = getComponentName(Ctor.options) || tag;\n      var vnode = new VNode(\n      // @ts-expect-error\n      \"vue-component-\".concat(Ctor.cid).concat(name ? \"-\".concat(name) : ''), data, undefined, undefined, undefined, context, \n      // @ts-expect-error\n      { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);\n      return vnode;\n  }\n  function createComponentInstanceForVnode(\n  // we know it's MountedComponentVNode but flow doesn't\n  vnode, \n  // activeInstance in lifecycle state\n  parent) {\n      var options = {\n          _isComponent: true,\n          _parentVnode: vnode,\n          parent: parent\n      };\n      // check inline-template render functions\n      var inlineTemplate = vnode.data.inlineTemplate;\n      if (isDef(inlineTemplate)) {\n          options.render = inlineTemplate.render;\n          options.staticRenderFns = inlineTemplate.staticRenderFns;\n      }\n      return new vnode.componentOptions.Ctor(options);\n  }\n  function installComponentHooks(data) {\n      var hooks = data.hook || (data.hook = {});\n      for (var i = 0; i < hooksToMerge.length; i++) {\n          var key = hooksToMerge[i];\n          var existing = hooks[key];\n          var toMerge = componentVNodeHooks[key];\n          // @ts-expect-error\n          if (existing !== toMerge && !(existing && existing._merged)) {\n              hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;\n          }\n      }\n  }\n  function mergeHook(f1, f2) {\n      var merged = function (a, b) {\n          // flow complains about extra args which is why we use any\n          f1(a, b);\n          f2(a, b);\n      };\n      merged._merged = true;\n      return merged;\n  }\n  // transform component v-model info (value and callback) into\n  // prop and event handler respectively.\n  function transformModel(options, data) {\n      var prop = (options.model && options.model.prop) || 'value';\n      var event = (options.model && options.model.event) || 'input';\n      (data.attrs || (data.attrs = {}))[prop] = data.model.value;\n      var on = data.on || (data.on = {});\n      var existing = on[event];\n      var callback = data.model.callback;\n      if (isDef(existing)) {\n          if (isArray(existing)\n              ? existing.indexOf(callback) === -1\n              : existing !== callback) {\n              on[event] = [callback].concat(existing);\n          }\n      }\n      else {\n          on[event] = callback;\n      }\n  }\n\n  var warn = noop;\n  var tip = noop;\n  var generateComponentTrace; // work around flow check\n  var formatComponentName;\n  {\n      var hasConsole_1 = typeof console !== 'undefined';\n      var classifyRE_1 = /(?:^|[-_])(\\w)/g;\n      var classify_1 = function (str) {\n          return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');\n      };\n      warn = function (msg, vm) {\n          if (vm === void 0) { vm = currentInstance; }\n          var trace = vm ? generateComponentTrace(vm) : '';\n          if (config.warnHandler) {\n              config.warnHandler.call(null, msg, vm, trace);\n          }\n          else if (hasConsole_1 && !config.silent) {\n              console.error(\"[Vue warn]: \".concat(msg).concat(trace));\n          }\n      };\n      tip = function (msg, vm) {\n          if (hasConsole_1 && !config.silent) {\n              console.warn(\"[Vue tip]: \".concat(msg) + (vm ? generateComponentTrace(vm) : ''));\n          }\n      };\n      formatComponentName = function (vm, includeFile) {\n          if (vm.$root === vm) {\n              return '<Root>';\n          }\n          var options = isFunction(vm) && vm.cid != null\n              ? vm.options\n              : vm._isVue\n                  ? vm.$options || vm.constructor.options\n                  : vm;\n          var name = getComponentName(options);\n          var file = options.__file;\n          if (!name && file) {\n              var match = file.match(/([^/\\\\]+)\\.vue$/);\n              name = match && match[1];\n          }\n          return ((name ? \"<\".concat(classify_1(name), \">\") : \"<Anonymous>\") +\n              (file && includeFile !== false ? \" at \".concat(file) : ''));\n      };\n      var repeat_1 = function (str, n) {\n          var res = '';\n          while (n) {\n              if (n % 2 === 1)\n                  res += str;\n              if (n > 1)\n                  str += str;\n              n >>= 1;\n          }\n          return res;\n      };\n      generateComponentTrace = function (vm) {\n          if (vm._isVue && vm.$parent) {\n              var tree = [];\n              var currentRecursiveSequence = 0;\n              while (vm) {\n                  if (tree.length > 0) {\n                      var last = tree[tree.length - 1];\n                      if (last.constructor === vm.constructor) {\n                          currentRecursiveSequence++;\n                          vm = vm.$parent;\n                          continue;\n                      }\n                      else if (currentRecursiveSequence > 0) {\n                          tree[tree.length - 1] = [last, currentRecursiveSequence];\n                          currentRecursiveSequence = 0;\n                      }\n                  }\n                  tree.push(vm);\n                  vm = vm.$parent;\n              }\n              return ('\\n\\nfound in\\n\\n' +\n                  tree\n                      .map(function (vm, i) {\n                      return \"\".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)\n                          ? \"\".concat(formatComponentName(vm[0]), \"... (\").concat(vm[1], \" recursive calls)\")\n                          : formatComponentName(vm));\n                  })\n                      .join('\\n'));\n          }\n          else {\n              return \"\\n\\n(found in \".concat(formatComponentName(vm), \")\");\n          }\n      };\n  }\n\n  /**\n   * Option overwriting strategies are functions that handle\n   * how to merge a parent option value and a child option\n   * value into the final value.\n   */\n  var strats = config.optionMergeStrategies;\n  /**\n   * Options with restrictions\n   */\n  {\n      strats.el = strats.propsData = function (parent, child, vm, key) {\n          if (!vm) {\n              warn(\"option \\\"\".concat(key, \"\\\" can only be used during instance \") +\n                  'creation with the `new` keyword.');\n          }\n          return defaultStrat(parent, child);\n      };\n  }\n  /**\n   * Helper that recursively merges two data objects together.\n   */\n  function mergeData(to, from, recursive) {\n      if (recursive === void 0) { recursive = true; }\n      if (!from)\n          return to;\n      var key, toVal, fromVal;\n      var keys = hasSymbol\n          ? Reflect.ownKeys(from)\n          : Object.keys(from);\n      for (var i = 0; i < keys.length; i++) {\n          key = keys[i];\n          // in case the object is already observed...\n          if (key === '__ob__')\n              continue;\n          toVal = to[key];\n          fromVal = from[key];\n          if (!recursive || !hasOwn(to, key)) {\n              set(to, key, fromVal);\n          }\n          else if (toVal !== fromVal &&\n              isPlainObject(toVal) &&\n              isPlainObject(fromVal)) {\n              mergeData(toVal, fromVal);\n          }\n      }\n      return to;\n  }\n  /**\n   * Data\n   */\n  function mergeDataOrFn(parentVal, childVal, vm) {\n      if (!vm) {\n          // in a Vue.extend merge, both should be functions\n          if (!childVal) {\n              return parentVal;\n          }\n          if (!parentVal) {\n              return childVal;\n          }\n          // when parentVal & childVal are both present,\n          // we need to return a function that returns the\n          // merged result of both functions... no need to\n          // check if parentVal is a function here because\n          // it has to be a function to pass previous merges.\n          return function mergedDataFn() {\n              return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);\n          };\n      }\n      else {\n          return function mergedInstanceDataFn() {\n              // instance merge\n              var instanceData = isFunction(childVal)\n                  ? childVal.call(vm, vm)\n                  : childVal;\n              var defaultData = isFunction(parentVal)\n                  ? parentVal.call(vm, vm)\n                  : parentVal;\n              if (instanceData) {\n                  return mergeData(instanceData, defaultData);\n              }\n              else {\n                  return defaultData;\n              }\n          };\n      }\n  }\n  strats.data = function (parentVal, childVal, vm) {\n      if (!vm) {\n          if (childVal && typeof childVal !== 'function') {\n              warn('The \"data\" option should be a function ' +\n                      'that returns a per-instance value in component ' +\n                      'definitions.', vm);\n              return parentVal;\n          }\n          return mergeDataOrFn(parentVal, childVal);\n      }\n      return mergeDataOrFn(parentVal, childVal, vm);\n  };\n  /**\n   * Hooks and props are merged as arrays.\n   */\n  function mergeLifecycleHook(parentVal, childVal) {\n      var res = childVal\n          ? parentVal\n              ? parentVal.concat(childVal)\n              : isArray(childVal)\n                  ? childVal\n                  : [childVal]\n          : parentVal;\n      return res ? dedupeHooks(res) : res;\n  }\n  function dedupeHooks(hooks) {\n      var res = [];\n      for (var i = 0; i < hooks.length; i++) {\n          if (res.indexOf(hooks[i]) === -1) {\n              res.push(hooks[i]);\n          }\n      }\n      return res;\n  }\n  LIFECYCLE_HOOKS.forEach(function (hook) {\n      strats[hook] = mergeLifecycleHook;\n  });\n  /**\n   * Assets\n   *\n   * When a vm is present (instance creation), we need to do\n   * a three-way merge between constructor options, instance\n   * options and parent options.\n   */\n  function mergeAssets(parentVal, childVal, vm, key) {\n      var res = Object.create(parentVal || null);\n      if (childVal) {\n          assertObjectType(key, childVal, vm);\n          return extend(res, childVal);\n      }\n      else {\n          return res;\n      }\n  }\n  ASSET_TYPES.forEach(function (type) {\n      strats[type + 's'] = mergeAssets;\n  });\n  /**\n   * Watchers.\n   *\n   * Watchers hashes should not overwrite one\n   * another, so we merge them as arrays.\n   */\n  strats.watch = function (parentVal, childVal, vm, key) {\n      // work around Firefox's Object.prototype.watch...\n      //@ts-expect-error work around\n      if (parentVal === nativeWatch)\n          parentVal = undefined;\n      //@ts-expect-error work around\n      if (childVal === nativeWatch)\n          childVal = undefined;\n      /* istanbul ignore if */\n      if (!childVal)\n          return Object.create(parentVal || null);\n      {\n          assertObjectType(key, childVal, vm);\n      }\n      if (!parentVal)\n          return childVal;\n      var ret = {};\n      extend(ret, parentVal);\n      for (var key_1 in childVal) {\n          var parent_1 = ret[key_1];\n          var child = childVal[key_1];\n          if (parent_1 && !isArray(parent_1)) {\n              parent_1 = [parent_1];\n          }\n          ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];\n      }\n      return ret;\n  };\n  /**\n   * Other object hashes.\n   */\n  strats.props =\n      strats.methods =\n          strats.inject =\n              strats.computed =\n                  function (parentVal, childVal, vm, key) {\n                      if (childVal && true) {\n                          assertObjectType(key, childVal, vm);\n                      }\n                      if (!parentVal)\n                          return childVal;\n                      var ret = Object.create(null);\n                      extend(ret, parentVal);\n                      if (childVal)\n                          extend(ret, childVal);\n                      return ret;\n                  };\n  strats.provide = function (parentVal, childVal) {\n      if (!parentVal)\n          return childVal;\n      return function () {\n          var ret = Object.create(null);\n          mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);\n          if (childVal) {\n              mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive\n              );\n          }\n          return ret;\n      };\n  };\n  /**\n   * Default strategy.\n   */\n  var defaultStrat = function (parentVal, childVal) {\n      return childVal === undefined ? parentVal : childVal;\n  };\n  /**\n   * Validate component names\n   */\n  function checkComponents(options) {\n      for (var key in options.components) {\n          validateComponentName(key);\n      }\n  }\n  function validateComponentName(name) {\n      if (!new RegExp(\"^[a-zA-Z][\\\\-\\\\.0-9_\".concat(unicodeRegExp.source, \"]*$\")).test(name)) {\n          warn('Invalid component name: \"' +\n              name +\n              '\". Component names ' +\n              'should conform to valid custom element name in html5 specification.');\n      }\n      if (isBuiltInTag(name) || config.isReservedTag(name)) {\n          warn('Do not use built-in or reserved HTML elements as component ' +\n              'id: ' +\n              name);\n      }\n  }\n  /**\n   * Ensure all props option syntax are normalized into the\n   * Object-based format.\n   */\n  function normalizeProps(options, vm) {\n      var props = options.props;\n      if (!props)\n          return;\n      var res = {};\n      var i, val, name;\n      if (isArray(props)) {\n          i = props.length;\n          while (i--) {\n              val = props[i];\n              if (typeof val === 'string') {\n                  name = camelize(val);\n                  res[name] = { type: null };\n              }\n              else {\n                  warn('props must be strings when using array syntax.');\n              }\n          }\n      }\n      else if (isPlainObject(props)) {\n          for (var key in props) {\n              val = props[key];\n              name = camelize(key);\n              res[name] = isPlainObject(val) ? val : { type: val };\n          }\n      }\n      else {\n          warn(\"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n              \"but got \".concat(toRawType(props), \".\"), vm);\n      }\n      options.props = res;\n  }\n  /**\n   * Normalize all injections into Object-based format\n   */\n  function normalizeInject(options, vm) {\n      var inject = options.inject;\n      if (!inject)\n          return;\n      var normalized = (options.inject = {});\n      if (isArray(inject)) {\n          for (var i = 0; i < inject.length; i++) {\n              normalized[inject[i]] = { from: inject[i] };\n          }\n      }\n      else if (isPlainObject(inject)) {\n          for (var key in inject) {\n              var val = inject[key];\n              normalized[key] = isPlainObject(val)\n                  ? extend({ from: key }, val)\n                  : { from: val };\n          }\n      }\n      else {\n          warn(\"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n              \"but got \".concat(toRawType(inject), \".\"), vm);\n      }\n  }\n  /**\n   * Normalize raw function directives into object format.\n   */\n  function normalizeDirectives$1(options) {\n      var dirs = options.directives;\n      if (dirs) {\n          for (var key in dirs) {\n              var def = dirs[key];\n              if (isFunction(def)) {\n                  dirs[key] = { bind: def, update: def };\n              }\n          }\n      }\n  }\n  function assertObjectType(name, value, vm) {\n      if (!isPlainObject(value)) {\n          warn(\"Invalid value for option \\\"\".concat(name, \"\\\": expected an Object, \") +\n              \"but got \".concat(toRawType(value), \".\"), vm);\n      }\n  }\n  /**\n   * Merge two option objects into a new one.\n   * Core utility used in both instantiation and inheritance.\n   */\n  function mergeOptions(parent, child, vm) {\n      {\n          checkComponents(child);\n      }\n      if (isFunction(child)) {\n          // @ts-expect-error\n          child = child.options;\n      }\n      normalizeProps(child, vm);\n      normalizeInject(child, vm);\n      normalizeDirectives$1(child);\n      // Apply extends and mixins on the child options,\n      // but only if it is a raw options object that isn't\n      // the result of another mergeOptions call.\n      // Only merged options has the _base property.\n      if (!child._base) {\n          if (child.extends) {\n              parent = mergeOptions(parent, child.extends, vm);\n          }\n          if (child.mixins) {\n              for (var i = 0, l = child.mixins.length; i < l; i++) {\n                  parent = mergeOptions(parent, child.mixins[i], vm);\n              }\n          }\n      }\n      var options = {};\n      var key;\n      for (key in parent) {\n          mergeField(key);\n      }\n      for (key in child) {\n          if (!hasOwn(parent, key)) {\n              mergeField(key);\n          }\n      }\n      function mergeField(key) {\n          var strat = strats[key] || defaultStrat;\n          options[key] = strat(parent[key], child[key], vm, key);\n      }\n      return options;\n  }\n  /**\n   * Resolve an asset.\n   * This function is used because child instances need access\n   * to assets defined in its ancestor chain.\n   */\n  function resolveAsset(options, type, id, warnMissing) {\n      /* istanbul ignore if */\n      if (typeof id !== 'string') {\n          return;\n      }\n      var assets = options[type];\n      // check local registration variations first\n      if (hasOwn(assets, id))\n          return assets[id];\n      var camelizedId = camelize(id);\n      if (hasOwn(assets, camelizedId))\n          return assets[camelizedId];\n      var PascalCaseId = capitalize(camelizedId);\n      if (hasOwn(assets, PascalCaseId))\n          return assets[PascalCaseId];\n      // fallback to prototype chain\n      var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n      if (warnMissing && !res) {\n          warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id);\n      }\n      return res;\n  }\n\n  function validateProp(key, propOptions, propsData, vm) {\n      var prop = propOptions[key];\n      var absent = !hasOwn(propsData, key);\n      var value = propsData[key];\n      // boolean casting\n      var booleanIndex = getTypeIndex(Boolean, prop.type);\n      if (booleanIndex > -1) {\n          if (absent && !hasOwn(prop, 'default')) {\n              value = false;\n          }\n          else if (value === '' || value === hyphenate(key)) {\n              // only cast empty string / same name to boolean if\n              // boolean has higher priority\n              var stringIndex = getTypeIndex(String, prop.type);\n              if (stringIndex < 0 || booleanIndex < stringIndex) {\n                  value = true;\n              }\n          }\n      }\n      // check default value\n      if (value === undefined) {\n          value = getPropDefaultValue(vm, prop, key);\n          // since the default value is a fresh copy,\n          // make sure to observe it.\n          var prevShouldObserve = shouldObserve;\n          toggleObserving(true);\n          observe(value);\n          toggleObserving(prevShouldObserve);\n      }\n      {\n          assertProp(prop, key, value, vm, absent);\n      }\n      return value;\n  }\n  /**\n   * Get the default value of a prop.\n   */\n  function getPropDefaultValue(vm, prop, key) {\n      // no default, return undefined\n      if (!hasOwn(prop, 'default')) {\n          return undefined;\n      }\n      var def = prop.default;\n      // warn against non-factory defaults for Object & Array\n      if (isObject(def)) {\n          warn('Invalid default value for prop \"' +\n              key +\n              '\": ' +\n              'Props with type Object/Array must use a factory function ' +\n              'to return the default value.', vm);\n      }\n      // the raw prop value was also undefined from previous render,\n      // return previous default value to avoid unnecessary watcher trigger\n      if (vm &&\n          vm.$options.propsData &&\n          vm.$options.propsData[key] === undefined &&\n          vm._props[key] !== undefined) {\n          return vm._props[key];\n      }\n      // call factory function for non-Function types\n      // a value is Function if its prototype is function even across different execution context\n      return isFunction(def) && getType(prop.type) !== 'Function'\n          ? def.call(vm)\n          : def;\n  }\n  /**\n   * Assert whether a prop is valid.\n   */\n  function assertProp(prop, name, value, vm, absent) {\n      if (prop.required && absent) {\n          warn('Missing required prop: \"' + name + '\"', vm);\n          return;\n      }\n      if (value == null && !prop.required) {\n          return;\n      }\n      var type = prop.type;\n      var valid = !type || type === true;\n      var expectedTypes = [];\n      if (type) {\n          if (!isArray(type)) {\n              type = [type];\n          }\n          for (var i = 0; i < type.length && !valid; i++) {\n              var assertedType = assertType(value, type[i], vm);\n              expectedTypes.push(assertedType.expectedType || '');\n              valid = assertedType.valid;\n          }\n      }\n      var haveExpectedTypes = expectedTypes.some(function (t) { return t; });\n      if (!valid && haveExpectedTypes) {\n          warn(getInvalidTypeMessage(name, value, expectedTypes), vm);\n          return;\n      }\n      var validator = prop.validator;\n      if (validator) {\n          if (!validator(value)) {\n              warn('Invalid prop: custom validator check failed for prop \"' + name + '\".', vm);\n          }\n      }\n  }\n  var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;\n  function assertType(value, type, vm) {\n      var valid;\n      var expectedType = getType(type);\n      if (simpleCheckRE.test(expectedType)) {\n          var t = typeof value;\n          valid = t === expectedType.toLowerCase();\n          // for primitive wrapper objects\n          if (!valid && t === 'object') {\n              valid = value instanceof type;\n          }\n      }\n      else if (expectedType === 'Object') {\n          valid = isPlainObject(value);\n      }\n      else if (expectedType === 'Array') {\n          valid = isArray(value);\n      }\n      else {\n          try {\n              valid = value instanceof type;\n          }\n          catch (e) {\n              warn('Invalid prop type: \"' + String(type) + '\" is not a constructor', vm);\n              valid = false;\n          }\n      }\n      return {\n          valid: valid,\n          expectedType: expectedType\n      };\n  }\n  var functionTypeCheckRE = /^\\s*function (\\w+)/;\n  /**\n   * Use function string name to check built-in types,\n   * because a simple equality check will fail when running\n   * across different vms / iframes.\n   */\n  function getType(fn) {\n      var match = fn && fn.toString().match(functionTypeCheckRE);\n      return match ? match[1] : '';\n  }\n  function isSameType(a, b) {\n      return getType(a) === getType(b);\n  }\n  function getTypeIndex(type, expectedTypes) {\n      if (!isArray(expectedTypes)) {\n          return isSameType(expectedTypes, type) ? 0 : -1;\n      }\n      for (var i = 0, len = expectedTypes.length; i < len; i++) {\n          if (isSameType(expectedTypes[i], type)) {\n              return i;\n          }\n      }\n      return -1;\n  }\n  function getInvalidTypeMessage(name, value, expectedTypes) {\n      var message = \"Invalid prop: type check failed for prop \\\"\".concat(name, \"\\\".\") +\n          \" Expected \".concat(expectedTypes.map(capitalize).join(', '));\n      var expectedType = expectedTypes[0];\n      var receivedType = toRawType(value);\n      // check if we need to specify expected value\n      if (expectedTypes.length === 1 &&\n          isExplicable(expectedType) &&\n          isExplicable(typeof value) &&\n          !isBoolean(expectedType, receivedType)) {\n          message += \" with value \".concat(styleValue(value, expectedType));\n      }\n      message += \", got \".concat(receivedType, \" \");\n      // check if we need to specify received value\n      if (isExplicable(receivedType)) {\n          message += \"with value \".concat(styleValue(value, receivedType), \".\");\n      }\n      return message;\n  }\n  function styleValue(value, type) {\n      if (type === 'String') {\n          return \"\\\"\".concat(value, \"\\\"\");\n      }\n      else if (type === 'Number') {\n          return \"\".concat(Number(value));\n      }\n      else {\n          return \"\".concat(value);\n      }\n  }\n  var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];\n  function isExplicable(value) {\n      return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });\n  }\n  function isBoolean() {\n      var args = [];\n      for (var _i = 0; _i < arguments.length; _i++) {\n          args[_i] = arguments[_i];\n      }\n      return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });\n  }\n\n  /* not type checking this file because flow doesn't play well with Proxy */\n  var initProxy;\n  {\n      var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +\n          'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n          'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +\n          'require' // for Webpack/Browserify\n      );\n      var warnNonPresent_1 = function (target, key) {\n          warn(\"Property or method \\\"\".concat(key, \"\\\" is not defined on the instance but \") +\n              'referenced during render. Make sure that this property is reactive, ' +\n              'either in the data option, or for class-based components, by ' +\n              'initializing the property. ' +\n              'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);\n      };\n      var warnReservedPrefix_1 = function (target, key) {\n          warn(\"Property \\\"\".concat(key, \"\\\" must be accessed with \\\"$data.\").concat(key, \"\\\" because \") +\n              'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n              'prevent conflicts with Vue internals. ' +\n              'See: https://v2.vuejs.org/v2/api/#data', target);\n      };\n      var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);\n      if (hasProxy_1) {\n          var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n          config.keyCodes = new Proxy(config.keyCodes, {\n              set: function (target, key, value) {\n                  if (isBuiltInModifier_1(key)) {\n                      warn(\"Avoid overwriting built-in modifier in config.keyCodes: .\".concat(key));\n                      return false;\n                  }\n                  else {\n                      target[key] = value;\n                      return true;\n                  }\n              }\n          });\n      }\n      var hasHandler_1 = {\n          has: function (target, key) {\n              var has = key in target;\n              var isAllowed = allowedGlobals_1(key) ||\n                  (typeof key === 'string' &&\n                      key.charAt(0) === '_' &&\n                      !(key in target.$data));\n              if (!has && !isAllowed) {\n                  if (key in target.$data)\n                      warnReservedPrefix_1(target, key);\n                  else\n                      warnNonPresent_1(target, key);\n              }\n              return has || !isAllowed;\n          }\n      };\n      var getHandler_1 = {\n          get: function (target, key) {\n              if (typeof key === 'string' && !(key in target)) {\n                  if (key in target.$data)\n                      warnReservedPrefix_1(target, key);\n                  else\n                      warnNonPresent_1(target, key);\n              }\n              return target[key];\n          }\n      };\n      initProxy = function initProxy(vm) {\n          if (hasProxy_1) {\n              // determine which proxy handler to use\n              var options = vm.$options;\n              var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;\n              vm._renderProxy = new Proxy(vm, handlers);\n          }\n          else {\n              vm._renderProxy = vm;\n          }\n      };\n  }\n\n  var sharedPropertyDefinition = {\n      enumerable: true,\n      configurable: true,\n      get: noop,\n      set: noop\n  };\n  function proxy(target, sourceKey, key) {\n      sharedPropertyDefinition.get = function proxyGetter() {\n          return this[sourceKey][key];\n      };\n      sharedPropertyDefinition.set = function proxySetter(val) {\n          this[sourceKey][key] = val;\n      };\n      Object.defineProperty(target, key, sharedPropertyDefinition);\n  }\n  function initState(vm) {\n      var opts = vm.$options;\n      if (opts.props)\n          initProps$1(vm, opts.props);\n      // Composition API\n      initSetup(vm);\n      if (opts.methods)\n          initMethods(vm, opts.methods);\n      if (opts.data) {\n          initData(vm);\n      }\n      else {\n          var ob = observe((vm._data = {}));\n          ob && ob.vmCount++;\n      }\n      if (opts.computed)\n          initComputed$1(vm, opts.computed);\n      if (opts.watch && opts.watch !== nativeWatch) {\n          initWatch(vm, opts.watch);\n      }\n  }\n  function initProps$1(vm, propsOptions) {\n      var propsData = vm.$options.propsData || {};\n      var props = (vm._props = shallowReactive({}));\n      // cache prop keys so that future props updates can iterate using Array\n      // instead of dynamic object key enumeration.\n      var keys = (vm.$options._propKeys = []);\n      var isRoot = !vm.$parent;\n      // root instance props should be converted\n      if (!isRoot) {\n          toggleObserving(false);\n      }\n      var _loop_1 = function (key) {\n          keys.push(key);\n          var value = validateProp(key, propsOptions, propsData, vm);\n          /* istanbul ignore else */\n          {\n              var hyphenatedKey = hyphenate(key);\n              if (isReservedAttribute(hyphenatedKey) ||\n                  config.isReservedAttr(hyphenatedKey)) {\n                  warn(\"\\\"\".concat(hyphenatedKey, \"\\\" is a reserved attribute and cannot be used as component prop.\"), vm);\n              }\n              defineReactive(props, key, value, function () {\n                  if (!isRoot && !isUpdatingChildComponent) {\n                      warn(\"Avoid mutating a prop directly since the value will be \" +\n                          \"overwritten whenever the parent component re-renders. \" +\n                          \"Instead, use a data or computed property based on the prop's \" +\n                          \"value. Prop being mutated: \\\"\".concat(key, \"\\\"\"), vm);\n                  }\n              }, true /* shallow */);\n          }\n          // static props are already proxied on the component's prototype\n          // during Vue.extend(). We only need to proxy props defined at\n          // instantiation here.\n          if (!(key in vm)) {\n              proxy(vm, \"_props\", key);\n          }\n      };\n      for (var key in propsOptions) {\n          _loop_1(key);\n      }\n      toggleObserving(true);\n  }\n  function initData(vm) {\n      var data = vm.$options.data;\n      data = vm._data = isFunction(data) ? getData(data, vm) : data || {};\n      if (!isPlainObject(data)) {\n          data = {};\n          warn('data functions should return an object:\\n' +\n                  'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);\n      }\n      // proxy data on instance\n      var keys = Object.keys(data);\n      var props = vm.$options.props;\n      var methods = vm.$options.methods;\n      var i = keys.length;\n      while (i--) {\n          var key = keys[i];\n          {\n              if (methods && hasOwn(methods, key)) {\n                  warn(\"Method \\\"\".concat(key, \"\\\" has already been defined as a data property.\"), vm);\n              }\n          }\n          if (props && hasOwn(props, key)) {\n              warn(\"The data property \\\"\".concat(key, \"\\\" is already declared as a prop. \") +\n                      \"Use prop default value instead.\", vm);\n          }\n          else if (!isReserved(key)) {\n              proxy(vm, \"_data\", key);\n          }\n      }\n      // observe data\n      var ob = observe(data);\n      ob && ob.vmCount++;\n  }\n  function getData(data, vm) {\n      // #7573 disable dep collection when invoking data getters\n      pushTarget();\n      try {\n          return data.call(vm, vm);\n      }\n      catch (e) {\n          handleError(e, vm, \"data()\");\n          return {};\n      }\n      finally {\n          popTarget();\n      }\n  }\n  var computedWatcherOptions = { lazy: true };\n  function initComputed$1(vm, computed) {\n      // $flow-disable-line\n      var watchers = (vm._computedWatchers = Object.create(null));\n      // computed properties are just getters during SSR\n      var isSSR = isServerRendering();\n      for (var key in computed) {\n          var userDef = computed[key];\n          var getter = isFunction(userDef) ? userDef : userDef.get;\n          if (getter == null) {\n              warn(\"Getter is missing for computed property \\\"\".concat(key, \"\\\".\"), vm);\n          }\n          if (!isSSR) {\n              // create internal watcher for the computed property.\n              watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);\n          }\n          // component-defined computed properties are already defined on the\n          // component prototype. We only need to define computed properties defined\n          // at instantiation here.\n          if (!(key in vm)) {\n              defineComputed(vm, key, userDef);\n          }\n          else {\n              if (key in vm.$data) {\n                  warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined in data.\"), vm);\n              }\n              else if (vm.$options.props && key in vm.$options.props) {\n                  warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a prop.\"), vm);\n              }\n              else if (vm.$options.methods && key in vm.$options.methods) {\n                  warn(\"The computed property \\\"\".concat(key, \"\\\" is already defined as a method.\"), vm);\n              }\n          }\n      }\n  }\n  function defineComputed(target, key, userDef) {\n      var shouldCache = !isServerRendering();\n      if (isFunction(userDef)) {\n          sharedPropertyDefinition.get = shouldCache\n              ? createComputedGetter(key)\n              : createGetterInvoker(userDef);\n          sharedPropertyDefinition.set = noop;\n      }\n      else {\n          sharedPropertyDefinition.get = userDef.get\n              ? shouldCache && userDef.cache !== false\n                  ? createComputedGetter(key)\n                  : createGetterInvoker(userDef.get)\n              : noop;\n          sharedPropertyDefinition.set = userDef.set || noop;\n      }\n      if (sharedPropertyDefinition.set === noop) {\n          sharedPropertyDefinition.set = function () {\n              warn(\"Computed property \\\"\".concat(key, \"\\\" was assigned to but it has no setter.\"), this);\n          };\n      }\n      Object.defineProperty(target, key, sharedPropertyDefinition);\n  }\n  function createComputedGetter(key) {\n      return function computedGetter() {\n          var watcher = this._computedWatchers && this._computedWatchers[key];\n          if (watcher) {\n              if (watcher.dirty) {\n                  watcher.evaluate();\n              }\n              if (Dep.target) {\n                  if (Dep.target.onTrack) {\n                      Dep.target.onTrack({\n                          effect: Dep.target,\n                          target: this,\n                          type: \"get\" /* TrackOpTypes.GET */,\n                          key: key\n                      });\n                  }\n                  watcher.depend();\n              }\n              return watcher.value;\n          }\n      };\n  }\n  function createGetterInvoker(fn) {\n      return function computedGetter() {\n          return fn.call(this, this);\n      };\n  }\n  function initMethods(vm, methods) {\n      var props = vm.$options.props;\n      for (var key in methods) {\n          {\n              if (typeof methods[key] !== 'function') {\n                  warn(\"Method \\\"\".concat(key, \"\\\" has type \\\"\").concat(typeof methods[key], \"\\\" in the component definition. \") +\n                      \"Did you reference the function correctly?\", vm);\n              }\n              if (props && hasOwn(props, key)) {\n                  warn(\"Method \\\"\".concat(key, \"\\\" has already been defined as a prop.\"), vm);\n              }\n              if (key in vm && isReserved(key)) {\n                  warn(\"Method \\\"\".concat(key, \"\\\" conflicts with an existing Vue instance method. \") +\n                      \"Avoid defining component methods that start with _ or $.\");\n              }\n          }\n          vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n      }\n  }\n  function initWatch(vm, watch) {\n      for (var key in watch) {\n          var handler = watch[key];\n          if (isArray(handler)) {\n              for (var i = 0; i < handler.length; i++) {\n                  createWatcher(vm, key, handler[i]);\n              }\n          }\n          else {\n              createWatcher(vm, key, handler);\n          }\n      }\n  }\n  function createWatcher(vm, expOrFn, handler, options) {\n      if (isPlainObject(handler)) {\n          options = handler;\n          handler = handler.handler;\n      }\n      if (typeof handler === 'string') {\n          handler = vm[handler];\n      }\n      return vm.$watch(expOrFn, handler, options);\n  }\n  function stateMixin(Vue) {\n      // flow somehow has problems with directly declared definition object\n      // when using Object.defineProperty, so we have to procedurally build up\n      // the object here.\n      var dataDef = {};\n      dataDef.get = function () {\n          return this._data;\n      };\n      var propsDef = {};\n      propsDef.get = function () {\n          return this._props;\n      };\n      {\n          dataDef.set = function () {\n              warn('Avoid replacing instance root $data. ' +\n                  'Use nested data properties instead.', this);\n          };\n          propsDef.set = function () {\n              warn(\"$props is readonly.\", this);\n          };\n      }\n      Object.defineProperty(Vue.prototype, '$data', dataDef);\n      Object.defineProperty(Vue.prototype, '$props', propsDef);\n      Vue.prototype.$set = set;\n      Vue.prototype.$delete = del;\n      Vue.prototype.$watch = function (expOrFn, cb, options) {\n          var vm = this;\n          if (isPlainObject(cb)) {\n              return createWatcher(vm, expOrFn, cb, options);\n          }\n          options = options || {};\n          options.user = true;\n          var watcher = new Watcher(vm, expOrFn, cb, options);\n          if (options.immediate) {\n              var info = \"callback for immediate watcher \\\"\".concat(watcher.expression, \"\\\"\");\n              pushTarget();\n              invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);\n              popTarget();\n          }\n          return function unwatchFn() {\n              watcher.teardown();\n          };\n      };\n  }\n\n  var uid = 0;\n  function initMixin$1(Vue) {\n      Vue.prototype._init = function (options) {\n          var vm = this;\n          // a uid\n          vm._uid = uid++;\n          var startTag, endTag;\n          /* istanbul ignore if */\n          if (config.performance && mark) {\n              startTag = \"vue-perf-start:\".concat(vm._uid);\n              endTag = \"vue-perf-end:\".concat(vm._uid);\n              mark(startTag);\n          }\n          // a flag to mark this as a Vue instance without having to do instanceof\n          // check\n          vm._isVue = true;\n          // avoid instances from being observed\n          vm.__v_skip = true;\n          // effect scope\n          vm._scope = new EffectScope(true /* detached */);\n          // #13134 edge case where a child component is manually created during the\n          // render of a parent component\n          vm._scope.parent = undefined;\n          vm._scope._vm = true;\n          // merge options\n          if (options && options._isComponent) {\n              // optimize internal component instantiation\n              // since dynamic options merging is pretty slow, and none of the\n              // internal component options needs special treatment.\n              initInternalComponent(vm, options);\n          }\n          else {\n              vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);\n          }\n          /* istanbul ignore else */\n          {\n              initProxy(vm);\n          }\n          // expose real self\n          vm._self = vm;\n          initLifecycle(vm);\n          initEvents(vm);\n          initRender(vm);\n          callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);\n          initInjections(vm); // resolve injections before data/props\n          initState(vm);\n          initProvide(vm); // resolve provide after data/props\n          callHook$1(vm, 'created');\n          /* istanbul ignore if */\n          if (config.performance && mark) {\n              vm._name = formatComponentName(vm, false);\n              mark(endTag);\n              measure(\"vue \".concat(vm._name, \" init\"), startTag, endTag);\n          }\n          if (vm.$options.el) {\n              vm.$mount(vm.$options.el);\n          }\n      };\n  }\n  function initInternalComponent(vm, options) {\n      var opts = (vm.$options = Object.create(vm.constructor.options));\n      // doing this because it's faster than dynamic enumeration.\n      var parentVnode = options._parentVnode;\n      opts.parent = options.parent;\n      opts._parentVnode = parentVnode;\n      var vnodeComponentOptions = parentVnode.componentOptions;\n      opts.propsData = vnodeComponentOptions.propsData;\n      opts._parentListeners = vnodeComponentOptions.listeners;\n      opts._renderChildren = vnodeComponentOptions.children;\n      opts._componentTag = vnodeComponentOptions.tag;\n      if (options.render) {\n          opts.render = options.render;\n          opts.staticRenderFns = options.staticRenderFns;\n      }\n  }\n  function resolveConstructorOptions(Ctor) {\n      var options = Ctor.options;\n      if (Ctor.super) {\n          var superOptions = resolveConstructorOptions(Ctor.super);\n          var cachedSuperOptions = Ctor.superOptions;\n          if (superOptions !== cachedSuperOptions) {\n              // super option changed,\n              // need to resolve new options.\n              Ctor.superOptions = superOptions;\n              // check if there are any late-modified/attached options (#4976)\n              var modifiedOptions = resolveModifiedOptions(Ctor);\n              // update base extend options\n              if (modifiedOptions) {\n                  extend(Ctor.extendOptions, modifiedOptions);\n              }\n              options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n              if (options.name) {\n                  options.components[options.name] = Ctor;\n              }\n          }\n      }\n      return options;\n  }\n  function resolveModifiedOptions(Ctor) {\n      var modified;\n      var latest = Ctor.options;\n      var sealed = Ctor.sealedOptions;\n      for (var key in latest) {\n          if (latest[key] !== sealed[key]) {\n              if (!modified)\n                  modified = {};\n              modified[key] = latest[key];\n          }\n      }\n      return modified;\n  }\n\n  function Vue(options) {\n      if (!(this instanceof Vue)) {\n          warn('Vue is a constructor and should be called with the `new` keyword');\n      }\n      this._init(options);\n  }\n  //@ts-expect-error Vue has function type\n  initMixin$1(Vue);\n  //@ts-expect-error Vue has function type\n  stateMixin(Vue);\n  //@ts-expect-error Vue has function type\n  eventsMixin(Vue);\n  //@ts-expect-error Vue has function type\n  lifecycleMixin(Vue);\n  //@ts-expect-error Vue has function type\n  renderMixin(Vue);\n\n  function initUse(Vue) {\n      Vue.use = function (plugin) {\n          var installedPlugins = this._installedPlugins || (this._installedPlugins = []);\n          if (installedPlugins.indexOf(plugin) > -1) {\n              return this;\n          }\n          // additional parameters\n          var args = toArray(arguments, 1);\n          args.unshift(this);\n          if (isFunction(plugin.install)) {\n              plugin.install.apply(plugin, args);\n          }\n          else if (isFunction(plugin)) {\n              plugin.apply(null, args);\n          }\n          installedPlugins.push(plugin);\n          return this;\n      };\n  }\n\n  function initMixin(Vue) {\n      Vue.mixin = function (mixin) {\n          this.options = mergeOptions(this.options, mixin);\n          return this;\n      };\n  }\n\n  function initExtend(Vue) {\n      /**\n       * Each instance constructor, including Vue, has a unique\n       * cid. This enables us to create wrapped \"child\n       * constructors\" for prototypal inheritance and cache them.\n       */\n      Vue.cid = 0;\n      var cid = 1;\n      /**\n       * Class inheritance\n       */\n      Vue.extend = function (extendOptions) {\n          extendOptions = extendOptions || {};\n          var Super = this;\n          var SuperId = Super.cid;\n          var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n          if (cachedCtors[SuperId]) {\n              return cachedCtors[SuperId];\n          }\n          var name = getComponentName(extendOptions) || getComponentName(Super.options);\n          if (name) {\n              validateComponentName(name);\n          }\n          var Sub = function VueComponent(options) {\n              this._init(options);\n          };\n          Sub.prototype = Object.create(Super.prototype);\n          Sub.prototype.constructor = Sub;\n          Sub.cid = cid++;\n          Sub.options = mergeOptions(Super.options, extendOptions);\n          Sub['super'] = Super;\n          // For props and computed properties, we define the proxy getters on\n          // the Vue instances at extension time, on the extended prototype. This\n          // avoids Object.defineProperty calls for each instance created.\n          if (Sub.options.props) {\n              initProps(Sub);\n          }\n          if (Sub.options.computed) {\n              initComputed(Sub);\n          }\n          // allow further extension/mixin/plugin usage\n          Sub.extend = Super.extend;\n          Sub.mixin = Super.mixin;\n          Sub.use = Super.use;\n          // create asset registers, so extended classes\n          // can have their private assets too.\n          ASSET_TYPES.forEach(function (type) {\n              Sub[type] = Super[type];\n          });\n          // enable recursive self-lookup\n          if (name) {\n              Sub.options.components[name] = Sub;\n          }\n          // keep a reference to the super options at extension time.\n          // later at instantiation we can check if Super's options have\n          // been updated.\n          Sub.superOptions = Super.options;\n          Sub.extendOptions = extendOptions;\n          Sub.sealedOptions = extend({}, Sub.options);\n          // cache constructor\n          cachedCtors[SuperId] = Sub;\n          return Sub;\n      };\n  }\n  function initProps(Comp) {\n      var props = Comp.options.props;\n      for (var key in props) {\n          proxy(Comp.prototype, \"_props\", key);\n      }\n  }\n  function initComputed(Comp) {\n      var computed = Comp.options.computed;\n      for (var key in computed) {\n          defineComputed(Comp.prototype, key, computed[key]);\n      }\n  }\n\n  function initAssetRegisters(Vue) {\n      /**\n       * Create asset registration methods.\n       */\n      ASSET_TYPES.forEach(function (type) {\n          // @ts-expect-error function is not exact same type\n          Vue[type] = function (id, definition) {\n              if (!definition) {\n                  return this.options[type + 's'][id];\n              }\n              else {\n                  /* istanbul ignore if */\n                  if (type === 'component') {\n                      validateComponentName(id);\n                  }\n                  if (type === 'component' && isPlainObject(definition)) {\n                      // @ts-expect-error\n                      definition.name = definition.name || id;\n                      definition = this.options._base.extend(definition);\n                  }\n                  if (type === 'directive' && isFunction(definition)) {\n                      definition = { bind: definition, update: definition };\n                  }\n                  this.options[type + 's'][id] = definition;\n                  return definition;\n              }\n          };\n      });\n  }\n\n  function _getComponentName(opts) {\n      return opts && (getComponentName(opts.Ctor.options) || opts.tag);\n  }\n  function matches(pattern, name) {\n      if (isArray(pattern)) {\n          return pattern.indexOf(name) > -1;\n      }\n      else if (typeof pattern === 'string') {\n          return pattern.split(',').indexOf(name) > -1;\n      }\n      else if (isRegExp(pattern)) {\n          return pattern.test(name);\n      }\n      /* istanbul ignore next */\n      return false;\n  }\n  function pruneCache(keepAliveInstance, filter) {\n      var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode, $vnode = keepAliveInstance.$vnode;\n      for (var key in cache) {\n          var entry = cache[key];\n          if (entry) {\n              var name_1 = entry.name;\n              if (name_1 && !filter(name_1)) {\n                  pruneCacheEntry(cache, key, keys, _vnode);\n              }\n          }\n      }\n      $vnode.componentOptions.children = undefined;\n  }\n  function pruneCacheEntry(cache, key, keys, current) {\n      var entry = cache[key];\n      if (entry && (!current || entry.tag !== current.tag)) {\n          // @ts-expect-error can be undefined\n          entry.componentInstance.$destroy();\n      }\n      cache[key] = null;\n      remove$2(keys, key);\n  }\n  var patternTypes = [String, RegExp, Array];\n  // TODO defineComponent\n  var KeepAlive = {\n      name: 'keep-alive',\n      abstract: true,\n      props: {\n          include: patternTypes,\n          exclude: patternTypes,\n          max: [String, Number]\n      },\n      methods: {\n          cacheVNode: function () {\n              var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;\n              if (vnodeToCache) {\n                  var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;\n                  cache[keyToCache] = {\n                      name: _getComponentName(componentOptions),\n                      tag: tag,\n                      componentInstance: componentInstance\n                  };\n                  keys.push(keyToCache);\n                  // prune oldest entry\n                  if (this.max && keys.length > parseInt(this.max)) {\n                      pruneCacheEntry(cache, keys[0], keys, this._vnode);\n                  }\n                  this.vnodeToCache = null;\n              }\n          }\n      },\n      created: function () {\n          this.cache = Object.create(null);\n          this.keys = [];\n      },\n      destroyed: function () {\n          for (var key in this.cache) {\n              pruneCacheEntry(this.cache, key, this.keys);\n          }\n      },\n      mounted: function () {\n          var _this = this;\n          this.cacheVNode();\n          this.$watch('include', function (val) {\n              pruneCache(_this, function (name) { return matches(val, name); });\n          });\n          this.$watch('exclude', function (val) {\n              pruneCache(_this, function (name) { return !matches(val, name); });\n          });\n      },\n      updated: function () {\n          this.cacheVNode();\n      },\n      render: function () {\n          var slot = this.$slots.default;\n          var vnode = getFirstComponentChild(slot);\n          var componentOptions = vnode && vnode.componentOptions;\n          if (componentOptions) {\n              // check pattern\n              var name_2 = _getComponentName(componentOptions);\n              var _a = this, include = _a.include, exclude = _a.exclude;\n              if (\n              // not included\n              (include && (!name_2 || !matches(include, name_2))) ||\n                  // excluded\n                  (exclude && name_2 && matches(exclude, name_2))) {\n                  return vnode;\n              }\n              var _b = this, cache = _b.cache, keys = _b.keys;\n              var key = vnode.key == null\n                  ? // same constructor may get registered as different local components\n                      // so cid alone is not enough (#3269)\n                      componentOptions.Ctor.cid +\n                          (componentOptions.tag ? \"::\".concat(componentOptions.tag) : '')\n                  : vnode.key;\n              if (cache[key]) {\n                  vnode.componentInstance = cache[key].componentInstance;\n                  // make current key freshest\n                  remove$2(keys, key);\n                  keys.push(key);\n              }\n              else {\n                  // delay setting the cache until update\n                  this.vnodeToCache = vnode;\n                  this.keyToCache = key;\n              }\n              // @ts-expect-error can vnode.data can be undefined\n              vnode.data.keepAlive = true;\n          }\n          return vnode || (slot && slot[0]);\n      }\n  };\n\n  var builtInComponents = {\n      KeepAlive: KeepAlive\n  };\n\n  function initGlobalAPI(Vue) {\n      // config\n      var configDef = {};\n      configDef.get = function () { return config; };\n      {\n          configDef.set = function () {\n              warn('Do not replace the Vue.config object, set individual fields instead.');\n          };\n      }\n      Object.defineProperty(Vue, 'config', configDef);\n      // exposed util methods.\n      // NOTE: these are not considered part of the public API - avoid relying on\n      // them unless you are aware of the risk.\n      Vue.util = {\n          warn: warn,\n          extend: extend,\n          mergeOptions: mergeOptions,\n          defineReactive: defineReactive\n      };\n      Vue.set = set;\n      Vue.delete = del;\n      Vue.nextTick = nextTick;\n      // 2.6 explicit observable API\n      Vue.observable = function (obj) {\n          observe(obj);\n          return obj;\n      };\n      Vue.options = Object.create(null);\n      ASSET_TYPES.forEach(function (type) {\n          Vue.options[type + 's'] = Object.create(null);\n      });\n      // this is used to identify the \"base\" constructor to extend all plain-object\n      // components with in Weex's multi-instance scenarios.\n      Vue.options._base = Vue;\n      extend(Vue.options.components, builtInComponents);\n      initUse(Vue);\n      initMixin(Vue);\n      initExtend(Vue);\n      initAssetRegisters(Vue);\n  }\n\n  initGlobalAPI(Vue);\n  Object.defineProperty(Vue.prototype, '$isServer', {\n      get: isServerRendering\n  });\n  Object.defineProperty(Vue.prototype, '$ssrContext', {\n      get: function () {\n          /* istanbul ignore next */\n          return this.$vnode && this.$vnode.ssrContext;\n      }\n  });\n  // expose FunctionalRenderContext for ssr runtime helper installation\n  Object.defineProperty(Vue, 'FunctionalRenderContext', {\n      value: FunctionalRenderContext\n  });\n  Vue.version = version;\n\n  // these are reserved for web because they are directly compiled away\n  // during template compilation\n  var isReservedAttr = makeMap('style,class');\n  // attributes that should be using props for binding\n  var acceptValue = makeMap('input,textarea,option,select,progress');\n  var mustUseProp = function (tag, type, attr) {\n      return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||\n          (attr === 'selected' && tag === 'option') ||\n          (attr === 'checked' && tag === 'input') ||\n          (attr === 'muted' && tag === 'video'));\n  };\n  var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n  var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');\n  var convertEnumeratedValue = function (key, value) {\n      return isFalsyAttrValue(value) || value === 'false'\n          ? 'false'\n          : // allow arbitrary string value for contenteditable\n              key === 'contenteditable' && isValidContentEditableValue(value)\n                  ? value\n                  : 'true';\n  };\n  var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n      'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n      'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n      'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n      'required,reversed,scoped,seamless,selected,sortable,' +\n      'truespeed,typemustmatch,visible');\n  var xlinkNS = 'http://www.w3.org/1999/xlink';\n  var isXlink = function (name) {\n      return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';\n  };\n  var getXlinkProp = function (name) {\n      return isXlink(name) ? name.slice(6, name.length) : '';\n  };\n  var isFalsyAttrValue = function (val) {\n      return val == null || val === false;\n  };\n\n  function genClassForVnode(vnode) {\n      var data = vnode.data;\n      var parentNode = vnode;\n      var childNode = vnode;\n      while (isDef(childNode.componentInstance)) {\n          childNode = childNode.componentInstance._vnode;\n          if (childNode && childNode.data) {\n              data = mergeClassData(childNode.data, data);\n          }\n      }\n      // @ts-expect-error parentNode.parent not VNodeWithData\n      while (isDef((parentNode = parentNode.parent))) {\n          if (parentNode && parentNode.data) {\n              data = mergeClassData(data, parentNode.data);\n          }\n      }\n      return renderClass(data.staticClass, data.class);\n  }\n  function mergeClassData(child, parent) {\n      return {\n          staticClass: concat(child.staticClass, parent.staticClass),\n          class: isDef(child.class) ? [child.class, parent.class] : parent.class\n      };\n  }\n  function renderClass(staticClass, dynamicClass) {\n      if (isDef(staticClass) || isDef(dynamicClass)) {\n          return concat(staticClass, stringifyClass(dynamicClass));\n      }\n      /* istanbul ignore next */\n      return '';\n  }\n  function concat(a, b) {\n      return a ? (b ? a + ' ' + b : a) : b || '';\n  }\n  function stringifyClass(value) {\n      if (Array.isArray(value)) {\n          return stringifyArray(value);\n      }\n      if (isObject(value)) {\n          return stringifyObject(value);\n      }\n      if (typeof value === 'string') {\n          return value;\n      }\n      /* istanbul ignore next */\n      return '';\n  }\n  function stringifyArray(value) {\n      var res = '';\n      var stringified;\n      for (var i = 0, l = value.length; i < l; i++) {\n          if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {\n              if (res)\n                  res += ' ';\n              res += stringified;\n          }\n      }\n      return res;\n  }\n  function stringifyObject(value) {\n      var res = '';\n      for (var key in value) {\n          if (value[key]) {\n              if (res)\n                  res += ' ';\n              res += key;\n          }\n      }\n      return res;\n  }\n\n  var namespaceMap = {\n      svg: 'http://www.w3.org/2000/svg',\n      math: 'http://www.w3.org/1998/Math/MathML'\n  };\n  var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +\n      'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n      'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n      'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n      's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n      'embed,object,param,source,canvas,script,noscript,del,ins,' +\n      'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n      'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n      'output,progress,select,textarea,' +\n      'details,dialog,menu,menuitem,summary,' +\n      'content,element,shadow,template,blockquote,iframe,tfoot');\n  // this map is intentionally selective, only covering SVG elements that may\n  // contain child elements.\n  var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n      'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n      'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);\n  var isReservedTag = function (tag) {\n      return isHTMLTag(tag) || isSVG(tag);\n  };\n  function getTagNamespace(tag) {\n      if (isSVG(tag)) {\n          return 'svg';\n      }\n      // basic support for MathML\n      // note it doesn't support other MathML elements being component roots\n      if (tag === 'math') {\n          return 'math';\n      }\n  }\n  var unknownElementCache = Object.create(null);\n  function isUnknownElement(tag) {\n      /* istanbul ignore if */\n      if (!inBrowser) {\n          return true;\n      }\n      if (isReservedTag(tag)) {\n          return false;\n      }\n      tag = tag.toLowerCase();\n      /* istanbul ignore if */\n      if (unknownElementCache[tag] != null) {\n          return unknownElementCache[tag];\n      }\n      var el = document.createElement(tag);\n      if (tag.indexOf('-') > -1) {\n          // https://stackoverflow.com/a/28210364/1070244\n          return (unknownElementCache[tag] =\n              el.constructor === window.HTMLUnknownElement ||\n                  el.constructor === window.HTMLElement);\n      }\n      else {\n          return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));\n      }\n  }\n  var isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n  /**\n   * Query an element selector if it's not an element already.\n   */\n  function query(el) {\n      if (typeof el === 'string') {\n          var selected = document.querySelector(el);\n          if (!selected) {\n              warn('Cannot find element: ' + el);\n              return document.createElement('div');\n          }\n          return selected;\n      }\n      else {\n          return el;\n      }\n  }\n\n  function createElement(tagName, vnode) {\n      var elm = document.createElement(tagName);\n      if (tagName !== 'select') {\n          return elm;\n      }\n      // false or null will remove the attribute but undefined will not\n      if (vnode.data &&\n          vnode.data.attrs &&\n          vnode.data.attrs.multiple !== undefined) {\n          elm.setAttribute('multiple', 'multiple');\n      }\n      return elm;\n  }\n  function createElementNS(namespace, tagName) {\n      return document.createElementNS(namespaceMap[namespace], tagName);\n  }\n  function createTextNode(text) {\n      return document.createTextNode(text);\n  }\n  function createComment(text) {\n      return document.createComment(text);\n  }\n  function insertBefore(parentNode, newNode, referenceNode) {\n      parentNode.insertBefore(newNode, referenceNode);\n  }\n  function removeChild(node, child) {\n      node.removeChild(child);\n  }\n  function appendChild(node, child) {\n      node.appendChild(child);\n  }\n  function parentNode(node) {\n      return node.parentNode;\n  }\n  function nextSibling(node) {\n      return node.nextSibling;\n  }\n  function tagName(node) {\n      return node.tagName;\n  }\n  function setTextContent(node, text) {\n      node.textContent = text;\n  }\n  function setStyleScope(node, scopeId) {\n      node.setAttribute(scopeId, '');\n  }\n\n  var nodeOps = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    createElement: createElement,\n    createElementNS: createElementNS,\n    createTextNode: createTextNode,\n    createComment: createComment,\n    insertBefore: insertBefore,\n    removeChild: removeChild,\n    appendChild: appendChild,\n    parentNode: parentNode,\n    nextSibling: nextSibling,\n    tagName: tagName,\n    setTextContent: setTextContent,\n    setStyleScope: setStyleScope\n  });\n\n  var ref = {\n      create: function (_, vnode) {\n          registerRef(vnode);\n      },\n      update: function (oldVnode, vnode) {\n          if (oldVnode.data.ref !== vnode.data.ref) {\n              registerRef(oldVnode, true);\n              registerRef(vnode);\n          }\n      },\n      destroy: function (vnode) {\n          registerRef(vnode, true);\n      }\n  };\n  function registerRef(vnode, isRemoval) {\n      var ref = vnode.data.ref;\n      if (!isDef(ref))\n          return;\n      var vm = vnode.context;\n      var refValue = vnode.componentInstance || vnode.elm;\n      var value = isRemoval ? null : refValue;\n      var $refsValue = isRemoval ? undefined : refValue;\n      if (isFunction(ref)) {\n          invokeWithErrorHandling(ref, vm, [value], vm, \"template ref function\");\n          return;\n      }\n      var isFor = vnode.data.refInFor;\n      var _isString = typeof ref === 'string' || typeof ref === 'number';\n      var _isRef = isRef(ref);\n      var refs = vm.$refs;\n      if (_isString || _isRef) {\n          if (isFor) {\n              var existing = _isString ? refs[ref] : ref.value;\n              if (isRemoval) {\n                  isArray(existing) && remove$2(existing, refValue);\n              }\n              else {\n                  if (!isArray(existing)) {\n                      if (_isString) {\n                          refs[ref] = [refValue];\n                          setSetupRef(vm, ref, refs[ref]);\n                      }\n                      else {\n                          ref.value = [refValue];\n                      }\n                  }\n                  else if (!existing.includes(refValue)) {\n                      existing.push(refValue);\n                  }\n              }\n          }\n          else if (_isString) {\n              if (isRemoval && refs[ref] !== refValue) {\n                  return;\n              }\n              refs[ref] = $refsValue;\n              setSetupRef(vm, ref, value);\n          }\n          else if (_isRef) {\n              if (isRemoval && ref.value !== refValue) {\n                  return;\n              }\n              ref.value = value;\n          }\n          else {\n              warn(\"Invalid template ref type: \".concat(typeof ref));\n          }\n      }\n  }\n  function setSetupRef(_a, key, val) {\n      var _setupState = _a._setupState;\n      if (_setupState && hasOwn(_setupState, key)) {\n          if (isRef(_setupState[key])) {\n              _setupState[key].value = val;\n          }\n          else {\n              _setupState[key] = val;\n          }\n      }\n  }\n\n  /**\n   * Virtual DOM patching algorithm based on Snabbdom by\n   * Simon Friis Vindum (@paldepind)\n   * Licensed under the MIT License\n   * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n   *\n   * modified by Evan You (@yyx990803)\n   *\n   * Not type-checking this because this file is perf-critical and the cost\n   * of making flow understand it is not worth it.\n   */\n  var emptyNode = new VNode('', {}, []);\n  var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n  function sameVnode(a, b) {\n      return (a.key === b.key &&\n          a.asyncFactory === b.asyncFactory &&\n          ((a.tag === b.tag &&\n              a.isComment === b.isComment &&\n              isDef(a.data) === isDef(b.data) &&\n              sameInputType(a, b)) ||\n              (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));\n  }\n  function sameInputType(a, b) {\n      if (a.tag !== 'input')\n          return true;\n      var i;\n      var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;\n      var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;\n      return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));\n  }\n  function createKeyToOldIdx(children, beginIdx, endIdx) {\n      var i, key;\n      var map = {};\n      for (i = beginIdx; i <= endIdx; ++i) {\n          key = children[i].key;\n          if (isDef(key))\n              map[key] = i;\n      }\n      return map;\n  }\n  function createPatchFunction(backend) {\n      var i, j;\n      var cbs = {};\n      var modules = backend.modules, nodeOps = backend.nodeOps;\n      for (i = 0; i < hooks.length; ++i) {\n          cbs[hooks[i]] = [];\n          for (j = 0; j < modules.length; ++j) {\n              if (isDef(modules[j][hooks[i]])) {\n                  cbs[hooks[i]].push(modules[j][hooks[i]]);\n              }\n          }\n      }\n      function emptyNodeAt(elm) {\n          return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);\n      }\n      function createRmCb(childElm, listeners) {\n          function remove() {\n              if (--remove.listeners === 0) {\n                  removeNode(childElm);\n              }\n          }\n          remove.listeners = listeners;\n          return remove;\n      }\n      function removeNode(el) {\n          var parent = nodeOps.parentNode(el);\n          // element may have already been removed due to v-html / v-text\n          if (isDef(parent)) {\n              nodeOps.removeChild(parent, el);\n          }\n      }\n      function isUnknownElement(vnode, inVPre) {\n          return (!inVPre &&\n              !vnode.ns &&\n              !(config.ignoredElements.length &&\n                  config.ignoredElements.some(function (ignore) {\n                      return isRegExp(ignore)\n                          ? ignore.test(vnode.tag)\n                          : ignore === vnode.tag;\n                  })) &&\n              config.isUnknownElement(vnode.tag));\n      }\n      var creatingElmInVPre = 0;\n      function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {\n          if (isDef(vnode.elm) && isDef(ownerArray)) {\n              // This vnode was used in a previous render!\n              // now it's used as a new node, overwriting its elm would cause\n              // potential patch errors down the road when it's used as an insertion\n              // reference node. Instead, we clone the node on-demand before creating\n              // associated DOM element for it.\n              vnode = ownerArray[index] = cloneVNode(vnode);\n          }\n          vnode.isRootInsert = !nested; // for transition enter check\n          if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n              return;\n          }\n          var data = vnode.data;\n          var children = vnode.children;\n          var tag = vnode.tag;\n          if (isDef(tag)) {\n              {\n                  if (data && data.pre) {\n                      creatingElmInVPre++;\n                  }\n                  if (isUnknownElement(vnode, creatingElmInVPre)) {\n                      warn('Unknown custom element: <' +\n                          tag +\n                          '> - did you ' +\n                          'register the component correctly? For recursive components, ' +\n                          'make sure to provide the \"name\" option.', vnode.context);\n                  }\n              }\n              vnode.elm = vnode.ns\n                  ? nodeOps.createElementNS(vnode.ns, tag)\n                  : nodeOps.createElement(tag, vnode);\n              setScope(vnode);\n              createChildren(vnode, children, insertedVnodeQueue);\n              if (isDef(data)) {\n                  invokeCreateHooks(vnode, insertedVnodeQueue);\n              }\n              insert(parentElm, vnode.elm, refElm);\n              if (data && data.pre) {\n                  creatingElmInVPre--;\n              }\n          }\n          else if (isTrue(vnode.isComment)) {\n              vnode.elm = nodeOps.createComment(vnode.text);\n              insert(parentElm, vnode.elm, refElm);\n          }\n          else {\n              vnode.elm = nodeOps.createTextNode(vnode.text);\n              insert(parentElm, vnode.elm, refElm);\n          }\n      }\n      function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n          var i = vnode.data;\n          if (isDef(i)) {\n              var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n              if (isDef((i = i.hook)) && isDef((i = i.init))) {\n                  i(vnode, false /* hydrating */);\n              }\n              // after calling the init hook, if the vnode is a child component\n              // it should've created a child instance and mounted it. the child\n              // component also has set the placeholder vnode's elm.\n              // in that case we can just return the element and be done.\n              if (isDef(vnode.componentInstance)) {\n                  initComponent(vnode, insertedVnodeQueue);\n                  insert(parentElm, vnode.elm, refElm);\n                  if (isTrue(isReactivated)) {\n                      reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n                  }\n                  return true;\n              }\n          }\n      }\n      function initComponent(vnode, insertedVnodeQueue) {\n          if (isDef(vnode.data.pendingInsert)) {\n              insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n              vnode.data.pendingInsert = null;\n          }\n          vnode.elm = vnode.componentInstance.$el;\n          if (isPatchable(vnode)) {\n              invokeCreateHooks(vnode, insertedVnodeQueue);\n              setScope(vnode);\n          }\n          else {\n              // empty component root.\n              // skip all element-related modules except for ref (#3455)\n              registerRef(vnode);\n              // make sure to invoke the insert hook\n              insertedVnodeQueue.push(vnode);\n          }\n      }\n      function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {\n          var i;\n          // hack for #4339: a reactivated component with inner transition\n          // does not trigger because the inner node's created hooks are not called\n          // again. It's not ideal to involve module-specific logic in here but\n          // there doesn't seem to be a better way to do it.\n          var innerNode = vnode;\n          while (innerNode.componentInstance) {\n              innerNode = innerNode.componentInstance._vnode;\n              if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {\n                  for (i = 0; i < cbs.activate.length; ++i) {\n                      cbs.activate[i](emptyNode, innerNode);\n                  }\n                  insertedVnodeQueue.push(innerNode);\n                  break;\n              }\n          }\n          // unlike a newly created component,\n          // a reactivated keep-alive component doesn't insert itself\n          insert(parentElm, vnode.elm, refElm);\n      }\n      function insert(parent, elm, ref) {\n          if (isDef(parent)) {\n              if (isDef(ref)) {\n                  if (nodeOps.parentNode(ref) === parent) {\n                      nodeOps.insertBefore(parent, elm, ref);\n                  }\n              }\n              else {\n                  nodeOps.appendChild(parent, elm);\n              }\n          }\n      }\n      function createChildren(vnode, children, insertedVnodeQueue) {\n          if (isArray(children)) {\n              {\n                  checkDuplicateKeys(children);\n              }\n              for (var i_1 = 0; i_1 < children.length; ++i_1) {\n                  createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);\n              }\n          }\n          else if (isPrimitive(vnode.text)) {\n              nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n          }\n      }\n      function isPatchable(vnode) {\n          while (vnode.componentInstance) {\n              vnode = vnode.componentInstance._vnode;\n          }\n          return isDef(vnode.tag);\n      }\n      function invokeCreateHooks(vnode, insertedVnodeQueue) {\n          for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {\n              cbs.create[i_2](emptyNode, vnode);\n          }\n          i = vnode.data.hook; // Reuse variable\n          if (isDef(i)) {\n              if (isDef(i.create))\n                  i.create(emptyNode, vnode);\n              if (isDef(i.insert))\n                  insertedVnodeQueue.push(vnode);\n          }\n      }\n      // set scope id attribute for scoped CSS.\n      // this is implemented as a special case to avoid the overhead\n      // of going through the normal attribute patching process.\n      function setScope(vnode) {\n          var i;\n          if (isDef((i = vnode.fnScopeId))) {\n              nodeOps.setStyleScope(vnode.elm, i);\n          }\n          else {\n              var ancestor = vnode;\n              while (ancestor) {\n                  if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {\n                      nodeOps.setStyleScope(vnode.elm, i);\n                  }\n                  ancestor = ancestor.parent;\n              }\n          }\n          // for slot content they should also get the scopeId from the host instance.\n          if (isDef((i = activeInstance)) &&\n              i !== vnode.context &&\n              i !== vnode.fnContext &&\n              isDef((i = i.$options._scopeId))) {\n              nodeOps.setStyleScope(vnode.elm, i);\n          }\n      }\n      function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n          for (; startIdx <= endIdx; ++startIdx) {\n              createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n          }\n      }\n      function invokeDestroyHook(vnode) {\n          var i, j;\n          var data = vnode.data;\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.destroy)))\n                  i(vnode);\n              for (i = 0; i < cbs.destroy.length; ++i)\n                  cbs.destroy[i](vnode);\n          }\n          if (isDef((i = vnode.children))) {\n              for (j = 0; j < vnode.children.length; ++j) {\n                  invokeDestroyHook(vnode.children[j]);\n              }\n          }\n      }\n      function removeVnodes(vnodes, startIdx, endIdx) {\n          for (; startIdx <= endIdx; ++startIdx) {\n              var ch = vnodes[startIdx];\n              if (isDef(ch)) {\n                  if (isDef(ch.tag)) {\n                      removeAndInvokeRemoveHook(ch);\n                      invokeDestroyHook(ch);\n                  }\n                  else {\n                      // Text node\n                      removeNode(ch.elm);\n                  }\n              }\n          }\n      }\n      function removeAndInvokeRemoveHook(vnode, rm) {\n          if (isDef(rm) || isDef(vnode.data)) {\n              var i_3;\n              var listeners = cbs.remove.length + 1;\n              if (isDef(rm)) {\n                  // we have a recursively passed down rm callback\n                  // increase the listeners count\n                  rm.listeners += listeners;\n              }\n              else {\n                  // directly removing\n                  rm = createRmCb(vnode.elm, listeners);\n              }\n              // recursively invoke hooks on child component root node\n              if (isDef((i_3 = vnode.componentInstance)) &&\n                  isDef((i_3 = i_3._vnode)) &&\n                  isDef(i_3.data)) {\n                  removeAndInvokeRemoveHook(i_3, rm);\n              }\n              for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {\n                  cbs.remove[i_3](vnode, rm);\n              }\n              if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {\n                  i_3(vnode, rm);\n              }\n              else {\n                  rm();\n              }\n          }\n          else {\n              removeNode(vnode.elm);\n          }\n      }\n      function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n          var oldStartIdx = 0;\n          var newStartIdx = 0;\n          var oldEndIdx = oldCh.length - 1;\n          var oldStartVnode = oldCh[0];\n          var oldEndVnode = oldCh[oldEndIdx];\n          var newEndIdx = newCh.length - 1;\n          var newStartVnode = newCh[0];\n          var newEndVnode = newCh[newEndIdx];\n          var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n          // removeOnly is a special flag used only by <transition-group>\n          // to ensure removed elements stay in correct relative positions\n          // during leaving transitions\n          var canMove = !removeOnly;\n          {\n              checkDuplicateKeys(newCh);\n          }\n          while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n              if (isUndef(oldStartVnode)) {\n                  oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n              }\n              else if (isUndef(oldEndVnode)) {\n                  oldEndVnode = oldCh[--oldEndIdx];\n              }\n              else if (sameVnode(oldStartVnode, newStartVnode)) {\n                  patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                  oldStartVnode = oldCh[++oldStartIdx];\n                  newStartVnode = newCh[++newStartIdx];\n              }\n              else if (sameVnode(oldEndVnode, newEndVnode)) {\n                  patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                  oldEndVnode = oldCh[--oldEndIdx];\n                  newEndVnode = newCh[--newEndIdx];\n              }\n              else if (sameVnode(oldStartVnode, newEndVnode)) {\n                  // Vnode moved right\n                  patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);\n                  canMove &&\n                      nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n                  oldStartVnode = oldCh[++oldStartIdx];\n                  newEndVnode = newCh[--newEndIdx];\n              }\n              else if (sameVnode(oldEndVnode, newStartVnode)) {\n                  // Vnode moved left\n                  patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                  canMove &&\n                      nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n                  oldEndVnode = oldCh[--oldEndIdx];\n                  newStartVnode = newCh[++newStartIdx];\n              }\n              else {\n                  if (isUndef(oldKeyToIdx))\n                      oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n                  idxInOld = isDef(newStartVnode.key)\n                      ? oldKeyToIdx[newStartVnode.key]\n                      : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n                  if (isUndef(idxInOld)) {\n                      // New element\n                      createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                  }\n                  else {\n                      vnodeToMove = oldCh[idxInOld];\n                      if (sameVnode(vnodeToMove, newStartVnode)) {\n                          patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);\n                          oldCh[idxInOld] = undefined;\n                          canMove &&\n                              nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n                      }\n                      else {\n                          // same key but different element. treat as new element\n                          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n                      }\n                  }\n                  newStartVnode = newCh[++newStartIdx];\n              }\n          }\n          if (oldStartIdx > oldEndIdx) {\n              refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n              addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n          }\n          else if (newStartIdx > newEndIdx) {\n              removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n          }\n      }\n      function checkDuplicateKeys(children) {\n          var seenKeys = {};\n          for (var i_4 = 0; i_4 < children.length; i_4++) {\n              var vnode = children[i_4];\n              var key = vnode.key;\n              if (isDef(key)) {\n                  if (seenKeys[key]) {\n                      warn(\"Duplicate keys detected: '\".concat(key, \"'. This may cause an update error.\"), vnode.context);\n                  }\n                  else {\n                      seenKeys[key] = true;\n                  }\n              }\n          }\n      }\n      function findIdxInOld(node, oldCh, start, end) {\n          for (var i_5 = start; i_5 < end; i_5++) {\n              var c = oldCh[i_5];\n              if (isDef(c) && sameVnode(node, c))\n                  return i_5;\n          }\n      }\n      function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {\n          if (oldVnode === vnode) {\n              return;\n          }\n          if (isDef(vnode.elm) && isDef(ownerArray)) {\n              // clone reused vnode\n              vnode = ownerArray[index] = cloneVNode(vnode);\n          }\n          var elm = (vnode.elm = oldVnode.elm);\n          if (isTrue(oldVnode.isAsyncPlaceholder)) {\n              if (isDef(vnode.asyncFactory.resolved)) {\n                  hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n              }\n              else {\n                  vnode.isAsyncPlaceholder = true;\n              }\n              return;\n          }\n          // reuse element for static trees.\n          // note we only do this if the vnode is cloned -\n          // if the new node is not cloned it means the render functions have been\n          // reset by the hot-reload-api and we need to do a proper re-render.\n          if (isTrue(vnode.isStatic) &&\n              isTrue(oldVnode.isStatic) &&\n              vnode.key === oldVnode.key &&\n              (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {\n              vnode.componentInstance = oldVnode.componentInstance;\n              return;\n          }\n          var i;\n          var data = vnode.data;\n          if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {\n              i(oldVnode, vnode);\n          }\n          var oldCh = oldVnode.children;\n          var ch = vnode.children;\n          if (isDef(data) && isPatchable(vnode)) {\n              for (i = 0; i < cbs.update.length; ++i)\n                  cbs.update[i](oldVnode, vnode);\n              if (isDef((i = data.hook)) && isDef((i = i.update)))\n                  i(oldVnode, vnode);\n          }\n          if (isUndef(vnode.text)) {\n              if (isDef(oldCh) && isDef(ch)) {\n                  if (oldCh !== ch)\n                      updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);\n              }\n              else if (isDef(ch)) {\n                  {\n                      checkDuplicateKeys(ch);\n                  }\n                  if (isDef(oldVnode.text))\n                      nodeOps.setTextContent(elm, '');\n                  addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n              }\n              else if (isDef(oldCh)) {\n                  removeVnodes(oldCh, 0, oldCh.length - 1);\n              }\n              else if (isDef(oldVnode.text)) {\n                  nodeOps.setTextContent(elm, '');\n              }\n          }\n          else if (oldVnode.text !== vnode.text) {\n              nodeOps.setTextContent(elm, vnode.text);\n          }\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.postpatch)))\n                  i(oldVnode, vnode);\n          }\n      }\n      function invokeInsertHook(vnode, queue, initial) {\n          // delay insert hooks for component root nodes, invoke them after the\n          // element is really inserted\n          if (isTrue(initial) && isDef(vnode.parent)) {\n              vnode.parent.data.pendingInsert = queue;\n          }\n          else {\n              for (var i_6 = 0; i_6 < queue.length; ++i_6) {\n                  queue[i_6].data.hook.insert(queue[i_6]);\n              }\n          }\n      }\n      var hydrationBailed = false;\n      // list of modules that can skip create hook during hydration because they\n      // are already rendered on the client or has no need for initialization\n      // Note: style is excluded because it relies on initial clone for future\n      // deep updates (#7063).\n      var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n      // Note: this is a browser-only function so we can assume elms are DOM nodes.\n      function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {\n          var i;\n          var tag = vnode.tag, data = vnode.data, children = vnode.children;\n          inVPre = inVPre || (data && data.pre);\n          vnode.elm = elm;\n          if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n              vnode.isAsyncPlaceholder = true;\n              return true;\n          }\n          // assert node match\n          {\n              if (!assertNodeMatch(elm, vnode, inVPre)) {\n                  return false;\n              }\n          }\n          if (isDef(data)) {\n              if (isDef((i = data.hook)) && isDef((i = i.init)))\n                  i(vnode, true /* hydrating */);\n              if (isDef((i = vnode.componentInstance))) {\n                  // child component. it should have hydrated its own tree.\n                  initComponent(vnode, insertedVnodeQueue);\n                  return true;\n              }\n          }\n          if (isDef(tag)) {\n              if (isDef(children)) {\n                  // empty element, allow client to pick up and populate children\n                  if (!elm.hasChildNodes()) {\n                      createChildren(vnode, children, insertedVnodeQueue);\n                  }\n                  else {\n                      // v-html and domProps: innerHTML\n                      if (isDef((i = data)) &&\n                          isDef((i = i.domProps)) &&\n                          isDef((i = i.innerHTML))) {\n                          if (i !== elm.innerHTML) {\n                              /* istanbul ignore if */\n                              if (typeof console !== 'undefined' &&\n                                  !hydrationBailed) {\n                                  hydrationBailed = true;\n                                  console.warn('Parent: ', elm);\n                                  console.warn('server innerHTML: ', i);\n                                  console.warn('client innerHTML: ', elm.innerHTML);\n                              }\n                              return false;\n                          }\n                      }\n                      else {\n                          // iterate and compare children lists\n                          var childrenMatch = true;\n                          var childNode = elm.firstChild;\n                          for (var i_7 = 0; i_7 < children.length; i_7++) {\n                              if (!childNode ||\n                                  !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {\n                                  childrenMatch = false;\n                                  break;\n                              }\n                              childNode = childNode.nextSibling;\n                          }\n                          // if childNode is not null, it means the actual childNodes list is\n                          // longer than the virtual children list.\n                          if (!childrenMatch || childNode) {\n                              /* istanbul ignore if */\n                              if (typeof console !== 'undefined' &&\n                                  !hydrationBailed) {\n                                  hydrationBailed = true;\n                                  console.warn('Parent: ', elm);\n                                  console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n                              }\n                              return false;\n                          }\n                      }\n                  }\n              }\n              if (isDef(data)) {\n                  var fullInvoke = false;\n                  for (var key in data) {\n                      if (!isRenderedModule(key)) {\n                          fullInvoke = true;\n                          invokeCreateHooks(vnode, insertedVnodeQueue);\n                          break;\n                      }\n                  }\n                  if (!fullInvoke && data['class']) {\n                      // ensure collecting deps for deep class bindings for future updates\n                      traverse(data['class']);\n                  }\n              }\n          }\n          else if (elm.data !== vnode.text) {\n              elm.data = vnode.text;\n          }\n          return true;\n      }\n      function assertNodeMatch(node, vnode, inVPre) {\n          if (isDef(vnode.tag)) {\n              return (vnode.tag.indexOf('vue-component') === 0 ||\n                  (!isUnknownElement(vnode, inVPre) &&\n                      vnode.tag.toLowerCase() ===\n                          (node.tagName && node.tagName.toLowerCase())));\n          }\n          else {\n              return node.nodeType === (vnode.isComment ? 8 : 3);\n          }\n      }\n      return function patch(oldVnode, vnode, hydrating, removeOnly) {\n          if (isUndef(vnode)) {\n              if (isDef(oldVnode))\n                  invokeDestroyHook(oldVnode);\n              return;\n          }\n          var isInitialPatch = false;\n          var insertedVnodeQueue = [];\n          if (isUndef(oldVnode)) {\n              // empty mount (likely as component), create new root element\n              isInitialPatch = true;\n              createElm(vnode, insertedVnodeQueue);\n          }\n          else {\n              var isRealElement = isDef(oldVnode.nodeType);\n              if (!isRealElement && sameVnode(oldVnode, vnode)) {\n                  // patch existing root node\n                  patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);\n              }\n              else {\n                  if (isRealElement) {\n                      // mounting to a real element\n                      // check if this is server-rendered content and if we can perform\n                      // a successful hydration.\n                      if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n                          oldVnode.removeAttribute(SSR_ATTR);\n                          hydrating = true;\n                      }\n                      if (isTrue(hydrating)) {\n                          if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n                              invokeInsertHook(vnode, insertedVnodeQueue, true);\n                              return oldVnode;\n                          }\n                          else {\n                              warn('The client-side rendered virtual DOM tree is not matching ' +\n                                  'server-rendered content. This is likely caused by incorrect ' +\n                                  'HTML markup, for example nesting block-level elements inside ' +\n                                  '<p>, or missing <tbody>. Bailing hydration and performing ' +\n                                  'full client-side render.');\n                          }\n                      }\n                      // either not server-rendered, or hydration failed.\n                      // create an empty node and replace it\n                      oldVnode = emptyNodeAt(oldVnode);\n                  }\n                  // replacing existing element\n                  var oldElm = oldVnode.elm;\n                  var parentElm = nodeOps.parentNode(oldElm);\n                  // create new node\n                  createElm(vnode, insertedVnodeQueue, \n                  // extremely rare edge case: do not insert if old element is in a\n                  // leaving transition. Only happens when combining transition +\n                  // keep-alive + HOCs. (#4590)\n                  oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));\n                  // update parent placeholder node element, recursively\n                  if (isDef(vnode.parent)) {\n                      var ancestor = vnode.parent;\n                      var patchable = isPatchable(vnode);\n                      while (ancestor) {\n                          for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {\n                              cbs.destroy[i_8](ancestor);\n                          }\n                          ancestor.elm = vnode.elm;\n                          if (patchable) {\n                              for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {\n                                  cbs.create[i_9](emptyNode, ancestor);\n                              }\n                              // #6513\n                              // invoke insert hooks that may have been merged by create hooks.\n                              // e.g. for directives that uses the \"inserted\" hook.\n                              var insert_1 = ancestor.data.hook.insert;\n                              if (insert_1.merged) {\n                                  // start at index 1 to avoid re-invoking component mounted hook\n                                  // clone insert hooks to avoid being mutated during iteration.\n                                  // e.g. for customed directives under transition group.\n                                  var cloned = insert_1.fns.slice(1);\n                                  for (var i_10 = 0; i_10 < cloned.length; i_10++) {\n                                      cloned[i_10]();\n                                  }\n                              }\n                          }\n                          else {\n                              registerRef(ancestor);\n                          }\n                          ancestor = ancestor.parent;\n                      }\n                  }\n                  // destroy old node\n                  if (isDef(parentElm)) {\n                      removeVnodes([oldVnode], 0, 0);\n                  }\n                  else if (isDef(oldVnode.tag)) {\n                      invokeDestroyHook(oldVnode);\n                  }\n              }\n          }\n          invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n          return vnode.elm;\n      };\n  }\n\n  var directives = {\n      create: updateDirectives,\n      update: updateDirectives,\n      destroy: function unbindDirectives(vnode) {\n          // @ts-expect-error emptyNode is not VNodeWithData\n          updateDirectives(vnode, emptyNode);\n      }\n  };\n  function updateDirectives(oldVnode, vnode) {\n      if (oldVnode.data.directives || vnode.data.directives) {\n          _update(oldVnode, vnode);\n      }\n  }\n  function _update(oldVnode, vnode) {\n      var isCreate = oldVnode === emptyNode;\n      var isDestroy = vnode === emptyNode;\n      var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);\n      var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);\n      var dirsWithInsert = [];\n      var dirsWithPostpatch = [];\n      var key, oldDir, dir;\n      for (key in newDirs) {\n          oldDir = oldDirs[key];\n          dir = newDirs[key];\n          if (!oldDir) {\n              // new directive, bind\n              callHook(dir, 'bind', vnode, oldVnode);\n              if (dir.def && dir.def.inserted) {\n                  dirsWithInsert.push(dir);\n              }\n          }\n          else {\n              // existing directive, update\n              dir.oldValue = oldDir.value;\n              dir.oldArg = oldDir.arg;\n              callHook(dir, 'update', vnode, oldVnode);\n              if (dir.def && dir.def.componentUpdated) {\n                  dirsWithPostpatch.push(dir);\n              }\n          }\n      }\n      if (dirsWithInsert.length) {\n          var callInsert = function () {\n              for (var i = 0; i < dirsWithInsert.length; i++) {\n                  callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n              }\n          };\n          if (isCreate) {\n              mergeVNodeHook(vnode, 'insert', callInsert);\n          }\n          else {\n              callInsert();\n          }\n      }\n      if (dirsWithPostpatch.length) {\n          mergeVNodeHook(vnode, 'postpatch', function () {\n              for (var i = 0; i < dirsWithPostpatch.length; i++) {\n                  callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n              }\n          });\n      }\n      if (!isCreate) {\n          for (key in oldDirs) {\n              if (!newDirs[key]) {\n                  // no longer present, unbind\n                  callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n              }\n          }\n      }\n  }\n  var emptyModifiers = Object.create(null);\n  function normalizeDirectives(dirs, vm) {\n      var res = Object.create(null);\n      if (!dirs) {\n          // $flow-disable-line\n          return res;\n      }\n      var i, dir;\n      for (i = 0; i < dirs.length; i++) {\n          dir = dirs[i];\n          if (!dir.modifiers) {\n              // $flow-disable-line\n              dir.modifiers = emptyModifiers;\n          }\n          res[getRawDirName(dir)] = dir;\n          if (vm._setupState && vm._setupState.__sfc) {\n              var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);\n              if (typeof setupDef === 'function') {\n                  dir.def = {\n                      bind: setupDef,\n                      update: setupDef,\n                  };\n              }\n              else {\n                  dir.def = setupDef;\n              }\n          }\n          dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);\n      }\n      // $flow-disable-line\n      return res;\n  }\n  function getRawDirName(dir) {\n      return (dir.rawName || \"\".concat(dir.name, \".\").concat(Object.keys(dir.modifiers || {}).join('.')));\n  }\n  function callHook(dir, hook, vnode, oldVnode, isDestroy) {\n      var fn = dir.def && dir.def[hook];\n      if (fn) {\n          try {\n              fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n          }\n          catch (e) {\n              handleError(e, vnode.context, \"directive \".concat(dir.name, \" \").concat(hook, \" hook\"));\n          }\n      }\n  }\n\n  var baseModules = [ref, directives];\n\n  function updateAttrs(oldVnode, vnode) {\n      var opts = vnode.componentOptions;\n      if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n          return;\n      }\n      if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n          return;\n      }\n      var key, cur, old;\n      var elm = vnode.elm;\n      var oldAttrs = oldVnode.data.attrs || {};\n      var attrs = vnode.data.attrs || {};\n      // clone observed objects, as the user probably wants to mutate it\n      if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {\n          attrs = vnode.data.attrs = extend({}, attrs);\n      }\n      for (key in attrs) {\n          cur = attrs[key];\n          old = oldAttrs[key];\n          if (old !== cur) {\n              setAttr(elm, key, cur, vnode.data.pre);\n          }\n      }\n      // #4391: in IE9, setting type can reset value for input[type=radio]\n      // #6666: IE/Edge forces progress value down to 1 before setting a max\n      /* istanbul ignore if */\n      if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n          setAttr(elm, 'value', attrs.value);\n      }\n      for (key in oldAttrs) {\n          if (isUndef(attrs[key])) {\n              if (isXlink(key)) {\n                  elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n              }\n              else if (!isEnumeratedAttr(key)) {\n                  elm.removeAttribute(key);\n              }\n          }\n      }\n  }\n  function setAttr(el, key, value, isInPre) {\n      if (isInPre || el.tagName.indexOf('-') > -1) {\n          baseSetAttr(el, key, value);\n      }\n      else if (isBooleanAttr(key)) {\n          // set attribute for blank value\n          // e.g. <option disabled>Select one</option>\n          if (isFalsyAttrValue(value)) {\n              el.removeAttribute(key);\n          }\n          else {\n              // technically allowfullscreen is a boolean attribute for <iframe>,\n              // but Flash expects a value of \"true\" when used on <embed> tag\n              value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;\n              el.setAttribute(key, value);\n          }\n      }\n      else if (isEnumeratedAttr(key)) {\n          el.setAttribute(key, convertEnumeratedValue(key, value));\n      }\n      else if (isXlink(key)) {\n          if (isFalsyAttrValue(value)) {\n              el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n          }\n          else {\n              el.setAttributeNS(xlinkNS, key, value);\n          }\n      }\n      else {\n          baseSetAttr(el, key, value);\n      }\n  }\n  function baseSetAttr(el, key, value) {\n      if (isFalsyAttrValue(value)) {\n          el.removeAttribute(key);\n      }\n      else {\n          // #7138: IE10 & 11 fires input event when setting placeholder on\n          // <textarea>... block the first input event and remove the blocker\n          // immediately.\n          /* istanbul ignore if */\n          if (isIE &&\n              !isIE9 &&\n              el.tagName === 'TEXTAREA' &&\n              key === 'placeholder' &&\n              value !== '' &&\n              !el.__ieph) {\n              var blocker_1 = function (e) {\n                  e.stopImmediatePropagation();\n                  el.removeEventListener('input', blocker_1);\n              };\n              el.addEventListener('input', blocker_1);\n              // $flow-disable-line\n              el.__ieph = true; /* IE placeholder patched */\n          }\n          el.setAttribute(key, value);\n      }\n  }\n  var attrs = {\n      create: updateAttrs,\n      update: updateAttrs\n  };\n\n  function updateClass(oldVnode, vnode) {\n      var el = vnode.elm;\n      var data = vnode.data;\n      var oldData = oldVnode.data;\n      if (isUndef(data.staticClass) &&\n          isUndef(data.class) &&\n          (isUndef(oldData) ||\n              (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {\n          return;\n      }\n      var cls = genClassForVnode(vnode);\n      // handle transition classes\n      var transitionClass = el._transitionClasses;\n      if (isDef(transitionClass)) {\n          cls = concat(cls, stringifyClass(transitionClass));\n      }\n      // set the class\n      if (cls !== el._prevClass) {\n          el.setAttribute('class', cls);\n          el._prevClass = cls;\n      }\n  }\n  var klass = {\n      create: updateClass,\n      update: updateClass\n  };\n\n  // in some cases, the event used has to be determined at runtime\n  // so we used some reserved tokens during compile.\n  var RANGE_TOKEN = '__r';\n  var CHECKBOX_RADIO_TOKEN = '__c';\n\n  // normalize v-model event tokens that can only be determined at runtime.\n  // it's important to place the event as the first in the array because\n  // the whole point is ensuring the v-model callback gets called before\n  // user-attached handlers.\n  function normalizeEvents(on) {\n      /* istanbul ignore if */\n      if (isDef(on[RANGE_TOKEN])) {\n          // IE input[type=range] only supports `change` event\n          var event_1 = isIE ? 'change' : 'input';\n          on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);\n          delete on[RANGE_TOKEN];\n      }\n      // This was originally intended to fix #4521 but no longer necessary\n      // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n      /* istanbul ignore if */\n      if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n          on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n          delete on[CHECKBOX_RADIO_TOKEN];\n      }\n  }\n  var target;\n  function createOnceHandler(event, handler, capture) {\n      var _target = target; // save current target element in closure\n      return function onceHandler() {\n          var res = handler.apply(null, arguments);\n          if (res !== null) {\n              remove(event, onceHandler, capture, _target);\n          }\n      };\n  }\n  // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp\n  // implementation and does not fire microtasks in between event propagation, so\n  // safe to exclude.\n  var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);\n  function add(name, handler, capture, passive) {\n      // async edge case #6566: inner click event triggers patch, event handler\n      // attached to outer element during patch, and triggered again. This\n      // happens because browsers fire microtask ticks between event propagation.\n      // the solution is simple: we save the timestamp when a handler is attached,\n      // and the handler would only fire if the event passed to it was fired\n      // AFTER it was attached.\n      if (useMicrotaskFix) {\n          var attachedTimestamp_1 = currentFlushTimestamp;\n          var original_1 = handler;\n          //@ts-expect-error\n          handler = original_1._wrapper = function (e) {\n              if (\n              // no bubbling, should always fire.\n              // this is just a safety net in case event.timeStamp is unreliable in\n              // certain weird environments...\n              e.target === e.currentTarget ||\n                  // event is fired after handler attachment\n                  e.timeStamp >= attachedTimestamp_1 ||\n                  // bail for environments that have buggy event.timeStamp implementations\n                  // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState\n                  // #9681 QtWebEngine event.timeStamp is negative value\n                  e.timeStamp <= 0 ||\n                  // #9448 bail if event is fired in another document in a multi-page\n                  // electron/nw.js app, since event.timeStamp will be using a different\n                  // starting reference\n                  e.target.ownerDocument !== document) {\n                  return original_1.apply(this, arguments);\n              }\n          };\n      }\n      target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);\n  }\n  function remove(name, handler, capture, _target) {\n      (_target || target).removeEventListener(name, \n      //@ts-expect-error\n      handler._wrapper || handler, capture);\n  }\n  function updateDOMListeners(oldVnode, vnode) {\n      if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n          return;\n      }\n      var on = vnode.data.on || {};\n      var oldOn = oldVnode.data.on || {};\n      // vnode is empty when removing all listeners,\n      // and use old vnode dom element\n      target = vnode.elm || oldVnode.elm;\n      normalizeEvents(on);\n      updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);\n      target = undefined;\n  }\n  var events = {\n      create: updateDOMListeners,\n      update: updateDOMListeners,\n      // @ts-expect-error emptyNode has actually data\n      destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }\n  };\n\n  var svgContainer;\n  function updateDOMProps(oldVnode, vnode) {\n      if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n          return;\n      }\n      var key, cur;\n      var elm = vnode.elm;\n      var oldProps = oldVnode.data.domProps || {};\n      var props = vnode.data.domProps || {};\n      // clone observed objects, as the user probably wants to mutate it\n      if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {\n          props = vnode.data.domProps = extend({}, props);\n      }\n      for (key in oldProps) {\n          if (!(key in props)) {\n              elm[key] = '';\n          }\n      }\n      for (key in props) {\n          cur = props[key];\n          // ignore children if the node has textContent or innerHTML,\n          // as these will throw away existing DOM nodes and cause removal errors\n          // on subsequent patches (#3360)\n          if (key === 'textContent' || key === 'innerHTML') {\n              if (vnode.children)\n                  vnode.children.length = 0;\n              if (cur === oldProps[key])\n                  continue;\n              // #6601 work around Chrome version <= 55 bug where single textNode\n              // replaced by innerHTML/textContent retains its parentNode property\n              if (elm.childNodes.length === 1) {\n                  elm.removeChild(elm.childNodes[0]);\n              }\n          }\n          if (key === 'value' && elm.tagName !== 'PROGRESS') {\n              // store value as _value as well since\n              // non-string values will be stringified\n              elm._value = cur;\n              // avoid resetting cursor position when value is the same\n              var strCur = isUndef(cur) ? '' : String(cur);\n              if (shouldUpdateValue(elm, strCur)) {\n                  elm.value = strCur;\n              }\n          }\n          else if (key === 'innerHTML' &&\n              isSVG(elm.tagName) &&\n              isUndef(elm.innerHTML)) {\n              // IE doesn't support innerHTML for SVG elements\n              svgContainer = svgContainer || document.createElement('div');\n              svgContainer.innerHTML = \"<svg>\".concat(cur, \"</svg>\");\n              var svg = svgContainer.firstChild;\n              while (elm.firstChild) {\n                  elm.removeChild(elm.firstChild);\n              }\n              while (svg.firstChild) {\n                  elm.appendChild(svg.firstChild);\n              }\n          }\n          else if (\n          // skip the update if old and new VDOM state is the same.\n          // `value` is handled separately because the DOM value may be temporarily\n          // out of sync with VDOM state due to focus, composition and modifiers.\n          // This  #4521 by skipping the unnecessary `checked` update.\n          cur !== oldProps[key]) {\n              // some property updates can throw\n              // e.g. `value` on <progress> w/ non-finite value\n              try {\n                  elm[key] = cur;\n              }\n              catch (e) { }\n          }\n      }\n  }\n  function shouldUpdateValue(elm, checkVal) {\n      return (\n      //@ts-expect-error\n      !elm.composing &&\n          (elm.tagName === 'OPTION' ||\n              isNotInFocusAndDirty(elm, checkVal) ||\n              isDirtyWithModifiers(elm, checkVal)));\n  }\n  function isNotInFocusAndDirty(elm, checkVal) {\n      // return true when textbox (.number and .trim) loses focus and its value is\n      // not equal to the updated value\n      var notInFocus = true;\n      // #6157\n      // work around IE bug when accessing document.activeElement in an iframe\n      try {\n          notInFocus = document.activeElement !== elm;\n      }\n      catch (e) { }\n      return notInFocus && elm.value !== checkVal;\n  }\n  function isDirtyWithModifiers(elm, newVal) {\n      var value = elm.value;\n      var modifiers = elm._vModifiers; // injected by v-model runtime\n      if (isDef(modifiers)) {\n          if (modifiers.number) {\n              return toNumber(value) !== toNumber(newVal);\n          }\n          if (modifiers.trim) {\n              return value.trim() !== newVal.trim();\n          }\n      }\n      return value !== newVal;\n  }\n  var domProps = {\n      create: updateDOMProps,\n      update: updateDOMProps\n  };\n\n  var parseStyleText = cached(function (cssText) {\n      var res = {};\n      var listDelimiter = /;(?![^(]*\\))/g;\n      var propertyDelimiter = /:(.+)/;\n      cssText.split(listDelimiter).forEach(function (item) {\n          if (item) {\n              var tmp = item.split(propertyDelimiter);\n              tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n          }\n      });\n      return res;\n  });\n  // merge static and dynamic style data on the same vnode\n  function normalizeStyleData(data) {\n      var style = normalizeStyleBinding(data.style);\n      // static style is pre-processed into an object during compilation\n      // and is always a fresh object, so it's safe to merge into it\n      return data.staticStyle ? extend(data.staticStyle, style) : style;\n  }\n  // normalize possible array / string values into Object\n  function normalizeStyleBinding(bindingStyle) {\n      if (Array.isArray(bindingStyle)) {\n          return toObject(bindingStyle);\n      }\n      if (typeof bindingStyle === 'string') {\n          return parseStyleText(bindingStyle);\n      }\n      return bindingStyle;\n  }\n  /**\n   * parent component style should be after child's\n   * so that parent component's style could override it\n   */\n  function getStyle(vnode, checkChild) {\n      var res = {};\n      var styleData;\n      if (checkChild) {\n          var childNode = vnode;\n          while (childNode.componentInstance) {\n              childNode = childNode.componentInstance._vnode;\n              if (childNode &&\n                  childNode.data &&\n                  (styleData = normalizeStyleData(childNode.data))) {\n                  extend(res, styleData);\n              }\n          }\n      }\n      if ((styleData = normalizeStyleData(vnode.data))) {\n          extend(res, styleData);\n      }\n      var parentNode = vnode;\n      // @ts-expect-error parentNode.parent not VNodeWithData\n      while ((parentNode = parentNode.parent)) {\n          if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n              extend(res, styleData);\n          }\n      }\n      return res;\n  }\n\n  var cssVarRE = /^--/;\n  var importantRE = /\\s*!important$/;\n  var setProp = function (el, name, val) {\n      /* istanbul ignore if */\n      if (cssVarRE.test(name)) {\n          el.style.setProperty(name, val);\n      }\n      else if (importantRE.test(val)) {\n          el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');\n      }\n      else {\n          var normalizedName = normalize(name);\n          if (Array.isArray(val)) {\n              // Support values array created by autoprefixer, e.g.\n              // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n              // Set them one by one, and the browser will only set those it can recognize\n              for (var i = 0, len = val.length; i < len; i++) {\n                  el.style[normalizedName] = val[i];\n              }\n          }\n          else {\n              el.style[normalizedName] = val;\n          }\n      }\n  };\n  var vendorNames = ['Webkit', 'Moz', 'ms'];\n  var emptyStyle;\n  var normalize = cached(function (prop) {\n      emptyStyle = emptyStyle || document.createElement('div').style;\n      prop = camelize(prop);\n      if (prop !== 'filter' && prop in emptyStyle) {\n          return prop;\n      }\n      var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n      for (var i = 0; i < vendorNames.length; i++) {\n          var name_1 = vendorNames[i] + capName;\n          if (name_1 in emptyStyle) {\n              return name_1;\n          }\n      }\n  });\n  function updateStyle(oldVnode, vnode) {\n      var data = vnode.data;\n      var oldData = oldVnode.data;\n      if (isUndef(data.staticStyle) &&\n          isUndef(data.style) &&\n          isUndef(oldData.staticStyle) &&\n          isUndef(oldData.style)) {\n          return;\n      }\n      var cur, name;\n      var el = vnode.elm;\n      var oldStaticStyle = oldData.staticStyle;\n      var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n      // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n      var oldStyle = oldStaticStyle || oldStyleBinding;\n      var style = normalizeStyleBinding(vnode.data.style) || {};\n      // store normalized style under a different key for next diff\n      // make sure to clone it if it's reactive, since the user likely wants\n      // to mutate it.\n      vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;\n      var newStyle = getStyle(vnode, true);\n      for (name in oldStyle) {\n          if (isUndef(newStyle[name])) {\n              setProp(el, name, '');\n          }\n      }\n      for (name in newStyle) {\n          cur = newStyle[name];\n          // ie9 setting to null has no effect, must use empty string\n          setProp(el, name, cur == null ? '' : cur);\n      }\n  }\n  var style = {\n      create: updateStyle,\n      update: updateStyle\n  };\n\n  var whitespaceRE = /\\s+/;\n  /**\n   * Add class with compatibility for SVG since classList is not supported on\n   * SVG elements in IE\n   */\n  function addClass(el, cls) {\n      /* istanbul ignore if */\n      if (!cls || !(cls = cls.trim())) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (el.classList) {\n          if (cls.indexOf(' ') > -1) {\n              cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });\n          }\n          else {\n              el.classList.add(cls);\n          }\n      }\n      else {\n          var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n          if (cur.indexOf(' ' + cls + ' ') < 0) {\n              el.setAttribute('class', (cur + cls).trim());\n          }\n      }\n  }\n  /**\n   * Remove class with compatibility for SVG since classList is not supported on\n   * SVG elements in IE\n   */\n  function removeClass(el, cls) {\n      /* istanbul ignore if */\n      if (!cls || !(cls = cls.trim())) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (el.classList) {\n          if (cls.indexOf(' ') > -1) {\n              cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });\n          }\n          else {\n              el.classList.remove(cls);\n          }\n          if (!el.classList.length) {\n              el.removeAttribute('class');\n          }\n      }\n      else {\n          var cur = \" \".concat(el.getAttribute('class') || '', \" \");\n          var tar = ' ' + cls + ' ';\n          while (cur.indexOf(tar) >= 0) {\n              cur = cur.replace(tar, ' ');\n          }\n          cur = cur.trim();\n          if (cur) {\n              el.setAttribute('class', cur);\n          }\n          else {\n              el.removeAttribute('class');\n          }\n      }\n  }\n\n  function resolveTransition(def) {\n      if (!def) {\n          return;\n      }\n      /* istanbul ignore else */\n      if (typeof def === 'object') {\n          var res = {};\n          if (def.css !== false) {\n              extend(res, autoCssTransition(def.name || 'v'));\n          }\n          extend(res, def);\n          return res;\n      }\n      else if (typeof def === 'string') {\n          return autoCssTransition(def);\n      }\n  }\n  var autoCssTransition = cached(function (name) {\n      return {\n          enterClass: \"\".concat(name, \"-enter\"),\n          enterToClass: \"\".concat(name, \"-enter-to\"),\n          enterActiveClass: \"\".concat(name, \"-enter-active\"),\n          leaveClass: \"\".concat(name, \"-leave\"),\n          leaveToClass: \"\".concat(name, \"-leave-to\"),\n          leaveActiveClass: \"\".concat(name, \"-leave-active\")\n      };\n  });\n  var hasTransition = inBrowser && !isIE9;\n  var TRANSITION = 'transition';\n  var ANIMATION = 'animation';\n  // Transition property/event sniffing\n  var transitionProp = 'transition';\n  var transitionEndEvent = 'transitionend';\n  var animationProp = 'animation';\n  var animationEndEvent = 'animationend';\n  if (hasTransition) {\n      /* istanbul ignore if */\n      if (window.ontransitionend === undefined &&\n          window.onwebkittransitionend !== undefined) {\n          transitionProp = 'WebkitTransition';\n          transitionEndEvent = 'webkitTransitionEnd';\n      }\n      if (window.onanimationend === undefined &&\n          window.onwebkitanimationend !== undefined) {\n          animationProp = 'WebkitAnimation';\n          animationEndEvent = 'webkitAnimationEnd';\n      }\n  }\n  // binding to window is necessary to make hot reload work in IE in strict mode\n  var raf = inBrowser\n      ? window.requestAnimationFrame\n          ? window.requestAnimationFrame.bind(window)\n          : setTimeout\n      : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };\n  function nextFrame(fn) {\n      raf(function () {\n          // @ts-expect-error\n          raf(fn);\n      });\n  }\n  function addTransitionClass(el, cls) {\n      var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n      if (transitionClasses.indexOf(cls) < 0) {\n          transitionClasses.push(cls);\n          addClass(el, cls);\n      }\n  }\n  function removeTransitionClass(el, cls) {\n      if (el._transitionClasses) {\n          remove$2(el._transitionClasses, cls);\n      }\n      removeClass(el, cls);\n  }\n  function whenTransitionEnds(el, expectedType, cb) {\n      var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;\n      if (!type)\n          return cb();\n      var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n      var ended = 0;\n      var end = function () {\n          el.removeEventListener(event, onEnd);\n          cb();\n      };\n      var onEnd = function (e) {\n          if (e.target === el) {\n              if (++ended >= propCount) {\n                  end();\n              }\n          }\n      };\n      setTimeout(function () {\n          if (ended < propCount) {\n              end();\n          }\n      }, timeout + 1);\n      el.addEventListener(event, onEnd);\n  }\n  var transformRE = /\\b(transform|all)(,|$)/;\n  function getTransitionInfo(el, expectedType) {\n      var styles = window.getComputedStyle(el);\n      // JSDOM may return undefined for transition properties\n      var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');\n      var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');\n      var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n      var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');\n      var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');\n      var animationTimeout = getTimeout(animationDelays, animationDurations);\n      var type;\n      var timeout = 0;\n      var propCount = 0;\n      /* istanbul ignore if */\n      if (expectedType === TRANSITION) {\n          if (transitionTimeout > 0) {\n              type = TRANSITION;\n              timeout = transitionTimeout;\n              propCount = transitionDurations.length;\n          }\n      }\n      else if (expectedType === ANIMATION) {\n          if (animationTimeout > 0) {\n              type = ANIMATION;\n              timeout = animationTimeout;\n              propCount = animationDurations.length;\n          }\n      }\n      else {\n          timeout = Math.max(transitionTimeout, animationTimeout);\n          type =\n              timeout > 0\n                  ? transitionTimeout > animationTimeout\n                      ? TRANSITION\n                      : ANIMATION\n                  : null;\n          propCount = type\n              ? type === TRANSITION\n                  ? transitionDurations.length\n                  : animationDurations.length\n              : 0;\n      }\n      var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);\n      return {\n          type: type,\n          timeout: timeout,\n          propCount: propCount,\n          hasTransform: hasTransform\n      };\n  }\n  function getTimeout(delays, durations) {\n      /* istanbul ignore next */\n      while (delays.length < durations.length) {\n          delays = delays.concat(delays);\n      }\n      return Math.max.apply(null, durations.map(function (d, i) {\n          return toMs(d) + toMs(delays[i]);\n      }));\n  }\n  // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers\n  // in a locale-dependent way, using a comma instead of a dot.\n  // If comma is not replaced with a dot, the input will be rounded down (i.e. acting\n  // as a floor function) causing unexpected behaviors\n  function toMs(s) {\n      return Number(s.slice(0, -1).replace(',', '.')) * 1000;\n  }\n\n  function enter(vnode, toggleDisplay) {\n      var el = vnode.elm;\n      // call leave callback now\n      if (isDef(el._leaveCb)) {\n          el._leaveCb.cancelled = true;\n          el._leaveCb();\n      }\n      var data = resolveTransition(vnode.data.transition);\n      if (isUndef(data)) {\n          return;\n      }\n      /* istanbul ignore if */\n      if (isDef(el._enterCb) || el.nodeType !== 1) {\n          return;\n      }\n      var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;\n      // activeInstance will always be the <transition> component managing this\n      // transition. One edge case to check is when the <transition> is placed\n      // as the root node of a child component. In that case we need to check\n      // <transition>'s parent for appear check.\n      var context = activeInstance;\n      var transitionNode = activeInstance.$vnode;\n      while (transitionNode && transitionNode.parent) {\n          context = transitionNode.context;\n          transitionNode = transitionNode.parent;\n      }\n      var isAppear = !context._isMounted || !vnode.isRootInsert;\n      if (isAppear && !appear && appear !== '') {\n          return;\n      }\n      var startClass = isAppear && appearClass ? appearClass : enterClass;\n      var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;\n      var toClass = isAppear && appearToClass ? appearToClass : enterToClass;\n      var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;\n      var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;\n      var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;\n      var enterCancelledHook = isAppear\n          ? appearCancelled || enterCancelled\n          : enterCancelled;\n      var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);\n      if (explicitEnterDuration != null) {\n          checkDuration(explicitEnterDuration, 'enter', vnode);\n      }\n      var expectsCSS = css !== false && !isIE9;\n      var userWantsControl = getHookArgumentsLength(enterHook);\n      var cb = (el._enterCb = once(function () {\n          if (expectsCSS) {\n              removeTransitionClass(el, toClass);\n              removeTransitionClass(el, activeClass);\n          }\n          // @ts-expect-error\n          if (cb.cancelled) {\n              if (expectsCSS) {\n                  removeTransitionClass(el, startClass);\n              }\n              enterCancelledHook && enterCancelledHook(el);\n          }\n          else {\n              afterEnterHook && afterEnterHook(el);\n          }\n          el._enterCb = null;\n      }));\n      if (!vnode.data.show) {\n          // remove pending leave element on enter by injecting an insert hook\n          mergeVNodeHook(vnode, 'insert', function () {\n              var parent = el.parentNode;\n              var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n              if (pendingNode &&\n                  pendingNode.tag === vnode.tag &&\n                  pendingNode.elm._leaveCb) {\n                  pendingNode.elm._leaveCb();\n              }\n              enterHook && enterHook(el, cb);\n          });\n      }\n      // start enter transition\n      beforeEnterHook && beforeEnterHook(el);\n      if (expectsCSS) {\n          addTransitionClass(el, startClass);\n          addTransitionClass(el, activeClass);\n          nextFrame(function () {\n              removeTransitionClass(el, startClass);\n              // @ts-expect-error\n              if (!cb.cancelled) {\n                  addTransitionClass(el, toClass);\n                  if (!userWantsControl) {\n                      if (isValidDuration(explicitEnterDuration)) {\n                          setTimeout(cb, explicitEnterDuration);\n                      }\n                      else {\n                          whenTransitionEnds(el, type, cb);\n                      }\n                  }\n              }\n          });\n      }\n      if (vnode.data.show) {\n          toggleDisplay && toggleDisplay();\n          enterHook && enterHook(el, cb);\n      }\n      if (!expectsCSS && !userWantsControl) {\n          cb();\n      }\n  }\n  function leave(vnode, rm) {\n      var el = vnode.elm;\n      // call enter callback now\n      if (isDef(el._enterCb)) {\n          el._enterCb.cancelled = true;\n          el._enterCb();\n      }\n      var data = resolveTransition(vnode.data.transition);\n      if (isUndef(data) || el.nodeType !== 1) {\n          return rm();\n      }\n      /* istanbul ignore if */\n      if (isDef(el._leaveCb)) {\n          return;\n      }\n      var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;\n      var expectsCSS = css !== false && !isIE9;\n      var userWantsControl = getHookArgumentsLength(leave);\n      var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);\n      if (isDef(explicitLeaveDuration)) {\n          checkDuration(explicitLeaveDuration, 'leave', vnode);\n      }\n      var cb = (el._leaveCb = once(function () {\n          if (el.parentNode && el.parentNode._pending) {\n              el.parentNode._pending[vnode.key] = null;\n          }\n          if (expectsCSS) {\n              removeTransitionClass(el, leaveToClass);\n              removeTransitionClass(el, leaveActiveClass);\n          }\n          // @ts-expect-error\n          if (cb.cancelled) {\n              if (expectsCSS) {\n                  removeTransitionClass(el, leaveClass);\n              }\n              leaveCancelled && leaveCancelled(el);\n          }\n          else {\n              rm();\n              afterLeave && afterLeave(el);\n          }\n          el._leaveCb = null;\n      }));\n      if (delayLeave) {\n          delayLeave(performLeave);\n      }\n      else {\n          performLeave();\n      }\n      function performLeave() {\n          // the delayed leave may have already been cancelled\n          // @ts-expect-error\n          if (cb.cancelled) {\n              return;\n          }\n          // record leaving element\n          if (!vnode.data.show && el.parentNode) {\n              (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =\n                  vnode;\n          }\n          beforeLeave && beforeLeave(el);\n          if (expectsCSS) {\n              addTransitionClass(el, leaveClass);\n              addTransitionClass(el, leaveActiveClass);\n              nextFrame(function () {\n                  removeTransitionClass(el, leaveClass);\n                  // @ts-expect-error\n                  if (!cb.cancelled) {\n                      addTransitionClass(el, leaveToClass);\n                      if (!userWantsControl) {\n                          if (isValidDuration(explicitLeaveDuration)) {\n                              setTimeout(cb, explicitLeaveDuration);\n                          }\n                          else {\n                              whenTransitionEnds(el, type, cb);\n                          }\n                      }\n                  }\n              });\n          }\n          leave && leave(el, cb);\n          if (!expectsCSS && !userWantsControl) {\n              cb();\n          }\n      }\n  }\n  // only used in dev mode\n  function checkDuration(val, name, vnode) {\n      if (typeof val !== 'number') {\n          warn(\"<transition> explicit \".concat(name, \" duration is not a valid number - \") +\n              \"got \".concat(JSON.stringify(val), \".\"), vnode.context);\n      }\n      else if (isNaN(val)) {\n          warn(\"<transition> explicit \".concat(name, \" duration is NaN - \") +\n              'the duration expression might be incorrect.', vnode.context);\n      }\n  }\n  function isValidDuration(val) {\n      return typeof val === 'number' && !isNaN(val);\n  }\n  /**\n   * Normalize a transition hook's argument length. The hook may be:\n   * - a merged hook (invoker) with the original in .fns\n   * - a wrapped component method (check ._length)\n   * - a plain function (.length)\n   */\n  function getHookArgumentsLength(fn) {\n      if (isUndef(fn)) {\n          return false;\n      }\n      // @ts-expect-error\n      var invokerFns = fn.fns;\n      if (isDef(invokerFns)) {\n          // invoker\n          return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);\n      }\n      else {\n          // @ts-expect-error\n          return (fn._length || fn.length) > 1;\n      }\n  }\n  function _enter(_, vnode) {\n      if (vnode.data.show !== true) {\n          enter(vnode);\n      }\n  }\n  var transition = inBrowser\n      ? {\n          create: _enter,\n          activate: _enter,\n          remove: function (vnode, rm) {\n              /* istanbul ignore else */\n              if (vnode.data.show !== true) {\n                  // @ts-expect-error\n                  leave(vnode, rm);\n              }\n              else {\n                  rm();\n              }\n          }\n      }\n      : {};\n\n  var platformModules = [attrs, klass, events, domProps, style, transition];\n\n  // the directive module should be applied last, after all\n  // built-in modules have been applied.\n  var modules = platformModules.concat(baseModules);\n  var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n  /**\n   * Not type checking this file because flow doesn't like attaching\n   * properties to Elements.\n   */\n  /* istanbul ignore if */\n  if (isIE9) {\n      // http://www.matts411.com/post/internet-explorer-9-oninput/\n      document.addEventListener('selectionchange', function () {\n          var el = document.activeElement;\n          // @ts-expect-error\n          if (el && el.vmodel) {\n              trigger(el, 'input');\n          }\n      });\n  }\n  var directive = {\n      inserted: function (el, binding, vnode, oldVnode) {\n          if (vnode.tag === 'select') {\n              // #6903\n              if (oldVnode.elm && !oldVnode.elm._vOptions) {\n                  mergeVNodeHook(vnode, 'postpatch', function () {\n                      directive.componentUpdated(el, binding, vnode);\n                  });\n              }\n              else {\n                  setSelected(el, binding, vnode.context);\n              }\n              el._vOptions = [].map.call(el.options, getValue);\n          }\n          else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n              el._vModifiers = binding.modifiers;\n              if (!binding.modifiers.lazy) {\n                  el.addEventListener('compositionstart', onCompositionStart);\n                  el.addEventListener('compositionend', onCompositionEnd);\n                  // Safari < 10.2 & UIWebView doesn't fire compositionend when\n                  // switching focus before confirming composition choice\n                  // this also fixes the issue where some browsers e.g. iOS Chrome\n                  // fires \"change\" instead of \"input\" on autocomplete.\n                  el.addEventListener('change', onCompositionEnd);\n                  /* istanbul ignore if */\n                  if (isIE9) {\n                      el.vmodel = true;\n                  }\n              }\n          }\n      },\n      componentUpdated: function (el, binding, vnode) {\n          if (vnode.tag === 'select') {\n              setSelected(el, binding, vnode.context);\n              // in case the options rendered by v-for have changed,\n              // it's possible that the value is out-of-sync with the rendered options.\n              // detect such cases and filter out values that no longer has a matching\n              // option in the DOM.\n              var prevOptions_1 = el._vOptions;\n              var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));\n              if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {\n                  // trigger change event if\n                  // no matching option found for at least one value\n                  var needReset = el.multiple\n                      ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })\n                      : binding.value !== binding.oldValue &&\n                          hasNoMatchingOption(binding.value, curOptions_1);\n                  if (needReset) {\n                      trigger(el, 'change');\n                  }\n              }\n          }\n      }\n  };\n  function setSelected(el, binding, vm) {\n      actuallySetSelected(el, binding, vm);\n      /* istanbul ignore if */\n      if (isIE || isEdge) {\n          setTimeout(function () {\n              actuallySetSelected(el, binding, vm);\n          }, 0);\n      }\n  }\n  function actuallySetSelected(el, binding, vm) {\n      var value = binding.value;\n      var isMultiple = el.multiple;\n      if (isMultiple && !Array.isArray(value)) {\n          warn(\"<select multiple v-model=\\\"\".concat(binding.expression, \"\\\"> \") +\n                  \"expects an Array value for its binding, but got \".concat(Object.prototype.toString\n                      .call(value)\n                      .slice(8, -1)), vm);\n          return;\n      }\n      var selected, option;\n      for (var i = 0, l = el.options.length; i < l; i++) {\n          option = el.options[i];\n          if (isMultiple) {\n              selected = looseIndexOf(value, getValue(option)) > -1;\n              if (option.selected !== selected) {\n                  option.selected = selected;\n              }\n          }\n          else {\n              if (looseEqual(getValue(option), value)) {\n                  if (el.selectedIndex !== i) {\n                      el.selectedIndex = i;\n                  }\n                  return;\n              }\n          }\n      }\n      if (!isMultiple) {\n          el.selectedIndex = -1;\n      }\n  }\n  function hasNoMatchingOption(value, options) {\n      return options.every(function (o) { return !looseEqual(o, value); });\n  }\n  function getValue(option) {\n      return '_value' in option ? option._value : option.value;\n  }\n  function onCompositionStart(e) {\n      e.target.composing = true;\n  }\n  function onCompositionEnd(e) {\n      // prevent triggering an input event for no reason\n      if (!e.target.composing)\n          return;\n      e.target.composing = false;\n      trigger(e.target, 'input');\n  }\n  function trigger(el, type) {\n      var e = document.createEvent('HTMLEvents');\n      e.initEvent(type, true, true);\n      el.dispatchEvent(e);\n  }\n\n  // recursively search for possible transition defined inside the component root\n  function locateNode(vnode) {\n      // @ts-expect-error\n      return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n          ? locateNode(vnode.componentInstance._vnode)\n          : vnode;\n  }\n  var show = {\n      bind: function (el, _a, vnode) {\n          var value = _a.value;\n          vnode = locateNode(vnode);\n          var transition = vnode.data && vnode.data.transition;\n          var originalDisplay = (el.__vOriginalDisplay =\n              el.style.display === 'none' ? '' : el.style.display);\n          if (value && transition) {\n              vnode.data.show = true;\n              enter(vnode, function () {\n                  el.style.display = originalDisplay;\n              });\n          }\n          else {\n              el.style.display = value ? originalDisplay : 'none';\n          }\n      },\n      update: function (el, _a, vnode) {\n          var value = _a.value, oldValue = _a.oldValue;\n          /* istanbul ignore if */\n          if (!value === !oldValue)\n              return;\n          vnode = locateNode(vnode);\n          var transition = vnode.data && vnode.data.transition;\n          if (transition) {\n              vnode.data.show = true;\n              if (value) {\n                  enter(vnode, function () {\n                      el.style.display = el.__vOriginalDisplay;\n                  });\n              }\n              else {\n                  leave(vnode, function () {\n                      el.style.display = 'none';\n                  });\n              }\n          }\n          else {\n              el.style.display = value ? el.__vOriginalDisplay : 'none';\n          }\n      },\n      unbind: function (el, binding, vnode, oldVnode, isDestroy) {\n          if (!isDestroy) {\n              el.style.display = el.__vOriginalDisplay;\n          }\n      }\n  };\n\n  var platformDirectives = {\n      model: directive,\n      show: show\n  };\n\n  // Provides transition support for a single element/component.\n  var transitionProps = {\n      name: String,\n      appear: Boolean,\n      css: Boolean,\n      mode: String,\n      type: String,\n      enterClass: String,\n      leaveClass: String,\n      enterToClass: String,\n      leaveToClass: String,\n      enterActiveClass: String,\n      leaveActiveClass: String,\n      appearClass: String,\n      appearActiveClass: String,\n      appearToClass: String,\n      duration: [Number, String, Object]\n  };\n  // in case the child is also an abstract component, e.g. <keep-alive>\n  // we want to recursively retrieve the real component to be rendered\n  function getRealChild(vnode) {\n      var compOptions = vnode && vnode.componentOptions;\n      if (compOptions && compOptions.Ctor.options.abstract) {\n          return getRealChild(getFirstComponentChild(compOptions.children));\n      }\n      else {\n          return vnode;\n      }\n  }\n  function extractTransitionData(comp) {\n      var data = {};\n      var options = comp.$options;\n      // props\n      for (var key in options.propsData) {\n          data[key] = comp[key];\n      }\n      // events.\n      // extract listeners and pass them directly to the transition methods\n      var listeners = options._parentListeners;\n      for (var key in listeners) {\n          data[camelize(key)] = listeners[key];\n      }\n      return data;\n  }\n  function placeholder(h, rawChild) {\n      // @ts-expect-error\n      if (/\\d-keep-alive$/.test(rawChild.tag)) {\n          return h('keep-alive', {\n              props: rawChild.componentOptions.propsData\n          });\n      }\n  }\n  function hasParentTransition(vnode) {\n      while ((vnode = vnode.parent)) {\n          if (vnode.data.transition) {\n              return true;\n          }\n      }\n  }\n  function isSameChild(child, oldChild) {\n      return oldChild.key === child.key && oldChild.tag === child.tag;\n  }\n  var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };\n  var isVShowDirective = function (d) { return d.name === 'show'; };\n  var Transition = {\n      name: 'transition',\n      props: transitionProps,\n      abstract: true,\n      render: function (h) {\n          var _this = this;\n          var children = this.$slots.default;\n          if (!children) {\n              return;\n          }\n          // filter out text nodes (possible whitespaces)\n          children = children.filter(isNotTextNode);\n          /* istanbul ignore if */\n          if (!children.length) {\n              return;\n          }\n          // warn multiple elements\n          if (children.length > 1) {\n              warn('<transition> can only be used on a single element. Use ' +\n                  '<transition-group> for lists.', this.$parent);\n          }\n          var mode = this.mode;\n          // warn invalid mode\n          if (mode && mode !== 'in-out' && mode !== 'out-in') {\n              warn('invalid <transition> mode: ' + mode, this.$parent);\n          }\n          var rawChild = children[0];\n          // if this is a component root node and the component's\n          // parent container node also has transition, skip.\n          if (hasParentTransition(this.$vnode)) {\n              return rawChild;\n          }\n          // apply transition data to child\n          // use getRealChild() to ignore abstract components e.g. keep-alive\n          var child = getRealChild(rawChild);\n          /* istanbul ignore if */\n          if (!child) {\n              return rawChild;\n          }\n          if (this._leaving) {\n              return placeholder(h, rawChild);\n          }\n          // ensure a key that is unique to the vnode type and to this transition\n          // component instance. This key will be used to remove pending leaving nodes\n          // during entering.\n          var id = \"__transition-\".concat(this._uid, \"-\");\n          child.key =\n              child.key == null\n                  ? child.isComment\n                      ? id + 'comment'\n                      : id + child.tag\n                  : isPrimitive(child.key)\n                      ? String(child.key).indexOf(id) === 0\n                          ? child.key\n                          : id + child.key\n                      : child.key;\n          var data = ((child.data || (child.data = {})).transition =\n              extractTransitionData(this));\n          var oldRawChild = this._vnode;\n          var oldChild = getRealChild(oldRawChild);\n          // mark v-show\n          // so that the transition module can hand over the control to the directive\n          if (child.data.directives && child.data.directives.some(isVShowDirective)) {\n              child.data.show = true;\n          }\n          if (oldChild &&\n              oldChild.data &&\n              !isSameChild(child, oldChild) &&\n              !isAsyncPlaceholder(oldChild) &&\n              // #6687 component root is a comment node\n              !(oldChild.componentInstance &&\n                  oldChild.componentInstance._vnode.isComment)) {\n              // replace old child transition data with fresh one\n              // important for dynamic transitions!\n              var oldData = (oldChild.data.transition = extend({}, data));\n              // handle transition mode\n              if (mode === 'out-in') {\n                  // return placeholder node and queue update when leave finishes\n                  this._leaving = true;\n                  mergeVNodeHook(oldData, 'afterLeave', function () {\n                      _this._leaving = false;\n                      _this.$forceUpdate();\n                  });\n                  return placeholder(h, rawChild);\n              }\n              else if (mode === 'in-out') {\n                  if (isAsyncPlaceholder(child)) {\n                      return oldRawChild;\n                  }\n                  var delayedLeave_1;\n                  var performLeave = function () {\n                      delayedLeave_1();\n                  };\n                  mergeVNodeHook(data, 'afterEnter', performLeave);\n                  mergeVNodeHook(data, 'enterCancelled', performLeave);\n                  mergeVNodeHook(oldData, 'delayLeave', function (leave) {\n                      delayedLeave_1 = leave;\n                  });\n              }\n          }\n          return rawChild;\n      }\n  };\n\n  // Provides transition support for list items.\n  var props = extend({\n      tag: String,\n      moveClass: String\n  }, transitionProps);\n  delete props.mode;\n  var TransitionGroup = {\n      props: props,\n      beforeMount: function () {\n          var _this = this;\n          var update = this._update;\n          this._update = function (vnode, hydrating) {\n              var restoreActiveInstance = setActiveInstance(_this);\n              // force removing pass\n              _this.__patch__(_this._vnode, _this.kept, false, // hydrating\n              true // removeOnly (!important, avoids unnecessary moves)\n              );\n              _this._vnode = _this.kept;\n              restoreActiveInstance();\n              update.call(_this, vnode, hydrating);\n          };\n      },\n      render: function (h) {\n          var tag = this.tag || this.$vnode.data.tag || 'span';\n          var map = Object.create(null);\n          var prevChildren = (this.prevChildren = this.children);\n          var rawChildren = this.$slots.default || [];\n          var children = (this.children = []);\n          var transitionData = extractTransitionData(this);\n          for (var i = 0; i < rawChildren.length; i++) {\n              var c = rawChildren[i];\n              if (c.tag) {\n                  if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n                      children.push(c);\n                      map[c.key] = c;\n                      (c.data || (c.data = {})).transition = transitionData;\n                  }\n                  else {\n                      var opts = c.componentOptions;\n                      var name_1 = opts\n                          ? getComponentName(opts.Ctor.options) || opts.tag || ''\n                          : c.tag;\n                      warn(\"<transition-group> children must be keyed: <\".concat(name_1, \">\"));\n                  }\n              }\n          }\n          if (prevChildren) {\n              var kept = [];\n              var removed = [];\n              for (var i = 0; i < prevChildren.length; i++) {\n                  var c = prevChildren[i];\n                  c.data.transition = transitionData;\n                  // @ts-expect-error .getBoundingClientRect is not typed in Node\n                  c.data.pos = c.elm.getBoundingClientRect();\n                  if (map[c.key]) {\n                      kept.push(c);\n                  }\n                  else {\n                      removed.push(c);\n                  }\n              }\n              this.kept = h(tag, null, kept);\n              this.removed = removed;\n          }\n          return h(tag, null, children);\n      },\n      updated: function () {\n          var children = this.prevChildren;\n          var moveClass = this.moveClass || (this.name || 'v') + '-move';\n          if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n              return;\n          }\n          // we divide the work into three loops to avoid mixing DOM reads and writes\n          // in each iteration - which helps prevent layout thrashing.\n          children.forEach(callPendingCbs);\n          children.forEach(recordPosition);\n          children.forEach(applyTranslation);\n          // force reflow to put everything in position\n          // assign to this to avoid being removed in tree-shaking\n          // $flow-disable-line\n          this._reflow = document.body.offsetHeight;\n          children.forEach(function (c) {\n              if (c.data.moved) {\n                  var el_1 = c.elm;\n                  var s = el_1.style;\n                  addTransitionClass(el_1, moveClass);\n                  s.transform = s.WebkitTransform = s.transitionDuration = '';\n                  el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {\n                      if (e && e.target !== el_1) {\n                          return;\n                      }\n                      if (!e || /transform$/.test(e.propertyName)) {\n                          el_1.removeEventListener(transitionEndEvent, cb);\n                          el_1._moveCb = null;\n                          removeTransitionClass(el_1, moveClass);\n                      }\n                  }));\n              }\n          });\n      },\n      methods: {\n          hasMove: function (el, moveClass) {\n              /* istanbul ignore if */\n              if (!hasTransition) {\n                  return false;\n              }\n              /* istanbul ignore if */\n              if (this._hasMove) {\n                  return this._hasMove;\n              }\n              // Detect whether an element with the move class applied has\n              // CSS transitions. Since the element may be inside an entering\n              // transition at this very moment, we make a clone of it and remove\n              // all other transition classes applied to ensure only the move class\n              // is applied.\n              var clone = el.cloneNode();\n              if (el._transitionClasses) {\n                  el._transitionClasses.forEach(function (cls) {\n                      removeClass(clone, cls);\n                  });\n              }\n              addClass(clone, moveClass);\n              clone.style.display = 'none';\n              this.$el.appendChild(clone);\n              var info = getTransitionInfo(clone);\n              this.$el.removeChild(clone);\n              return (this._hasMove = info.hasTransform);\n          }\n      }\n  };\n  function callPendingCbs(c) {\n      /* istanbul ignore if */\n      if (c.elm._moveCb) {\n          c.elm._moveCb();\n      }\n      /* istanbul ignore if */\n      if (c.elm._enterCb) {\n          c.elm._enterCb();\n      }\n  }\n  function recordPosition(c) {\n      c.data.newPos = c.elm.getBoundingClientRect();\n  }\n  function applyTranslation(c) {\n      var oldPos = c.data.pos;\n      var newPos = c.data.newPos;\n      var dx = oldPos.left - newPos.left;\n      var dy = oldPos.top - newPos.top;\n      if (dx || dy) {\n          c.data.moved = true;\n          var s = c.elm.style;\n          s.transform = s.WebkitTransform = \"translate(\".concat(dx, \"px,\").concat(dy, \"px)\");\n          s.transitionDuration = '0s';\n      }\n  }\n\n  var platformComponents = {\n      Transition: Transition,\n      TransitionGroup: TransitionGroup\n  };\n\n  // install platform specific utils\n  Vue.config.mustUseProp = mustUseProp;\n  Vue.config.isReservedTag = isReservedTag;\n  Vue.config.isReservedAttr = isReservedAttr;\n  Vue.config.getTagNamespace = getTagNamespace;\n  Vue.config.isUnknownElement = isUnknownElement;\n  // install platform runtime directives & components\n  extend(Vue.options.directives, platformDirectives);\n  extend(Vue.options.components, platformComponents);\n  // install platform patch function\n  Vue.prototype.__patch__ = inBrowser ? patch : noop;\n  // public mount method\n  Vue.prototype.$mount = function (el, hydrating) {\n      el = el && inBrowser ? query(el) : undefined;\n      return mountComponent(this, el, hydrating);\n  };\n  // devtools global hook\n  /* istanbul ignore next */\n  if (inBrowser) {\n      setTimeout(function () {\n          if (config.devtools) {\n              if (devtools) {\n                  devtools.emit('init', Vue);\n              }\n              else {\n                  // @ts-expect-error\n                  console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\\n' +\n                      'https://github.com/vuejs/vue-devtools');\n              }\n          }\n          if (config.productionTip !== false &&\n              typeof console !== 'undefined') {\n              // @ts-expect-error\n              console[console.info ? 'info' : 'log'](\"You are running Vue in development mode.\\n\" +\n                  \"Make sure to turn on production mode when deploying for production.\\n\" +\n                  \"See more tips at https://vuejs.org/guide/deployment.html\");\n          }\n      }, 0);\n  }\n\n  extend(Vue, vca);\n\n  return Vue;\n\n}));\n"
  },
  {
    "path": "web/assets/vue/vue.runtime.mjs",
    "content": "import Vue from './vue.runtime.common.js'\nexport default Vue\n\n// this should be kept in sync with src/v3/index.ts\nexport const {\n  version,\n\n  // refs\n  ref,\n  shallowRef,\n  isRef,\n  toRef,\n  toRefs,\n  unref,\n  proxyRefs,\n  customRef,\n  triggerRef,\n  computed,\n\n  // reactive\n  reactive,\n  isReactive,\n  isReadonly,\n  isShallow,\n  isProxy,\n  shallowReactive,\n  markRaw,\n  toRaw,\n  readonly,\n  shallowReadonly,\n\n  // watch\n  watch,\n  watchEffect,\n  watchPostEffect,\n  watchSyncEffect,\n\n  // effectScope\n  effectScope,\n  onScopeDispose,\n  getCurrentScope,\n\n  // provide / inject\n  provide,\n  inject,\n\n  // lifecycle\n  onBeforeMount,\n  onMounted,\n  onBeforeUpdate,\n  onUpdated,\n  onBeforeUnmount,\n  onUnmounted,\n  onErrorCaptured,\n  onActivated,\n  onDeactivated,\n  onServerPrefetch,\n  onRenderTracked,\n  onRenderTriggered,\n\n  // v2 only\n  set,\n  del,\n\n  // v3 compat\n  h,\n  getCurrentInstance,\n  useSlots,\n  useAttrs,\n  mergeDefaults,\n  nextTick,\n  useCssModule,\n  useCssVars,\n  defineComponent,\n  defineAsyncComponent\n} = Vue\n"
  },
  {
    "path": "web/controller/api.go",
    "content": "package controller\n\nimport (\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype APIController struct {\n\tBaseController\n\tinboundController *InboundController\n\tTgbot             service.Tgbot\n}\n\nfunc NewAPIController(g *gin.RouterGroup) *APIController {\n\ta := &APIController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *APIController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/panel/api/inbounds\")\n\tg.Use(a.checkLogin)\n\n\ta.inboundController = NewInboundController(g)\n\n\tinboundRoutes := []struct {\n\t\tMethod  string\n\t\tPath    string\n\t\tHandler gin.HandlerFunc\n\t}{\n\t\t{\"GET\", \"/createbackup\", a.createBackup},\n\t\t{\"GET\", \"/list\", a.inboundController.getInbounds},\n\t\t{\"GET\", \"/get/:id\", a.inboundController.getInbound},\n\t\t{\"GET\", \"/getClientTraffics/:email\", a.inboundController.getClientTraffics},\n\t\t{\"POST\", \"/add\", a.inboundController.addInbound},\n\t\t{\"POST\", \"/del/:id\", a.inboundController.delInbound},\n\t\t{\"POST\", \"/update/:id\", a.inboundController.updateInbound},\n\t\t{\"POST\", \"/clientIps/:email\", a.inboundController.getClientIps},\n\t\t{\"POST\", \"/clearClientIps/:email\", a.inboundController.clearClientIps},\n\t\t{\"POST\", \"/addClient\", a.inboundController.addInboundClient},\n\t\t{\"POST\", \"/:id/delClient/:clientId\", a.inboundController.delInboundClient},\n\t\t{\"POST\", \"/updateClient/:clientId\", a.inboundController.updateInboundClient},\n\t\t{\"POST\", \"/:id/resetClientTraffic/:email\", a.inboundController.resetClientTraffic},\n\t\t{\"POST\", \"/resetAllTraffics\", a.inboundController.resetAllTraffics},\n\t\t{\"POST\", \"/resetAllClientTraffics/:id\", a.inboundController.resetAllClientTraffics},\n\t\t{\"POST\", \"/delDepletedClients/:id\", a.inboundController.delDepletedClients},\n\t\t{\"POST\", \"/onlines\", a.inboundController.onlines},\n\t}\n\n\tfor _, route := range inboundRoutes {\n\t\tg.Handle(route.Method, route.Path, route.Handler)\n\t}\n}\n\nfunc (a *APIController) createBackup(c *gin.Context) {\n\ta.Tgbot.SendBackupToAdmins()\n}\n"
  },
  {
    "path": "web/controller/base.go",
    "content": "package controller\n\nimport (\n\t\"net/http\"\n\n\t\"x-ui/logger\"\n\t\"x-ui/web/locale\"\n\t\"x-ui/web/session\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype BaseController struct{}\n\nfunc (a *BaseController) checkLogin(c *gin.Context) {\n\tif !session.IsLogin(c) {\n\t\tif isAjax(c) {\n\t\t\tpureJsonMsg(c, http.StatusUnauthorized, false, I18nWeb(c, \"pages.login.loginAgain\"))\n\t\t} else {\n\t\t\tc.Redirect(http.StatusTemporaryRedirect, c.GetString(\"base_path\"))\n\t\t}\n\t\tc.Abort()\n\t} else {\n\t\tc.Next()\n\t}\n}\n\nfunc I18nWeb(c *gin.Context, name string, params ...string) string {\n\tanyfunc, funcExists := c.Get(\"I18n\")\n\tif !funcExists {\n\t\tlogger.Warning(\"I18n function not exists in gin context!\")\n\t\treturn \"\"\n\t}\n\ti18nFunc, _ := anyfunc.(func(i18nType locale.I18nType, key string, keyParams ...string) string)\n\tmsg := i18nFunc(locale.Web, name, params...)\n\treturn msg\n}\n"
  },
  {
    "path": "web/controller/inbound.go",
    "content": "package controller\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"x-ui/database/model\"\n\t\"x-ui/web/service\"\n\t\"x-ui/web/session\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype InboundController struct {\n\tinboundService service.InboundService\n\txrayService    service.XrayService\n}\n\nfunc NewInboundController(g *gin.RouterGroup) *InboundController {\n\ta := &InboundController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *InboundController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/inbound\")\n\n\tg.POST(\"/list\", a.getInbounds)\n\tg.POST(\"/add\", a.addInbound)\n\tg.POST(\"/del/:id\", a.delInbound)\n\tg.POST(\"/update/:id\", a.updateInbound)\n\tg.POST(\"/clientIps/:email\", a.getClientIps)\n\tg.POST(\"/clearClientIps/:email\", a.clearClientIps)\n\tg.POST(\"/addClient\", a.addInboundClient)\n\tg.POST(\"/:id/delClient/:clientId\", a.delInboundClient)\n\tg.POST(\"/updateClient/:clientId\", a.updateInboundClient)\n\tg.POST(\"/:id/resetClientTraffic/:email\", a.resetClientTraffic)\n\tg.POST(\"/resetAllTraffics\", a.resetAllTraffics)\n\tg.POST(\"/resetAllClientTraffics/:id\", a.resetAllClientTraffics)\n\tg.POST(\"/delDepletedClients/:id\", a.delDepletedClients)\n\tg.POST(\"/import\", a.importInbound)\n\tg.POST(\"/onlines\", a.onlines)\n}\n\nfunc (a *InboundController) getInbounds(c *gin.Context) {\n\tuser := session.GetLoginUser(c)\n\tinbounds, err := a.inboundService.GetInbounds(user.Id)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.toasts.obtain\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, inbounds, nil)\n}\n\nfunc (a *InboundController) getInbound(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"get\"), err)\n\t\treturn\n\t}\n\tinbound, err := a.inboundService.GetInbound(id)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.toasts.obtain\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, inbound, nil)\n}\n\nfunc (a *InboundController) getClientTraffics(c *gin.Context) {\n\temail := c.Param(\"email\")\n\tclientTraffics, err := a.inboundService.GetClientTrafficByEmail(email)\n\tif err != nil {\n\t\tjsonMsg(c, \"Error getting traffics\", err)\n\t\treturn\n\t}\n\tjsonObj(c, clientTraffics, nil)\n}\n\nfunc (a *InboundController) addInbound(c *gin.Context) {\n\tinbound := &model.Inbound{}\n\terr := c.ShouldBind(inbound)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.create\"), err)\n\t\treturn\n\t}\n\tuser := session.GetLoginUser(c)\n\tinbound.UserId = user.Id\n\tif inbound.Listen == \"\" || inbound.Listen == \"0.0.0.0\" || inbound.Listen == \"::\" || inbound.Listen == \"::0\" {\n\t\tinbound.Tag = fmt.Sprintf(\"inbound-%v\", inbound.Port)\n\t} else {\n\t\tinbound.Tag = fmt.Sprintf(\"inbound-%v:%v\", inbound.Listen, inbound.Port)\n\t}\n\n\tneedRestart := false\n\tinbound, needRestart, err = a.inboundService.AddInbound(inbound)\n\tjsonMsgObj(c, I18nWeb(c, \"pages.inbounds.create\"), inbound, err)\n\tif err == nil && needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) delInbound(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"delete\"), err)\n\t\treturn\n\t}\n\tneedRestart := true\n\tneedRestart, err = a.inboundService.DelInbound(id)\n\tjsonMsgObj(c, I18nWeb(c, \"delete\"), id, err)\n\tif err == nil && needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) updateInbound(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\tinbound := &model.Inbound{\n\t\tId: id,\n\t}\n\terr = c.ShouldBind(inbound)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\tneedRestart := true\n\tinbound, needRestart, err = a.inboundService.UpdateInbound(inbound)\n\tjsonMsgObj(c, I18nWeb(c, \"pages.inbounds.update\"), inbound, err)\n\tif err == nil && needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) getClientIps(c *gin.Context) {\n\temail := c.Param(\"email\")\n\n\tips, err := a.inboundService.GetInboundClientIps(email)\n\tif err != nil || ips == \"\" {\n\t\tjsonObj(c, \"No IP Record\", nil)\n\t\treturn\n\t}\n\n\tjsonObj(c, ips, nil)\n}\n\nfunc (a *InboundController) clearClientIps(c *gin.Context) {\n\temail := c.Param(\"email\")\n\n\terr := a.inboundService.ClearClientIps(email)\n\tif err != nil {\n\t\tjsonMsg(c, \"Update\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Log Cleared\", nil)\n}\n\nfunc (a *InboundController) addInboundClient(c *gin.Context) {\n\tdata := &model.Inbound{}\n\terr := c.ShouldBind(data)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\n\tneedRestart := true\n\n\tneedRestart, err = a.inboundService.AddInboundClient(data)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Client(s) added\", nil)\n\tif needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) delInboundClient(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\tclientId := c.Param(\"clientId\")\n\n\tneedRestart := true\n\n\tneedRestart, err = a.inboundService.DelInboundClient(id, clientId)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Client deleted\", nil)\n\tif needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) updateInboundClient(c *gin.Context) {\n\tclientId := c.Param(\"clientId\")\n\n\tinbound := &model.Inbound{}\n\terr := c.ShouldBind(inbound)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\n\tneedRestart := true\n\n\tneedRestart, err = a.inboundService.UpdateInboundClient(inbound, clientId)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Client updated\", nil)\n\tif needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) resetClientTraffic(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\temail := c.Param(\"email\")\n\n\tneedRestart, err := a.inboundService.ResetClientTraffic(id, email)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Traffic has been reset\", nil)\n\tif needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) resetAllTraffics(c *gin.Context) {\n\terr := a.inboundService.ResetAllTraffics()\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t} else {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n\tjsonMsg(c, \"all traffic has been reset\", nil)\n}\n\nfunc (a *InboundController) resetAllClientTraffics(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\n\terr = a.inboundService.ResetAllClientTraffics(id)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t} else {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n\tjsonMsg(c, \"All traffic from the client has been reset.\", nil)\n}\n\nfunc (a *InboundController) importInbound(c *gin.Context) {\n\tinbound := &model.Inbound{}\n\terr := json.Unmarshal([]byte(c.PostForm(\"data\")), inbound)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tuser := session.GetLoginUser(c)\n\tinbound.Id = 0\n\tinbound.UserId = user.Id\n\tif inbound.Listen == \"\" || inbound.Listen == \"0.0.0.0\" || inbound.Listen == \"::\" || inbound.Listen == \"::0\" {\n\t\tinbound.Tag = fmt.Sprintf(\"inbound-%v\", inbound.Port)\n\t} else {\n\t\tinbound.Tag = fmt.Sprintf(\"inbound-%v:%v\", inbound.Listen, inbound.Port)\n\t}\n\n\tfor index := range inbound.ClientStats {\n\t\tinbound.ClientStats[index].Id = 0\n\t\tinbound.ClientStats[index].Enable = true\n\t}\n\n\tneedRestart := false\n\tinbound, needRestart, err = a.inboundService.AddInbound(inbound)\n\tjsonMsgObj(c, I18nWeb(c, \"pages.inbounds.create\"), inbound, err)\n\tif err == nil && needRestart {\n\t\ta.xrayService.SetToNeedRestart()\n\t}\n}\n\nfunc (a *InboundController) delDepletedClients(c *gin.Context) {\n\tid, err := strconv.Atoi(c.Param(\"id\"))\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.inbounds.update\"), err)\n\t\treturn\n\t}\n\terr = a.inboundService.DelDepletedClients(id)\n\tif err != nil {\n\t\tjsonMsg(c, \"Something went wrong!\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"All depleted clients are deleted\", nil)\n}\n\nfunc (a *InboundController) onlines(c *gin.Context) {\n\tjsonObj(c, a.inboundService.GetOnlineClients(), nil)\n}\n"
  },
  {
    "path": "web/controller/index.go",
    "content": "package controller\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"x-ui/logger\"\n\t\"x-ui/web/service\"\n\t\"x-ui/web/session\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype LoginForm struct {\n\tUsername    string `json:\"username\" form:\"username\"`\n\tPassword    string `json:\"password\" form:\"password\"`\n\tLoginSecret string `json:\"loginSecret\" form:\"loginSecret\"`\n}\n\ntype IndexController struct {\n\tBaseController\n\n\tsettingService service.SettingService\n\tuserService    service.UserService\n\ttgbot          service.Tgbot\n}\n\nfunc NewIndexController(g *gin.RouterGroup) *IndexController {\n\ta := &IndexController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *IndexController) initRouter(g *gin.RouterGroup) {\n\tg.GET(\"/\", a.index)\n\tg.POST(\"/login\", a.login)\n\tg.GET(\"/logout\", a.logout)\n\tg.POST(\"/getSecretStatus\", a.getSecretStatus)\n}\n\nfunc (a *IndexController) index(c *gin.Context) {\n\tif session.IsLogin(c) {\n\t\tc.Redirect(http.StatusTemporaryRedirect, \"panel/\")\n\t\treturn\n\t}\n\thtml(c, \"login.html\", \"pages.login.title\", nil)\n}\n\nfunc (a *IndexController) login(c *gin.Context) {\n\tvar form LoginForm\n\terr := c.ShouldBind(&form)\n\tif err != nil {\n\t\tpureJsonMsg(c, http.StatusOK, false, I18nWeb(c, \"pages.login.toasts.invalidFormData\"))\n\t\treturn\n\t}\n\tif form.Username == \"\" {\n\t\tpureJsonMsg(c, http.StatusOK, false, I18nWeb(c, \"pages.login.toasts.emptyUsername\"))\n\t\treturn\n\t}\n\tif form.Password == \"\" {\n\t\tpureJsonMsg(c, http.StatusOK, false, I18nWeb(c, \"pages.login.toasts.emptyPassword\"))\n\t\treturn\n\t}\n\n\tuser := a.userService.CheckUser(form.Username, form.Password, form.LoginSecret)\n\ttimeStr := time.Now().Format(\"2006-01-02 15:04:05\")\n\tif user == nil {\n\t\tlogger.Warningf(\"wrong username or password or secret: \\\"%s\\\" \\\"%s\\\" \\\"%s\\\"\", form.Username, form.Password, form.LoginSecret)\n\t\ta.tgbot.UserLoginNotify(form.Username, form.Password, getRemoteIp(c), timeStr, 0)\n\t\tpureJsonMsg(c, http.StatusOK, false, I18nWeb(c, \"pages.login.toasts.wrongUsernameOrPassword\"))\n\t\treturn\n\t} else {\n\t\tlogger.Infof(\"%s logged in successfully, Ip Address: %s\\n\", form.Username, getRemoteIp(c))\n\t\ta.tgbot.UserLoginNotify(form.Username, ``, getRemoteIp(c), timeStr, 1)\n\t}\n\n\tsessionMaxAge, err := a.settingService.GetSessionMaxAge()\n\tif err != nil {\n\t\tlogger.Warning(\"Unable to get session's max age from DB\")\n\t}\n\n\tif sessionMaxAge > 0 {\n\t\terr = session.SetMaxAge(c, sessionMaxAge*60)\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"Unable to set session's max age\")\n\t\t}\n\t}\n\n\terr = session.SetLoginUser(c, user)\n\tlogger.Infof(\"%s logged in successfully\", user.Username)\n\tjsonMsg(c, I18nWeb(c, \"pages.login.toasts.successLogin\"), err)\n}\n\nfunc (a *IndexController) logout(c *gin.Context) {\n\tuser := session.GetLoginUser(c)\n\tif user != nil {\n\t\tlogger.Infof(\"%s logged out successfully\", user.Username)\n\t}\n\tsession.ClearSession(c)\n\tc.Redirect(http.StatusTemporaryRedirect, c.GetString(\"base_path\"))\n}\n\nfunc (a *IndexController) getSecretStatus(c *gin.Context) {\n\tstatus, err := a.settingService.GetSecretStatus()\n\tif err == nil {\n\t\tjsonObj(c, status, nil)\n\t}\n}\n"
  },
  {
    "path": "web/controller/server.go",
    "content": "package controller\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n\t\"time\"\n\n\t\"x-ui/web/global\"\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nvar filenameRegex = regexp.MustCompile(`^[a-zA-Z0-9_\\-.]+$`)\n\ntype ServerController struct {\n\tBaseController\n\n\tserverService service.ServerService\n\n\tlastStatus        *service.Status\n\tlastGetStatusTime time.Time\n\n\tlastVersions        []string\n\tlastGetVersionsTime time.Time\n}\n\nfunc NewServerController(g *gin.RouterGroup) *ServerController {\n\ta := &ServerController{\n\t\tlastGetStatusTime: time.Now(),\n\t}\n\ta.initRouter(g)\n\ta.startTask()\n\treturn a\n}\n\nfunc (a *ServerController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/server\")\n\n\tg.Use(a.checkLogin)\n\tg.POST(\"/status\", a.status)\n\tg.POST(\"/getXrayVersion\", a.getXrayVersion)\n\tg.POST(\"/stopXrayService\", a.stopXrayService)\n\tg.POST(\"/restartXrayService\", a.restartXrayService)\n\tg.POST(\"/installXray/:version\", a.installXray)\n\tg.POST(\"/logs/:count\", a.getLogs)\n\tg.POST(\"/getConfigJson\", a.getConfigJson)\n\tg.GET(\"/getDb\", a.getDb)\n\tg.POST(\"/importDB\", a.importDB)\n\tg.POST(\"/getNewX25519Cert\", a.getNewX25519Cert)\n}\n\nfunc (a *ServerController) refreshStatus() {\n\ta.lastStatus = a.serverService.GetStatus(a.lastStatus)\n}\n\nfunc (a *ServerController) startTask() {\n\twebServer := global.GetWebServer()\n\tc := webServer.GetCron()\n\tc.AddFunc(\"@every 2s\", func() {\n\t\tnow := time.Now()\n\t\tif now.Sub(a.lastGetStatusTime) > time.Minute*3 {\n\t\t\treturn\n\t\t}\n\t\ta.refreshStatus()\n\t})\n}\n\nfunc (a *ServerController) status(c *gin.Context) {\n\ta.lastGetStatusTime = time.Now()\n\n\tjsonObj(c, a.lastStatus, nil)\n}\n\nfunc (a *ServerController) getXrayVersion(c *gin.Context) {\n\tnow := time.Now()\n\tif now.Sub(a.lastGetVersionsTime) <= time.Minute {\n\t\tjsonObj(c, a.lastVersions, nil)\n\t\treturn\n\t}\n\n\tversions, err := a.serverService.GetXrayVersions()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"getVersion\"), err)\n\t\treturn\n\t}\n\n\ta.lastVersions = versions\n\ta.lastGetVersionsTime = time.Now()\n\n\tjsonObj(c, versions, nil)\n}\n\nfunc (a *ServerController) installXray(c *gin.Context) {\n\tversion := c.Param(\"version\")\n\terr := a.serverService.UpdateXray(version)\n\tjsonMsg(c, I18nWeb(c, \"install\")+\" xray\", err)\n}\n\nfunc (a *ServerController) stopXrayService(c *gin.Context) {\n\ta.lastGetStatusTime = time.Now()\n\terr := a.serverService.StopXrayService()\n\tif err != nil {\n\t\tjsonMsg(c, \"\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Xray stopped\", err)\n}\n\nfunc (a *ServerController) restartXrayService(c *gin.Context) {\n\terr := a.serverService.RestartXrayService()\n\tif err != nil {\n\t\tjsonMsg(c, \"\", err)\n\t\treturn\n\t}\n\tjsonMsg(c, \"Xray restarted\", err)\n}\n\nfunc (a *ServerController) getLogs(c *gin.Context) {\n\tcount := c.Param(\"count\")\n\tlevel := c.PostForm(\"level\")\n\tsyslog := c.PostForm(\"syslog\")\n\tlogs := a.serverService.GetLogs(count, level, syslog)\n\tjsonObj(c, logs, nil)\n}\n\nfunc (a *ServerController) getConfigJson(c *gin.Context) {\n\tconfigJson, err := a.serverService.GetConfigJson()\n\tif err != nil {\n\t\tjsonMsg(c, \"get config.json\", err)\n\t\treturn\n\t}\n\tjsonObj(c, configJson, nil)\n}\n\nfunc (a *ServerController) getDb(c *gin.Context) {\n\tdb, err := a.serverService.GetDb()\n\tif err != nil {\n\t\tjsonMsg(c, \"get Database\", err)\n\t\treturn\n\t}\n\n\tfilename := \"x-ui.db\"\n\n\tif !isValidFilename(filename) {\n\t\tc.AbortWithError(http.StatusBadRequest, fmt.Errorf(\"invalid filename\"))\n\t\treturn\n\t}\n\n\t// Set the headers for the response\n\tc.Header(\"Content-Type\", \"application/octet-stream\")\n\tc.Header(\"Content-Disposition\", \"attachment; filename=\"+filename)\n\n\t// Write the file contents to the response\n\tc.Writer.Write(db)\n}\n\nfunc isValidFilename(filename string) bool {\n\t// Validate that the filename only contains allowed characters\n\treturn filenameRegex.MatchString(filename)\n}\n\nfunc (a *ServerController) importDB(c *gin.Context) {\n\t// Get the file from the request body\n\tfile, _, err := c.Request.FormFile(\"db\")\n\tif err != nil {\n\t\tjsonMsg(c, \"Error reading db file\", err)\n\t\treturn\n\t}\n\tdefer file.Close()\n\t// Always restart Xray before return\n\tdefer a.serverService.RestartXrayService()\n\tdefer func() {\n\t\ta.lastGetStatusTime = time.Now()\n\t}()\n\t// Import it\n\terr = a.serverService.ImportDB(file)\n\tif err != nil {\n\t\tjsonMsg(c, \"\", err)\n\t\treturn\n\t}\n\tjsonObj(c, \"Import DB\", nil)\n}\n\nfunc (a *ServerController) getNewX25519Cert(c *gin.Context) {\n\tcert, err := a.serverService.GetNewX25519Cert()\n\tif err != nil {\n\t\tjsonMsg(c, \"get x25519 certificate\", err)\n\t\treturn\n\t}\n\tjsonObj(c, cert, nil)\n}\n"
  },
  {
    "path": "web/controller/setting.go",
    "content": "package controller\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"x-ui/web/entity\"\n\t\"x-ui/web/service\"\n\t\"x-ui/web/session\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype updateUserForm struct {\n\tOldUsername string `json:\"oldUsername\" form:\"oldUsername\"`\n\tOldPassword string `json:\"oldPassword\" form:\"oldPassword\"`\n\tNewUsername string `json:\"newUsername\" form:\"newUsername\"`\n\tNewPassword string `json:\"newPassword\" form:\"newPassword\"`\n}\n\ntype updateSecretForm struct {\n\tLoginSecret string `json:\"loginSecret\" form:\"loginSecret\"`\n}\n\ntype SettingController struct {\n\tsettingService service.SettingService\n\tuserService    service.UserService\n\tpanelService   service.PanelService\n}\n\nfunc NewSettingController(g *gin.RouterGroup) *SettingController {\n\ta := &SettingController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *SettingController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/setting\")\n\n\tg.POST(\"/all\", a.getAllSetting)\n\tg.POST(\"/defaultSettings\", a.getDefaultSettings)\n\tg.POST(\"/update\", a.updateSetting)\n\tg.POST(\"/updateUser\", a.updateUser)\n\tg.POST(\"/restartPanel\", a.restartPanel)\n\tg.GET(\"/getDefaultJsonConfig\", a.getDefaultXrayConfig)\n\tg.POST(\"/updateUserSecret\", a.updateSecret)\n\tg.POST(\"/getUserSecret\", a.getUserSecret)\n}\n\nfunc (a *SettingController) getAllSetting(c *gin.Context) {\n\tallSetting, err := a.settingService.GetAllSetting()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, allSetting, nil)\n}\n\nfunc (a *SettingController) getDefaultSettings(c *gin.Context) {\n\tresult, err := a.settingService.GetDefaultSettings(c.Request.Host)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, result, nil)\n}\n\nfunc (a *SettingController) updateSetting(c *gin.Context) {\n\tallSetting := &entity.AllSetting{}\n\terr := c.ShouldBind(allSetting)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifySettings\"), err)\n\t\treturn\n\t}\n\terr = a.settingService.UpdateAllSetting(allSetting)\n\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifySettings\"), err)\n}\n\nfunc (a *SettingController) updateUser(c *gin.Context) {\n\tform := &updateUserForm{}\n\terr := c.ShouldBind(form)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifySettings\"), err)\n\t\treturn\n\t}\n\tuser := session.GetLoginUser(c)\n\tif user.Username != form.OldUsername || user.Password != form.OldPassword {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifyUser\"), errors.New(I18nWeb(c, \"pages.settings.toasts.originalUserPassIncorrect\")))\n\t\treturn\n\t}\n\tif form.NewUsername == \"\" || form.NewPassword == \"\" {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifyUser\"), errors.New(I18nWeb(c, \"pages.settings.toasts.userPassMustBeNotEmpty\")))\n\t\treturn\n\t}\n\terr = a.userService.UpdateUser(user.Id, form.NewUsername, form.NewPassword)\n\tif err == nil {\n\t\tuser.Username = form.NewUsername\n\t\tuser.Password = form.NewPassword\n\t\tsession.SetLoginUser(c, user)\n\t}\n\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifyUser\"), err)\n}\n\nfunc (a *SettingController) restartPanel(c *gin.Context) {\n\terr := a.panelService.RestartPanel(time.Second * 3)\n\tjsonMsg(c, I18nWeb(c, \"pages.settings.restartPanel\"), err)\n}\n\nfunc (a *SettingController) updateSecret(c *gin.Context) {\n\tform := &updateSecretForm{}\n\terr := c.ShouldBind(form)\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifySettings\"), err)\n\t}\n\tuser := session.GetLoginUser(c)\n\terr = a.userService.UpdateUserSecret(user.Id, form.LoginSecret)\n\tif err == nil {\n\t\tuser.LoginSecret = form.LoginSecret\n\t\tsession.SetLoginUser(c, user)\n\t}\n\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifyUser\"), err)\n}\n\nfunc (a *SettingController) getUserSecret(c *gin.Context) {\n\tloginUser := session.GetLoginUser(c)\n\tuser := a.userService.GetUserSecret(loginUser.Id)\n\tif user != nil {\n\t\tjsonObj(c, user, nil)\n\t}\n}\n\nfunc (a *SettingController) getDefaultXrayConfig(c *gin.Context) {\n\tdefaultJsonConfig, err := a.settingService.GetDefaultXrayConfig()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, defaultJsonConfig, nil)\n}\n"
  },
  {
    "path": "web/controller/util.go",
    "content": "package controller\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"x-ui/config\"\n\t\"x-ui/logger\"\n\t\"x-ui/web/entity\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc getRemoteIp(c *gin.Context) string {\n\tvalue := c.GetHeader(\"X-Real-IP\")\n\tif value != \"\" {\n\t\treturn value\n\t}\n\tvalue = c.GetHeader(\"X-Forwarded-For\")\n\tif value != \"\" {\n\t\tips := strings.Split(value, \",\")\n\t\treturn ips[0]\n\t}\n\taddr := c.Request.RemoteAddr\n\tip, _, _ := net.SplitHostPort(addr)\n\treturn ip\n}\n\nfunc jsonMsg(c *gin.Context, msg string, err error) {\n\tjsonMsgObj(c, msg, nil, err)\n}\n\nfunc jsonObj(c *gin.Context, obj interface{}, err error) {\n\tjsonMsgObj(c, \"\", obj, err)\n}\n\nfunc jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) {\n\tm := entity.Msg{\n\t\tObj: obj,\n\t}\n\tif err == nil {\n\t\tm.Success = true\n\t\tif msg != \"\" {\n\t\t\tm.Msg = msg + I18nWeb(c, \"success\")\n\t\t}\n\t} else {\n\t\tm.Success = false\n\t\tm.Msg = msg + I18nWeb(c, \"fail\") + \": \" + err.Error()\n\t\tlogger.Warning(msg+I18nWeb(c, \"fail\")+\": \", err)\n\t}\n\tc.JSON(http.StatusOK, m)\n}\n\nfunc pureJsonMsg(c *gin.Context, statusCode int, success bool, msg string) {\n\tc.JSON(statusCode, entity.Msg{\n\t\tSuccess: success,\n\t\tMsg:     msg,\n\t})\n}\n\nfunc html(c *gin.Context, name string, title string, data gin.H) {\n\tif data == nil {\n\t\tdata = gin.H{}\n\t}\n\tdata[\"title\"] = title\n\thost := c.GetHeader(\"X-Forwarded-Host\")\n\tif host == \"\" {\n\t\thost = c.GetHeader(\"X-Real-IP\")\n\t}\n\tif host == \"\" {\n\t\tvar err error\n\t\thost, _, err = net.SplitHostPort(c.Request.Host)\n\t\tif err != nil {\n\t\t\thost = c.Request.Host\n\t\t}\n\t}\n\tdata[\"host\"] = host\n\tdata[\"request_uri\"] = c.Request.RequestURI\n\tdata[\"base_path\"] = c.GetString(\"base_path\")\n\tc.HTML(http.StatusOK, name, getContext(data))\n}\n\nfunc getContext(h gin.H) gin.H {\n\ta := gin.H{\n\t\t\"cur_ver\": config.GetVersion(),\n\t}\n\tfor key, value := range h {\n\t\ta[key] = value\n\t}\n\treturn a\n}\n\nfunc isAjax(c *gin.Context) bool {\n\treturn c.GetHeader(\"X-Requested-With\") == \"XMLHttpRequest\"\n}\n"
  },
  {
    "path": "web/controller/xray_setting.go",
    "content": "package controller\n\nimport (\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype XraySettingController struct {\n\tXraySettingService service.XraySettingService\n\tSettingService     service.SettingService\n\tInboundService     service.InboundService\n\tOutboundService    service.OutboundService\n\tXrayService        service.XrayService\n}\n\nfunc NewXraySettingController(g *gin.RouterGroup) *XraySettingController {\n\ta := &XraySettingController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *XraySettingController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/xray\")\n\n\tg.POST(\"/\", a.getXraySetting)\n\tg.POST(\"/update\", a.updateSetting)\n\tg.GET(\"/getXrayResult\", a.getXrayResult)\n\tg.GET(\"/getDefaultJsonConfig\", a.getDefaultXrayConfig)\n\tg.POST(\"/warp/:action\", a.warp)\n\tg.GET(\"/getOutboundsTraffic\", a.getOutboundsTraffic)\n\tg.POST(\"/resetOutboundsTraffic\", a.resetOutboundsTraffic)\n}\n\nfunc (a *XraySettingController) getXraySetting(c *gin.Context) {\n\txraySetting, err := a.SettingService.GetXrayConfigTemplate()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\tinboundTags, err := a.InboundService.GetInboundTags()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\txrayResponse := \"{ \\\"xraySetting\\\": \" + xraySetting + \", \\\"inboundTags\\\": \" + inboundTags + \" }\"\n\tjsonObj(c, xrayResponse, nil)\n}\n\nfunc (a *XraySettingController) updateSetting(c *gin.Context) {\n\txraySetting := c.PostForm(\"xraySetting\")\n\terr := a.XraySettingService.SaveXraySetting(xraySetting)\n\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.modifySettings\"), err)\n}\n\nfunc (a *XraySettingController) getDefaultXrayConfig(c *gin.Context) {\n\tdefaultJsonConfig, err := a.SettingService.GetDefaultXrayConfig()\n\tif err != nil {\n\t\tjsonMsg(c, I18nWeb(c, \"pages.settings.toasts.getSettings\"), err)\n\t\treturn\n\t}\n\tjsonObj(c, defaultJsonConfig, nil)\n}\n\nfunc (a *XraySettingController) getXrayResult(c *gin.Context) {\n\tjsonObj(c, a.XrayService.GetXrayResult(), nil)\n}\n\nfunc (a *XraySettingController) warp(c *gin.Context) {\n\taction := c.Param(\"action\")\n\tvar resp string\n\tvar err error\n\tswitch action {\n\tcase \"data\":\n\t\tresp, err = a.XraySettingService.GetWarp()\n\tcase \"config\":\n\t\tresp, err = a.XraySettingService.GetWarpConfig()\n\tcase \"reg\":\n\t\tskey := c.PostForm(\"privateKey\")\n\t\tpkey := c.PostForm(\"publicKey\")\n\t\tresp, err = a.XraySettingService.RegWarp(skey, pkey)\n\tcase \"license\":\n\t\tlicense := c.PostForm(\"license\")\n\t\tresp, err = a.XraySettingService.SetWarpLicense(license)\n\t}\n\n\tjsonObj(c, resp, err)\n}\n\nfunc (a *XraySettingController) getOutboundsTraffic(c *gin.Context) {\n\toutboundsTraffic, err := a.OutboundService.GetOutboundsTraffic()\n\tif err != nil {\n\t\tjsonMsg(c, \"Error getting traffics\", err)\n\t\treturn\n\t}\n\tjsonObj(c, outboundsTraffic, nil)\n}\n\nfunc (a *XraySettingController) resetOutboundsTraffic(c *gin.Context) {\n\ttag := c.PostForm(\"tag\")\n\terr := a.OutboundService.ResetOutboundTraffic(tag)\n\tif err != nil {\n\t\tjsonMsg(c, \"Error in reset outbound traffics\", err)\n\t\treturn\n\t}\n\tjsonObj(c, \"\", nil)\n}\n"
  },
  {
    "path": "web/controller/xui.go",
    "content": "package controller\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype XUIController struct {\n\tBaseController\n\n\tinboundController     *InboundController\n\tsettingController     *SettingController\n\txraySettingController *XraySettingController\n\t\n}\n\nfunc NewXUIController(g *gin.RouterGroup) *XUIController {\n\ta := &XUIController{}\n\ta.initRouter(g)\n\treturn a\n}\n\nfunc (a *XUIController) initRouter(g *gin.RouterGroup) {\n\tg = g.Group(\"/panel\")\n\tg.Use(a.checkLogin)\n\n\tg.GET(\"/\", a.index)\n\tg.GET(\"/inbounds\", a.inbounds)\n\tg.GET(\"/settings\", a.settings)\n\tg.GET(\"/xray\", a.xraySettings)\n\tg.GET(\"/navigation\", a.navigation)\n\n\ta.inboundController = NewInboundController(g)\n\ta.settingController = NewSettingController(g)\n\ta.xraySettingController = NewXraySettingController(g)\n\t\n}\n\nfunc (a *XUIController) index(c *gin.Context) {\n\thtml(c, \"index.html\", \"pages.index.title\", nil)\n}\n\nfunc (a *XUIController) inbounds(c *gin.Context) {\n\thtml(c, \"inbounds.html\", \"pages.inbounds.title\", nil)\n}\n\nfunc (a *XUIController) settings(c *gin.Context) {\n\thtml(c, \"settings.html\", \"pages.settings.title\", nil)\n}\n\nfunc (a *XUIController) xraySettings(c *gin.Context) {\n\thtml(c, \"xray.html\", \"pages.xray.title\", nil)\n}\n\nfunc (a *XUIController) navigation(c *gin.Context) {\n\thtml(c, \"navigation.html\", \"pages.navigation.title\", nil)\n}\n"
  },
  {
    "path": "web/entity/entity.go",
    "content": "package entity\n\nimport (\n\t\"crypto/tls\"\n\t\"net\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/util/common\"\n)\n\ntype Msg struct {\n\tSuccess bool        `json:\"success\"`\n\tMsg     string      `json:\"msg\"`\n\tObj     interface{} `json:\"obj\"`\n}\n\ntype AllSetting struct {\n\tWebListen        string `json:\"webListen\" form:\"webListen\"`\n\tWebDomain        string `json:\"webDomain\" form:\"webDomain\"`\n\tWebPort          int    `json:\"webPort\" form:\"webPort\"`\n\tWebCertFile      string `json:\"webCertFile\" form:\"webCertFile\"`\n\tWebKeyFile       string `json:\"webKeyFile\" form:\"webKeyFile\"`\n\tWebBasePath      string `json:\"webBasePath\" form:\"webBasePath\"`\n\tSessionMaxAge    int    `json:\"sessionMaxAge\" form:\"sessionMaxAge\"`\n\tPageSize         int    `json:\"pageSize\" form:\"pageSize\"`\n\tExpireDiff       int    `json:\"expireDiff\" form:\"expireDiff\"`\n\tTrafficDiff      int    `json:\"trafficDiff\" form:\"trafficDiff\"`\n\tRemarkModel      string `json:\"remarkModel\" form:\"remarkModel\"`\n\tTgBotEnable      bool   `json:\"tgBotEnable\" form:\"tgBotEnable\"`\n\tTgBotToken       string `json:\"tgBotToken\" form:\"tgBotToken\"`\n\tTgBotProxy       string `json:\"tgBotProxy\" form:\"tgBotProxy\"`\n\tTgBotChatId      string `json:\"tgBotChatId\" form:\"tgBotChatId\"`\n\tTgRunTime        string `json:\"tgRunTime\" form:\"tgRunTime\"`\n\tTgBotBackup      bool   `json:\"tgBotBackup\" form:\"tgBotBackup\"`\n\tTgBotLoginNotify bool   `json:\"tgBotLoginNotify\" form:\"tgBotLoginNotify\"`\n\tTgCpu            int    `json:\"tgCpu\" form:\"tgCpu\"`\n\tTgLang           string `json:\"tgLang\" form:\"tgLang\"`\n\tTimeLocation     string `json:\"timeLocation\" form:\"timeLocation\"`\n\tSecretEnable     bool   `json:\"secretEnable\" form:\"secretEnable\"`\n\tSubEnable        bool   `json:\"subEnable\" form:\"subEnable\"`\n\tSubListen        string `json:\"subListen\" form:\"subListen\"`\n\tSubPort          int    `json:\"subPort\" form:\"subPort\"`\n\tSubPath          string `json:\"subPath\" form:\"subPath\"`\n\tSubDomain        string `json:\"subDomain\" form:\"subDomain\"`\n\tSubCertFile      string `json:\"subCertFile\" form:\"subCertFile\"`\n\tSubKeyFile       string `json:\"subKeyFile\" form:\"subKeyFile\"`\n\tSubUpdates       int    `json:\"subUpdates\" form:\"subUpdates\"`\n\tSubEncrypt       bool   `json:\"subEncrypt\" form:\"subEncrypt\"`\n\tSubShowInfo      bool   `json:\"subShowInfo\" form:\"subShowInfo\"`\n\tSubURI           string `json:\"subURI\" form:\"subURI\"`\n\tSubJsonPath      string `json:\"subJsonPath\" form:\"subJsonPath\"`\n\tSubJsonURI       string `json:\"subJsonURI\" form:\"subJsonURI\"`\n\tSubJsonFragment  string `json:\"subJsonFragment\" form:\"subJsonFragment\"`\n\tSubJsonMux       string `json:\"subJsonMux\" form:\"subJsonMux\"`\n\tSubJsonRules     string `json:\"subJsonRules\" form:\"subJsonRules\"`\n\tDatepicker       string `json:\"datepicker\" form:\"datepicker\"`\n}\n\nfunc (s *AllSetting) CheckValid() error {\n\tif s.WebListen != \"\" {\n\t\tip := net.ParseIP(s.WebListen)\n\t\tif ip == nil {\n\t\t\treturn common.NewError(\"web listen is not valid ip:\", s.WebListen)\n\t\t}\n\t}\n\n\tif s.SubListen != \"\" {\n\t\tip := net.ParseIP(s.SubListen)\n\t\tif ip == nil {\n\t\t\treturn common.NewError(\"Sub listen is not valid ip:\", s.SubListen)\n\t\t}\n\t}\n\n\tif s.WebPort <= 0 || s.WebPort > 65535 {\n\t\treturn common.NewError(\"web port is not a valid port:\", s.WebPort)\n\t}\n\n\tif s.SubPort <= 0 || s.SubPort > 65535 {\n\t\treturn common.NewError(\"Sub port is not a valid port:\", s.SubPort)\n\t}\n\n\tif (s.SubPort == s.WebPort) && (s.WebListen == s.SubListen) {\n\t\treturn common.NewError(\"Sub and Web could not use same ip:port, \", s.SubListen, \":\", s.SubPort, \" & \", s.WebListen, \":\", s.WebPort)\n\t}\n\n\tif s.WebCertFile != \"\" || s.WebKeyFile != \"\" {\n\t\t_, err := tls.LoadX509KeyPair(s.WebCertFile, s.WebKeyFile)\n\t\tif err != nil {\n\t\t\treturn common.NewErrorf(\"cert file <%v> or key file <%v> invalid: %v\", s.WebCertFile, s.WebKeyFile, err)\n\t\t}\n\t}\n\n\tif s.SubCertFile != \"\" || s.SubKeyFile != \"\" {\n\t\t_, err := tls.LoadX509KeyPair(s.SubCertFile, s.SubKeyFile)\n\t\tif err != nil {\n\t\t\treturn common.NewErrorf(\"cert file <%v> or key file <%v> invalid: %v\", s.SubCertFile, s.SubKeyFile, err)\n\t\t}\n\t}\n\n\tif !strings.HasPrefix(s.WebBasePath, \"/\") {\n\t\ts.WebBasePath = \"/\" + s.WebBasePath\n\t}\n\tif !strings.HasSuffix(s.WebBasePath, \"/\") {\n\t\ts.WebBasePath += \"/\"\n\t}\n\tif !strings.HasPrefix(s.SubPath, \"/\") {\n\t\ts.SubPath = \"/\" + s.SubPath\n\t}\n\tif !strings.HasSuffix(s.SubPath, \"/\") {\n\t\ts.SubPath += \"/\"\n\t}\n\n\tif !strings.HasPrefix(s.SubJsonPath, \"/\") {\n\t\ts.SubJsonPath = \"/\" + s.SubJsonPath\n\t}\n\tif !strings.HasSuffix(s.SubJsonPath, \"/\") {\n\t\ts.SubJsonPath += \"/\"\n\t}\n\n\t_, err := time.LoadLocation(s.TimeLocation)\n\tif err != nil {\n\t\treturn common.NewError(\"time location not exist:\", s.TimeLocation)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "web/global/global.go",
    "content": "package global\n\nimport (\n\t\"context\"\n\t_ \"unsafe\"\n\n\t\"github.com/robfig/cron/v3\"\n)\n\nvar (\n\twebServer WebServer\n\tsubServer SubServer\n)\n\ntype WebServer interface {\n\tGetCron() *cron.Cron\n\tGetCtx() context.Context\n}\n\ntype SubServer interface {\n\tGetCtx() context.Context\n}\n\nfunc SetWebServer(s WebServer) {\n\twebServer = s\n}\n\nfunc GetWebServer() WebServer {\n\treturn webServer\n}\n\nfunc SetSubServer(s SubServer) {\n\tsubServer = s\n}\n\nfunc GetSubServer() SubServer {\n\treturn subServer\n}\n"
  },
  {
    "path": "web/global/hashStorage.go",
    "content": "package global\n\nimport (\n\t\"crypto/md5\"\n\t\"encoding/hex\"\n\t\"regexp\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype HashEntry struct {\n\tHash      string\n\tValue     string\n\tTimestamp time.Time\n}\n\ntype HashStorage struct {\n\tsync.RWMutex\n\tData       map[string]HashEntry\n\tExpiration time.Duration\n}\n\nfunc NewHashStorage(expiration time.Duration) *HashStorage {\n\treturn &HashStorage{\n\t\tData:       make(map[string]HashEntry),\n\t\tExpiration: expiration,\n\t}\n}\n\nfunc (h *HashStorage) SaveHash(query string) string {\n\th.Lock()\n\tdefer h.Unlock()\n\n\tmd5Hash := md5.Sum([]byte(query))\n\tmd5HashString := hex.EncodeToString(md5Hash[:])\n\n\tentry := HashEntry{\n\t\tHash:      md5HashString,\n\t\tValue:     query,\n\t\tTimestamp: time.Now(),\n\t}\n\n\th.Data[md5HashString] = entry\n\n\treturn md5HashString\n}\n\nfunc (h *HashStorage) GetValue(hash string) (string, bool) {\n\th.RLock()\n\tdefer h.RUnlock()\n\n\tentry, exists := h.Data[hash]\n\n\treturn entry.Value, exists\n}\n\nfunc (h *HashStorage) IsMD5(hash string) bool {\n\tmatch, _ := regexp.MatchString(\"^[a-f0-9]{32}$\", hash)\n\treturn match\n}\n\nfunc (h *HashStorage) RemoveExpiredHashes() {\n\th.Lock()\n\tdefer h.Unlock()\n\n\tnow := time.Now()\n\n\tfor hash, entry := range h.Data {\n\t\tif now.Sub(entry.Timestamp) > h.Expiration {\n\t\t\tdelete(h.Data, hash)\n\t\t}\n\t}\n}\n\nfunc (h *HashStorage) Reset() {\n\th.Lock()\n\tdefer h.Unlock()\n\n\th.Data = make(map[string]HashEntry)\n}\n"
  },
  {
    "path": "web/html/common/head.html",
    "content": "{{define \"head\"}}\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"renderer\" content=\"webkit\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <link rel=\"stylesheet\" href=\"{{ .base_path }}assets/ant-design-vue/antd.min.css\">\n  <link rel=\"stylesheet\" href=\"{{ .base_path }}assets/element-ui/theme-chalk/display.css\">\n  <link rel=\"stylesheet\" href=\"{{ .base_path }}assets/css/custom.min.css?{{ .cur_ver }}\">\n  <style>\n    [v-cloak] {\n      display: none;\n    }\n    /* vazirmatn-regular - arabic_latin_latin-ext */\n    @font-face {\n      font-display: swap;\n      font-family: 'Vazirmatn';\n      font-style: normal;\n      font-weight: 400;\n      src: url('{{ .base_path }}assets/Vazirmatn-UI-NL-Regular.woff2') format('woff2');\n      unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC, U+0030-0039;\n    }\n    body {\n      font-family: -apple-system, BlinkMacSystemFont, 'Vazirmatn', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',\n        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',\n        'Segoe UI Emoji', 'Segoe UI Symbol';\n    }\n  </style>\n  <title>{{ .host }}-{{ i18n .title}}</title>\n</head>\n<div id=\"message\"></div>\n{{end}}"
  },
  {
    "path": "web/html/common/js.html",
    "content": "{{define \"js\"}}\n<script src=\"{{ .base_path }}assets/vue/vue.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/moment/moment.min.js\"></script>\n<script src=\"{{ .base_path }}assets/ant-design-vue/antd.min.js\"></script>\n<script src=\"{{ .base_path }}assets/axios/axios.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/qs/qs.min.js\"></script>\n<script src=\"{{ .base_path }}assets/js/axios-init.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/util/common.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/util/date-util.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/util/utils.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/langs.js\"></script>\n<script>\n    const basePath = '{{ .base_path }}';\n    axios.defaults.baseURL = basePath;\n</script>\n{{end}}"
  },
  {
    "path": "web/html/common/prompt_modal.html",
    "content": "{{define \"promptModal\"}}\n<a-modal id=\"prompt-modal\" v-model=\"promptModal.visible\" :title=\"promptModal.title\"\n         :closable=\"true\" @ok=\"promptModal.ok\" :mask-closable=\"false\"\n         :confirm-loading=\"promptModal.confirmLoading\"\n         :ok-text=\"promptModal.okText\" cancel-text='{{ i18n \"cancel\" }}' :class=\"themeSwitcher.currentTheme\">\n    <a-input id=\"prompt-modal-input\" :type=\"promptModal.type\"\n             v-model=\"promptModal.value\"\n             :autosize=\"{minRows: 10, maxRows: 20}\"\n             @keydown.enter.native=\"promptModal.keyEnter\"\n             @keydown.ctrl.83=\"promptModal.ctrlS\"></a-input>\n</a-modal>\n\n<script>\n\n    const promptModal = {\n        title: '',\n        type: '',\n        value: '',\n        okText: '{{ i18n \"sure\"}}',\n        visible: false,\n        confirmLoading: false,\n        keyEnter(e) {\n            if (this.type !== 'textarea') {\n                e.preventDefault();\n                this.ok();\n            }\n        },\n        ctrlS(e) {\n            if (this.type === 'textarea') {\n                e.preventDefault();\n                promptModal.confirm(promptModal.value);\n            }\n        },\n        ok() {\n            promptModal.confirm(promptModal.value);\n        },\n        confirm() {},\n        open({\n            title = '',\n            type = 'text',\n            value = '',\n            okText = '{{ i18n \"sure\"}}',\n            confirm = () => {},\n        }) {\n            this.title = title;\n            this.type = type;\n            this.value = value;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.visible = true;\n            promptModalApp.$nextTick(() => {\n                document.querySelector('#prompt-modal-input').focus();\n            });\n        },\n        close() {\n            this.visible = false;\n        },\n        loading(loading=true) {\n            this.confirmLoading = loading;\n        },\n    };\n\n    const promptModalApp = new Vue({\n        el: '#prompt-modal',\n        data: {\n            promptModal: promptModal,\n        },\n    });\n\n</script>\n{{end}}"
  },
  {
    "path": "web/html/common/qrcode_modal.html",
    "content": "{{define \"qrcodeModal\"}}\n<style>\n.qr-container {\n  display: flex;\n  justify-content: center; /* 在水平方向上居中 */\n}\n.qr-bg {\n  width: 300px; \n  height: 300px;\n} \n.qr-modal-header {\n  display: flex;\n  justify-content: center; /* 在水平方向上居中 */\n  text-align: center; /* 文字居中 */\n}\n</style>\n\n<a-modal id=\"qrcode-modal\" v-model=\"qrModal.visible\" :title=\"qrModal.title\"\n    :dialog-style=\"{ top: '60px' }\"\n    :closable=\"true\"\n    :class=\"themeSwitcher.currentTheme\"\n    :footer=\"null\" width=\"360px\">\n  <a-tag color=\"green\" style=\"margin-bottom: 10px;display: block;text-align: center;\">\n    {{ i18n \"pages.inbounds.clickOnQRcode\" }}\n  </a-tag>\n  <template v-if=\"app.subSettings.enable && qrModal.subId\">\n    <a-divider>{{ i18n \"pages.settings.subSettings\"}}</a-divider>\n    <div class=\"qr-container\">\n      <div class=\"qr-bg\"><canvas @click=\"copyToClipboard('qrCode-sub',genSubLink(qrModal.client.subId))\" id=\"qrCode-sub\" class=\"qr-cv\"></canvas></div>\n    </div>\n    <a-divider>{{ i18n \"pages.settings.subSettings\"}} Json</a-divider>\n    <div class=\"qr-container\">\n      <div class=\"qr-bg\"><canvas @click=\"copyToClipboard('qrCode-subJson',genSubJsonLink(qrModal.client.subId))\" id=\"qrCode-subJson\" class=\"qr-cv\"></canvas></div>\n    </div>\n  </template>\n  <a-divider>{{ i18n \"pages.inbounds.client\" }}</a-divider>\n  <template v-for=\"(row, index) in qrModal.qrcodes\">\n    <a-tag color=\"green\" style=\"margin: 10px 0; display: block; text-align: center;\">[[ row.remark ]]</a-tag>\n    <div class=\"qr-container\">\n      <div class=\"qr-bg\"><canvas @click=\"copyToClipboard('qrCode-'+index, row.link)\" :id=\"'qrCode-'+index\" class=\"qr-cv\"></canvas></div>\n    </div>\n  </template>\n</a-modal>\n\n<script>\n\nconst qrModal = {\n    title: '',\n    dbInbound: new DBInbound(),\n    client: null,\n    qrcodes: [],\n    clipboard: null,\n    visible: false,\n    subId: '',\n    show: function (title = '', dbInbound, client) {\n        this.title = title;\n        this.dbInbound = dbInbound;\n        this.inbound = dbInbound.toInbound();\n        this.client = client;\n        this.subId = '';\n        this.qrcodes = [];\n        if (this.inbound.protocol == Protocols.WIREGUARD){\n            this.inbound.genInboundLinks(dbInbound.remark).split('\\r\\n').forEach((l,index) =>{\n                this.qrcodes.push({\n                    remark: \"Peer \" + (index+1),\n                    link: l\n                });\n            });\n        } else {\n            this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => {\n                this.qrcodes.push({\n                    remark: l.remark,\n                    link: l.link\n                });\n            });\n        }\n        this.visible = true;\n    },\n    close: function () {\n        this.visible = false;\n    },\n};\n\nconst qrModalApp = new Vue({\n    delimiters: ['[[', ']]'],\n    el: '#qrcode-modal',\n    data: {\n        qrModal: qrModal,\n    },\n    methods: {\n      copyToClipboard(elementId, content) {\n        this.qrModal.clipboard = new ClipboardJS('#' + elementId, {\n          text: () => content,\n        });\n        this.qrModal.clipboard.on('success', () => {\n          app.$message.success('{{ i18n \"copied\" }}')\n          this.qrModal.clipboard.destroy();\n        });\n      },\n      setQrCode(elementId, content) {\n        new QRious({\n          element: document.querySelector('#' + elementId),\n          size: 500,\n          value: content,\n          background: 'white',\n          backgroundAlpha: 0,\n          foreground: 'black',\n          padding: 4,\n          level: 'L'\n        });\n      },\n      genSubLink(subID) {\n        return app.subSettings.subURI + subID;\n      },\n      genSubJsonLink(subID) {\n        return app.subSettings.subJsonURI + subID;\n      },\n      revertOverflow() {\n        const elements = document.querySelectorAll(\".qr-tag\");\n        elements.forEach((element) => {\n          element.classList.remove(\"tr-marquee\");\n          element.children[0].style.animation = '';\n          while (element.children.length > 1) {\n            element.removeChild(element.lastChild);\n          }\n        });\n      }\n    },\n    updated() {\n        if (qrModal.client && qrModal.client.subId) {\n            qrModal.subId = qrModal.client.subId;\n            this.setQrCode(\"qrCode-sub\", this.genSubLink(qrModal.subId));\n            this.setQrCode(\"qrCode-subJson\", this.genSubJsonLink(qrModal.subId));\n        }\n        qrModal.qrcodes.forEach((element, index) => {\n            this.setQrCode(\"qrCode-\" + index, element.link);\n        });\n    }\n});\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/common/text_modal.html",
    "content": "{{define \"textModal\"}}\n<a-modal id=\"text-modal\" v-model=\"txtModal.visible\" :title=\"txtModal.title\"\n         :closable=\"true\"\n         :class=\"themeSwitcher.currentTheme\">\n    <template slot=\"footer\">\n        <a-button v-if=\"!ObjectUtil.isEmpty(txtModal.fileName)\" icon=\"download\"\n            :href=\"'data:application/text;charset=utf-8,' + encodeURIComponent(txtModal.content)\"\n            :download=\"txtModal.fileName\">[[ txtModal.fileName ]]\n        </a-button>\n            <a-button type=\"primary\" id=\"copy-btn\">{{ i18n \"copy\" }}</a-button>\n    </template>\n    <a-input style=\"overflow-y: auto;\" type=\"textarea\" v-model=\"txtModal.content\"\n        :autosize=\"{ minRows: 10, maxRows: 20}\"></a-input>\n</a-modal>\n\n<script>\n\n    const txtModal = {\n        title: '',\n        content: '',\n        fileName: '',\n        qrcode: null,\n        clipboard: null,\n        visible: false,\n        show: function (title = '', content = '', fileName = '') {\n            this.title = title;\n            this.content = content;\n            this.fileName = fileName;\n            this.visible = true;\n            textModalApp.$nextTick(() => {\n                if (this.clipboard === null) {\n                    this.clipboard = new ClipboardJS('#copy-btn', {\n                        text: () => this.content,\n                    });\n                    this.clipboard.on('success', () => {\n                        app.$message.success('{{ i18n \"copied\" }}')\n                        this.close();\n                    });\n                }\n            });\n        },\n        close: function () {\n            this.visible = false;\n        },\n    };\n\n    const textModalApp = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#text-modal',\n        data: {\n            txtModal: txtModal,\n        },\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/login.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n  html * {\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n  h1 {\n    text-align: center;\n/*    margin: 20px 0 50px 0;*/\n    height: 110px;\n  }\n  .ant-btn,\n  .ant-input {\n    height: 50px;\n    border-radius: 30px;\n  }\n  .ant-input-group-addon {\n    border-radius: 0 30px 30px 0;\n    width: 50px;\n    font-size: 18px;\n  }\n  .ant-input-affix-wrapper .ant-input-prefix {\n    left: 23px;\n  }\n  .ant-input-affix-wrapper .ant-input:not(:first-child) {\n    padding-left: 50px;\n  }\n  .centered {\n    display: flex;\n    text-align: center;\n    align-items: center;\n    justify-content: center;\n    width: 100%;\n  }\n  .title {\n    font-size: 32px;\n  }\n  .title b {\n    font-weight: bold !important;\n  }\n  #app {\n    overflow: hidden;\n  }\n  #login {\n    animation: charge 0.5s both;\n    background-color: #fff;\n    border-radius: 2rem;\n    padding: 3rem;\n    transition: all 0.3s;\n    user-select:none;\n    -webkit-user-select:none;\n    -moz-user-select: none;\n  }\n  #login:hover {\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);\n  }\n  @keyframes charge {\n    from {\n      transform: translateY(5rem);\n      opacity: 0;\n    }\n    to {\n      transform: translateY(0);\n      opacity: 1;\n    }\n  }\n  .under {\n    background-color: #c7ebe2;\n    z-index: 0;\n  }\n  .dark .under {\n    background-color: var(--dark-color-login-wave);\n  }\n  .dark #login {\n    background-color: var(--dark-color-surface-100);\n  }\n  .dark h1 {\n    color: rgba(255, 255, 255);\n  }\n  .ant-form-item {\n    margin-bottom: 16px;\n  }\n  .ant-btn-primary-login {\n    width: 100%;\n  }\n  .ant-btn-primary-login:focus,\n  .ant-btn-primary-login:hover {\n    color: #fff;\n    background-color: #006655;\n    border-color: #006655;\n    background-image: linear-gradient(\n      270deg,\n      rgba(123, 199, 77, 0) 30%,\n      #009980,\n      rgba(123, 199, 77, 0) 100%\n    );\n    background-repeat: no-repeat;\n    animation: ma-bg-move ease-in-out 5s infinite;\n    background-position-x: -500px;\n    width: 95%;\n    animation-delay: -0.5s;\n    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n  }\n  .ant-btn-primary-login.active,\n  .ant-btn-primary-login:active {\n    color: #fff;\n    background-color: #006655;\n    border-color: #006655;\n  }\n  @keyframes ma-bg-move {\n    0% {\n      background-position: -500px 0;\n    }\n    50% {\n      background-position: 1000px 0;\n    }\n    100% {\n      background-position: 1000px 0;\n    }\n  }\n  .wave-btn-bg {\n    position: relative;\n    border-radius: 25px;\n    width: 100%;\n    transition: all 0.3s cubic-bezier(.645,.045,.355,1);\n  }\n  .dark .wave-btn-bg {\n    color: #fff;\n    position: relative;\n    background-color: #0a7557;\n    border: 2px double transparent;\n    background-origin: border-box;\n    background-clip: padding-box, border-box;\n    background-size: 300%;\n    width: 100%;\n    z-index: 1;\n  }\n  .dark .wave-btn-bg:hover {animation: wave-btn-tara 4s ease infinite;}\n  .dark .wave-btn-bg-cl {\n    background-image: linear-gradient(rgba(13, 14, 33, 0), rgba(13, 14, 33, 0)),\n      radial-gradient(circle at left top, #006655, #009980, #006655) !important;\n    border-radius: 3em;\n  }\n  .dark .wave-btn-bg-cl:hover {\n    width: 95%;\n  }\n  .dark .wave-btn-bg-cl:before {\n    position: absolute;\n    content: \"\";\n    top: -5px;\n    left: -5px;\n    bottom: -5px;\n    right: -5px;\n    z-index: -1;\n    background: inherit;\n    background-size: inherit;\n    border-radius: 4em;\n    opacity: 0;\n    transition: 0.5s;\n  }\n  .dark .wave-btn-bg-cl:hover::before {\n    opacity: 1;\n    filter: blur(20px);\n    animation: wave-btn-tara 8s linear infinite;\n  }\n  @keyframes wave-btn-tara {\n    to {\n      background-position: 300%;\n    }\n  }\n  .dark .ant-btn-primary-login {\n    font-size: 14px;\n    color: #fff;\n    text-align: center;\n    background-image: linear-gradient(\n      rgba(13, 14, 33, 0.45),\n      rgba(13, 14, 33, 0.35)\n    );\n    border-radius: 2rem;\n    border: none;\n    outline: none;\n    background-color: transparent;\n    height: 46px;\n    position: relative;\n    white-space: nowrap;\n    cursor: pointer;\n    touch-action: manipulation;\n    padding: 0 15px;\n    width: 100%;\n    animation: none;\n    background-position-x: 0;\n    box-shadow: none;\n  }\n  .waves-header {\n    position: fixed;\n    width: 100%;\n    text-align: center;\n    background-color: #dbf5ed;\n    color: white;\n    z-index: -1;\n  }\n  .dark .waves-header {\n    background-color: var(--dark-color-login-background);\n  }\n  .waves-inner-header {\n    height: 50vh;\n    width: 100%;\n    margin: 0;\n    padding: 0;\n  }\n  .waves {\n    position: relative;\n    width: 100%;\n    height: 15vh;\n    margin-bottom: -8px; /*Fix for safari gap*/\n    min-height: 100px;\n    max-height: 150px;\n  }\n  .parallax > use {\n    animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;\n  }\n  .dark .parallax > use {\n    fill: var(--dark-color-login-wave);\n  }\n  .parallax > use:nth-child(1) {\n    animation-delay: -2s;\n    animation-duration: 4s;\n    opacity: 0.2;\n  }\n  .parallax > use:nth-child(2) {\n    animation-delay: -3s;\n    animation-duration: 7s;\n    opacity: 0.4;\n  }\n  .parallax > use:nth-child(3) {\n    animation-delay: -4s;\n    animation-duration: 10s;\n    opacity: 0.6;\n  }\n  .parallax > use:nth-child(4) {\n  animation-delay: -5s;\n  animation-duration: 13s;\n  }\n  @keyframes move-forever {\n    0% {\n      transform: translate3d(-90px, 0, 0);\n    }\n    100% {\n      transform: translate3d(85px, 0, 0);\n    }\n  }\n  @media (max-width: 768px) {\n    .waves {\n      height: 40px;\n      min-height: 40px;\n    }\n  }\n  .words-wrapper {\n    width: 100%;\n    display: inline-block;\n    position: relative;\n    text-align: center;\n  }\n  .words-wrapper b {\n    width: 100%;\n    display: inline-block;\n    position: absolute;\n    left: 0;\n    top: 0;\n  }\n  .words-wrapper b.is-visible {\n    position: relative;\n  }\n  .headline.zoom .words-wrapper {\n    -webkit-perspective: 300px;\n    -moz-perspective: 300px;\n    perspective: 300px;\n  }\n  .headline {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n  .headline.zoom b {\n    opacity: 0;\n  }\n  .headline.zoom b.is-visible {\n    opacity: 1;\n    -webkit-animation: zoom-in 0.8s;\n    -moz-animation: zoom-in 0.8s;\n    animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-in 0.8s;\n  }\n  .headline.zoom b.is-hidden {\n    -webkit-animation: zoom-out 0.8s;\n    -moz-animation: zoom-out 0.8s;\n    animation: cubic-bezier(0.215, 0.610, 0.355, 1.000) zoom-out 0.4s;\n  }\n  @-webkit-keyframes zoom-in {\n    0% {\n      opacity: 0;\n      -webkit-transform: translateZ(100px);\n    }\n\n    100% {\n      opacity: 1;\n      -webkit-transform: translateZ(0);\n    }\n  }\n  @-moz-keyframes zoom-in {\n    0% {\n      opacity: 0;\n      -moz-transform: translateZ(100px);\n    }\n    100% {\n      opacity: 1;\n      -moz-transform: translateZ(0);\n    }\n  }\n  @keyframes zoom-in {\n    0% {\n      opacity: 0;\n      -webkit-transform: translateZ(100px);\n      -moz-transform: translateZ(100px);\n      -ms-transform: translateZ(100px);\n      -o-transform: translateZ(100px);\n      transform: translateZ(100px);\n    }\n    100% {\n      opacity: 1;\n      -webkit-transform: translateZ(0);\n      -moz-transform: translateZ(0);\n      -ms-transform: translateZ(0);\n      -o-transform: translateZ(0);\n      transform: translateZ(0);\n    }\n  }\n  @-webkit-keyframes zoom-out {\n    0% {\n      opacity: 1;\n      -webkit-transform: translateZ(0);\n    }\n    100% {\n      opacity: 0;\n      -webkit-transform: translateZ(-100px);\n    }\n  }\n  @-moz-keyframes zoom-out {\n    0% {\n      opacity: 1;\n      -moz-transform: translateZ(0);\n    }\n    100% {\n      opacity: 0;\n      -moz-transform: translateZ(-100px);\n    }\n  }\n  @keyframes zoom-out {\n    0% {\n      opacity: 1;\n      -webkit-transform: translateZ(0);\n      -moz-transform: translateZ(0);\n      -ms-transform: translateZ(0);\n      -o-transform: translateZ(0);\n      transform: translateZ(0);\n    }\n    100% {\n      opacity: 0;\n      -webkit-transform: translateZ(-100px);\n      -moz-transform: translateZ(-100px);\n      -ms-transform: translateZ(-100px);\n      -o-transform: translateZ(-100px);\n      transform: translateZ(-100px);\n    }\n  }\n  .ant-menu-item .anticon {\n    margin-right: 4px;\n  }\n  .ant-menu-inline .ant-menu-item {\n    padding: 0 16px !important;\n  }\n</style>\n<body>\n  <a-layout id=\"app\" v-cloak :class=\"themeSwitcher.currentTheme\">\n    <transition name=\"list\" appear>\n      <a-layout-content class=\"under\" style=\"min-height: 0;\">\n        <div class=\"waves-header\">\n          <div class=\"waves-inner-header\"></div>\n          <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n               viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n            <defs>\n              <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n            </defs>\n            <g class=\"parallax\">\n              <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(0, 135, 113, 0.08)\" />\n              <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(0, 135, 113, 0.08)\" />\n              <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"5\" fill=\"rgba(0, 135, 113, 0.08)\" />\n              <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#c7ebe2\" />\n            </g>\n          </svg>\n        </div>\n        <a-row type=\"flex\" justify=\"center\" align=\"middle\" style=\"height: 100%; overflow: auto;\">\n          <a-col :xs=\"22\" :sm=\"20\" :md=\"14\" :lg=\"10\" :xl=\"8\" :xxl=\"6\" id=\"login\" style=\"margin: 3rem 0;\">\n            <a-row type=\"flex\" justify=\"center\">\n              <a-col style=\"width: 100%;\">\n                <h1 class=\"title headline zoom\">\n                  <span class=\"words-wrapper\">\n                    <b class=\"is-visible\">{{ i18n \"pages.login.hello\" }}</b>\n                    <b>{{ i18n \"pages.login.title\" }}</b>\n                  </span>\n                </h1>\n              </a-col>\n            </a-row>\n            <a-row type=\"flex\" justify=\"center\">\n              <a-col span=\"24\">\n                <a-form>\n                  <a-form-item>\n                    <a-input autocomplete=\"username\" v-model.trim=\"user.username\" placeholder='{{ i18n \"username\" }}'\n                             @keydown.enter.native=\"login\" autofocus>\n                      <a-icon slot=\"prefix\" type=\"user\" style=\"font-size: 16px;\"></a-icon>\n                    </a-input>\n                  </a-form-item>\n                  <a-form-item>\n                    <password-input autocomplete=\"current-password\" icon=\"lock\" v-model.trim=\"user.password\"\n                                    placeholder='{{ i18n \"password\" }}'\n                                    @keydown.enter.native=\"login\">\n                    </password-input>\n                  </a-form-item>\n                  <a-form-item v-if=\"secretEnable\">\n                    <password-input autocomplete=\"secret\" icon=\"key\" v-model.trim=\"user.loginSecret\"\n                                    placeholder='{{ i18n \"secretToken\" }}'\n                                    @keydown.enter.native=\"login\">\n                    </password-input>\n                  </a-form-item>\n                  <a-form-item>\n                    <a-row justify=\"center\" class=\"centered\">\n                      <div style=\"height: 50px;\" class=\"wave-btn-bg wave-btn-bg-cl\"\n                           :style=\"loading ? { width: '52px' } : { display: 'inline-block' }\">\n                        <a-button class=\"ant-btn-primary-login\" type=\"primary\"\n                                  :loading=\"loading\" @click=\"login\"\n                                  :icon=\"loading ? 'poweroff' : undefined\">\n                                  [[ loading ? '' : '{{ i18n \"login\" }}' ]]\n                        </a-button>\n                      </div>\n                    </a-row>\n                  </a-form-item>\n                  <a-form-item>\n                    <a-row justify=\"center\" class=\"centered\">\n                      <a-col :span=\"24\">\n                        <a-select ref=\"selectLang\" v-model=\"lang\"\n                                  @change=\"setLang(lang)\" style=\"width: 150px;\"\n                                  :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                          <a-select-option :value=\"l.value\" label=\"English\" v-for=\"l in supportLangs\">\n                            <span role=\"img\" aria-label=\"l.name\" v-text=\"l.icon\"></span>\n                            &nbsp;&nbsp;<span v-text=\"l.name\"></span>\n                          </a-select-option>\n                        </a-select>\n                      </a-col>\n                    </a-row>\n                  </a-form-item>\n                  <a-form-item>\n                    <a-row justify=\"center\" class=\"centered\">\n                      <theme-switch></theme-switch>\n                    </a-row>\n                  </a-form-item>\n                </a-form>\n              </a-col>\n            </a-row>\n          </a-col>\n        </a-row>\n      </a-layout-content>\n    </transition>\n  </a-layout>\n{{template \"js\" .}}\n{{template \"component/themeSwitcher\" .}}\n{{template \"component/password\" .}}\n<script>\n    class User {\n        constructor() {\n            this.username = \"\";\n            this.password = \"\";\n        }\n    }\n\n    const app = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#app',\n        data: {\n            themeSwitcher,\n            loading: false,\n            user: new User(),\n            secretEnable: false,\n            lang: \"\"\n        },\n        async created() {\n            this.lang = getLang();\n            this.secretEnable = await this.getSecretStatus();\n        },\n        methods: {\n            async login() {\n                this.loading = true;\n                const msg = await HttpUtil.post('/login', this.user);\n                this.loading = false;\n                if (msg.success) {\n                    location.href = basePath + 'panel/';\n                }\n            },\n            async getSecretStatus() {\n                this.loading = true;\n                const msg = await HttpUtil.post('/getSecretStatus');\n                this.loading = false;\n                if (msg.success) {\n                    this.secretEnable = msg.obj;\n                    return msg.obj;\n                }\n            },\n        },\n    });\n    document.addEventListener(\"DOMContentLoaded\", function() {\n        var animationDelay = 2000;\n        initHeadline();\n\n        function initHeadline() {\n            animateHeadline(document.querySelectorAll('.headline'));\n        }\n\n        function animateHeadline(headlines) {\n            var duration = animationDelay;\n            headlines.forEach(function(headline) {\n                setTimeout(function() {\n                    hideWord(headline.querySelector('.is-visible'));\n                }, duration);\n            });\n        }\n\n        function hideWord(word) {\n            var nextWord = takeNext(word);\n            switchWord(word, nextWord);\n            setTimeout(function() {\n                hideWord(nextWord);\n            }, animationDelay);\n        }\n\n        function takeNext(word) {\n            return (word.nextElementSibling) ? word.nextElementSibling : word.parentElement.firstElementChild;\n        }\n\n        function switchWord(oldWord, newWord) {\n            oldWord.classList.remove('is-visible');\n            oldWord.classList.add('is-hidden');\n            newWord.classList.remove('is-hidden');\n            newWord.classList.add('is-visible');\n        }\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/client_bulk_modal.html",
    "content": "{{define \"clientsBulkModal\"}}\n<a-modal id=\"client-bulk-modal\" v-model=\"clientsBulkModal.visible\" :title=\"clientsBulkModal.title\"\n    @ok=\"clientsBulkModal.ok\" :confirm-loading=\"clientsBulkModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n    :ok-text=\"clientsBulkModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"pages.client.method\" }}'>\n            <a-select v-model=\"clientsBulkModal.emailMethod\" buttonStyle=\"solid\"\n                :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option :value=\"0\">Random</a-select-option>\n                <a-select-option :value=\"1\">Random+Prefix</a-select-option>\n                <a-select-option :value=\"2\">Random+Prefix+Num</a-select-option>\n                <a-select-option :value=\"3\">Random+Prefix+Num+Postfix</a-select-option>\n                <a-select-option :value=\"4\">Prefix+Num+Postfix</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.first\" }}' v-if=\"clientsBulkModal.emailMethod>1\">\n            <a-input-number v-model=\"clientsBulkModal.firstNum\" :min=\"1\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.last\" }}' v-if=\"clientsBulkModal.emailMethod>1\">\n            <a-input-number v-model=\"clientsBulkModal.lastNum\" :min=\"clientsBulkModal.firstNum\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.prefix\" }}' v-if=\"clientsBulkModal.emailMethod>0\">\n            <a-input v-model.trim=\"clientsBulkModal.emailPrefix\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.postfix\" }}' v-if=\"clientsBulkModal.emailMethod>2\">\n            <a-input v-model.trim=\"clientsBulkModal.emailPostfix\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.clientCount\" }}' v-if=\"clientsBulkModal.emailMethod < 2\">\n            <a-input-number v-model=\"clientsBulkModal.quantity\" :min=\"1\" :max=\"100\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Flow' v-if=\"clientsBulkModal.inbound.canEnableTlsFlow()\">\n            <a-select v-model=\"clientsBulkModal.flow\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"\" selected>{{ i18n \"none\" }}</a-select-option>\n                <a-select-option v-for=\"key in TLS_FLOW_CONTROL\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='Flow' v-if=\"clientsBulkModal.inbound.xtls\">\n            <a-select v-model=\"clientsBulkModal.flow\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"\" selected>{{ i18n \"none\" }}</a-select-option>\n                <a-select-option v-for=\"key in XTLS_FLOW_CONTROL\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item v-if=\"app.subSettings.enable\">\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.inbounds.subscriptionDesc\" }}</span>\n                    </template>\n                    Subscription\n                    <a-icon @click=\"clientsBulkModal.subId = RandomUtil.randomLowerAndNum(16)\" type=\"sync\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"clientsBulkModal.subId\"></a-input>\n        </a-form-item>\n        <a-form-item v-if=\"app.tgBotEnable\">\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.inbounds.telegramDesc\" }}</span>\n                    </template>\n                    Telegram ChatID\n                    <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input-number style=\"width: 50%\" v-model=\"clientsBulkModal.tgId\" min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item v-if=\"app.ipLimitEnable\">\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.inbounds.IPLimitDesc\" }}</span>\n                    </template>\n                    <span>{{ i18n \"pages.inbounds.IPLimit\" }} </span>\n                    <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input-number v-model=\"clientsBulkModal.limitIp\" min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        0 <span>{{ i18n \"pages.inbounds.meansNoLimit\" }}</span>\n                    </template>\n                    {{ i18n \"pages.inbounds.totalFlow\" }}\n                    <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input-number v-model=\"clientsBulkModal.totalGB\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.delayedStart\" }}'>\n            <a-switch v-model=\"clientsBulkModal.delayedStart\" @click=\"clientsBulkModal.expiryTime=0\"></a-switch>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.client.expireDays\" }}' v-if=\"clientsBulkModal.delayedStart\">\n            <a-input-number v-model.number=\"delayedExpireDays\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item v-else>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.inbounds.leaveBlankToNeverExpire\" }}</span>\n                    </template>\n                    {{ i18n \"pages.inbounds.expireDate\" }}\n                    <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-date-picker v-if=\"datepicker == 'gregorian'\" :show-time=\"{ format: 'HH:mm:ss' }\"\n                format=\"YYYY-MM-DD HH:mm:ss\" :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                v-model=\"clientsBulkModal.expiryTime\"></a-date-picker>\n            <persian-datepicker v-else placeholder='{{ i18n \"pages.settings.datepickerPlaceholder\" }}'\n                value=\"clientsBulkModal.expiryTime\" v-model=\"clientsBulkModal.expiryTime\"></persian-datepicker>\n        </a-form-item>\n        <a-form-item v-if=\"clientsBulkModal.expiryTime != 0\">\n            <template slot=\"label\">\n                <span>{{ i18n \"pages.client.renew\" }}</span>\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.client.renewDesc\" }}</span>\n                    </template>\n                    <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input-number v-model.number=\"clientsBulkModal.reset\" :min=\"0\"></a-input-number>\n        </a-form-item>\n    </a-form>\n</a-modal>\n<script>\n\n    const clientsBulkModal = {\n        visible: false,\n        confirmLoading: false,\n        title: '',\n        okText: '',\n        confirm: null,\n        dbInbound: new DBInbound(),\n        inbound: new Inbound(),\n        quantity: 1,\n        totalGB: 0,\n        limitIp: 0,\n        expiryTime: '',\n        emailMethod: 0,\n        firstNum: 1,\n        lastNum: 1,\n        emailPrefix: \"\",\n        emailPostfix: \"\",\n        subId: \"\",\n        tgId: '',\n        flow: \"\",\n        delayedStart: false,\n        reset: 0,\n        ok() {\n            clients = [];\n            method = clientsBulkModal.emailMethod;\n            if (method > 1) {\n                start = clientsBulkModal.firstNum;\n                end = clientsBulkModal.lastNum + 1;\n            } else {\n                start = 0;\n                end = clientsBulkModal.quantity;\n            }\n            prefix = (method > 0 && clientsBulkModal.emailPrefix.length > 0) ? clientsBulkModal.emailPrefix : \"\";\n            useNum = (method > 1);\n            postfix = (method > 2 && clientsBulkModal.emailPostfix.length > 0) ? clientsBulkModal.emailPostfix : \"\";\n            for (let i = start; i < end; i++) {\n                newClient = clientsBulkModal.newClient(clientsBulkModal.dbInbound.protocol);\n                if (method == 4) newClient.email = \"\";\n                newClient.email += useNum ? prefix + i.toString() + postfix : prefix + postfix;\n                if (clientsBulkModal.subId.length > 0) newClient.subId = clientsBulkModal.subId;\n                newClient.tgId = clientsBulkModal.tgId;\n                newClient.limitIp = clientsBulkModal.limitIp;\n                newClient._totalGB = clientsBulkModal.totalGB;\n                newClient._expiryTime = clientsBulkModal.expiryTime;\n                if (clientsBulkModal.inbound.canEnableTlsFlow()) {\n                    newClient.flow = clientsBulkModal.flow;\n                }\n                if (clientsBulkModal.inbound.xtls) {\n                    newClient.flow = clientsBulkModal.flow;\n                }\n                newClient.reset = clientsBulkModal.reset;\n                clients.push(newClient);\n            }\n            ObjectUtil.execute(clientsBulkModal.confirm, clients, clientsBulkModal.dbInbound.id);\n        },\n        show({\n            title = '',\n            okText = '{{ i18n \"sure\" }}',\n            dbInbound = null,\n            confirm = (inbound, dbInbound) => { }\n        }) {\n            this.visible = true;\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.quantity = 1;\n            this.totalGB = 0;\n            this.expiryTime = 0;\n            this.emailMethod = 0;\n            this.limitIp = 0;\n            this.firstNum = 1;\n            this.lastNum = 1;\n            this.emailPrefix = \"\";\n            this.emailPostfix = \"\";\n            this.subId = \"\";\n            this.tgId = '';\n            this.flow = \"\";\n            this.dbInbound = new DBInbound(dbInbound);\n            this.inbound = dbInbound.toInbound();\n            this.delayedStart = false;\n            this.reset = 0;\n        },\n        newClient(protocol) {\n            switch (protocol) {\n                case Protocols.VMESS: return new Inbound.VmessSettings.Vmess();\n                case Protocols.VLESS: return new Inbound.VLESSSettings.VLESS();\n                case Protocols.TROJAN: return new Inbound.TrojanSettings.Trojan();\n                case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings.Shadowsocks(clientsBulkModal.inbound.settings.shadowsockses[0].method);\n                default: return null;\n            }\n        },\n        close() {\n            clientsBulkModal.visible = false;\n            clientsBulkModal.loading(false);\n        },\n        loading(loading = true) {\n            clientsBulkModal.confirmLoading = loading;\n        },\n    };\n\n    const clientsBulkModalApp = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#client-bulk-modal',\n        data: {\n            clientsBulkModal,\n            get inbound() {\n                return this.clientsBulkModal.inbound;\n            },\n            get delayedExpireDays() {\n                return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -86400000 : 0;\n            },\n            get datepicker() {\n                return app.datepicker;\n            },\n            set delayedExpireDays(days) {\n                this.clientsBulkModal.expiryTime = -86400000 * days;\n            },\n        },\n    });\n\n</script>\n{{end}}"
  },
  {
    "path": "web/html/xui/client_modal.html",
    "content": "{{define \"clientsModal\"}}\n<a-modal id=\"client-modal\" v-model=\"clientModal.visible\" :title=\"clientModal.title\" @ok=\"clientModal.ok\"\n         :confirm-loading=\"clientModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n         :class=\"themeSwitcher.currentTheme\"\n         :ok-text=\"clientModal.okText\" cancel-text='{{ i18n \"close\" }}'>\n    <template v-if=\"isEdit\">\n        <a-tag v-if=\"isExpiry || isTrafficExhausted\" color=\"red\" style=\"margin-bottom: 10px;display: block;text-align: center;\">Account is (Expired|Traffic Ended) And Disabled</a-tag>\n    </template>\n    {{template \"form/client\"}}\n</a-modal>\n<script>\n\n    const clientModal = {\n        visible: false,\n        confirmLoading: false,\n        title: '',\n        okText: '',\n        isEdit: false,\n        dbInbound: new DBInbound(),\n        inbound: new Inbound(),\n        clients: [],\n        clientStats: [],\n        oldClientId: \"\",\n        index: null,\n        clientIps: null,\n        delayedStart: false,\n        ok() {\n            if (clientModal.isEdit) {\n                ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal.oldClientId);\n            } else {\n                ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id);\n            }\n        },\n        show({ title = '', okText = '{{ i18n \"sure\" }}', index = null, dbInbound = null, confirm = () => { }, isEdit = false }) {\n            this.visible = true;\n            this.title = title;\n            this.okText = okText;\n            this.isEdit = isEdit;\n            this.dbInbound = new DBInbound(dbInbound);\n            this.inbound = dbInbound.toInbound();\n            this.clients = this.inbound.clients;\n            this.index = index === null ? this.clients.length : index;\n            this.delayedStart = false;\n            if (isEdit) {\n                if (this.clients[index].expiryTime < 0) {\n                    this.delayedStart = true;\n                }\n                this.oldClientId = this.getClientId(dbInbound.protocol, clients[index]);\n            } else {\n                this.addClient(this.inbound.protocol, this.clients);\n            }\n            this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clients[this.index].email);\n            this.confirm = confirm;\n        },  \n        getClientId(protocol, client) {\n            switch (protocol) {\n                case Protocols.TROJAN: return client.password;\n                case Protocols.SHADOWSOCKS: return client.email;\n                default: return client.id;\n            }\n        },\n        addClient(protocol, clients) {\n            switch (protocol) {\n                case Protocols.VMESS: return clients.push(new Inbound.VmessSettings.Vmess());\n                case Protocols.VLESS: return clients.push(new Inbound.VLESSSettings.VLESS());\n                case Protocols.TROJAN: return clients.push(new Inbound.TrojanSettings.Trojan());\n                case Protocols.SHADOWSOCKS: return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method));\n                default: return null;\n            }\n        },\n        close() {\n            clientModal.visible = false;\n            clientModal.loading(false);\n        },\n        loading(loading=true) {\n            clientModal.confirmLoading = loading;\n        },\n    };\n\n    const clientModalApp = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#client-modal',\n        data: {\n            clientModal,\n            get inbound() {\n                return this.clientModal.inbound;\n            },\n            get client() {\n                return this.clientModal.clients[this.clientModal.index];\n            },\n            get clientStats() {\n                return this.clientModal.clientStats;\n            },\n            get isEdit() {\n                return this.clientModal.isEdit;\n            },\n            get datepicker() {\n                return app.datepicker;\n            },\n            get isTrafficExhausted() {\n                if (!clientStats) return false\n                if (clientStats.total <= 0) return false\n                if (clientStats.up + clientStats.down < clientStats.total) return false\n                return true\n            },\n            get isExpiry() {\n                return this.clientModal.isEdit && this.client.expiryTime >0 ? (this.client.expiryTime < new Date().getTime()) : false;\n            },\n            get delayedStart() {\n                return this.clientModal.delayedStart;\n            },\n            set delayedStart(value) {\n                this.clientModal.delayedStart = value;\n            },\n            get delayedExpireDays() {\n                return this.client && this.client.expiryTime < 0 ? this.client.expiryTime / -86400000 : 0;\n            },\n            set delayedExpireDays(days) {\n                this.client.expiryTime = -86400000 * days;\n            },\n        },\n        methods: {\n            async getDBClientIps(email) {\n                const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);\n                if (!msg.success) {\n                    document.getElementById(\"clientIPs\").value = msg.obj;\n                    return;\n                }\n                let ips = msg.obj;\n                if (typeof ips === 'string' && ips.startsWith('[') && ips.endsWith(']')) {\n                    try {\n                        ips = JSON.parse(ips);\n                        ips = Array.isArray(ips) ? ips.join(\"\\n\") : ips;\n                    } catch (e) {\n                        console.error('Error parsing JSON:', e);\n                    }\n                }\n                document.getElementById(\"clientIPs\").value = ips;\n            },\n            async clearDBClientIps(email) {\n                try {\n                    const msg = await HttpUtil.post(`/panel/inbound/clearClientIps/${email}`);\n                    if (!msg.success) {\n                        return;\n                    }\n                    document.getElementById(\"clientIPs\").value = \"\";\n                } catch (error) {\n                }\n            },\n            resetClientTraffic(email, dbInboundId, iconElement) {\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.resetTraffic\"}}',\n                    content: '{{ i18n \"pages.inbounds.resetTrafficContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"reset\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: async () => {\n                        iconElement.disabled = true;\n                        const msg = await HttpUtil.postWithModal('/panel/inbound/' + dbInboundId + '/resetClientTraffic/' + email);\n                        if (msg.success) {\n                            this.clientModal.clientStats.up = 0;\n                            this.clientModal.clientStats.down = 0;\n                        }\n                        iconElement.disabled = false;\n                    },\n                })\n            },\n        },\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/common_sider.html",
    "content": "{{define \"menuItems\"}}\n<a-menu-item key=\"{{ .base_path }}panel/\">\n  <a-icon type=\"dashboard\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.dashboard\"}}</b>\n  </span>\n</a-menu-item>\n<a-menu-item key=\"{{ .base_path }}panel/inbounds\">\n  <a-icon type=\"user\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.inbounds\"}}</b>\n  </span>\n</a-menu-item>\n<a-menu-item key=\"{{ .base_path }}panel/settings\">\n  <a-icon type=\"setting\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.settings\"}}</b>\n  </span>\n</a-menu-item>\n<a-menu-item key=\"{{ .base_path }}panel/xray\">\n  <a-icon type=\"tool\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.xray\"}}</b>\n  </span>\n</a-menu-item>\n\n<!-- 将实用导航菜单项移动到第五 -->\n<a-menu-item key=\"{{ .base_path }}panel/navigation\">\n  <a-icon type=\"link\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.navigation\"}}</b>\n  </span>\n</a-menu-item>\n\n<a-menu-item key=\"{{ .base_path }}logout\">\n  <a-icon type=\"logout\"></a-icon>\n  <span>\n    <b>{{ i18n \"menu.logout\"}}</b>\n  </span>\n</a-menu-item>\n{{end}}\n\n\n{{define \"commonSider\"}}\n<a-layout-sider :theme=\"themeSwitcher.currentTheme\" id=\"sider\" collapsible breakpoint=\"md\" collapsed-width=\"0\">\n    <theme-switch></theme-switch>\n    <a-menu :theme=\"themeSwitcher.currentTheme\" mode=\"inline\" :selected-keys=\"['{{ .request_uri }}']\"\n            @click=\"({key}) => key.startsWith('http') ? window.open(key) : location.href = key\">\n        {{template \"menuItems\" .}}\n    </a-menu>\n</a-layout-sider>\n<a-drawer id=\"sider-drawer\" placement=\"left\" :closable=\"false\"\n          @close=\"siderDrawer.close()\"\n          :visible=\"siderDrawer.visible\"\n          :wrap-class-name=\"themeSwitcher.currentTheme\"\n          :wrap-style=\"{ padding: 0 }\">\n    <div class=\"drawer-handle\" @click=\"siderDrawer.change()\" slot=\"handle\">\n        <a-icon :type=\"siderDrawer.visible ? 'close' : 'menu-fold'\"></a-icon>\n    </div>\n    <theme-switch></theme-switch>\n    <a-menu :theme=\"themeSwitcher.currentTheme\" mode=\"inline\" :selected-keys=\"['{{ .request_uri }}']\"\n        @click=\"({key}) => key.startsWith('http') ? window.open(key) : location.href = key\">\n        {{template \"menuItems\" .}}\n    </a-menu>\n</a-drawer>\n<script>\n    const siderDrawer = {\n        visible: false,\n        show() {\n            this.visible = true;\n        },\n        close() {\n            this.visible = false;\n        },\n        change() {\n            this.visible = !this.visible;\n        },\n    };\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/component/password.html",
    "content": "{{define \"component/passwordInput\"}}\n<template>\n    <a-input :value=\"value\" :type=\"showPassword ? 'text' : 'password'\"\n            :placeholder=\"placeholder\"\n            @input=\"$emit('input', $event.target.value)\">\n        <template v-if=\"icon\" #prefix>\n            <a-icon :type=\"icon\" style=\"font-size: 16px;\" />\n        </template>\n        <template #addonAfter>\n            <a-icon :type=\"showPassword ? 'eye-invisible' : 'eye'\"\n                    @click=\"toggleShowPassword\"\n                    style=\"font-size: 16px;\" />\n        </template>\n    </a-input>\n</template>\n{{end}}\n\n{{define \"component/password\"}}\n<script>\n  Vue.component('password-input', {\n    props: [\"title\", \"value\", \"placeholder\", \"icon\"],\n    template: `{{template \"component/passwordInput\"}}`,\n    data() {\n      return {\n        showPassword: false,\n      };\n    },\n    methods: {\n      toggleShowPassword() {\n        this.showPassword = !this.showPassword;\n      },\n    },\n  });\n</script>\n{{end}}"
  },
  {
    "path": "web/html/xui/component/persianDatepicker.html",
    "content": "{{define \"component/persianDatepickerTemplate\"}}\n<template>\n    <div>\n        <a-input :value=\"value\" type=\"text\" v-model=\"date\" data-jdp class=\"persian-datepicker\"\n                 @input=\"$emit('input', convertToGregorian($event.target.value)); jalaliDatepicker.hide();\"\n                 :placeholder=\"placeholder\">\n            <template #addonAfter>\n                <a-icon type=\"calendar\" style=\"font-size: 14px; opacity: 0.5;\"/>\n            </template>\n        </a-input>\n    </div>\n</template>\n{{end}}\n\n{{define \"component/persianDatepicker\"}}\n<link rel=\"stylesheet\" href=\"{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.css?{{ .cur_ver }}\"/>\n<script src=\"{{ .base_path }}assets/moment/moment-jalali.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.js?{{ .cur_ver }}\"></script>\n<script>\n\n    const persianDatepicker = {};\n\n    Vue.component('persian-datepicker', {\n        props: ['placeholder', 'format', 'value'],\n        template: `{{template \"component/persianDatepickerTemplate\"}}`,\n        data() {\n            return {\n                date: '',\n                persianDatepicker,\n            };\n        },\n        watch: {\n            value: function (date) {\n                this.date = this.convertToJalalian(date)\n            }\n        },\n        mounted() {\n            this.date = this.convertToJalalian(this.value)\n            this.listenToDatepicker()\n        },\n        methods: {\n            convertToGregorian(date) {\n                return date ? moment(moment(date, 'jYYYY/jMM/jDD HH:mm:ss').format('YYYY-MM-DD HH:mm:ss')) : null\n            },\n            convertToJalalian(date) {\n                return date && moment.isMoment(date) ? date.format('jYYYY/jMM/jDD HH:mm:ss') : null\n            },\n            listenToDatepicker() {\n                jalaliDatepicker.startWatch({\n                    time: true,\n                    zIndex: '9999',\n                    hideAfterChange: true,\n                    useDropDownYears: false,\n                    changeMonthRotateYear: true,\n                });\n            },\n        }\n    });\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/component/setting.html",
    "content": "{{define \"component/settingListItem\"}}\n<a-list-item style=\"padding: 20px\">\n    <a-row v-if=\"type === 'textarea'\">\n        <a-col>\n            <a-list-item-meta :title=\"title\" :description=\"desc\"/>\n            <a-textarea class=\"ant-setting-textarea\" :value=\"value\" @input=\"$emit('input', $event.target.value)\" :auto-size=\"{ minRows: 10 }\"></a-textarea>\n            <!--a-textarea :value=\"value\" @input=\"$emit('input', $event.target.value)\" :auto-size=\"{ minRows: 10, maxRows: 30 }\"></a-textarea-->\n        </a-col>\n    </a-row>\n    <a-row v-else>\n        <a-col :lg=\"24\" :xl=\"12\">\n            <a-list-item-meta :title=\"title\" :description=\"desc\"/>\n        </a-col>\n        <a-col :lg=\"24\" :xl=\"12\">\n            <template v-if=\"type === 'text'\">\n                <a-input :value=\"value\" @input=\"$emit('input', $event.target.value)\" :placeholder=\"placeholder\"></a-input>\n            </template>\n            <template v-else-if=\"type === 'number'\">\n                <a-input-number :value=\"value\" :step=\"step\" @change=\"value => $emit('input', value)\" :min=\"min\" :max=\"max\" style=\"width: 100%;\"></a-input-number>\n            </template>\n            <template v-else-if=\"type === 'switch'\">\n                <a-switch :checked=\"value\" @change=\"value => $emit('input', value)\"></a-switch>\n            </template>\n        </a-col>\n    </a-row>\n</a-list-item>\n{{end}}\n\n{{define \"component/setting\"}}\n<script>\n    Vue.component('setting-list-item', {\n        props: [\"type\", \"title\", \"desc\", \"value\", \"min\", \"max\" , \"step\", \"placeholder\"],\n        template: `{{template \"component/settingListItem\"}}`,\n    });\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/component/sortableTable.html",
    "content": "{{define \"component/sortableTableTrigger\"}}\n    <a-icon type=\"drag\"\n        class=\"sortable-icon\"\n        style=\"cursor: move;\"\n        @mouseup=\"mouseUpHandler\"\n        @mousedown=\"mouseDownHandler\"\n        @click=\"clickHandler\" />\n{{end}}\n\n{{define \"component/sortableTable\"}}\n<script>\n    const DRAGGABLE_ROW_CLASS = 'draggable-row';\n\n    const findParentRowElement = (el) => {\n        if (!el || !el.tagName) {\n            return null;\n        } else if (el.classList.contains(DRAGGABLE_ROW_CLASS)) {\n            return el;\n        } else if (el.parentNode) {\n            return findParentRowElement(el.parentNode);\n        } else {\n            return null;\n        }\n    }\n\n    Vue.component('a-table-sortable', {\n        data() {\n            return {\n                sortingElementIndex: null,\n                newElementIndex: null,\n            };\n        },\n        props: ['data-source', 'customRow'],\n        inheritAttrs: false,\n        provide() {\n            const sortable = {}\n\n            Object.defineProperty(sortable, \"setSortableIndex\", {\n                enumerable: true,\n                get: () => this.setCurrentSortableIndex,\n            });\n\n            Object.defineProperty(sortable, \"resetSortableIndex\", {\n                enumerable: true,\n                get: () => this.resetSortableIndex,\n            });\n\n            return {\n                sortable,\n            }\n        },\n        render: function (createElement) {\n            return createElement('a-table', {\n                class: {\n                    'ant-table-is-sorting': this.isDragging(),\n                },\n                props: {\n                    ...this.$attrs,\n                    'data-source': this.records,\n                    customRow: (record, index) => this.customRowRender(record, index),\n                },\n                on: this.$listeners,\n                nativeOn: {\n                    drop: (e) => this.dropHandler(e),\n                },\n                scopedSlots: this.$scopedSlots,\n            }, this.$slots.default, )\n        },\n        created() {\n            this.$memoSort = {};\n        },\n        methods: {\n            isDragging() {\n                const currentIndex = this.sortingElementIndex;\n                return currentIndex !== null && currentIndex !== undefined;\n            },\n            resetSortableIndex(e, index) {\n                this.sortingElementIndex = null;\n                this.newElementIndex = null;\n                this.$memoSort = {};\n            },\n            setCurrentSortableIndex(e, index) {\n                this.sortingElementIndex = index;\n            },\n            dragStartHandler(e, index) {\n                if (!this.isDragging()) {\n                    e.preventDefault();\n                    return;\n                }\n                const hideDragImage = this.$el.cloneNode(true);\n                hideDragImage.id = \"hideDragImage-hide\";\n                hideDragImage.style.opacity = 0;\n                e.dataTransfer.setDragImage(hideDragImage, 0, 0);\n            },\n            dragStopHandler(e, index) {\n                const hideDragImage = document.getElementById('hideDragImage-hide');\n                if (hideDragImage) hideDragImage.remove();\n                this.resetSortableIndex(e, index);\n            },\n            dragOverHandler(e, index) {\n                if (!this.isDragging()) {\n                    return;\n                }\n\n                e.preventDefault();\n\n                const currentIndex = this.sortingElementIndex;\n                if (index === currentIndex) {\n                    this.newElementIndex = null;\n                    return;\n                }\n\n                const row = findParentRowElement(e.target);\n                if (!row) {\n                    return;\n                }\n\n                const rect = row.getBoundingClientRect();\n                const offsetTop = e.pageY - rect.top;\n\n                if (offsetTop < rect.height / 2) {\n                    this.newElementIndex = Math.max(index - 1, 0);\n                } else {\n                    this.newElementIndex = index;\n                }\n            },\n            dropHandler(e) {\n                if (this.isDragging()) {\n                    this.$emit('onsort', this.sortingElementIndex, this.newElementIndex);\n                }\n            },\n            customRowRender(record, index) {\n                const parentMethodResult = this.customRow?.(record, index) || {};\n                const newIndex = this.newElementIndex;\n                const currentIndex = this.sortingElementIndex;\n\n                return {\n                    ...parentMethodResult,\n                    attrs: {\n                        ...(parentMethodResult?.attrs || {}),\n                        draggable: true,\n                    },\n                    on: {\n                        ...(parentMethodResult?.on || {}),\n                        dragstart: (e) => this.dragStartHandler(e, index),\n                        dragend: (e) => this.dragStopHandler(e, index),\n                        dragover: (e) => this.dragOverHandler(e, index),\n                    },\n                    class: {\n                        ...(parentMethodResult?.class || {}),\n                        [DRAGGABLE_ROW_CLASS]: true,\n                        ['dragging']: this.isDragging()\n                            ? (newIndex === null ? index === currentIndex : index === newIndex)\n                            : false,\n                    },\n                };\n            }\n        },\n        computed: {\n            records() {\n                const newIndex = this.newElementIndex;\n                const currentIndex = this.sortingElementIndex;\n\n                if (!this.isDragging() || newIndex === null || currentIndex === newIndex) {\n                    return this.dataSource;\n                }\n\n                if (this.$memoSort.newIndex === newIndex) {\n                    return this.$memoSort.list;\n                }\n\n                let list = [...this.dataSource];\n                list.splice(newIndex, 0, list.splice(currentIndex, 1)[0]);\n\n                this.$memoSort = {\n                    newIndex,\n                    list,\n                };\n\n                return list;\n            }\n        }\n    });\n\n    Vue.component('table-sort-trigger', {\n        template: `{{template \"component/sortableTableTrigger\"}}`,\n        props: ['item-index'],\n        inject: ['sortable'],\n        methods: {\n            mouseDownHandler(e) {\n                if (this.sortable) {\n                    this.sortable.setSortableIndex(e, this.itemIndex);\n                }\n            },\n            mouseUpHandler(e) {\n                if (this.sortable) {\n                    this.sortable.resetSortableIndex(e, this.itemIndex);\n                }\n            },\n            clickHandler(e) {\n                e.preventDefault();\n            },\n        }\n    })\n</script>\n\n<style>\n    @media only screen and (max-width: 767px) {\n        .sortable-icon {\n            display: none;\n        }\n    }\n    .ant-table-is-sorting .draggable-row td {\n        background-color: #ffffff !important;\n    }\n    .dark .ant-table-is-sorting .draggable-row td {\n        background-color: var(--dark-color-surface-100) !important;\n    }\n    .ant-table-is-sorting .dragging td {\n        background-color: rgb(232 244 242) !important;\n        color: rgba(0, 0, 0, 0.3);\n    }\n    .dark .ant-table-is-sorting .dragging td {\n        background-color: var(--dark-color-table-hover) !important;\n        color: rgba(255, 255, 255, 0.3);\n    }\n    .ant-table-is-sorting .dragging {\n        opacity: 1;\n        box-shadow: 1px -2px 2px #008771;\n        transition: all 0.2s;\n    }\n    .ant-table-is-sorting .dragging .ant-table-row-index {\n        opacity: 0.3;\n    }\n</style>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/component/themeSwitch.html",
    "content": "{{define \"component/themeSwitchTemplate\"}}\n<template>\n  <a-menu class=\"change-theme\" :theme=\"themeSwitcher.currentTheme\" mode=\"inline\" selected-keys=\"\">\n    <a-menu-item mode=\"inline\" class=\"ant-menu-theme-switch\">\n      <a-icon type=\"bulb\" :theme=\"themeSwitcher.isDarkTheme ? 'filled' : 'outlined'\"></a-icon>\n      <a-switch size=\"small\" :default-checked=\"themeSwitcher.isDarkTheme\" @change=\"themeSwitcher.toggleTheme()\"></a-switch>\n      <template v-if=\"themeSwitcher.isDarkTheme\">\n        <a-checkbox style=\"margin-left: 1rem; vertical-align: middle;\" :checked=\"themeSwitcher.isUltra\" @click=\"themeSwitcher.toggleUltra()\">Ultra</a-checkbox>\n      </template>\n    </a-menu-item>\n  </a-menu>\n</template>\n{{end}}\n\n{{define \"component/themeSwitcher\"}}\n<script>\n  function createThemeSwitcher() {\n    const isDarkTheme = localStorage.getItem('dark-mode') === 'true';\n    const isUltra = localStorage.getItem('isUltraDarkThemeEnabled') === 'true';\n    if (isUltra) {\n      document.documentElement.setAttribute('data-theme', 'ultra-dark');\n    }\n    const theme = isDarkTheme ? 'dark' : 'light';\n    document.querySelector('body').setAttribute('class', theme);\n    return {\n      isDarkTheme,\n      isUltra,\n      get currentTheme() {\n        return this.isDarkTheme ? 'dark' : 'light';\n      },\n      toggleTheme() {\n        this.isDarkTheme = !this.isDarkTheme;\n        localStorage.setItem('dark-mode', this.isDarkTheme);\n        document.querySelector('body').setAttribute('class', this.isDarkTheme ? 'dark' : 'light');\n        document.getElementById('message').className = themeSwitcher.currentTheme;\n      },\n      toggleUltra() {\n        this.isUltra = !this.isUltra;\n        if (this.isUltra) {\n          document.documentElement.setAttribute('data-theme', 'ultra-dark');\n        } else {\n          document.documentElement.removeAttribute('data-theme');\n        }\n        localStorage.setItem('isUltraDarkThemeEnabled', this.isUltra.toString());\n      }\n    };\n  }\n  const themeSwitcher = createThemeSwitcher();\n  Vue.component('theme-switch', {\n    props: [],\n    template: `{{template \"component/themeSwitchTemplate\"}}`,\n    data: () => ({\n      themeSwitcher\n    }),\n    mounted() {\n      this.$message.config({\n        getContainer: () => document.getElementById('message')\n      });\n      document.getElementById('message').className = themeSwitcher.currentTheme;\n      const themeAnimations = document.querySelector('.change-theme');\n      themeAnimations.addEventListener('mousedown', () => {\n        document.documentElement.setAttribute('data-theme-animations', 'off');\n      });\n      themeAnimations.addEventListener('mouseleave', () => {\n        document.documentElement.removeAttribute('data-theme-animations');\n      });\n    }\n  });\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/dns_modal.html",
    "content": "{{define \"dnsModal\"}}\n<a-modal id=\"dns-modal\" v-model=\"dnsModal.visible\" :title=\"dnsModal.title\" @ok=\"dnsModal.ok\" :closable=\"true\" :mask-closable=\"false\" :ok-text=\"dnsModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n  <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"pages.xray.outbound.address\" }}'>\n      <a-input v-model.trim=\"dnsModal.dnsServer.address\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.xray.dns.domains\" }}'>\n      <a-button icon=\"plus\" size=\"small\" type=\"primary\" @click=\"dnsModal.dnsServer.domains.push('')\"></a-button>\n      <template v-for=\"(domain, index) in dnsModal.dnsServer.domains\">\n        <a-input v-model.trim=\"dnsModal.dnsServer.domains[index]\">\n          <a-button icon=\"minus\" size=\"small\" slot=\"addonAfter\" @click=\"dnsModal.dnsServer.domains.splice(index,1)\"></a-button>\n        </a-input>\n      </template>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.xray.dns.strategy\" }}' v-if=\"isAdvanced\">\n      <a-select v-model=\"dnsModal.dnsServer.queryStrategy\" style=\"width: 100%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n        <a-select-option :value=\"l\" :label=\"l\" v-for=\"l in ['UseIP', 'UseIPv4', 'UseIPv6']\"> [[ l ]] </a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label='Skip Fallback' v-if=\"isAdvanced\">\n      <a-switch v-model=\"dnsModal.dnsServer.skipFallback\"></a-switch>\n    </a-form-item>\n  </a-form>\n</a-modal>\n<script>\n  const dnsModal = {\n    title: '',\n    visible: false,\n    okText: '{{ i18n \"confirm\" }}',\n    isEdit: false,\n    confirm: null,\n    dnsServer: {\n      address: \"localhost\",\n      domains: [],\n      queryStrategy: 'UseIP',\n      skipFallback: true,\n    },\n    ok() {\n      domains = dnsModal.dnsServer.domains.filter(d => d.length > 0);\n      dnsModal.dnsServer.domains = domains;\n      newDnsServer = domains.length > 0 ? dnsModal.dnsServer : dnsModal.dnsServer.address;\n      ObjectUtil.execute(dnsModal.confirm, newDnsServer);\n    },\n    show({\n      title = '',\n      okText = '{{ i18n \"confirm\" }}',\n      dnsServer,\n      confirm = (dnsServer) => {},\n      isEdit = false\n    }) {\n      this.title = title;\n      this.okText = okText;\n      this.confirm = confirm;\n      this.visible = true;\n      if (isEdit) {\n        if (typeof dnsServer == 'object') {\n          this.dnsServer = dnsServer;\n        } else {\n          this.dnsServer = {\n            address: dnsServer ?? \"\",\n            domains: [],\n            queryStrategy: 'UseIP',\n            skipFallback: true,\n          }\n        }\n      } else {\n        this.dnsServer = {\n          address: \"localhost\",\n          domains: [],\n          queryStrategy: 'UseIP',\n          skipFallback: true,\n        }\n      }\n      this.isEdit = isEdit;\n    },\n    close() {\n      dnsModal.visible = false;\n    },\n  };\n  new Vue({\n    delimiters: ['[[', ']]'],\n    el: '#dns-modal',\n    data: {\n      dnsModal: dnsModal,\n    },\n    computed: {\n      isAdvanced: {\n        get: function() {\n          return dnsModal.dnsServer.domains.length > 0\n        }\n      }\n    }\n  });\n</script>\n{{end}}"
  },
  {
    "path": "web/html/xui/fakedns_modal.html",
    "content": "{{define \"fakednsModal\"}}\n<a-modal id=\"fakedns-modal\" v-model=\"fakednsModal.visible\" :title=\"fakednsModal.title\" @ok=\"fakednsModal.ok\"\n         :closable=\"true\" :mask-closable=\"false\"\n         :ok-text=\"fakednsModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"pages.xray.fakedns.ipPool\" }}'>\n            <a-input v-model.trim=\"fakednsModal.fakeDns.ipPool\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.fakedns.poolSize\" }}'>\n          <a-input-number style=\"width: 100%;\" type=\"number\" min=\"1\" v-model.trim=\"fakednsModal.fakeDns.poolSize\"></a-input-number>\n        </a-form-item>\n    </a-form>\n</a-modal>\n<script>\n    const fakednsModal = {\n        title: '',\n        visible: false,\n        okText: '{{ i18n \"confirm\" }}',\n        isEdit: false,\n        confirm: null,\n        fakeDns: {\n          ipPool: \"198.18.0.0/16\",\n          poolSize: 65535,\n        },\n        ok() {\n          ObjectUtil.execute(fakednsModal.confirm, fakednsModal.fakeDns);\n        },\n        show({ title='', okText='{{ i18n \"confirm\" }}', fakeDns, confirm=(fakeDns)=>{}, isEdit=false  }) {\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.visible = true;\n            if(isEdit) {\n                this.fakeDns = fakeDns;\n            } else {\n              this.fakeDns = {\n                ipPool: \"198.18.0.0/16\",\n                poolSize: 65535,\n              }\n            }\n            this.isEdit = isEdit;\n        },\n        close() {\n            fakednsModal.visible = false;\n        },\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#fakedns-modal',\n        data: {\n            fakednsModal: fakednsModal,\n        }\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/client.html",
    "content": "{{define \"form/client\"}}\n<a-form layout=\"horizontal\" v-if=\"client\" :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"pages.inbounds.enable\" }}'>\n        <a-switch v-model=\"client.enable\"></a-switch>\n    </a-form-item>\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.emailDesc\" }}</span>\n                </template>\n                {{ i18n \"pages.inbounds.email\" }}\n                <a-icon type=\"sync\" @click=\"client.email = RandomUtil.randomLowerAndNum(9)\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"client.email\"></a-input>\n    </a-form-item>\n    <a-form-item v-if=\"inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template>\n                {{ i18n \"password\" }}\n                <a-icon v-if=\"inbound.protocol === Protocols.SHADOWSOCKS\"@click=\"client.password = RandomUtil.randomShadowsocksPassword()\" type=\"sync\"></a-icon>\n                <a-icon v-if=\"inbound.protocol === Protocols.TROJAN\" @click=\"client.password = RandomUtil.randomSeq(10)\"type=\"sync\"> </a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"client.password\"></a-input>\n    </a-form-item>\n    <a-form-item v-if=\"inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template>\n                ID <a-icon @click=\"client.id = RandomUtil.randomUUID()\" type=\"sync\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"client.id\"></a-input>\n    </a-form-item>\n    <a-form-item v-if=\"client.email && app.subSettings.enable\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.subscriptionDesc\" }}</span>\n                </template>\n                Subscription\n                <a-icon @click=\"client.subId = RandomUtil.randomLowerAndNum(16)\" type=\"sync\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"client.subId\"></a-input>\n    </a-form-item>\n    <a-form-item v-if=\"client.email && app.tgBotEnable\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.telegramDesc\" }}</span>\n                </template>\n                Telegram ID\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input-number style=\"width: 50%\" v-model=\"client.tgId\" min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item v-if=\"app.ipLimitEnable\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.IPLimitDesc\"}}</span>\n                </template>\n                    <span>{{ i18n \"pages.inbounds.IPLimit\"}} </span>\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input-number v-model=\"client.limitIp\" min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item v-if=\"app.ipLimitEnable && client.limitIp > 0 && client.email && isEdit\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.IPLimitlogDesc\" }}</span>\n                </template>\n                    <span>{{ i18n \"pages.inbounds.IPLimitlog\" }} </span>\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-tooltip>\n            <template slot=\"title\">\n                <span>{{ i18n \"pages.inbounds.IPLimitlogclear\" }}</span>\n            </template>\n            <span style=\"color: #FF4D4F\">\n                <a-icon type=\"delete\" @click=\"clearDBClientIps(client.email)\"></a-icon>\n            </span>\n        </a-tooltip>\n        <a-form layout=\"block\">\n            <a-textarea id=\"clientIPs\" readonly @click=\"getDBClientIps(client.email)\" placeholder=\"Click To Get IPs\"\n                :auto-size=\"{ minRows: 5, maxRows: 10 }\">\n            </a-textarea>\n        </a-form>\n    </a-form-item>\n    <a-form-item v-if=\"inbound.xtls\" label='Flow'>\n        <a-select v-model=\"client.flow\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"\" selected>{{ i18n \"none\" }}</a-select-option>\n            <a-select-option v-for=\"key in XTLS_FLOW_CONTROL\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n    <a-form-item v-if=\"inbound.canEnableTlsFlow()\" label='Flow'>\n        <a-select v-model=\"client.flow\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"\" selected>{{ i18n \"none\" }}</a-select-option>\n            <a-select-option v-for=\"key in TLS_FLOW_CONTROL\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    0 <span>{{ i18n \"pages.inbounds.meansNoLimit\" }}</span>\n                </template>\n                {{ i18n \"pages.inbounds.totalFlow\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input-number v-model=\"client._totalGB\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item v-if=\"isEdit && clientStats\" label='{{ i18n \"usage\" }}'>\n        <a-tag :color=\"clientUsageColor(clientStats, app.trafficDiff)\">\n            [[ sizeFormat(clientStats.up) ]] /\n            [[ sizeFormat(clientStats.down) ]]\n            ([[ sizeFormat(clientStats.up + clientStats.down) ]])\n        </a-tag>\n        <a-tooltip>\n            <template slot=\"title\">{{ i18n \"pages.inbounds.resetTraffic\" }}</template>\n            <a-icon type=\"retweet\"\n                @click=\"resetClientTraffic(client.email,clientStats.inboundId,$event.target)\"\n                v-if=\"client.email.length > 0\"></a-icon>\n        </a-tooltip>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.client.delayedStart\" }}'>\n        <a-switch v-model=\"delayedStart\" @click=\"client._expiryTime=0\"></a-switch>\n    </a-form-item>\n    <a-form-item v-if=\"delayedStart\" label='{{ i18n \"pages.client.expireDays\" }}'>\n        <a-input-number v-model.number=\"delayedExpireDays\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item v-else>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">{{ i18n \"pages.inbounds.leaveBlankToNeverExpire\" }}</template>\n                {{ i18n \"pages.inbounds.expireDate\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-date-picker v-if=\"datepicker == 'gregorian'\" :show-time=\"{ format: 'HH:mm:ss' }\" format=\"YYYY-MM-DD HH:mm:ss\"\n            :dropdown-class-name=\"themeSwitcher.currentTheme\" v-model=\"client._expiryTime\"></a-date-picker>\n        <persian-datepicker v-else placeholder='{{ i18n \"pages.settings.datepickerPlaceholder\" }}'\n                            value=\"client._expiryTime\" v-model=\"client._expiryTime\"></persian-datepicker>\n        <a-tag color=\"red\" v-if=\"isEdit && isExpiry\">Expired</a-tag>\n    </a-form-item>\n    <a-form-item v-if=\"client.expiryTime != 0\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">{{ i18n \"pages.client.renewDesc\" }}</template>\n                {{ i18n \"pages.client.renew\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input-number v-model.number=\"client.reset\" :min=\"0\"></a-input-number>\n    </a-form-item>\n</a-form>\n{{end}}"
  },
  {
    "path": "web/html/xui/form/inbound.html",
    "content": "{{define \"form/inbound\"}}\n<!-- base -->\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"enable\" }}'>\n        <a-switch v-model=\"dbInbound.enable\"></a-switch>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"remark\" }}'>\n        <a-input v-model.trim=\"dbInbound.remark\"></a-input>\n    </a-form-item>\n\n    <a-form-item label='{{ i18n \"protocol\" }}'>\n        <a-select v-model=\"inbound.protocol\" :disabled=\"isEdit\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option v-for=\"p in Protocols\" :key=\"p\" :value=\"p\">[[ p ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.monitorDesc\" }}</span>\n                </template>\n                {{ i18n \"monitor\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"inbound.listen\"></a-input>\n    </a-form-item>\n\n    <a-form-item label='{{ i18n \"pages.inbounds.port\" }}'>\n        <a-input-number v-model.number=\"inbound.port\" :min=\"1\" :max=\"65531\"></a-input-number>\n    </a-form-item>\n\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    0 <span>{{ i18n \"pages.inbounds.meansNoLimit\" }}</span>\n                </template>\n                {{ i18n \"pages.inbounds.totalFlow\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input-number v-model=\"dbInbound.totalGB\" :min=\"0\"></a-input-number>\n    </a-form-item>\n\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"pages.inbounds.leaveBlankToNeverExpire\" }}</span>\n                </template>\n                {{ i18n \"pages.inbounds.expireDate\" }}\n                <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n        </template>\n            <a-date-picker style=\"width: 100%;\" v-if=\"datepicker == 'gregorian'\" :show-time=\"{ format: 'HH:mm:ss' }\" format=\"YYYY-MM-DD HH:mm:ss\"\n                :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                v-model=\"dbInbound._expiryTime\"></a-date-picker>\n            <persian-datepicker v-else placeholder='{{ i18n \"pages.settings.datepickerPlaceholder\" }}'\n                            value=\"dbInbound._expiryTime\" v-model=\"dbInbound._expiryTime\"></persian-datepicker>\n        </a-form-item>\n</a-form>\n\n<!-- vmess settings -->\n<template v-if=\"inbound.protocol === Protocols.VMESS\">\n    {{template \"form/vmess\"}}\n</template>\n\n<!-- vless settings -->\n<template v-if=\"inbound.protocol === Protocols.VLESS\">\n    {{template \"form/vless\"}}\n</template>\n\n<!-- trojan settings -->\n<template v-if=\"inbound.protocol === Protocols.TROJAN\">\n    {{template \"form/trojan\"}}\n</template>\n\n<!-- shadowsocks -->\n<template v-if=\"inbound.protocol === Protocols.SHADOWSOCKS\">\n    {{template \"form/shadowsocks\"}}\n</template>\n\n<!-- dokodemo-door -->\n<template v-if=\"inbound.protocol === Protocols.DOKODEMO\">\n    {{template \"form/dokodemo\"}}\n</template>\n\n<!-- socks -->\n<template v-if=\"inbound.protocol === Protocols.SOCKS\">\n    {{template \"form/socks\"}}\n</template>\n\n<!-- http -->\n<template v-if=\"inbound.protocol === Protocols.HTTP\">\n    {{template \"form/http\"}}\n</template>\n\n<!-- wireguard -->\n<template v-if=\"inbound.protocol === Protocols.WIREGUARD\">\n    {{template \"form/wireguard\"}}\n</template>\n\n<!-- stream settings -->\n<template v-if=\"inbound.canEnableStream()\">\n    {{template \"form/streamSettings\"}}\n    {{template \"form/externalProxy\" }}\n</template>\n\n<!-- tls settings -->\n<template v-if=\"inbound.canEnableTls()\">\n    {{template \"form/tlsSettings\"}}\n</template>\n\n<!-- sniffing -->\n<template>\n    {{template \"form/sniffing\"}}\n</template>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/outbound.html",
    "content": "{{define \"form/outbound\"}}\n<!-- base -->\n<a-tabs :active-key=\"outModal.activeKey\"  style=\"padding: 0; background-color: transparent;\" @change=\"(activeKey) => {outModal.toggleJson(activeKey == '2'); }\">\n<a-tab-pane key=\"1\" tab=\"Form\">\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"protocol\" }}'>\n            <a-select v-model=\"outbound.protocol\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x,y in Protocols\" :value=\"x\">[[ y ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.outbound.tag\" }}' has-feedback :validate-status=\"outModal.duplicateTag? 'warning' : 'success'\">\n            <a-input v-model.trim=\"outbound.tag\" @change=\"outModal.check()\" placeholder='{{ i18n \"pages.xray.outbound.tagDesc\" }}'></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.outbound.sendThrough\" }}'>\n            <a-input v-model=\"outbound.sendThrough\"></a-input>\n        </a-form-item>\n\n<!-- freedom settings-->\n<template v-if=\"outbound.protocol === Protocols.Freedom\">\n        <a-form-item label='Strategy'>\n            <a-select\n            v-model=\"outbound.settings.domainStrategy\"\n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"s in OutboundDomainStrategies\" :value=\"s\">[[ s ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='Fragment'>\n            <a-switch\n                :checked=\"Object.keys(outbound.settings.fragment).length >0\"\n                @change=\"checked => outbound.settings.fragment = checked ? new Outbound.FreedomSettings.Fragment() : {}\">\n            </a-switch>\n        </a-form-item>\n    <template v-if=\"Object.keys(outbound.settings.fragment).length >0\">\n        <a-form-item label='Packets'>\n            <a-select\n            v-model=\"outbound.settings.fragment.packets\"\n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"s in ['1-3','tlshello']\" :value=\"s\">[[ s ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='Length'>\n            <a-input v-model.trim=\"outbound.settings.fragment.length\"></a-input>\n        </a-form-item>\n        <a-form-item label='Interval'>\n            <a-input v-model.trim=\"outbound.settings.fragment.interval\"></a-input>\n        </a-form-item>\n    </template>\n</template>\n\n<!-- blackhole settings -->\n<template v-if=\"outbound.protocol === Protocols.Blackhole\">\n    <a-form-item label='Response Type'>\n        <a-select\n        v-model=\"outbound.settings.type\"\n        :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option v-for=\"s in ['', 'none','http']\" :value=\"s\">[[ s ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n</template>\n\n<!-- dns settings -->\n<template v-if=\"outbound.protocol === Protocols.DNS\">\n    <a-form-item label='{{ i18n \"pages.inbounds.network\" }}'>\n        <a-select\n        v-model=\"outbound.settings.network\"\n        :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option v-for=\"s in ['udp','tcp']\" :value=\"s\">[[ s ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n</template>\n\n<!-- wireguard settings -->\n      <template v-if=\"outbound.protocol === Protocols.Wireguard\">\n        <a-form-item>\n          <template slot=\"label\">\n            <a-tooltip>\n              <template slot=\"title\">\n                <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n              </template>\n              {{ i18n \"pages.xray.outbound.address\" }}\n              <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n          </template>\n          <a-input v-model.trim=\"outbound.settings.address\"></a-input>\n        </a-form-item>\n        <a-form-item>\n          <template slot=\"label\">\n              <a-tooltip>\n                  <template slot=\"title\">\n                      <span>{{ i18n \"reset\" }}</span>\n                  </template>\n                  {{ i18n \"pages.xray.wireguard.secretKey\" }}\n                  <a-icon type=\"sync\"\n                      @click=\"[outbound.settings.pubKey, outbound.settings.secretKey] = Object.values(Wireguard.generateKeypair())\">\n                  </a-icon>\n              </a-tooltip>\n          </template>\n          <a-input v-model.trim=\"outbound.settings.secretKey\"></a-input>\n      </a-form-item>\n      <a-form-item label='{{ i18n \"pages.xray.wireguard.publicKey\" }}'>\n          <a-input disabled v-model=\"outbound.settings.pubKey\"></a-input>\n      </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.wireguard.domainStrategy\" }}'>\n          <a-select v-model=\"outbound.settings.domainStrategy\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option v-for=\"wds in ['', ...WireguardDomainStrategy]\" :value=\"wds\">[[ wds ]]</a-select-option>\n          </a-select>\n        </a-form-item>\n        <a-form-item label='MTU'>\n          <a-input-number v-model.number=\"outbound.settings.mtu\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Workers'>\n          <a-input-number min=\"0\" v-model.number=\"outbound.settings.workers\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Kernel Mode'>\n          <a-switch v-model=\"outbound.settings.kernelMode\"></a-switch>\n        </a-form-item>\n        <a-form-item>\n          <template slot=\"label\">\n            <a-tooltip>\n              <template slot=\"title\">\n                <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n              </template> Reserved <a-icon type=\"question-circle\"></a-icon>\n            </a-tooltip>\n          </template>\n          <a-input v-model=\"outbound.settings.reserved\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"Peers\">\n          <a-button icon=\"plus\" type=\"primary\" size=\"small\" @click=\"outbound.settings.addPeer()\"></a-button>\n        </a-form-item>\n        <a-form v-for=\"(peer, index) in outbound.settings.peers\" :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n          <a-divider style=\"margin:0;\"> Peer [[ index + 1 ]] <a-icon v-if=\"outbound.settings.peers.length>1\" type=\"delete\" @click=\"() => outbound.settings.delPeer(index)\" style=\"color: rgb(255, 77, 79);cursor: pointer;\"></a-icon>\n          </a-divider>\n          <a-form-item label='{{ i18n \"pages.xray.wireguard.endpoint\" }}'>\n            <a-input v-model.trim=\"peer.endpoint\"></a-input>\n          </a-form-item>\n          <a-form-item label='{{ i18n \"pages.xray.wireguard.publicKey\" }}'>\n            <a-input v-model.trim=\"peer.publicKey\"></a-input>\n          </a-form-item>\n          <a-form-item label='{{ i18n \"pages.xray.wireguard.psk\" }}'>\n            <a-input v-model.trim=\"peer.psk\"></a-input>\n          </a-form-item>\n          <a-form-item>\n            <template slot=\"label\">\n              {{ i18n \"pages.xray.wireguard.allowedIPs\" }}\n              <a-button icon=\"plus\" type=\"primary\" size=\"small\" @click=\"peer.allowedIPs.push('')\"></a-button>\n            </template>\n            <template v-for=\"(aip, index) in peer.allowedIPs\" style=\"margin-bottom: 10px;\">\n              <a-input v-model.trim=\"peer.allowedIPs[index]\">\n                <a-button icon=\"minus\" v-if=\"peer.allowedIPs.length>1\" slot=\"addonAfter\" size=\"small\" @click=\"peer.allowedIPs.splice(index, 1)\"></a-button>\n              </a-input>\n            </template>\n          </a-form-item>\n          <a-form-item label='Keep Alive'>\n            <a-input-number v-model.number=\"peer.keepAlive\" :min=\"0\"></a-input-number>\n          </a-form-item>\n        </a-form>\n      </template>\n\n<!-- Address + Port -->\n<template v-if=\"outbound.hasAddressPort()\">\n        <a-form-item label='{{ i18n \"pages.inbounds.address\" }}'>\n            <a-input v-model.trim=\"outbound.settings.address\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.inbounds.port\" }}'>\n            <a-input-number v-model.number=\"outbound.settings.port\" :min=\"1\" :max=\"65532\"></a-input-number>\n        </a-form-item>\n</template>\n\n<!-- Vnext (vless/vmess) settings -->\n<template v-if=\"[Protocols.VMess, Protocols.VLESS].includes(outbound.protocol)\">\n        <a-form-item label='ID'>\n            <a-input v-model.trim=\"outbound.settings.id\"></a-input>\n        </a-form-item>\n <!-- vless settings -->\n <template v-if=\"outbound.canEnableTlsFlow()\">\n        <a-form-item label='Flow'>\n            <a-select v-model=\"outbound.settings.flow\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"\" selected>{{ i18n \"none\" }}</a-select-option>\n                <a-select-option v-for=\"key in TLS_FLOW_CONTROL\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n    </template>\n</template>\n\n<!-- Servers (trojan/shadowsocks/socks/http) settings -->\n<template v-if=\"outbound.hasServers()\">\n    <!-- http / socks -->\n    <template v-if=\"outbound.hasUsername()\">\n        <a-form-item label='{{ i18n \"username\" }}'>\n            <a-input v-model.trim=\"outbound.settings.user\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"password\" }}'>\n            <a-input v-model.trim=\"outbound.settings.pass\"></a-input>\n        </a-form-item>\n    </template>\n<!-- trojan/shadowsocks -->\n<template v-if=\"[Protocols.Trojan, Protocols.Shadowsocks].includes(outbound.protocol)\">\n        <a-form-item label='{{ i18n \"password\" }}'>\n        <a-input v-model.trim=\"outbound.settings.password\"></a-input>\n        </a-form-item>\n    </template>\n    <!-- shadowsocks -->\n    <template v-if=\"outbound.protocol === Protocols.Shadowsocks\">\n        <a-form-item label='{{ i18n \"encryption\" }}'>\n            <a-select v-model=\"outbound.settings.method\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"(method, method_name) in SSMethods\" :value=\"method\">[[ method_name ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='UDP over TCP'>\n            <a-switch v-model=\"outbound.settings.uot\"></a-switch>\n          </a-form-item>\n          <a-form-item label='UoTVersion'>\n            <a-input-number v-model.number=\"outbound.settings.UoTVersion\" :min=\"1\" :max=\"2\"></a-input-number>\n          </a-form-item>\n        </template>\n      </template>\n\n<!-- stream settings -->\n<template v-if=\"outbound.canEnableStream()\">\n    <a-form-item label='{{ i18n \"transmission\" }}'>\n        <a-select v-model=\"outbound.stream.network\" @change=\"streamNetworkChange\"\n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"tcp\">TCP</a-select-option>\n            <a-select-option value=\"kcp\">mKCP</a-select-option>\n            <a-select-option value=\"ws\">WebSocket</a-select-option>\n            <a-select-option value=\"http\">H2</a-select-option>\n            <a-select-option value=\"quic\">QUIC</a-select-option>\n            <a-select-option value=\"grpc\">gRPC</a-select-option>\n            <a-select-option value=\"httpupgrade\">HTTPUpgrade</a-select-option>\n            <a-select-option value=\"splithttp\">SplitHTTP</a-select-option>\n        </a-select>\n    </a-form-item>\n    <template v-if=\"outbound.stream.network === 'tcp'\">\n          <a-form-item label='HTTP {{ i18n \"camouflage\" }}'>\n            <a-switch :checked=\"outbound.stream.tcp.type === 'http'\" @change=\"checked => outbound.stream.tcp.type = checked ? 'http' : 'none'\"></a-switch>\n          </a-form-item>\n        <template v-if=\"outbound.stream.tcp.type == 'http'\">\n            <a-form-item label='{{ i18n \"host\" }}'>\n                <a-input v-model.trim=\"outbound.stream.tcp.host\"></a-input>\n            </a-form-item>\n            <a-form-item label='{{ i18n \"path\" }}'>\n                <a-input v-model.trim=\"outbound.stream.tcp.path\"></a-input>\n            </a-form-item>\n        </template>\n    </template>\n\n    <!-- kcp -->\n    <template v-if=\"outbound.stream.network === 'kcp'\">\n        <a-form-item label='{{ i18n \"camouflage\" }}'>\n            <a-select v-model=\"outbound.stream.kcp.type\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"none\">None</a-select-option>\n                <a-select-option value=\"srtp\">SRTP</a-select-option>\n                <a-select-option value=\"utp\">uTP</a-select-option>\n                <a-select-option value=\"wechat-video\">WeChat</a-select-option>\n                <a-select-option value=\"dtls\">DTLS 1.2</a-select-option>\n                <a-select-option value=\"wireguard\">WireGuard</a-select-option>\n                <a-select-option value=\"dns\">DNS</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"password\" }}'>\n            <a-input v-model=\"outbound.stream.kcp.seed\"></a-input>\n        </a-form-item>\n        <a-form-item label='MTU'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.mtu\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='TTI (ms)'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.tti\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Uplink (MB/s)'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.upCap\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Downlink (MB/s)'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.downCap\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Congestion'>\n            <a-switch v-model=\"outbound.stream.kcp.congestion\"></a-switch>\n        </a-form-item>\n        <a-form-item label='Read Buffer (MB)'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.readBuffer\"></a-input-number>\n        </a-form-item>\n        <a-form-item label='Write Buffer (MB)'>\n            <a-input-number v-model.number=\"outbound.stream.kcp.writeBuffer\"></a-input-number>\n        </a-form-item>\n    </template>\n\n    <!-- ws -->\n    <template v-if=\"outbound.stream.network === 'ws'\">\n        <a-form-item label='{{ i18n \"host\" }}'>\n            <a-input v-model=\"outbound.stream.ws.host\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"path\" }}'>\n            <a-input v-model.trim=\"outbound.stream.ws.path\"></a-input>\n        </a-form-item>\n    </template>\n\n    <!-- http -->\n    <template v-if=\"outbound.stream.network === 'http'\">\n        <a-form-item label='{{ i18n \"host\" }}'>\n            <a-input v-model.trim=\"outbound.stream.http.host\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"path\" }}'>\n            <a-input v-model.trim=\"outbound.stream.http.path\"></a-input>\n        </a-form-item>\n    </template>\n\n    <!-- quic -->\n    <template v-if=\"outbound.stream.network === 'quic'\">\n        <a-form-item label='{{ i18n \"pages.inbounds.stream.quic.encryption\" }}'>\n            <a-select v-model=\"outbound.stream.quic.security\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"none\">None</a-select-option>\n                <a-select-option value=\"aes-128-gcm\">AES-128-GCM</a-select-option>\n                <a-select-option value=\"chacha20-poly1305\">CHACHA20-POLY1305</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"password\" }}'>\n            <a-input v-model.trim=\"outbound.stream.quic.key\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"camouflage\" }}'>\n            <a-select v-model=\"outbound.stream.quic.type\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"none\">None</a-select-option>\n                <a-select-option value=\"srtp\">SRTP</a-select-option>\n                <a-select-option value=\"utp\">uTP</a-select-option>\n                <a-select-option value=\"wechat-video\">WeChat</a-select-option>\n                <a-select-option value=\"dtls\">DTLS 1.2</a-select-option>\n                <a-select-option value=\"wireguard\">WireGuard</a-select-option>\n            </a-select>\n        </a-form-item>\n    </template>\n\n    <!-- grpc -->\n    <template v-if=\"outbound.stream.network === 'grpc'\">\n        <a-form-item label='Service Name'>\n            <a-input v-model.trim=\"outbound.stream.grpc.serviceName\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"Authority\">\n            <a-input v-model.trim=\"outbound.stream.grpc.authority\"></a-input>\n        </a-form-item>\n        <a-form-item label='Multi Mode'>\n            <a-switch v-model=\"outbound.stream.grpc.multiMode\"></a-switch>\n        </a-form-item>\n    </template>\n\n    <!-- httpupgrade -->\n    <template v-if=\"outbound.stream.network === 'httpupgrade'\">\n        <a-form-item label='{{ i18n \"host\" }}'>\n            <a-input v-model=\"outbound.stream.httpupgrade.host\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"path\" }}'>\n            <a-input v-model.trim=\"outbound.stream.httpupgrade.path\"></a-input>\n          </a-form-item>\n        </template>\n\n        <!-- splithttp -->\n        <template v-if=\"outbound.stream.network === 'splithttp'\">\n          <a-form-item label='{{ i18n \"host\" }}'>\n            <a-input v-model=\"outbound.stream.splithttp.host\"></a-input>\n          </a-form-item>\n          <a-form-item label='{{ i18n \"path\" }}'>\n            <a-input v-model.trim=\"outbound.stream.splithttp.path\"></a-input>\n          </a-form-item>\n        </template>\n      </template>\n\n<!-- tls settings -->\n<template v-if=\"outbound.canEnableTls()\">\n    <a-form-item label='{{ i18n \"security\" }}'>\n        <a-radio-group v-model=\"outbound.stream.security\" button-style=\"solid\">\n            <a-radio-button value=\"none\">{{ i18n \"none\" }}</a-radio-button>\n            <a-radio-button value=\"tls\">TLS</a-radio-button>\n            <a-radio-button v-if=\"outbound.canEnableReality()\" value=\"reality\">Reality</a-radio-button>\n        </a-radio-group>\n    </a-form-item>\n    <template v-if=\"outbound.stream.isTls\">\n        <a-form-item label=\"SNI\" placeholder=\"Server Name Indication\">\n            <a-input v-model.trim=\"outbound.stream.tls.serverName\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"uTLS\">\n            <a-select v-model=\"outbound.stream.tls.fingerprint\" \n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=''>None</a-select-option>\n                <a-select-option v-for=\"key in UTLS_FINGERPRINT\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"ALPN\">\n            <a-select mode=\"multiple\" \n            :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                v-model=\"outbound.stream.tls.alpn\">\n                <a-select-option v-for=\"alpn in ALPN_OPTION\" :value=\"alpn\">[[ alpn ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"Allow Insecure\">\n            <a-switch v-model=\"outbound.stream.tls.allowInsecure\"></a-switch>\n        </a-form-item>\n    </template>\n\n    <!-- reality settings -->\n    <template v-if=\"outbound.stream.isReality\">\n        <a-form-item label=\"SNI\">\n            <a-input v-model.trim=\"outbound.stream.reality.serverName\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"uTLS\">\n            <a-select v-model=\"outbound.stream.reality.fingerprint\" \n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"key in UTLS_FINGERPRINT\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"Short ID\">\n            <a-input v-model.trim=\"outbound.stream.reality.shortId\" style=\"width:250px\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"SpiderX\">\n            <a-input v-model.trim=\"outbound.stream.reality.spiderX\" style=\"width:250px\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"Public Key\">\n            <a-input v-model.trim=\"outbound.stream.reality.publicKey\"></a-input>\n        </a-form-item>\n    </template>\n</template>\n\n<!-- sockopt settings -->\n    <a-form-item label=\"Sockopts\">\n        <a-switch v-model=\"outbound.stream.sockoptSwitch\"></a-switch>\n    </a-form-item>\n    <template v-if=\"outbound.stream.sockoptSwitch\">\n        <a-form-item label=\"Dialer Proxy\">\n            <a-select v-model=\"outbound.stream.sockopt.dialerProxy\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"tag in ['', ...outModal.tags]\" :value=\"tag\">[[ tag ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"TCP Fast Open\">\n            <a-switch v-model=\"outbound.stream.sockopt.tcpFastOpen\"></a-switch>\n        </a-form-item>\n        <a-form-item label=\"Keep Alive Interval\">\n            <a-input-number v-model=\"outbound.stream.sockopt.tcpKeepAliveInterval\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"Multipath TCP\">\n          <a-switch v-model.trim=\"outbound.stream.sockopt.tcpMptcp\"></a-switch>\n      </a-form-item>\n        <a-form-item label=\"TCP No-Delay\">\n            <a-switch v-model=\"outbound.stream.sockopt.tcpNoDelay\"></a-switch>\n        </a-form-item>\n</template>\n\n<!-- mux settings -->\n<template v-if=\"outbound.canEnableMux()\">\n    <a-form-item label=\"Mux\">\n        <a-switch v-model=\"outbound.mux.enabled\"></a-switch>\n    </a-form-item>\n    <template v-if=\"outbound.mux.enabled\">\n        <a-form-item label=\"Concurrency\">\n            <a-input-number v-model=\"outbound.mux.concurrency\" :min=\"-1\" :max=\"1024\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"xudp Concurrency\">\n            <a-input-number v-model=\"outbound.mux.xudpConcurrency\" :min=\"-1\" :max=\"1024\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"xudp UDP 443\">\n            <a-select v-model=\"outbound.mux.xudpProxyUDP443\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"c in ['reject', 'allow', 'skip']\" :value=\"c\">[[ c ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n    </template>\n</template>\n\n</a-form>\n</a-tab-pane>\n<a-tab-pane key=\"2\" tab=\"JSON\" force-render=\"true\">\n    <a-form-item style=\"margin: 10px 0\">\n        Link: <a-input v-model.trim=\"outModal.link\" style=\"width: 300px; margin-right: 5px;\" placeholder=\"vmess:// vless:// trojan:// ss://\"></a-input>\n        <a-button @click=\"convertLink\" type=\"primary\"><a-icon type=\"form\"></a-icon></a-button>\n    </a-form-item>\n        <textarea style=\"position:absolute; left: -800px;\" id=\"outboundJson\"></textarea>\n</a-tab-pane>\n</a-tabs>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/dokodemo.html",
    "content": "{{define \"form/dokodemo\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"pages.inbounds.targetAddress\"}}'>\n        <a-input v-model.trim=\"inbound.settings.address\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.destinationPort\"}}'>\n        <a-input-number v-model.number=\"inbound.settings.port\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.network\"}}'>\n        <a-select v-model=\"inbound.settings.network\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"tcp,udp\">TCP,UDP</a-select-option>\n            <a-select-option value=\"tcp\">TCP</a-select-option>\n            <a-select-option value=\"udp\">UDP</a-select-option>\n        </a-select>\n    </a-form-item>           \n    <a-form-item label='Follow Redirect'>\n        <a-switch v-model=\"inbound.settings.followRedirect\"></a-switch>\n    </a-form-item>\n    <a-form-item label='Timeout'>\n        <a-input-number v-model.number=\"inbound.settings.timeout\" :min=\"0\"></a-input-number>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/http.html",
    "content": "{{define \"form/http\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <table style=\"width: 100%; text-align: center; margin: 1rem 0;\">\n            <tr>\n                <td width=\"45%\">{{ i18n \"username\" }}</td>\n                <td width=\"45%\">{{ i18n \"password\" }}</td>\n                <td><a-button size=\"small\" @click=\"inbound.settings.addAccount(new Inbound.HttpSettings.HttpAccount())\">+</a-button></td>\n            </tr>\n        </table>\n        <a-input-group compact v-for=\"(account, index) in inbound.settings.accounts\" style=\"margin-bottom: 10px;\">\n            <a-input style=\"width: 50%\" v-model.trim=\"account.user\" placeholder='{{ i18n \"username\" }}'>\n                <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n            </a-input>\n            <a-input style=\"width: 50%\" v-model.trim=\"account.pass\" placeholder='{{ i18n \"password\" }}'>\n                <template slot=\"addonAfter\">\n                    <a-button size=\"small\" @click=\"inbound.settings.delAccount(index)\">-</a-button>\n                </template>\n            </a-input>\n        </a-input-group>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/shadowsocks.html",
    "content": "{{define \"form/shadowsocks\"}}\n<template v-if=\"inbound.isSSMultiUser\">\n    <a-collapse activeKey=\"0\" v-for=\"(client, index) in inbound.settings.shadowsockses.slice(0,1)\" v-if=\"!isEdit\">  \n        <a-collapse-panel header='{{ i18n \"pages.inbounds.client\" }}'>\n            {{template \"form/client\"}}\n        </a-collapse-panel>\n    </a-collapse>\n    <a-collapse v-else>\n        <a-collapse-panel :header=\"'{{ i18n \"pages.client.clientCount\"}} : ' + inbound.settings.shadowsockses.length\">\n            <table width=\"100%\">\n                <tr class=\"client-table-header\">\n                    <th>{{ i18n \"pages.inbounds.email\" }}</th>\n                    <th>Password</th>\n                </tr>\n                <tr v-for=\"(client, index) in inbound.settings.shadowsockses\" :class=\"index % 2 == 1 ? 'client-table-odd-row' : ''\">\n                    <td>[[ client.email ]]</td>\n                    <td>[[ client.password ]]</td>\n                </tr>\n            </table>\n        </a-collapse-panel>\n    </a-collapse>\n</template>\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"encryption\" }}'>\n        <a-select v-model=\"inbound.settings.method\" @change=\"SSMethodChange\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option v-for=\"(method,method_name) in SSMethods\" :value=\"method\">[[ method_name ]]</a-select-option>\n        </a-select>\n    </a-form-item>\n    <a-form-item v-if=\"inbound.isSS2022\">\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template> Password <a-icon @click=\"inbound.settings.password = RandomUtil.randomShadowsocksPassword()\" type=\"sync\"></a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"inbound.settings.password\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.network\" }}'>\n        <a-select v-model=\"inbound.settings.network\" style=\"width: 100px;\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"tcp,udp\">TCP,UDP</a-select-option>\n            <a-select-option value=\"tcp\">TCP</a-select-option>\n            <a-select-option value=\"udp\">UDP</a-select-option>\n        </a-select>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/socks.html",
    "content": "{{define \"form/socks\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"pages.inbounds.enable\" }} UDP'>\n        <a-switch v-model=\"inbound.settings.udp\"></a-switch>\n    </a-form-item>\n    <a-form-item label=\"IP\" v-if=\"inbound.settings.udp\">\n        <a-input v-model.trim=\"inbound.settings.ip\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"password\" }}'>\n        <a-switch :checked=\"inbound.settings.auth === 'password'\"\n        @change=\"checked => inbound.settings.auth = checked ? 'password' : 'noauth'\"></a-switch>\n    </a-form-item>\n    <template v-if=\"inbound.settings.auth === 'password'\">\n        <table style=\"width: 100%; text-align: center; margin: 1rem 0;\">\n            <tr>\n                <td width=\"45%\">{{ i18n \"username\" }}</td>\n                <td width=\"45%\">{{ i18n \"password\" }}</td>\n                <td><a-button size=\"small\" @click=\"inbound.settings.addAccount(new Inbound.SocksSettings.SocksAccount())\">+</a-button></td>\n            </tr>\n        </table>\n        <a-input-group compact v-for=\"(account, index) in inbound.settings.accounts\" style=\"margin-bottom: 10px;\">\n            <a-input style=\"width: 50%\" v-model.trim=\"account.user\" placeholder='{{ i18n \"username\" }}'>\n                <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n            </a-input>\n            <a-input style=\"width: 50%\" v-model.trim=\"account.pass\" placeholder='{{ i18n \"password\" }}'>\n                <template slot=\"addonAfter\">\n                    <a-button size=\"small\" @click=\"inbound.settings.delAccount(index)\">-</a-button>\n                </template>\n            </a-input>\n        </a-input-group>\n    </template>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/trojan.html",
    "content": "{{define \"form/trojan\"}}\n<a-collapse activeKey=\"0\" v-for=\"(client, index) in inbound.settings.trojans.slice(0,1)\" v-if=\"!isEdit\">  \n    <a-collapse-panel header='{{ i18n \"pages.inbounds.client\" }}'>\n        {{template \"form/client\"}}\n    </a-collapse-panel>\n</a-collapse>\n<a-collapse v-else>\n    <a-collapse-panel :header=\"'{{ i18n \"pages.client.clientCount\"}} : ' + inbound.settings.trojans.length\">\n        <table width=\"100%\">\n            <tr class=\"client-table-header\">\n                <th>{{ i18n \"pages.inbounds.email\" }}</th>\n                <th>Password</th>\n            </tr>\n            <tr v-for=\"(client, index) in inbound.settings.trojans\" :class=\"index % 2 == 1 ? 'client-table-odd-row' : ''\">\n                <td>[[ client.email ]]</td>\n                <td>[[ client.password ]]</td>\n            </tr>\n        </table>\n    </a-collapse-panel>\n</a-collapse>\n<template v-if=\"inbound.isTcp && !inbound.stream.isReality\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label=\"Fallbacks\">\n            <a-button type=\"primary\" size=\"small\" @click=\"inbound.settings.addFallback()\">+</a-button>\n        </a-form-item>\n    </a-form>\n\n    <!-- trojan fallbacks -->\n    <a-form v-for=\"(fallback, index) in inbound.settings.fallbacks\" :colon=\"false\" :label-col=\"{ md: {span:8} }\"\n        :wrapper-col=\"{ md: {span:14} }\">\n        <a-divider style=\"margin:0;\">\n            Fallback [[ index + 1 ]]\n            <a-icon type=\"delete\" @click=\"() => inbound.settings.delFallback(index)\"\n                style=\"color: rgb(255, 77, 79);cursor: pointer;\" />\n        </a-divider>\n        <a-form-item label='SNI'>\n            <a-input v-model=\"fallback.name\"></a-input>\n        </a-form-item>\n        <a-form-item label='ALPN'>\n            <a-input v-model=\"fallback.alpn\"></a-input>\n        </a-form-item>\n        <a-form-item label='Path'>\n            <a-input v-model=\"fallback.path\"></a-input>\n        </a-form-item>\n        <a-form-item label='Dest'>\n            <a-input v-model=\"fallback.dest\"></a-input>\n        </a-form-item>\n        <a-form-item label='xVer'>\n            <a-input-number v-model=\"fallback.xver\" :min=\"0\" :max=\"2\"></a-input-number>\n        </a-form-item>\n    </a-form>\n    <a-divider style=\"margin:5px 0;\"></a-divider>\n</template>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/vless.html",
    "content": "{{define \"form/vless\"}}\n<a-collapse activeKey=\"0\" v-for=\"(client, index) in inbound.settings.vlesses.slice(0,1)\" v-if=\"!isEdit\">    \n    <a-collapse-panel header='{{ i18n \"pages.inbounds.client\" }}'>\n        {{template \"form/client\"}}\n    </a-collapse-panel>\n</a-collapse>\n<a-collapse v-else>\n    <a-collapse-panel :header=\"'{{ i18n \"pages.client.clientCount\"}} : ' + inbound.settings.vlesses.length\">\n        <table width=\"100%\">\n            <tr class=\"client-table-header\">\n                <th>{{ i18n \"pages.inbounds.email\" }}</th>\n                <th>Flow</th>\n                <th>ID</th>\n            </tr>\n            <tr v-for=\"(client, index) in inbound.settings.vlesses\" :class=\"index % 2 == 1 ? 'client-table-odd-row' : ''\">\n                <td>[[ client.email ]]</td>\n                <td>[[ client.flow ]]</td>\n                <td>[[ client.id ]]</td>\n            </tr>\n        </table>\n    </a-collapse-panel>\n</a-collapse>\n<template v-if=\"inbound.isTcp && !inbound.stream.isReality\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label=\"Fallbacks\">\n            <a-button type=\"primary\" size=\"small\" @click=\"inbound.settings.addFallback()\">+</a-button>\n        </a-form-item>\n    </a-form>\n\n    <!-- vless fallbacks -->\n    <a-form v-for=\"(fallback, index) in inbound.settings.fallbacks\" :colon=\"false\" :label-col=\"{ md: {span:8} }\"\n        :wrapper-col=\"{ md: {span:14} }\">\n        <a-divider style=\"margin:0;\">\n            Fallback [[ index + 1 ]]\n            <a-icon type=\"delete\" @click=\"() => inbound.settings.delFallback(index)\"\n                style=\"color: rgb(255, 77, 79);cursor: pointer;\" />\n        </a-divider>\n        <a-form-item label='SNI'>\n            <a-input v-model=\"fallback.name\"></a-input>\n        </a-form-item>\n        <a-form-item label='ALPN'>\n            <a-input v-model=\"fallback.alpn\"></a-input>\n        </a-form-item>\n        <a-form-item label='Path'>\n            <a-input v-model=\"fallback.path\"></a-input>\n        </a-form-item>\n        <a-form-item label='Dest'>\n            <a-input v-model=\"fallback.dest\"></a-input>\n        </a-form-item>\n        <a-form-item label='xVer'>\n            <a-input-number v-model=\"fallback.xver\" :min=\"0\" :max=\"2\"></a-input-number>\n        </a-form-item>\n    </a-form>\n    <a-divider style=\"margin:5px 0;\"></a-divider>\n</template>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/vmess.html",
    "content": "{{define \"form/vmess\"}}\n<a-collapse activeKey=\"0\" v-for=\"(client, index) in inbound.settings.vmesses.slice(0,1)\" v-if=\"!isEdit\">    \n    <a-collapse-panel header='{{ i18n \"pages.inbounds.client\" }}'>\n        {{template \"form/client\"}}\n    </a-collapse-panel>\n</a-collapse>\n<a-collapse v-else>\n    <a-collapse-panel :header=\"'{{ i18n \"pages.client.clientCount\"}} : ' + inbound.settings.vmesses.length\">\n        <table width=\"100%\">\n            <tr class=\"client-table-header\">\n                <th>{{ i18n \"pages.inbounds.email\" }}</th>\n                <th>ID</th>\n            </tr>\n            <tr v-for=\"(client, index) in inbound.settings.vmesses\" :class=\"index % 2 == 1 ? 'client-table-odd-row' : ''\">\n                <td>[[ client.email ]]</td>\n                <td>[[ client.id ]]</td>\n            </tr>\n        </table>\n    </a-collapse-panel>\n</a-collapse>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/protocol/wireguard.html",
    "content": "{{define \"form/wireguard\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template>\n                {{ i18n \"pages.xray.wireguard.secretKey\" }}\n                <a-icon type=\"sync\"\n                    @click=\"[inbound.settings.pubKey, inbound.settings.secretKey] = Object.values(Wireguard.generateKeypair())\">\n                </a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"inbound.settings.secretKey\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.xray.wireguard.publicKey\" }}'>\n        <a-input disabled v-model=\"inbound.settings.pubKey\"></a-input>\n    </a-form-item>\n    <a-form-item label='MTU'>\n        <a-input-number v-model.number=\"inbound.settings.mtu\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='Kernel Mode'>\n        <a-switch v-model=\"inbound.settings.kernelMode\"></a-switch>\n    </a-form-item>\n    <a-form-item label=\"Peers\">\n        <a-button type=\"primary\" size=\"small\" @click=\"inbound.settings.addPeer()\">+</a-button>\n    </a-form-item>\n    <a-form v-for=\"(peer, index) in inbound.settings.peers\" :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-divider style=\"margin:0;\">\n            Peer [[ index + 1 ]]\n            <a-icon v-if=\"inbound.settings.peers.length>1\" type=\"delete\" @click=\"() => inbound.settings.delPeer(index)\"\n                    style=\"color: rgb(255, 77, 79);cursor: pointer;\"/>\n        </a-divider>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"reset\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.wireguard.secretKey\" }}\n                    <a-icon @click=\"[peer.publicKey, peer.privateKey] = Object.values(Wireguard.generateKeypair())\"type=\"sync\"> </a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"peer.privateKey\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                {{ i18n \"pages.xray.wireguard.publicKey\" }}\n            </template>\n            <a-input v-model.trim=\"peer.publicKey\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"reset\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.wireguard.psk\" }}\n                    <a-icon @click=\"peer.psk = Wireguard.keyToBase64(Wireguard.generatePresharedKey())\"type=\"sync\"> </a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"peer.psk\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                {{ i18n \"pages.xray.wireguard.allowedIPs\" }} <a-button type=\"primary\" size=\"small\" @click=\"peer.allowedIPs.push('')\">+</a-button>\n            </template>\n            <template v-for=\"(aip, index) in peer.allowedIPs\" style=\"margin-bottom: 10px;\">\n                <a-input v-model.trim=\"peer.allowedIPs[index]\">\n                    <a-button v-if=\"peer.allowedIPs.length>1\" slot=\"addonAfter\" size=\"small\" @click=\"peer.allowedIPs.splice(index, 1)\">-</a-button>\n                </a-input>\n            </template>\n        </a-form-item>\n        <a-form-item label='Keep Alive'>\n            <a-input-number v-model.number=\"peer.keepAlive\" :min=\"0\"></a-input>\n        </a-form-item>    \n    </a-form>\n</a-form>\n{{end}}"
  },
  {
    "path": "web/html/xui/form/sniffing.html",
    "content": "{{define \"form/sniffing\"}}\n<a-divider style=\"margin:5px 0 0;\"></a-divider>\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <a-form-item>\n    <span slot=\"label\">\n        Sniffing\n        <a-tooltip>\n            <template slot=\"title\">\n                <span>{{ i18n \"pages.inbounds.noRecommendKeepDefault\" }}</span>\n            </template>\n            <a-icon type=\"question-circle\"></a-icon>\n        </a-tooltip>\n    </span>\n    <a-switch v-model=\"inbound.sniffing.enabled\"></a-switch>\n  </a-form-item>\n  <template v-if=\"inbound.sniffing.enabled\">\n    <a-form-item :wrapper-col=\"{span:24}\">\n      <a-checkbox-group v-model=\"inbound.sniffing.destOverride\">\n        <a-checkbox v-for=\"key,value in SNIFFING_OPTION\" :value=\"key\">[[ value ]]</a-checkbox>\n      </a-checkbox-group>\n    </a-form-item>\n    <a-form-item label='Metadata Only'>\n      <a-switch v-model=\"inbound.sniffing.metadataOnly\"></a-switch>\n    </a-form-item>\n    <a-form-item label='Route Only'>\n      <a-switch v-model=\"inbound.sniffing.routeOnly\"></a-switch>\n    </a-form-item>\n  </template>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/external_proxy.html",
    "content": "{{define \"form/externalProxy\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-divider style=\"margin:5px 0 0;\"></a-divider>\n    <a-form-item label=\"External Proxy\">\n        <a-switch v-model=\"externalProxy\"></a-switch>\n        <a-button v-if=\"externalProxy\" type=\"primary\" style=\"margin-left: 10px\" size=\"small\" @click=\"inbound.stream.externalProxy.push({forceTls: 'same', dest: '', port: 443, remark: ''})\">+</a-button>\n    </a-form-item>\n    <a-input-group style=\"margin: 8px 0;\" compact v-for=\"(row, index) in inbound.stream.externalProxy\">\n        <template>\n            <a-tooltip title=\"Force TLS\">\n                <a-select v-model=\"row.forceTls\" style=\"width:20%; margin: 0px\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                    <a-select-option value=\"same\">{{ i18n \"pages.inbounds.same\" }}</a-select-option>\n                    <a-select-option value=\"none\">{{ i18n \"none\" }}</a-select-option>\n                    <a-select-option value=\"tls\">TLS</a-select-option>\n                </a-select>\n            </a-tooltip>\n        </template>\n        <a-input style=\"width: 35%\" v-model.trim=\"row.dest\" placeholder='{{ i18n \"host\" }}'></a-input>\n        <a-tooltip title='{{ i18n \"pages.inbounds.port\" }}'>\n            <a-input-number style=\"width: 15%;\" v-model.number=\"row.port\" min=\"1\" max=\"65531\"></a-input-number>\n        </a-tooltip>\n        <a-input style=\"width: 20%\" v-model.trim=\"row.remark\" placeholder='{{ i18n \"remark\" }}'></a-input>\n        <a-button style=\"width: 10%; margin: 0px; border-radius: 0 1rem 1rem 0;\" @click=\"inbound.stream.externalProxy.splice(index, 1)\">-</a-button>\n    </a-input-group>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_grpc.html",
    "content": "{{define \"form/streamGRPC\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label=\"Service Name\">\n        <a-input v-model.trim=\"inbound.stream.grpc.serviceName\"></a-input>\n    </a-form-item>\n    <a-form-item label=\"Authority\">\n        <a-input v-model.trim=\"inbound.stream.grpc.authority\"></a-input>\n    </a-form-item>\n    <a-form-item label=\"Multi Mode\">\n        <a-switch v-model=\"inbound.stream.grpc.multiMode\"></a-switch>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_http.html",
    "content": "{{define \"form/streamHTTP\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"path\" }}'>\n        <a-input v-model.trim=\"inbound.stream.http.path\"></a-input>\n    </a-form-item>\n    <a-form-item>\n        <template slot=\"label\">{{ i18n \"host\" }}\n            <a-button size=\"small\" @click=\"inbound.stream.http.addHost()\">+</a-button>\n        </template>\n        <template v-for=\"(host, index) in inbound.stream.http.host\">\n            <a-input v-model.trim=\"inbound.stream.http.host[index]\">\n                <a-button size=\"small\" slot=\"addonAfter\"\n                @click=\"inbound.stream.http.removeHost(index)\"\n                v-if=\"inbound.stream.http.host.length>1\">-</a-button>\n            </a-input>\n        </template>\n    </a-form-item>\n</a-form>\n{{end}}"
  },
  {
    "path": "web/html/xui/form/stream/stream_httpupgrade.html",
    "content": "{{define \"form/streamHTTPUpgrade\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <a-form-item label=\"Proxy Protocol\">\n    <a-switch v-model=\"inbound.stream.httpupgrade.acceptProxyProtocol\"></a-switch>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"host\" }}'>\n    <a-input v-model.trim=\"inbound.stream.httpupgrade.host\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"path\" }}'>\n    <a-input v-model.trim=\"inbound.stream.httpupgrade.path\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.requestHeader\" }}'>\n    <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.httpupgrade.addHeader('host', '')\"></a-button>\n  </a-form-item>\n  <a-form-item :wrapper-col=\"{span:24}\">\n    <a-input-group compact v-for=\"(header, index) in inbound.stream.httpupgrade.headers\">\n      <a-input style=\"width: 50%\" v-model.trim=\"header.name\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\"}}'>\n        <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n      </a-input>\n      <a-input style=\"width: 50%\" v-model.trim=\"header.value\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n        <a-button icon=\"minus\" slot=\"addonAfter\" size=\"small\" @click=\"inbound.stream.httpupgrade.removeHeader(index)\"></a-button>\n      </a-input>\n    </a-input-group>\n  </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_kcp.html",
    "content": "{{define \"form/streamKCP\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"camouflage\" }}'>\n        <a-select v-model=\"inbound.stream.kcp.type\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"none\">None</a-select-option>\n            <a-select-option value=\"srtp\">SRTP</a-select-option>\n            <a-select-option value=\"utp\">uTP</a-select-option>\n            <a-select-option value=\"wechat-video\">WeChat</a-select-option>\n            <a-select-option value=\"dtls\">DTLS 1.2</a-select-option>\n            <a-select-option value=\"wireguard\">WireGuard</a-select-option>\n        </a-select>\n    </a-form-item>\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template>\n                {{ i18n \"password\" }}\n                <a-icon @click=\"inbound.stream.kcp.seed = RandomUtil.randomSeq(10)\"type=\"sync\"> </a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"inbound.stream.kcp.seed\"></a-input>\n    </a-form-item>\n    <a-form-item label='MTU'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.mtu\" :min=\"576\" :max=\"1460\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='TTI (ms)'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.tti\" :min=\"10\" :max=\"100\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='Uplink (MB/s)'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.upCap\" :min=\"0\"></a-input-number>\n    </a-form-item> \n    <a-form-item label='Downlink (MB/s)'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.downCap\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='Congestion'>\n        <a-switch v-model=\"inbound.stream.kcp.congestion\"></a-switch>\n    </a-form-item>\n    <a-form-item label='Read Buffer (MB)'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.readBuffer\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='Write Buffer (MB)'>\n        <a-input-number v-model.number=\"inbound.stream.kcp.writeBuffer\" :min=\"0\"></a-input-number>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_quic.html",
    "content": "{{define \"form/streamQUIC\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"pages.inbounds.stream.quic.encryption\" }}'>\n        <a-select v-model=\"inbound.stream.quic.security\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"none\">None</a-select-option>\n            <a-select-option value=\"aes-128-gcm\">AES-128-GCM</a-select-option>\n            <a-select-option value=\"chacha20-poly1305\">CHACHA20-POLY1305</a-select-option>\n        </a-select>\n    </a-form-item>\n    <a-form-item>\n        <template slot=\"label\">\n            <a-tooltip>\n                <template slot=\"title\">\n                    <span>{{ i18n \"reset\" }}</span>\n                </template>\n                {{ i18n \"password\" }}\n                <a-icon @click=\"inbound.stream.quic.key = RandomUtil.randomSeq(10)\"type=\"sync\"> </a-icon>\n            </a-tooltip>\n        </template>\n        <a-input v-model.trim=\"inbound.stream.quic.key\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"camouflage\" }}'>\n        <a-select v-model=\"inbound.stream.quic.type\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"none\">None</a-select-option>\n            <a-select-option value=\"srtp\">SRTP</a-select-option>\n            <a-select-option value=\"utp\">uTP</a-select-option>\n            <a-select-option value=\"wechat-video\">WeChat</a-select-option>\n            <a-select-option value=\"dtls\">DTLS 1.2</a-select-option>\n            <a-select-option value=\"wireguard\">WireGuard</a-select-option>\n        </a-select>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_settings.html",
    "content": "{{define \"form/streamSettings\"}}\n<!-- select stream network -->\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"transmission\" }}'>\n        <a-select v-model=\"inbound.stream.network\" style=\"width: 75%\" @change=\"streamNetworkChange\"\n            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n            <a-select-option value=\"tcp\">TCP</a-select-option>\n            <a-select-option value=\"kcp\">mKCP</a-select-option>\n            <a-select-option value=\"ws\">WebSocket</a-select-option>\n            <a-select-option value=\"http\">H2</a-select-option>\n            <a-select-option value=\"quic\">QUIC</a-select-option>\n            <a-select-option value=\"grpc\">gRPC</a-select-option>\n            <a-select-option value=\"httpupgrade\">HTTPUpgrade</a-select-option>\n            <a-select-option value=\"splithttp\">SplitHTTP</a-select-option>\n        </a-select>\n    </a-form-item>\n</a-form>\n\n<!-- tcp -->\n<template v-if=\"inbound.stream.network === 'tcp'\">\n    {{template \"form/streamTCP\"}}\n</template>\n\n<!-- kcp -->\n<template v-if=\"inbound.stream.network === 'kcp'\">\n    {{template \"form/streamKCP\"}}\n</template>\n\n<!-- ws -->\n<template v-if=\"inbound.stream.network === 'ws'\">\n    {{template \"form/streamWS\"}}\n</template>\n\n<!-- http -->\n<template v-if=\"inbound.stream.network === 'http'\">\n    {{template \"form/streamHTTP\"}}\n</template>\n\n<!-- quic -->\n<template v-if=\"inbound.stream.network === 'quic'\">\n    {{template \"form/streamQUIC\"}}\n</template>\n\n<!-- grpc -->\n<template v-if=\"inbound.stream.network === 'grpc'\">\n    {{template \"form/streamGRPC\"}}\n</template>\n\n<!-- httpupgrade -->\n<template v-if=\"inbound.stream.network === 'httpupgrade'\">\n    {{template \"form/streamHTTPUpgrade\"}}\n</template>\n\n<!-- splithttp -->\n<template v-if=\"inbound.stream.network === 'splithttp'\">\n    {{template \"form/streamSplitHTTP\"}}\n</template>\n\n<!-- sockopt -->\n<template>\n    {{template \"form/streamSockopt\"}}\n</template>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_sockopt.html",
    "content": "{{define \"form/streamSockopt\"}}\n<a-divider style=\"margin:5px 0 0;\"></a-divider>\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label=\"Sockopt\">\n        <a-switch v-model=\"inbound.stream.sockoptSwitch\"></a-switch>\n    </a-form-item>\n    <template v-if=\"inbound.stream.sockoptSwitch\">\n        <a-form-item label=\"Route Mark\">\n            <a-input-number v-model=\"inbound.stream.sockopt.mark\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"TCP Keep Alive Interval\">\n            <a-input-number v-model=\"inbound.stream.sockopt.tcpKeepAliveInterval\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"TCP Keep Alive Idle\">\n            <a-input-number v-model=\"inbound.stream.sockopt.tcpKeepAliveIdle\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"TCP Max Seg\">\n            <a-input-number v-model=\"inbound.stream.sockopt.tcpMaxSeg\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"TCP User Timeout\">\n            <a-input-number v-model=\"inbound.stream.sockopt.tcpUserTimeout\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"TCP Window Clamp\">\n            <a-input-number v-model=\"inbound.stream.sockopt.tcpWindowClamp\" :min=\"0\"></a-input-number>\n        </a-form-item>\n        <a-form-item label=\"Proxy Protocol\">\n            <a-switch v-model=\"inbound.stream.sockopt.acceptProxyProtocol\"></a-switch>\n        </a-form-item>\n        <a-form-item label=\"TCP Fast Open\">\n            <a-switch v-model.trim=\"inbound.stream.sockopt.tcpFastOpen\"></a-switch>\n        </a-form-item>\n        <a-form-item label=\"Multipath TCP\">\n            <a-switch v-model.trim=\"inbound.stream.sockopt.tcpMptcp\"></a-switch>\n        </a-form-item>\n        <a-form-item label=\"TCP No-Delay\">\n            <a-switch v-model.trim=\"inbound.stream.sockopt.tcpNoDelay\"></a-switch>\n        </a-form-item>\n        <a-form-item label=\"V6 Only\">\n            <a-switch v-model.trim=\"inbound.stream.sockopt.V6Only\"></a-switch>\n        </a-form-item>\n        <a-form-item label='Domain Strategy'>\n            <a-select v-model=\"inbound.stream.sockopt.domainStrategy\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n              <a-select-option v-for=\"key in DOMAIN_STRATEGY_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='TCP Congestion'>\n            <a-select v-model=\"inbound.stream.sockopt.tcpcongestion\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n              <a-select-option v-for=\"key in TCP_CONGESTION_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"TProxy\">\n            <a-select v-model=\"inbound.stream.sockopt.tproxy\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"off\">Off</a-select-option>\n                <a-select-option value=\"redirect\">Redirect</a-select-option>\n                <a-select-option value=\"tproxy\">TProxy</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label=\"Dialer Proxy\">\n            <a-input v-model=\"inbound.stream.sockopt.dialerProxy\"></a-input>\n        </a-form-item>\n        <a-form-item label=\"Interface Name\">\n            <a-input v-model=\"inbound.stream.sockopt.interfaceName\"></a-input>\n        </a-form-item>\n    </template>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_splithttp.html",
    "content": "{{define \"form/streamSplitHTTP\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n    <a-form-item label='{{ i18n \"host\" }}'>\n        <a-input v-model.trim=\"inbound.stream.splithttp.host\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"path\" }}'>\n      <a-input v-model.trim=\"inbound.stream.splithttp.path\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.requestHeader\" }}'>\n      <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.splithttp.addHeader('host', '')\"></a-button>\n    </a-form-item>\n    <a-form-item :wrapper-col=\"{span:24}\">\n        <a-input-group compact v-for=\"(header, index) in inbound.stream.splithttp.headers\">\n            <a-input style=\"width: 50%\" v-model.trim=\"header.name\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\"}}'>\n                <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n            </a-input>\n            <a-input style=\"width: 50%\" v-model.trim=\"header.value\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n                <a-button slot=\"addonAfter\" size=\"small\" @click=\"inbound.stream.splithttp.removeHeader(index)\">-</a-button>\n            </a-input>\n        </a-input-group>\n    </a-form-item>\n    <a-form-item label=\"Max Upload Size (MB)\">\n        <a-input-number v-model=\"inbound.stream.splithttp.maxUploadSize\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item label=\"Max Concurrent Upload\">\n        <a-input-number v-model=\"inbound.stream.splithttp.maxConcurrentUploads\" :min=\"0\"></a-input-number>\n    </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_tcp.html",
    "content": "{{define \"form/streamTCP\"}}\n<!-- tcp type -->\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <a-form-item label=\"Proxy Protocol\" v-if=\"inbound.canEnableTls()\">\n    <a-switch v-model=\"inbound.stream.tcp.acceptProxyProtocol\"></a-switch>\n  </a-form-item>\n  <a-form-item label='HTTP {{ i18n \"camouflage\" }}'>\n    <a-switch :checked=\"inbound.stream.tcp.type === 'http'\" @change=\"checked => inbound.stream.tcp.type = checked ? 'http' : 'none'\"></a-switch>\n  </a-form-item>\n</a-form>\n\n<a-form v-if=\"inbound.stream.tcp.type === 'http'\" :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <!-- tcp request -->\n  <a-divider style=\"margin:0;\">{{ i18n \"pages.inbounds.stream.general.request\" }}</a-divider>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.version\" }}'>\n    <a-input v-model.trim=\"inbound.stream.tcp.request.version\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.method\" }}'>\n    <a-input v-model.trim=\"inbound.stream.tcp.request.method\"></a-input>\n  </a-form-item>\n  <a-form-item>\n    <template slot=\"label\">{{ i18n \"pages.inbounds.stream.tcp.path\" }}\n      <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.tcp.request.addPath('/')\"></a-button>\n    </template>\n    <template v-for=\"(path, index) in inbound.stream.tcp.request.path\">\n      <a-input v-model.trim=\"inbound.stream.tcp.request.path[index]\">\n        <a-button icon=\"minus\" size=\"small\" slot=\"addonAfter\" @click=\"inbound.stream.tcp.request.removePath(index)\" v-if=\"inbound.stream.tcp.request.path.length>1\"></a-button>\n      </a-input>\n    </template>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.requestHeader\" }}'>\n    <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.tcp.request.addHeader('Host', '')\"></a-button>\n  </a-form-item>\n  <a-form-item :wrapper-col=\"{span:24}\">\n    <a-input-group compact v-for=\"(header, index) in inbound.stream.tcp.request.headers\">\n      <a-input style=\"width: 50%\" v-model.trim=\"header.name\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\" }}'>\n        <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n      </a-input>\n      <a-input style=\"width: 50%\" v-model.trim=\"header.value\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n        <a-button icon=\"minus\" slot=\"addonAfter\" size=\"small\" @click=\"inbound.stream.tcp.request.removeHeader(index)\"></a-button>\n      </a-input>\n    </a-input-group>\n  </a-form-item>\n\n  <!-- tcp response -->\n  <a-divider style=\"margin:0;\">{{ i18n \"pages.inbounds.stream.general.response\" }}</a-divider>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.version\" }}'>\n    <a-input v-model.trim=\"inbound.stream.tcp.response.version\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.status\" }}'>\n    <a-input v-model.trim=\"inbound.stream.tcp.response.status\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.statusDescription\" }}'>\n    <a-input v-model.trim=\"inbound.stream.tcp.response.reason\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.responseHeader\" }}'>\n    <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')\"></a-button>\n  </a-form-item>\n  <a-form-item :wrapper-col=\"{span:24}\">\n    <a-input-group compact v-for=\"(header, index) in inbound.stream.tcp.response.headers\">\n      <a-input style=\"width: 50%\" v-model.trim=\"header.name\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\" }}'>\n        <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n      </a-input>\n      <a-input style=\"width: 50%\" v-model.trim=\"header.value\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n        <template slot=\"addonAfter\">\n          <a-button icon=\"minus\" size=\"small\" @click=\"inbound.stream.tcp.response.removeHeader(index)\"></a-button>\n        </template>\n      </a-input>\n    </a-input-group>\n  </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/stream/stream_ws.html",
    "content": "{{define \"form/streamWS\"}}\n<a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <a-form-item label=\"Proxy Protocol\">\n    <a-switch v-model=\"inbound.stream.ws.acceptProxyProtocol\"></a-switch>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"host\" }}'>\n    <a-input v-model.trim=\"inbound.stream.ws.host\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"path\" }}'>\n    <a-input v-model.trim=\"inbound.stream.ws.path\"></a-input>\n  </a-form-item>\n  <a-form-item label='{{ i18n \"pages.inbounds.stream.tcp.requestHeader\" }}'>\n    <a-button icon=\"plus\" size=\"small\" @click=\"inbound.stream.ws.addHeader('host', '')\"></a-button>\n  </a-form-item>\n  <a-form-item :wrapper-col=\"{span:24}\">\n    <a-input-group compact v-for=\"(header, index) in inbound.stream.ws.headers\">\n      <a-input style=\"width: 50%\" v-model.trim=\"header.name\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\"}}'>\n        <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n      </a-input>\n      <a-input style=\"width: 50%\" v-model.trim=\"header.value\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n        <a-button icon=\"minus\" slot=\"addonAfter\" size=\"small\" @click=\"inbound.stream.ws.removeHeader(index)\"></a-button>\n      </a-input>\n    </a-input-group>\n  </a-form-item>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/form/tls_settings.html",
    "content": "{{define \"form/tlsSettings\"}}\n<!-- tls enable -->\n<a-form v-if=\"inbound.canEnableTls()\" :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n  <a-divider style=\"margin:3px 0;\"></a-divider>\n  <a-form-item label='{{ i18n \"security\" }}'>\n    <a-radio-group v-model=\"inbound.stream.security\" button-style=\"solid\">\n      <a-radio-button value=\"none\">{{ i18n \"none\" }}</a-radio-button>\n      <a-tooltip>\n        <template slot=\"title\">\n          <span>{{ i18n \"pages.inbounds.xtlsDesc\" }}</span>\n        </template>\n        <a-radio-button v-if=\"inbound.canEnableXtls()\" value=\"xtls\">XTLS</a-radio-button>\n      </a-tooltip>\n      <a-tooltip>\n        <template slot=\"title\">\n          <span>{{ i18n \"pages.inbounds.realityDesc\" }}</span>\n        </template>\n        <a-radio-button v-if=\"inbound.canEnableReality()\" value=\"reality\">REALITY</a-radio-button>\n      </a-tooltip>\n      <a-radio-button value=\"tls\">TLS</a-radio-button>\n    </a-radio-group>\n  </a-form-item>\n\n  <!-- tls settings -->\n  <template v-if=\"inbound.stream.isTls\">\n    <a-form-item label=\"SNI\" placeholder=\"Server Name Indication\">\n      <a-input v-model.trim=\"inbound.stream.tls.sni\"></a-input>\n    </a-form-item>\n    <a-form-item label=\"Cipher Suites\">\n      <a-select v-model=\"inbound.stream.tls.cipherSuites\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n        <a-select-option value=\"\">Auto</a-select-option>\n        <a-select-option v-for=\"key,value in TLS_CIPHER_OPTION\" :value=\"key\">[[ value ]]</a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label=\"Min/Max Version\">\n      <a-input-group compact>\n        <a-select v-model=\"inbound.stream.tls.minVersion\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n          <a-select-option v-for=\"key in TLS_VERSION_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n        <a-select v-model=\"inbound.stream.tls.maxVersion\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n          <a-select-option v-for=\"key in TLS_VERSION_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n      </a-input-group>\n    </a-form-item>\n    <a-form-item label=\"uTLS\">\n      <a-select v-model=\"inbound.stream.tls.settings.fingerprint\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n        <a-select-option value=''>None</a-select-option>\n        <a-select-option v-for=\"key in UTLS_FINGERPRINT\" :value=\"key\">[[ key ]]</a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label=\"ALPN\">\n      <a-select mode=\"multiple\" :dropdown-class-name=\"themeSwitcher.currentTheme\" v-model=\"inbound.stream.tls.alpn\">\n        <a-select-option v-for=\"alpn in ALPN_OPTION\" :value=\"alpn\">[[ alpn ]]</a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label=\"Allow Insecure\">\n      <a-switch v-model=\"inbound.stream.tls.settings.allowInsecure\"></a-switch>\n    </a-form-item>\n    <a-form-item label=\"Reject Unknown SNI\">\n      <a-switch v-model=\"inbound.stream.tls.rejectUnknownSni\"></a-switch>\n    </a-form-item>\n    <a-form-item label=\"Disable System Root\">\n      <a-switch v-model=\"inbound.stream.tls.settings.disableSystemRoot\"></a-switch>\n    </a-form-item>\n    <a-form-item label=\"Session Resumption\">\n      <a-switch v-model=\"inbound.stream.tls.settings.enableSessionResumption\"></a-switch>\n    </a-form-item>\n    <template v-for=\"cert,index in inbound.stream.tls.certs\">\n      <a-form-item label='{{ i18n \"certificate\" }}'>\n        <a-radio-group v-model=\"cert.useFile\" button-style=\"solid\">\n          <a-radio-button :value=\"true\">{{ i18n \"pages.inbounds.certificatePath\" }}</a-radio-button>\n          <a-radio-button :value=\"false\">{{ i18n \"pages.inbounds.certificateContent\" }}</a-radio-button>\n        </a-radio-group>\n        <a-button icon=\"plus\" v-if=\"index === 0\" type=\"primary\" size=\"small\" @click=\"inbound.stream.tls.addCert()\" style=\"margin-left: 10px\"></a-button>\n        <a-button icon=\"minus\" v-if=\"inbound.stream.tls.certs.length>1\" type=\"primary\" size=\"small\" @click=\"inbound.stream.tls.removeCert(index)\" style=\"margin-left: 10px\"></a-button>\n      </a-form-item>\n      <template v-if=\"cert.useFile\">\n        <a-form-item label='{{ i18n \"pages.inbounds.publicKey\" }}'>\n          <a-input v-model.trim=\"cert.certFile\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.inbounds.privatekey\" }}'>\n          <a-input v-model.trim=\"cert.keyFile\"></a-input>\n        </a-form-item>\n        <a-form-item label=\" \">\n          <a-button type=\"primary\" icon=\"import\" @click=\"setDefaultCertData(index)\">{{ i18n \"pages.inbounds.setDefaultCert\" }}</a-button>\n        </a-form-item>\n      </template>\n      <template v-else>\n        <a-form-item label='{{ i18n \"pages.inbounds.publicKey\" }}'>\n          <a-input type=\"textarea\" :rows=\"3\" v-model=\"cert.cert\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.inbounds.privatekey\" }}'>\n          <a-input type=\"textarea\" :rows=\"3\" v-model=\"cert.key\"></a-input>\n        </a-form-item>\n      </template>\n      <a-form-item label='OCSP stapling'>\n        <a-input-number v-model.number=\"cert.ocspStapling\" :min=\"0\"></a-input-number>\n      </a-form-item>\n      <a-form-item label=\"One Time Loading\">\n        <a-switch v-model=\"cert.oneTimeLoading\"></a-switch>\n      </a-form-item>\n      <a-form-item label='Usage Option'>\n        <a-select v-model=\"cert.usage\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n          <a-select-option v-for=\"key in USAGE_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n      </a-form-item>\n    </template>\n  </template>\n\n  <!-- xtls settings -->\n  <template v-else-if=\"inbound.xtls\">\n    <a-form-item label=\"SNI\" placeholder=\"Server Name Indication\">\n      <a-input v-model.trim=\"inbound.stream.xtls.sni\"></a-input>\n    </a-form-item>\n    <a-form-item label=\"ALPN\">\n      <a-select mode=\"multiple\" :dropdown-class-name=\"themeSwitcher.currentTheme\" v-model=\"inbound.stream.xtls.alpn\">\n        <a-select-option v-for=\"alpn in ALPN_OPTION\" :value=\"alpn\">[[ alpn ]]</a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label=\"Allow Insecure\">\n      <a-switch v-model=\"inbound.stream.xtls.settings.allowInsecure\"></a-switch>\n    </a-form-item>\n    <template v-for=\"cert,index in inbound.stream.xtls.certs\">\n      <a-form-item label='{{ i18n \"certificate\" }}'>\n        <a-radio-group v-model=\"cert.useFile\" button-style=\"solid\">\n          <a-radio-button :value=\"true\">{{ i18n \"pages.inbounds.certificatePath\" }}</a-radio-button>\n          <a-radio-button :value=\"false\">{{ i18n \"pages.inbounds.certificateContent\" }}</a-radio-button>\n        </a-radio-group>\n        <a-button icon=\"plus\" v-if=\"index === 0\" type=\"primary\" size=\"small\" @click=\"inbound.stream.xtls.addCert()\" style=\"margin-left: 10px\"></a-button>\n        <a-button icon=\"minus\" v-if=\"inbound.stream.xtls.certs.length>1\" type=\"primary\" size=\"small\" @click=\"inbound.stream.xtls.removeCert(index)\" style=\"margin-left: 10px\"></a-button>\n      </a-form-item>\n      <template v-if=\"cert.useFile\">\n        <a-form-item label='{{ i18n \"pages.inbounds.publicKey\" }}'>\n          <a-input v-model.trim=\"cert.certFile\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.inbounds.privatekey\" }}'>\n          <a-input v-model.trim=\"cert.keyFile\"></a-input>\n        </a-form-item>\n        <a-form-item label=\" \">\n          <a-button type=\"primary\" icon=\"import\" @click=\"setDefaultCertXtls(index)\">{{ i18n \"pages.inbounds.setDefaultCert\" }}</a-button>\n        </a-form-item>\n      </template>\n      <template v-else>\n        <a-form-item label='{{ i18n \"pages.inbounds.publicKey\" }}'>\n          <a-input type=\"textarea\" :rows=\"3\" v-model=\"cert.cert\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.inbounds.privatekey\" }}'>\n          <a-input type=\"textarea\" :rows=\"3\" v-model=\"cert.key\"></a-input>\n        </a-form-item>\n      </template>\n      <a-form-item label='OCSP stapling'>\n        <a-input-number v-model.number=\"cert.ocspStapling\" :min=\"0\"></a-input-number>\n      </a-form-item>\n      <a-form-item label=\"One Time Loading\">\n        <a-switch v-model=\"cert.oneTimeLoading\"></a-switch>\n      </a-form-item>\n      <a-form-item label='Usage Option'>\n        <a-select v-model=\"cert.usage\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n          <a-select-option v-for=\"key in USAGE_OPTION\" :value=\"key\">[[ key ]]</a-select-option>\n        </a-select>\n      </a-form-item>\n    </template>\n  </template>\n\n  <!-- reality settings -->\n  <template v-if=\"inbound.stream.isReality\">\n    <a-form-item label='Show'>\n      <a-switch v-model=\"inbound.stream.reality.show\"></a-switch>\n    </a-form-item>\n    <a-form-item label='Xver'>\n      <a-input-number v-model.number=\"inbound.stream.reality.xver\" :min=\"0\"></a-input-number>\n    </a-form-item>\n    <a-form-item label='uTLS'>\n      <a-select v-model=\"inbound.stream.reality.settings.fingerprint\" style=\"width: 50%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n        <a-select-option v-for=\"key in UTLS_FINGERPRINT\" :value=\"key\">[[ key ]]</a-select-option>\n      </a-select>\n    </a-form-item>\n    <a-form-item label='Dest'>\n      <a-input v-model.trim=\"inbound.stream.reality.dest\"></a-input>\n    </a-form-item>\n    <a-form-item label='SNI'>\n      <a-input v-model.trim=\"inbound.stream.reality.serverNames\"></a-input>\n    </a-form-item>\n    <a-form-item>\n      <template slot=\"label\">\n        <a-tooltip>\n          <template slot=\"title\">\n            <span>{{ i18n \"reset\" }}</span>\n          </template> Short ID <a-icon @click=\"inbound.stream.reality.shortIds = RandomUtil.randomShortId()\" type=\"sync\"></a-icon>\n        </a-tooltip>\n      </template>\n      <a-input v-model.trim=\"inbound.stream.reality.shortIds\"></a-input>\n    </a-form-item>\n    <a-form-item label='SpiderX'>\n      <a-input v-model.trim=\"inbound.stream.reality.settings.spiderX\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.privatekey\" }}'>\n      <a-input v-model.trim=\"inbound.stream.reality.privateKey\"></a-input>\n    </a-form-item>\n    <a-form-item label='{{ i18n \"pages.inbounds.publicKey\" }}'>\n      <a-input v-model.trim=\"inbound.stream.reality.settings.publicKey\"></a-input>\n    </a-form-item>\n    <a-form-item label=\" \">\n      <a-button type=\"primary\" icon=\"import\" @click=\"getNewX25519Cert\">Get New Cert（随机获取新证书）</a-button>\n    </a-form-item>\n  </template>\n</a-form>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/inbound_client_table.html",
    "content": "{{define \"client_table\"}}\n<template slot=\"actions\" slot-scope=\"text, client, index\">\n    <a-tooltip>\n        <template slot=\"title\">{{ i18n \"qrCode\" }}</template>\n        <a-icon style=\"font-size: 24px;\" class=\"normal-icon\" type=\"qrcode\" v-if=\"record.hasLink()\" @click=\"showQrcode(record.id,client);\"></a-icon>\n    </a-tooltip>\n    <a-tooltip>\n        <template slot=\"title\">{{ i18n \"pages.client.edit\" }}</template>\n        <a-icon style=\"font-size: 24px;\" class=\"normal-icon\" type=\"edit\" @click=\"openEditClient(record.id,client);\"></a-icon>\n    </a-tooltip>\n    <a-tooltip>\n        <template slot=\"title\">{{ i18n \"info\" }}</template>\n        <a-icon style=\"font-size: 24px;\" class=\"normal-icon\" type=\"info-circle\" @click=\"showInfo(record.id,client);\"></a-icon>\n    </a-tooltip>\n    <a-tooltip>\n        <template slot=\"title\">{{ i18n \"pages.inbounds.resetTraffic\" }}</template>\n        <a-popconfirm @confirm=\"resetClientTraffic(client,record.id,false)\"\n            title='{{ i18n \"pages.inbounds.resetTrafficContent\"}}'\n            :overlay-class-name=\"themeSwitcher.currentTheme\"\n            ok-text='{{ i18n \"reset\"}}'\n            cancel-text='{{ i18n \"cancel\"}}'>\n            <a-icon slot=\"icon\" type=\"question-circle-o\" :style=\"themeSwitcher.isDarkTheme ? 'color: var(--color-primary-100)' : 'color: var(--color-primary-100)'\"></a-icon>\n            <a-icon style=\"font-size: 24px; cursor: pointer;\" class=\"normal-icon\" type=\"retweet\" v-if=\"client.email.length > 0\"></a-icon>\n        </a-popconfirm>\n    </a-tooltip>\n    <a-tooltip>\n        <template slot=\"title\"><span style=\"color: #FF4D4F\"> {{ i18n \"delete\"}}</span></template>\n        <a-popconfirm @confirm=\"delClient(record.id,client,false)\"\n            title='{{ i18n \"pages.inbounds.deleteClientContent\"}}'\n            :overlay-class-name=\"themeSwitcher.currentTheme\"\n            ok-text='{{ i18n \"delete\"}}'\n            ok-type=\"danger\"\n            cancel-text='{{ i18n \"cancel\"}}'>\n            <a-icon slot=\"icon\" type=\"question-circle-o\" style=\"color: #e04141\"></a-icon>\n            <a-icon style=\"font-size: 24px; cursor: pointer;\" class=\"delete-icon\" type=\"delete\" v-if=\"isRemovable(record.id)\"></a-icon>\n        </a-popconfirm>\n    </a-tooltip>\n</template>\n<template slot=\"enable\" slot-scope=\"text, client, index\">\n    <a-switch v-model=\"client.enable\" @change=\"switchEnableClient(record.id,client)\"></a-switch>\n</template>   \n<template slot=\"online\" slot-scope=\"text, client, index\">\n    <template v-if=\"client.enable && isClientOnline(client.email)\">\n        <a-tag color=\"green\">{{ i18n \"online\" }}</a-tag>\n    </template>\n    <template v-else>\n        <a-tag>{{ i18n \"offline\" }}</a-tag>\n    </template>\n</template>\n<template slot=\"client\" slot-scope=\"text, client\">\n    <a-tooltip>\n        <template slot=\"title\">\n            <template v-if=\"!isClientEnabled(record, client.email)\">{{ i18n \"depleted\" }}</template>\n            <template v-else-if=\"!client.enable\">{{ i18n \"disabled\" }}</template>\n            <template v-else-if=\"client.enable && isClientOnline(client.email)\">{{ i18n \"online\" }}</template>\n        </template>\n    <a-badge :class=\"isClientOnline(client.email)? 'online-animation' : ''\" :color=\"client.enable ? statsExpColor(record, client.email) : themeSwitcher.isDarkTheme ? '#2c3950' : '#bcbcbc'\">\n    </a-badge>\n    </a-tooltip>\n    [[ client.email ]]\n</template>                                    \n<template slot=\"traffic\" slot-scope=\"text, client\">\n    <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n        <template slot=\"content\" v-if=\"client.email\">\n            <table cellpadding=\"2\" width=\"100%\">\n                <tr>\n                    <td>↑[[ sizeFormat(getUpStats(record, client.email)) ]]</td>\n                    <td>↓[[ sizeFormat(getDownStats(record, client.email)) ]]</td>\n                </tr>\n                <tr v-if=\"client.totalGB > 0\">\n                    <td>{{ i18n \"remained\" }}</td>\n                    <td>[[ sizeFormat(getRemStats(record, client.email)) ]]</td>\n                </tr>\n            </table>\n        </template>\n        <table>\n            <tr>\n                <td width=\"80px\" style=\"margin:0; text-align: right;font-size: 1em;\">\n                    [[ sizeFormat(getSumStats(record, client.email)) ]]\n                </td>\n                <td width=\"120px\" v-if=\"!client.enable\">\n                    <a-progress :stroke-color=\"themeSwitcher.isDarkTheme ? 'rgb(72 84 105)' : '#bcbcbc'\"\n                                :show-info=\"false\"\n                                :percent=\"statsProgress(record, client.email)\"/>\n                </td>\n                <td width=\"120px\" v-else-if=\"client.totalGB > 0\">\n                    <a-progress :stroke-color=\"clientStatsColor(record, client.email)\"\n                                :show-info=\"false\"\n                                :status=\"isClientEnabled(record, client.email)? 'exception' : ''\"\n                                :percent=\"statsProgress(record, client.email)\"/>\n                </td>\n                <td width=\"120px\" v-else class=\"infinite-bar\">\n                    <a-progress\n                    :show-info=\"false\"\n                    :percent=\"100\"></a-progress>\n                </td>\n                <td width=\"60px\">\n                    <template v-if=\"client.totalGB > 0\">[[ client._totalGB + \"GB\" ]]</template>\n                    <span v-else style=\"font-weight: 100;font-size: 14pt;\">&infin;</span>\n                </td>\n            </tr>\n        </table>\n    </a-popover>\n</template>                                    \n<template slot=\"expiryTime\" slot-scope=\"text, client, index\">\n    <template v-if=\"client.expiryTime !=0 && client.reset >0\">\n        <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n            <template slot=\"content\">\n                <span v-if=\"client.expiryTime < 0\">{{ i18n \"pages.client.delayedStart\" }}</span>\n                <span v-else>[[ DateUtil.formatMillis(client._expiryTime) ]]</span>\n            </template>\n            <table>\n                <tr>\n                    <td width=\"80px\" style=\"margin:0; text-align: right;font-size: 1em;\">\n                        [[ remainedDays(client.expiryTime) ]]\n                    </td>\n                    <td width=\"120px\" class=\"infinite-bar\">\n                        <a-progress :show-info=\"false\"\n                        :status=\"isClientEnabled(record, client.email)? 'exception' : ''\"\n                        :percent=\"expireProgress(client.expiryTime, client.reset)\"/>\n                    </td>\n                    <td width=\"60px\">[[ client.reset + \"d\" ]]</td>\n                </tr>\n            </table>\n        </a-popover>\n    </template>\n    <template v-else>\n        <a-popover v-if=\"client.expiryTime != 0\" :overlay-class-name=\"themeSwitcher.currentTheme\">\n            <template slot=\"content\">\n                <span v-if=\"client.expiryTime < 0\">{{ i18n \"pages.client.delayedStart\" }}</span>\n                <span v-else>[[ DateUtil.formatMillis(client._expiryTime) ]]</span>\n            </template>\n        <a-tag style=\"min-width: 50px; border: none;\" :color=\"userExpiryColor(app.expireDiff, client, themeSwitcher.isDarkTheme)\">\n            [[ remainedDays(client.expiryTime) ]]\n        </a-tag>\n        </a-popover>\n        <a-tag v-else :color=\"userExpiryColor(app.expireDiff, client, themeSwitcher.isDarkTheme)\" style=\"border: none;\" class=\"infinite-tag\">&infin;</a-tag>\n    </template>\n</template>\n<template slot=\"actionMenu\" slot-scope=\"text, client, index\">\n    <a-dropdown :trigger=\"['click']\">\n        <a-icon @click=\"e => e.preventDefault()\" type=\"ellipsis\" style=\"font-size: 20px;\"></a-icon>\n        <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n            <a-menu-item v-if=\"record.hasLink()\" @click=\"showQrcode(record.id,client);\">\n                <a-icon style=\"font-size: 14px;\" type=\"qrcode\"></a-icon>\n                {{ i18n \"qrCode\" }}\n            </a-menu-item>\n            <a-menu-item @click=\"openEditClient(record.id,client);\">\n                <a-icon style=\"font-size: 14px;\" type=\"edit\"></a-icon>\n                {{ i18n \"pages.client.edit\" }}\n            </a-menu-item>\n            <a-menu-item @click=\"showInfo(record.id,client);\">\n                <a-icon style=\"font-size: 14px;\" type=\"info-circle\"></a-icon>\n                {{ i18n \"info\" }}\n            </a-menu-item>\n            <a-menu-item @click=\"resetClientTraffic(client,record.id)\" v-if=\"client.email.length > 0\">\n                <a-icon style=\"font-size: 14px;\" type=\"retweet\"></a-icon>\n                {{ i18n \"pages.inbounds.resetTraffic\" }}\n            </a-menu-item>\n            <a-menu-item v-if=\"isRemovable(record.id)\" @click=\"delClient(record.id,client)\">\n                <a-icon style=\"font-size: 14px;\" type=\"delete\"></a-icon>\n                <span style=\"color: #FF4D4F\"> {{ i18n \"delete\"}}</span>\n            </a-menu-item>\n            <a-menu-item>\n                <a-switch v-model=\"client.enable\" size=\"small\" @change=\"switchEnableClient(record.id,client)\">\n                </a-switch>\n                    {{ i18n \"enable\"}}\n            </a-menu-item>\n        </a-menu>\n    </a-dropdown>\n</template>\n<template slot=\"info\" slot-scope=\"text, client, index\">\n    <a-popover placement=\"bottomRight\" :overlay-class-name=\"themeSwitcher.currentTheme\" trigger=\"click\">\n        <template slot=\"content\">\n            <table>\n                <tr>\n                    <td colspan=\"3\" style=\"text-align: center;\">{{ i18n \"pages.inbounds.traffic\" }}</td>\n                </tr>\n                <tr>\n                    <td width=\"80px\" style=\"margin:0; text-align: right;font-size: 1em;\">\n                        [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]]\n                    </td>\n                    <td width=\"120px\" v-if=\"!client.enable\">\n                        <a-progress :stroke-color=\"themeSwitcher.isDarkTheme ? 'rgb(72 84 105)' : '#bcbcbc'\"\n                                    :show-info=\"false\"\n                                    :percent=\"statsProgress(record, client.email)\"/>\n                    </td>\n                    <td width=\"120px\" v-else-if=\"client.totalGB > 0\">\n                        <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\" v-if=\"client.email\">\n                                <table cellpadding=\"2\" width=\"100%\">\n                                    <tr>\n                                        <td>↑[[ sizeFormat(getUpStats(record, client.email)) ]]</td>\n                                        <td>↓[[ sizeFormat(getDownStats(record, client.email)) ]]</td>\n                                    </tr>\n                                    <tr>\n                                        <td>{{ i18n \"remained\" }}</td>\n                                        <td>[[ sizeFormat(getRemStats(record, client.email)) ]]</td>\n                                    </tr>\n                                </table>\n                            </template>\n                            <a-progress :stroke-color=\"clientStatsColor(record, client.email)\"\n                                        :show-info=\"false\"\n                                        :status=\"isClientEnabled(record, client.email)? 'exception' : ''\"\n                                        :percent=\"statsProgress(record, client.email)\"/>\n                        </a-popover>\n                    </td>\n                    <td width=\"120px\" v-else class=\"infinite-bar\">\n                        <a-progress :stroke-color=\"themeSwitcher.isDarkTheme ? '#2c1e32':'#F2EAF1'\"\n                        :show-info=\"false\"\n                        :percent=\"100\"></a-progress>\n                    </td>\n                    <td width=\"80px\">\n                        <template v-if=\"client.totalGB > 0\">[[ client._totalGB + \"GB\" ]]</template>\n                        <span v-else style=\"font-weight: 100;font-size: 14pt;\">&infin;</span>\n                    </td>\n                </tr>\n                <tr>\n                    <td colspan=\"3\" style=\"text-align: center;\">\n                        <a-divider style=\"margin: 0; border-collapse: separate;\"></a-divider>\n                        {{ i18n \"pages.inbounds.expireDate\" }}\n                    </td>\n                </tr>\n                <tr>\n                <template v-if=\"client.expiryTime !=0 && client.reset >0\">\n                    <td width=\"80px\" style=\"margin:0; text-align: right;font-size: 1em;\">\n                        [[ remainedDays(client.expiryTime) ]]\n                    </td>\n                    <td width=\"120px\" class=\"infinite-bar\">\n                        <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                                <span v-if=\"client.expiryTime < 0\">{{ i18n \"pages.client.delayedStart\" }}</span>\n                                <span v-else>[[ DateUtil.formatMillis(client._expiryTime) ]]</span>\n                            </template>\n                            <a-progress :show-info=\"false\"\n                            :status=\"isClientEnabled(record, client.email)? 'exception' : ''\"\n                            :percent=\"expireProgress(client.expiryTime, client.reset)\"/>\n                        </a-popover>\n                    </td>\n                    <td width=\"60px\">[[ client.reset + \"d\" ]]</td>\n                </template>\n                <template v-else>\n                    <td colspan=\"3\" style=\"text-align: center;\">\n                            <a-popover v-if=\"client.expiryTime != 0\" :overlay-class-name=\"themeSwitcher.currentTheme\">\n                                <template slot=\"content\">\n                                    <span v-if=\"client.expiryTime < 0\">{{ i18n \"pages.client.delayedStart\" }}</span>\n                                    <span v-else>[[ DateUtil.formatMillis(client._expiryTime) ]]</span>\n                                </template>\n                                <a-tag style=\"min-width: 50px; border: none;\" \n                                    :color=\"userExpiryColor(app.expireDiff, client, themeSwitcher.isDarkTheme)\">\n                                    [[ remainedDays(client.expiryTime) ]]\n                                </a-tag>\n                            </a-popover>\n                            <a-tag v-else :color=\"client.enable ? 'purple' : themeSwitcher.isDarkTheme ? '#2c3950' : '#bcbcbc'\" class=\"infinite-tag\">&infin;</a-tag>\n                        </template>\n                    </td>\n                </tr>\n            </table>\n        </template>\n        <a-badge>\n            <a-icon v-if=\"!client.enable\" slot=\"count\" type=\"pause-circle\" theme=\"filled\" :style=\"'color: ' + themeSwitcher.isDarkTheme ? '#2c3950' : '#bcbcbc'\"></a-icon>\n            <a-button shape=\"round\" size=\"small\" style=\"font-size: 14px; padding: 0 10px;\"><a-icon type=\"solution\"></a-icon></a-button>\n        </a-badge>\n    </a-popover>\n</template>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/inbound_info_modal.html",
    "content": "{{define \"inboundInfoModal\"}}\n<a-modal id=\"inbound-info-modal\" v-model=\"infoModal.visible\" title='{{ i18n \"pages.inbounds.details\"}}' :closable=\"true\" :mask-closable=\"true\" :footer=\"null\" width=\"600px\" :class=\"themeSwitcher.currentTheme\">\n  <a-row>\n    <a-col :xs=\"24\" :md=\"12\">\n      <table>\n        <tr>\n          <td>{{ i18n \"protocol\" }}</td>\n          <td>\n            <a-tag color=\"purple\">[[ dbInbound.protocol ]]</a-tag>\n          </td>\n        </tr>\n        <tr>\n          <td>{{ i18n \"pages.inbounds.address\" }}</td>\n          <td>\n            <a-tooltip :title=\"[[ dbInbound.address ]]\">\n              <a-tag class=\"info-large-tag\">[[ dbInbound.address ]]</a-tag>\n            </a-tooltip>\n          </td>\n        </tr>\n        <tr>\n          <td>{{ i18n \"pages.inbounds.port\" }}</td>\n          <td>\n            <a-tag>[[ dbInbound.port ]]</a-tag>\n          </td>\n        </tr>\n      </table>\n    </a-col>\n    <a-col :xs=\"24\" :md=\"12\">\n      <template v-if=\"dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS\">\n        <table>\n          <tr>\n            <td>{{ i18n \"transmission\" }}</td>\n            <td>\n              <a-tag color=\"green\">[[ inbound.network ]]</a-tag>\n            </td>\n          </tr>\n          <template v-if=\"inbound.isTcp || inbound.isWs || inbound.isH2 || inbound.isHttpupgrade || inbound.isSplithttp\">\n            <tr>\n              <td>{{ i18n \"host\" }}</td>\n              <td v-if=\"inbound.host\">\n                <a-tooltip :title=\"[[ inbound.host ]]\">\n                  <a-tag class=\"info-large-tag\">[[ inbound.host ]]</a-tag>\n                </a-tooltip>\n              </td>\n              <td v-else>\n                <a-tag color=\"orange\">{{ i18n \"none\" }}</a-tag>\n              </td>\n            </tr>\n            </tr>\n            <tr>\n              <td>{{ i18n \"path\" }}</td>\n              <td v-if=\"inbound.path\">\n                <a-tooltip :title=\"[[ inbound.path ]]\">\n                  <a-tag class=\"info-large-tag\">[[ inbound.path ]]</a-tag>\n                </a-tooltip>\n              <td v-else>\n                <a-tag color=\"orange\">{{ i18n \"none\" }}</a-tag>\n              </td>\n            </tr>\n          </template>\n          <template v-if=\"inbound.isQuic\">\n            <tr>\n              <td>quic {{ i18n \"encryption\" }}</td>\n              <td>\n                <a-tag>[[ inbound.quicSecurity ]]</a-tag>\n              </td>\n            </tr>\n            <tr>\n              <td>quic {{ i18n \"password\" }}</td>\n              <td>\n                <a-tag>[[ inbound.quicKey ]]</a-tag>\n              </td>\n            </tr>\n            <tr>\n              <td>quic {{ i18n \"camouflage\" }}</td>\n              <td>\n                <a-tag>[[ inbound.quicType ]]</a-tag>\n              </td>\n            </tr>\n          </template>\n          <template v-if=\"inbound.isKcp\">\n            <tr>\n              <td>kcp {{ i18n \"encryption\" }}</td>\n              <td>\n                <a-tag>[[ inbound.kcpType ]]</a-tag>\n              </td>\n            </tr>\n            <tr>\n              <td>kcp {{ i18n \"password\" }}</td>\n              <td>\n                <a-tag>[[ inbound.kcpSeed ]]</a-tag>\n              </td>\n            </tr>\n          </template>\n          <template v-if=\"inbound.isGrpc\">\n            <tr>\n              <td>grpc serviceName</td>\n              <td>\n                <a-tooltip :title=\"[[ inbound.serviceName ]]\">\n                  <a-tag class=\"info-large-tag\">[[ inbound.serviceName ]]</a-tag>\n                </a-tooltip>\n            <tr>\n              <td>grpc multiMode</td>\n              <td>\n                <a-tag>[[ inbound.stream.grpc.multiMode ]]</a-tag>\n              </td>\n            </tr>\n          </template>\n        </table>\n      </template>\n    </a-col>\n    <template v-if=\"dbInbound.hasLink()\">\n      {{ i18n \"security\" }}\n      <a-tag :color=\"inbound.stream.security == 'none' ? 'red' : 'green'\">[[ inbound.stream.security ]]</a-tag>\n      <br />\n      <template v-if=\"inbound.stream.security != 'none'\">\n        {{ i18n \"domainName\" }}\n        <a-tag v-if=\"inbound.serverName\" :color=\"inbound.serverName ? 'green' : 'orange'\">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>\n        <a-tag v-else color=\"orange\">{{ i18n \"none\" }}</a-tag>\n      </template>\n    </template>\n    <table v-if=\"dbInbound.isSS\" style=\"margin-bottom: 10px; width: 100%;\">\n      <tr>\n        <td>{{ i18n \"encryption\" }}</td>\n        <td>\n          <a-tag color=\"green\">[[ inbound.settings.method ]]</a-tag>\n        </td>\n      </tr>\n      <tr v-if=\"inbound.isSS2022\">\n        <td>{{ i18n \"password\" }}</td>\n        <td>\n          <a-tooltip :title=\"[[ inbound.settings.password  ]]\">\n            <a-tag class=\"info-large-tag\">[[ inbound.settings.password ]]</a-tag>\n          </a-tooltip>\n        </td>\n      </tr>\n      <tr>\n        <td>{{ i18n \"pages.inbounds.network\" }}</td>\n        <td>\n          <a-tag color=\"green\">[[ inbound.settings.network ]]</a-tag>\n        </td>\n      </tr>\n    </table>\n    <template v-if=\"infoModal.clientSettings\">\n      <a-divider>{{ i18n \"pages.inbounds.client\" }}</a-divider>\n      <table style=\"margin-bottom: 10px;\">\n        <tr>\n          <td>{{ i18n \"pages.inbounds.email\" }}</td>\n          <td v-if=\"infoModal.clientSettings.email\">\n            <a-tag color=\"green\">[[ infoModal.clientSettings.email ]]</a-tag>\n          </td>\n          <td v-else>\n            <a-tag color=\"red\">{{ i18n \"none\" }}</a-tag>\n          </td>\n        </tr>\n        <tr v-if=\"infoModal.clientSettings.id\">\n          <td>ID</td>\n          <td>\n            <a-tag>[[ infoModal.clientSettings.id ]]</a-tag>\n          </td>\n        </tr>\n        <tr v-if=\"infoModal.inbound.canEnableTlsFlow()\">\n          <td>Flow</td>\n          <td v-if=\"infoModal.clientSettings.flow\">\n            <a-tag>[[ infoModal.clientSettings.flow ]]</a-tag>\n          </td>\n          <td v-else>\n            <a-tag color=\"orange\">{{ i18n \"none\" }}</a-tag>\n          </td>\n        </tr>\n        <tr v-if=\"infoModal.inbound.xtls\">\n          <td>Flow</td>\n          <td v-if=\"infoModal.clientSettings.flow\">\n            <a-tag>[[ infoModal.clientSettings.flow ]]</a-tag>\n          </td>\n          <td v-else>\n            <a-tag color=\"orange\">{{ i18n \"none\" }}</a-tag>\n          </td>\n        </tr>\n        <tr v-if=\"infoModal.clientSettings.password\">\n          <td>{{ i18n \"password\" }}</td>\n          <td>\n            <a-tooltip :title=\"[[ infoModal.clientSettings.password  ]]\">\n              <a-tag class=\"info-large-tag\">[[ infoModal.clientSettings.password ]]</a-tag>\n            </a-tooltip>\n          </td>\n        </tr>\n        <tr>\n          <td>{{ i18n \"status\" }}</td>\n          <td>\n            <a-tag v-if=\"isEnable\" color=\"green\">{{ i18n \"enabled\" }}</a-tag>\n            <a-tag v-else>{{ i18n \"disabled\" }}</a-tag>\n            <a-tag v-if=\"!isActive\" color=\"red\">{{ i18n \"depleted\" }}</a-tag>\n          </td>\n        </tr>\n        <tr v-if=\"infoModal.clientStats\">\n          <td>{{ i18n \"usage\" }}</td>\n          <td>\n            <a-tag color=\"green\">[[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</a-tag>\n            <a-tag>↑ [[ sizeFormat(infoModal.clientStats.up) ]] / [[ sizeFormat(infoModal.clientStats.down) ]] ↓</a-tag>\n          </td>\n        </tr>\n      </table>\n      <table style=\"display: inline-table; margin-block: 10px; width: 100%; text-align: center;\">\n        <tr>\n          <th>{{ i18n \"remained\" }}</th>\n          <th>{{ i18n \"pages.inbounds.totalFlow\" }}</th>\n          <th>{{ i18n \"pages.inbounds.expireDate\" }}</th>\n        </tr>\n        <tr>\n          <td>\n            <a-tag v-if=\"infoModal.clientStats && infoModal.clientSettings.totalGB > 0\" :color=\"statsColor(infoModal.clientStats)\"> [[ getRemStats() ]] </a-tag>\n          </td>\n          <td>\n            <a-tag v-if=\"infoModal.clientSettings.totalGB > 0\" :color=\"statsColor(infoModal.clientStats)\"> [[ sizeFormat(infoModal.clientSettings.totalGB) ]] </a-tag>\n            <a-tag v-else color=\"purple\" class=\"infinite-tag\">\n              <svg height=\"10px\" width=\"14px\" viewBox=\"0 0 640 512\" fill=\"currentColor\">\n                <path d=\"M484.4 96C407 96 349.2 164.1 320 208.5C290.8 164.1 233 96 155.6 96C69.75 96 0 167.8 0 256s69.75 160 155.6 160C233.1 416 290.8 347.9 320 303.5C349.2 347.9 407 416 484.4 416C570.3 416 640 344.2 640 256S570.3 96 484.4 96zM155.6 368C96.25 368 48 317.8 48 256s48.25-112 107.6-112c67.75 0 120.5 82.25 137.1 112C276 285.8 223.4 368 155.6 368zM484.4 368c-67.75 0-120.5-82.25-137.1-112C364 226.2 416.6 144 484.4 144C543.8 144 592 194.2 592 256S543.8 368 484.4 368z\" fill=\"currentColor\"></path>\n              </svg>\n            </a-tag>\n          </td>\n          <td>\n            <template v-if=\"infoModal.clientSettings.expiryTime > 0\">\n              <a-tag :color=\"usageColor(new Date().getTime(), app.expireDiff, infoModal.clientSettings.expiryTime)\"> [[ DateUtil.formatMillis(infoModal.clientSettings.expiryTime) ]] </a-tag>\n            </template>\n            <a-tag v-else-if=\"infoModal.clientSettings.expiryTime < 0\" color=\"green\">[[ infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n \"pages.client.days\" }}\n            </a-tag>\n            <a-tag v-else color=\"purple\" class=\"infinite-tag\">\n              <svg height=\"10px\" width=\"14px\" viewBox=\"0 0 640 512\" fill=\"currentColor\">\n                <path d=\"M484.4 96C407 96 349.2 164.1 320 208.5C290.8 164.1 233 96 155.6 96C69.75 96 0 167.8 0 256s69.75 160 155.6 160C233.1 416 290.8 347.9 320 303.5C349.2 347.9 407 416 484.4 416C570.3 416 640 344.2 640 256S570.3 96 484.4 96zM155.6 368C96.25 368 48 317.8 48 256s48.25-112 107.6-112c67.75 0 120.5 82.25 137.1 112C276 285.8 223.4 368 155.6 368zM484.4 368c-67.75 0-120.5-82.25-137.1-112C364 226.2 416.6 144 484.4 144C543.8 144 592 194.2 592 256S543.8 368 484.4 368z\" fill=\"currentColor\"></path>\n              </svg>\n            </a-tag>\n          </td>\n        </tr>\n      </table>\n      <template v-if=\"app.subSettings.enable && infoModal.clientSettings.subId\">\n        <a-divider>Subscription URL</a-divider>\n        <tr-info-row class=\"tr-info-row\">\n          <tr-info-title class=\"tr-info-title\">\n            <a-tag color=\"purple\">Subscription Link</a-tag>\n            <a-tooltip title='{{ i18n \"copy\" }}'>\n              <a-button size=\"small\" icon=\"snippets\" id=\"copy-sub-link\" @click=\"copyToClipboard('copy-sub-link', infoModal.subLink)\"></a-button>\n            </a-tooltip>\n          </tr-info-title>\n          <a :href=\"[[ infoModal.subLink ]]\" target=\"_blank\">[[ infoModal.subLink ]]</a>\n        </tr-info-row>\n        <tr-info-row class=\"tr-info-row\">\n          <tr-info-title class=\"tr-info-title\">\n            <a-tag color=\"purple\">Json Link</a-tag>\n            <a-tooltip title='{{ i18n \"copy\" }}'>\n              <a-button size=\"small\" icon=\"snippets\" id=\"copy-subJson-link\" @click=\"copyToClipboard('copy-subJson-link', infoModal.subJsonLink)\"></a-button>\n            </a-tooltip>\n          </tr-info-title>\n          <a :href=\"[[ infoModal.subJsonLink ]]\" target=\"_blank\">[[ infoModal.subJsonLink ]]</a>\n        </tr-info-row>\n      </template>\n      <template v-if=\"app.tgBotEnable && infoModal.clientSettings.tgId\">\n        <a-divider>Telegram ChatID</a-divider>\n        <tr-info-row class=\"tr-info-row\">\n          <tr-info-title class=\"tr-info-title\">\n            <a-tag color=\"blue\">[[ infoModal.clientSettings.tgId ]]</a-tag>\n            <a-tooltip title='{{ i18n \"copy\" }}'>\n              <a-button size=\"small\" icon=\"snippets\" id=\"copy-tg-link\" @click=\"copyToClipboard('copy-tg-link', infoModal.clientSettings.tgId)\"></a-button>\n            </a-tooltip>\n          </tr-info-title>\n        </tr-info-row>\n      </template>\n      <template v-if=\"dbInbound.hasLink()\">\n        <a-divider>URL</a-divider>\n        <tr-info-row v-for=\"(link,index) in infoModal.links\" class=\"tr-info-row\">\n          <tr-info-title class=\"tr-info-title\">\n            <a-tag class=\"tr-info-tag\" color=\"green\">[[ link.remark ]]</a-tag>\n            <a-tooltip title='{{ i18n \"copy\" }}'>\n              <a-button style=\"min-width: 24px;\" size=\"small\" icon=\"snippets\" :id=\"'copy-url-link-'+index\" @click=\"copyToClipboard('copy-url-link-'+index, link.link)\"></a-button>\n            </a-tooltip>\n          </tr-info-title>\n          <code>[[ link.link ]]</code>\n        </tr-info-row>\n      </template>\n    </template>\n    <template v-else>\n      <template v-if=\"dbInbound.isSS && !inbound.isSSMultiUser\">\n        <a-divider>URL</a-divider>\n        <tr-info-row v-for=\"(link,index) in infoModal.links\" class=\"tr-info-row\">\n          <tr-info-title class=\"tr-info-title\">\n            <a-tag class=\"tr-info-tag\" color=\"green\">[[ link.remark ]]</a-tag>\n            <a-tooltip title='{{ i18n \"copy\" }}'>\n              <a-button style=\"min-width: 24px;\" size=\"small\" icon=\"snippets\" :id=\"'copy-url-link-'+index\" @click=\"copyToClipboard('copy-url-link-'+index, link.link)\"></a-button>\n            </a-tooltip>\n          </tr-info-title>\n          <code>[[ link.link ]]</code>\n        </tr-info-row>\n      </template>\n      <table v-if=\"inbound.protocol == Protocols.DOKODEMO\" class=\"tr-info-table\">\n        <tr>\n          <th>{{ i18n \"pages.inbounds.targetAddress\" }}</th>\n          <th>{{ i18n \"pages.inbounds.destinationPort\" }}</th>\n          <th>{{ i18n \"pages.inbounds.network\" }}</th>\n          <th>FollowRedirect</th>\n        </tr>\n        <tr>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.address ]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.port ]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.network ]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.followRedirect ]]</a-tag>\n          </td>\n        </tr>\n      </table>\n      <table v-if=\"dbInbound.isSocks\" class=\"tr-info-table\">\n        <tr>\n          <th>{{ i18n \"password\" }} Auth</th>\n          <th>{{ i18n \"pages.inbounds.enable\" }} udp</th>\n          <th>IP</th>\n        </tr>\n        <tr>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.auth ]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.udp]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ inbound.settings.ip ]]</a-tag>\n          </td>\n        </tr>\n        <template v-if=\"inbound.settings.auth == 'password'\">\n          <tr>\n            <td></td>\n            <td>{{ i18n \"username\" }}</td>\n            <td>{{ i18n \"password\" }}</td>\n          </tr>\n          <tr v-for=\"account,index in inbound.settings.accounts\">\n            <td>[[ index ]]</td>\n            <td>\n              <a-tag color=\"green\">[[ account.user ]]</a-tag>\n            </td>\n            <td>\n              <a-tag color=\"green\">[[ account.pass ]]</a-tag>\n            </td>\n          </tr>\n        </template>\n      </table>\n      <table v-if=\"dbInbound.isHTTP\" class=\"tr-info-table\">\n        <tr>\n          <th></th>\n          <th>{{ i18n \"username\" }}</th>\n          <th>{{ i18n \"password\" }}</th>\n        </tr>\n        <tr v-for=\"account,index in inbound.settings.accounts\">\n          <td>[[ index ]]</td>\n          <td>\n            <a-tag color=\"green\">[[ account.user ]]</a-tag>\n          </td>\n          <td>\n            <a-tag color=\"green\">[[ account.pass ]]</a-tag>\n          </td>\n        </tr>\n      </table>\n      <table v-if=\"dbInbound.isWireguard\" class=\"tr-info-table\">\n        <tr class=\"client-table-odd-row\">\n          <td>{{ i18n \"pages.xray.wireguard.secretKey\" }}</td>\n          <td>[[ inbound.settings.secretKey ]]</td>\n        </tr>\n        <tr>\n          <td>{{ i18n \"pages.xray.wireguard.publicKey\" }}</td>\n          <td>[[ inbound.settings.pubKey ]]</td>\n        </tr>\n        <tr class=\"client-table-odd-row\">\n          <td>MTU</td>\n          <td>[[ inbound.settings.mtu ]]</td>\n        </tr>\n        <tr>\n          <td>Kernel Mode</td>\n          <td>[[ inbound.settings.kernelMode ]]</td>\n        </tr>\n        <template v-for=\"(peer, index) in inbound.settings.peers\">\n          <tr>\n            <td colspan=\"2\">\n              <a-divider>Peer [[ index + 1 ]]</a-divider>\n            </td>\n          </tr>\n          <tr class=\"client-table-odd-row\">\n            <td>{{ i18n \"pages.xray.wireguard.secretKey\" }}</td>\n            <td>[[ peer.privateKey ]]</td>\n          </tr>\n          <tr>\n            <td>{{ i18n \"pages.xray.wireguard.publicKey\" }}</td>\n            <td>[[ peer.publicKey ]]</td>\n          </tr>\n          <tr class=\"client-table-odd-row\">\n            <td>{{ i18n \"pages.xray.wireguard.psk\" }}</td>\n            <td>[[ peer.psk ]]</td>\n          </tr>\n          <tr>\n            <td>{{ i18n \"pages.xray.wireguard.allowedIPs\" }}</td>\n            <td>[[ peer.allowedIPs.join(\",\") ]]</td>\n          </tr>\n          <tr class=\"client-table-odd-row\">\n            <td>Keep Alive</td>\n            <td>[[ peer.keepAlive ]]</td>\n          </tr>\n          <tr>\n            <td colspan=\"2\">\n              <tr-info-row v-for=\"(link,index) in infoModal.links\" class=\"tr-info-row\">\n                <tr-info-title class=\"tr-info-title\">\n                  <a-tag color=\"blue\">Config</a-tag>\n                  <a-tooltip title='{{ i18n \"copy\" }}'>\n                    <a-button style=\"min-width: 24px;\" size=\"small\" icon=\"snippets\" :id=\"'copy-url-link-'+index\" @click=\"copyToClipboard('copy-url-link-'+index, infoModal.links[index])\"></a-button>\n                  </a-tooltip>\n                </tr-info-title>\n                <div v-html=\"infoModal.links[index].replaceAll(`\\n`,`<br />`)\" style=\"border-radius: 1rem; padding: 0.5rem;\" class=\"client-table-odd-row\">\n                </div>\n              </tr-info-row>\n            </td>\n          </tr>\n      </table>\n    </template>\n    </template>\n</a-modal>\n<script>\n  const infoModal = {\n    visible: false,\n    inbound: new Inbound(),\n    dbInbound: new DBInbound(),\n    clientSettings: null,\n    clientStats: [],\n    upStats: 0,\n    downStats: 0,\n    clipboard: null,\n    links: [],\n    index: null,\n    isExpired: false,\n    subLink: '',\n    subJsonLink: '',\n    show(dbInbound, index) {\n      this.index = index;\n      this.inbound = dbInbound.toInbound();\n      this.dbInbound = new DBInbound(dbInbound);\n      this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null;\n      this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index) : this.dbInbound.isExpiry;\n      this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : [];\n      if (this.inbound.protocol == Protocols.WIREGUARD) {\n        this.links = this.inbound.genInboundLinks(dbInbound.remark).split('\\r\\n')\n      } else {\n        this.links = this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, this.clientSettings);\n      }\n      if (this.clientSettings) {\n        if (this.clientSettings.subId) {\n          this.subLink = this.genSubLink(this.clientSettings.subId);\n          this.subJsonLink = this.genSubJsonLink(this.clientSettings.subId);\n        }\n      }\n      this.visible = true;\n    },\n    close() {\n      infoModal.visible = false;\n    },\n    genSubLink(subID) {\n      return app.subSettings.subURI + subID;\n    },\n    genSubJsonLink(subID) {\n      return app.subSettings.subJsonURI + subID;\n    }\n  };\n  const infoModalApp = new Vue({\n    delimiters: ['[[', ']]'],\n    el: '#inbound-info-modal',\n    data: {\n      infoModal,\n      get dbInbound() {\n        return this.infoModal.dbInbound;\n      },\n      get inbound() {\n        return this.infoModal.inbound;\n      },\n      get isActive() {\n        if (infoModal.clientStats) {\n          return infoModal.clientStats.enable;\n        }\n        return true;\n      },\n      get isEnable() {\n        if (infoModal.clientSettings) {\n          return infoModal.clientSettings.enable;\n        }\n        return infoModal.dbInbound.isEnable;\n      },\n    },\n    methods: {\n      copyToClipboard(elementId, content) {\n        this.infoModal.clipboard = new ClipboardJS('#' + elementId, {\n          text: () => content,\n        });\n        this.infoModal.clipboard.on('success', () => {\n          app.$message.success('{{ i18n \"copied\" }}')\n          this.infoModal.clipboard.destroy();\n        });\n      },\n      statsColor(stats) {\n        return usageColor(stats.up + stats.down, app.trafficDiff, stats.total);\n      },\n      getRemStats() {\n        remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats.down;\n        return remained > 0 ? sizeFormat(remained) : '-';\n      },\n    },\n  });\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/inbound_modal.html",
    "content": "{{define \"inboundModal\"}}\n<a-modal id=\"inbound-modal\" v-model=\"inModal.visible\" :title=\"inModal.title\"\n        :dialog-style=\"{ top: '20px' }\" @ok=\"inModal.ok\"\n        :confirm-loading=\"inModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n        :class=\"themeSwitcher.currentTheme\"\n        :ok-text=\"inModal.okText\" cancel-text='{{ i18n \"close\" }}'>\n    {{template \"form/inbound\"}}\n</a-modal>\n<script>\n\n    const inModal = {\n        title: '',\n        visible: false,\n        confirmLoading: false,\n        okText: '{{ i18n \"sure\" }}',\n        isEdit: false,\n        confirm: null,\n        inbound: new Inbound(),\n        dbInbound: new DBInbound(),\n        ok() {\n            ObjectUtil.execute(inModal.confirm, inModal.inbound, inModal.dbInbound);\n        },\n        show({ title = '', okText = '{{ i18n \"sure\" }}', inbound = null, dbInbound = null, confirm = (inbound, dbInbound) => {}, isEdit = false }) {\n            this.title = title;\n            this.okText = okText;\n            if (inbound) {\n                this.inbound = Inbound.fromJson(inbound.toJson());\n            } else {\n                this.inbound = new Inbound();\n            }\n            if (dbInbound) {\n                this.dbInbound = new DBInbound(dbInbound);\n            } else {\n                this.dbInbound = new DBInbound();\n            }\n            this.confirm = confirm;\n            this.visible = true;\n            this.isEdit = isEdit;\n        },\n        close() {\n            inModal.visible = false;\n            inModal.loading(false);\n        },\n        loading(loading=true) {\n            inModal.confirmLoading = loading;\n        },\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#inbound-modal',\n        data: {\n            inModal: inModal,\n            delayedStart: false,\n            get inbound() {\n                return inModal.inbound;\n            },\n            get dbInbound() {\n                return inModal.dbInbound;\n            },\n            get isEdit() {\n                return inModal.isEdit;\n            },\n            get client() {\n                return inModal.inbound.clients[0];\n            },\n            get datepicker() {\n                return app.datepicker;\n            },\n            get delayedExpireDays() {\n                return this.client && this.client.expiryTime < 0 ? this.client.expiryTime / -86400000 : 0;\n            },\n            set delayedExpireDays(days) {\n                this.client.expiryTime = -86400000 * days;\n            },\n            get externalProxy() {\n                return this.inbound.stream.externalProxy.length > 0;\n            },\n            set externalProxy(value) {\n                if (value) {\n                    inModal.inbound.stream.externalProxy = [{\n                        forceTls: \"same\",\n                        dest: window.location.hostname,\n                        port: inModal.inbound.port,\n                        remark: \"\"\n                    }];\n                } else {\n                    inModal.inbound.stream.externalProxy = [];\n                }\n            }\n        },\n        methods: {\n            streamNetworkChange() {\n                if (!inModal.inbound.canEnableTls()) {\n                    this.inModal.inbound.stream.security = 'none';\n                }\n                if (!inModal.inbound.canEnableReality()) {\n                    this.inModal.inbound.reality = false;\n                }\n                if (this.inModal.inbound.protocol == Protocols.VLESS && !inModal.inbound.canEnableTlsFlow()) {\n                    this.inModal.inbound.settings.vlesses.forEach(client => {\n                        client.flow = \"\";\n                    });\n                }\n                if ((this.inModal.inbound.protocol == Protocols.VLESS || this.inModal.inbound.protocol == Protocols.TROJAN) && !inModal.inbound.xtls) {\n                    this.inModal.inbound.settings.vlesses.forEach(client => {\n                        client.flow = \"\";\n                    });\n                }\n            },\n            SSMethodChange() {\n                if (this.inModal.inbound.isSSMultiUser) {\n                    if (this.inModal.inbound.settings.shadowsockses.length ==0){\n                        this.inModal.inbound.settings.shadowsockses = [new Inbound.ShadowsocksSettings.Shadowsocks()];\n                    }\n                    if (!this.inModal.inbound.isSS2022) {\n                        this.inModal.inbound.settings.shadowsockses.forEach(client => {\n                            client.method = this.inModal.inbound.settings.method;\n                        })\n                    } else {\n                        this.inModal.inbound.settings.shadowsockses.forEach(client => {\n                            client.method = \"\";\n                        })\n                    }\n                } else {\n                    if (this.inModal.inbound.settings.shadowsockses.length > 0){\n                        this.inModal.inbound.settings.shadowsockses = [];\n                    }\n                }\n            },\n            setDefaultCertData(index) {\n                inModal.inbound.stream.tls.certs[index].certFile = app.defaultCert;\n                inModal.inbound.stream.tls.certs[index].keyFile = app.defaultKey;\n            },\n            setDefaultCertXtls(index) {\n                inModal.inbound.stream.xtls.certs[index].certFile = app.defaultCert;\n                inModal.inbound.stream.xtls.certs[index].keyFile = app.defaultKey;\n            },\n            async getNewX25519Cert() {\n                inModal.loading(true);\n                const msg = await HttpUtil.post('/server/getNewX25519Cert');\n                inModal.loading(false);\n                if (!msg.success) {\n                    return;\n                }\n                inModal.inbound.stream.reality.privateKey = msg.obj.privateKey;\n                inModal.inbound.stream.reality.settings.publicKey = msg.obj.publicKey;\n            }\n        },\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/inbounds.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n  @media (min-width: 769px) {\n    .ant-layout-content {\n      margin: 24px 16px;\n    }\n  }\n  @media (max-width: 768px) {\n    .ant-card-body {\n      padding: .5rem;\n    }\n  }\n  .ant-col-sm-24 {\n    margin: 0.5rem -2rem 0.5rem 2rem;\n  }\n  tr.hideExpandIcon .ant-table-row-expand-icon {\n    display: none;\n  }\n  .infinite-tag {\n    padding: 0 5px;\n    border-radius: 2rem;\n    min-width: 50px;\n  }\n  .infinite-bar .ant-progress-inner .ant-progress-bg {\n    background-color: #F2EAF1;\n    border: #D5BED2 solid 1px;\n  }\n  .dark .infinite-bar .ant-progress-inner .ant-progress-bg {\n    background-color: #7a316f;\n    border: #7a316f solid 1px;\n  }\n  .ant-collapse {\n    margin: 5px 0;\n  }\n  .info-large-tag {\n    max-width: 200px;\n    overflow: hidden;\n  }\n  .online-animation .ant-badge-status-dot {\n    animation: onlineAnimation 1.2s linear infinite;\n  }\n  @keyframes onlineAnimation {\n    0%,\n    50%,\n    100% {\n      transform: scale(1);\n      opacity: 1;\n    }\n    10% {\n      transform: scale(1.5);\n      opacity: .2;\n    }\n  }\n</style>\n\n<body>\n<a-layout id=\"app\" v-cloak :class=\"themeSwitcher.currentTheme\">\n  {{ template \"commonSider\" . }}\n  <a-layout id=\"content-layout\">\n    <a-layout-content>\n      <a-spin :spinning=\"spinning\" :delay=\"500\" tip='{{ i18n \"loading\"}}'>\n        <transition name=\"list\" appear>\n          <a-alert type=\"error\" v-if=\"showAlert\" style=\"margin-bottom: 10px\"\n            message='{{ i18n \"secAlertTitle\" }}'\n            color=\"red\"\n            description='{{ i18n \"secAlertSsl\" }}'\n            show-icon closable>\n          </a-alert>\n        </transition>\n        <transition name=\"list\" appear>\n          <a-card hoverable>\n            <a-row>\n              <a-col :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                {{ i18n \"pages.inbounds.totalDownUp\" }}:\n                <a-tag color=\"green\">[[ sizeFormat(total.up) ]] / [[ sizeFormat(total.down) ]]</a-tag>\n              </a-col>\n              <a-col :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                {{ i18n \"pages.inbounds.totalUsage\" }}:\n                <a-tag color=\"green\">[[ sizeFormat(total.up + total.down) ]]</a-tag>\n              </a-col>\n              <a-col :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                {{ i18n \"pages.inbounds.inboundCount\" }}:\n                <a-tag color=\"green\">[[ dbInbounds.length ]]</a-tag>\n              </a-col>\n              <a-col :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                <template>\n                  <div>\n                    <a-back-top :target=\"() => document.getElementById('content-layout')\" visibility-height=\"200\"></a-back-top>\n                    {{ i18n \"clients\" }}:\n                    <a-tag color=\"green\">[[ total.clients ]]</a-tag>\n                    <a-popover title='{{ i18n \"disabled\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-for=\"clientEmail in total.deactive\">[[ clientEmail ]]</p>\n                      </template>\n                      <a-tag v-if=\"total.deactive.length\">[[ total.deactive.length ]]</a-tag>\n                    </a-popover>\n                    <a-popover title='{{ i18n \"depleted\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-for=\"clientEmail in total.depleted\">[[ clientEmail ]]</p>\n                      </template>\n                      <a-tag color=\"red\" v-if=\"total.depleted.length\">[[ total.depleted.length ]]</a-tag>\n                    </a-popover>\n                    <a-popover title='{{ i18n \"depletingSoon\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-for=\"clientEmail in total.expiring\">[[ clientEmail ]]</p>\n                      </template>\n                      <a-tag color=\"orange\" v-if=\"total.expiring.length\">[[ total.expiring.length ]]</a-tag>\n                    </a-popover>\n                    <a-popover title='{{ i18n \"online\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-for=\"clientEmail in onlineClients\">[[ clientEmail ]]</p>\n                      </template>\n                      <a-tag color=\"blue\" v-if=\"onlineClients.length\">[[ onlineClients.length ]]</a-tag>\n                    </a-popover>\n                  </div>\n                </template>\n              </a-col>\n            </a-row>\n          </a-card>\n        </transition>\n        <transition name=\"list\" appear>\n          <a-card hoverable>\n            <div slot=\"title\">\n              <a-row>\n                <a-col :xs=\"12\" :sm=\"12\" :lg=\"12\">\n                  <a-button type=\"primary\" icon=\"plus\" @click=\"openAddInbound\">\n                    <template v-if=\"!isMobile\">{{ i18n \"pages.inbounds.addInbound\" }}</template>\n                  </a-button>\n                  <a-dropdown :trigger=\"['click']\">\n                    <a-button type=\"primary\" icon=\"menu\">\n                      <template v-if=\"!isMobile\">{{ i18n \"pages.inbounds.generalActions\" }}</template>\n                    </a-button>\n                    <a-menu slot=\"overlay\" @click=\"a => generalActions(a)\" :theme=\"themeSwitcher.currentTheme\">\n                      <a-menu-item key=\"import\">\n                        <a-icon type=\"import\"></a-icon>\n                        {{ i18n \"pages.inbounds.importInbound\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"export\">\n                        <a-icon type=\"export\"></a-icon>\n                        {{ i18n \"pages.inbounds.export\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"subs\" v-if=\"subSettings.enable\">\n                        <a-icon type=\"export\"></a-icon>\n                        {{ i18n \"pages.inbounds.export\" }} - {{ i18n \"pages.settings.subSettings\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"resetInbounds\">\n                        <a-icon type=\"reload\"></a-icon>\n                        {{ i18n \"pages.inbounds.resetAllTraffic\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"resetClients\">\n                        <a-icon type=\"file-done\"></a-icon>\n                        {{ i18n \"pages.inbounds.resetAllClientTraffics\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"delDepletedClients\" style=\"color: #FF4D4F;\">\n                        <a-icon type=\"rest\"></a-icon>\n                        {{ i18n \"pages.inbounds.delDepletedClients\" }}\n                      </a-menu-item>\n                    </a-menu>\n                  </a-dropdown>\n                </a-col>\n                <a-col :xs=\"12\" :sm=\"12\" :lg=\"12\" style=\"text-align: right;\">\n                  <a-select v-model=\"refreshInterval\"\n                      style=\"width: 65px;\"\n                      v-if=\"isRefreshEnabled\"\n                      @change=\"changeRefreshInterval\"\n                      :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                    <a-select-option v-for=\"key in [5,10,30,60]\" :value=\"key*1000\">[[ key ]]s</a-select-option>\n                  </a-select>\n                  <a-icon type=\"sync\" :spin=\"refreshing\" @click=\"manualRefresh\" style=\"margin: 0 5px;\"></a-icon>\n                  <a-switch v-model=\"isRefreshEnabled\" @change=\"toggleRefresh\"></a-switch>\n                </a-col>\n              </a-row>\n            </div>\n            <div :style=\"isMobile ? '' : 'display: flex; align-items: center; justify-content: flex-start;'\">\n              <a-switch v-model=\"enableFilter\"\n                  :style=\"isMobile ? 'margin-bottom: .5rem; display: flex;' : 'margin-right: .5rem;'\"\n                  @change=\"toggleFilter\">\n                <a-icon slot=\"checkedChildren\" type=\"search\"></a-icon>\n                <a-icon slot=\"unCheckedChildren\" type=\"filter\"></a-icon>\n              </a-switch>\n              <a-input v-if=\"!enableFilter\" v-model.lazy=\"searchKey\" placeholder='{{ i18n \"search\" }}' autofocus style=\"max-width: 300px\" :size=\"isMobile ? 'small' : ''\"></a-input>\n              <a-radio-group v-if=\"enableFilter\" v-model=\"filterBy\" @change=\"filterInbounds\" button-style=\"solid\" :size=\"isMobile ? 'small' : ''\">\n                <a-radio-button value=\"\">{{ i18n \"none\" }}</a-radio-button>\n                <a-radio-button value=\"deactive\">{{ i18n \"disabled\" }}</a-radio-button>\n                <a-radio-button value=\"depleted\">{{ i18n \"depleted\" }}</a-radio-button>\n                <a-radio-button value=\"expiring\">{{ i18n \"depletingSoon\" }}</a-radio-button>\n                <a-radio-button value=\"online\">{{ i18n \"online\" }}</a-radio-button>\n              </a-radio-group>\n            </div>\n            <a-back-top></a-back-top>\n            <a-table :columns=\"isMobile ? mobileColumns : columns\" :row-key=\"dbInbound => dbInbound.id\"\n                :data-source=\"searchedInbounds\"\n                :scroll=\"isMobile ? {} : { x: 1000 }\"\n                :pagination=pagination(searchedInbounds)\n                :expand-icon-as-cell=\"false\"\n                :expand-row-by-click=\"false\"\n                :expand-icon-column-index=\"0\"\n                :indent-size=\"0\"\n                :row-class-name=\"dbInbound => (dbInbound.isMultiUser() ? '' : 'hideExpandIcon')\"\n                style=\"margin-top: 10px\">\n              <template slot=\"action\" slot-scope=\"text, dbInbound\">\n                <a-dropdown :trigger=\"['click']\">\n                  <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 20px; text-decoration: solid;\"></a-icon>\n                  <a-menu slot=\"overlay\" @click=\"a => clickAction(a, dbInbound)\" :theme=\"themeSwitcher.currentTheme\">\n                    <a-menu-item key=\"edit\">\n                      <a-icon type=\"edit\"></a-icon>\n                      {{ i18n \"edit\" }}\n                    </a-menu-item>\n                    <a-menu-item key=\"qrcode\" v-if=\"(dbInbound.isSS && !dbInbound.toInbound().isSSMultiUser) || dbInbound.isWireguard\">\n                      <a-icon type=\"qrcode\"></a-icon>\n                      {{ i18n \"qrCode\" }}\n                    </a-menu-item>\n                    <template v-if=\"dbInbound.isMultiUser()\">\n                      <a-menu-item key=\"addClient\">\n                        <a-icon type=\"user-add\"></a-icon>\n                        {{ i18n \"pages.client.add\"}}\n                      </a-menu-item>\n                      <a-menu-item key=\"addBulkClient\">\n                        <a-icon type=\"usergroup-add\"></a-icon>\n                        {{ i18n \"pages.client.bulk\"}}\n                      </a-menu-item>\n                      <a-menu-item key=\"resetClients\">\n                        <a-icon type=\"file-done\"></a-icon>\n                        {{ i18n \"pages.inbounds.resetInboundClientTraffics\"}}\n                      </a-menu-item>\n                      <a-menu-item key=\"export\">\n                        <a-icon type=\"export\"></a-icon>\n                        {{ i18n \"pages.inbounds.export\"}}\n                      </a-menu-item>\n                      <a-menu-item key=\"subs\" v-if=\"subSettings.enable\">\n                        <a-icon type=\"export\"></a-icon>\n                        {{ i18n \"pages.inbounds.export\"}} - {{ i18n \"pages.settings.subSettings\" }}\n                      </a-menu-item>\n                      <a-menu-item key=\"delDepletedClients\" style=\"color: #FF4D4F;\">\n                        <a-icon type=\"rest\"></a-icon>\n                        {{ i18n \"pages.inbounds.delDepletedClients\" }}\n                      </a-menu-item>\n                    </template>\n                    <template v-else>\n                      <a-menu-item key=\"showInfo\">\n                        <a-icon type=\"info-circle\"></a-icon>\n                        {{ i18n \"info\"}}\n                      </a-menu-item>\n                    </template>\n                    <a-menu-item key=\"clipboard\">\n                      <a-icon type=\"copy\"></a-icon>\n                      {{ i18n \"pages.inbounds.exportInbound\" }}\n                    </a-menu-item>\n                    <a-menu-item key=\"resetTraffic\">\n                      <a-icon type=\"retweet\"></a-icon> {{ i18n \"pages.inbounds.resetTraffic\" }}\n                    </a-menu-item>\n                    <a-menu-item key=\"clone\">\n                      <a-icon type=\"block\"></a-icon> {{ i18n \"pages.inbounds.clone\"}}\n                    </a-menu-item>\n                    <a-menu-item key=\"delete\">\n                      <span style=\"color: #FF4D4F\">\n                        <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                      </span>\n                    </a-menu-item>\n                    <a-menu-item v-if=\"isMobile\">\n                      <a-switch size=\"small\" v-model=\"dbInbound.enable\" @change=\"switchEnable(dbInbound.id,dbInbound.enable)\"></a-switch>\n                      {{ i18n \"pages.inbounds.enable\" }}\n                    </a-menu-item>\n                  </a-menu>\n                </a-dropdown>\n              </template>\n              <template slot=\"protocol\" slot-scope=\"text, dbInbound\">\n                <a-tag style=\"margin:0;\" color=\"purple\">[[ dbInbound.protocol ]]</a-tag>\n                <template v-if=\"dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS\">\n                  <a-tag style=\"margin:0;\" color=\"green\">[[ dbInbound.toInbound().stream.network ]]</a-tag>\n                  <a-tag style=\"margin:0;\" v-if=\"dbInbound.toInbound().stream.isTls\" color=\"blue\">TLS</a-tag>\n                  <a-tag style=\"margin:0;\" v-if=\"dbInbound.toInbound().stream.isXtls\" color=\"blue\">XTLS</a-tag>\n                  <a-tag style=\"margin:0;\" v-if=\"dbInbound.toInbound().stream.isReality\" color=\"blue\">Reality</a-tag>\n                </template>\n              </template>\n              <template slot=\"clients\" slot-scope=\"text, dbInbound\">\n                <template v-if=\"clientCount[dbInbound.id]\">\n                  <a-tag style=\"margin:0;\" color=\"green\">[[ clientCount[dbInbound.id].clients ]]</a-tag>\n                  <a-popover title='{{ i18n \"disabled\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                    <template slot=\"content\">\n                      <p v-for=\"clientEmail in clientCount[dbInbound.id].deactive\">[[ clientEmail ]]</p>\n                    </template>\n                    <a-tag style=\"margin:0; padding: 0 2px;\" v-if=\"clientCount[dbInbound.id].deactive.length\">[[ clientCount[dbInbound.id].deactive.length ]]</a-tag>\n                  </a-popover>\n                  <a-popover title='{{ i18n \"depleted\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                    <template slot=\"content\">\n                      <p v-for=\"clientEmail in clientCount[dbInbound.id].depleted\">[[ clientEmail ]]</p>\n                    </template>\n                    <a-tag style=\"margin:0; padding: 0 2px;\" color=\"red\" v-if=\"clientCount[dbInbound.id].depleted.length\">[[ clientCount[dbInbound.id].depleted.length ]]</a-tag>\n                  </a-popover>\n                  <a-popover title='{{ i18n \"depletingSoon\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                    <template slot=\"content\">\n                      <p v-for=\"clientEmail in clientCount[dbInbound.id].expiring\">[[ clientEmail ]]</p>\n                    </template>\n                    <a-tag style=\"margin:0; padding: 0 2px;\" color=\"orange\" v-if=\"clientCount[dbInbound.id].expiring.length\">[[ clientCount[dbInbound.id].expiring.length ]]</a-tag>\n                  </a-popover>\n                  <a-popover title='{{ i18n \"online\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                    <template slot=\"content\">\n                      <p v-for=\"clientEmail in clientCount[dbInbound.id].online\">[[ clientEmail ]]</p>\n                    </template>\n                    <a-tag style=\"margin:0; padding: 0 2px;\" color=\"blue\" v-if=\"clientCount[dbInbound.id].online.length\">[[ clientCount[dbInbound.id].online.length ]]</a-tag>\n                  </a-popover>\n                </template>\n              </template>\n              <template slot=\"traffic\" slot-scope=\"text, dbInbound\">\n                <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                  <template slot=\"content\">\n                    <table cellpadding=\"2\" width=\"100%\">\n                      <tr>\n                        <td>↑[[ sizeFormat(dbInbound.up) ]]</td>\n                        <td>↓[[ sizeFormat(dbInbound.down) ]]</td>\n                      </tr>\n                      <tr v-if=\"dbInbound.total > 0 &&  dbInbound.up + dbInbound.down < dbInbound.total\">\n                        <td>{{ i18n \"remained\" }}</td>\n                        <td>[[ sizeFormat(dbInbound.total - dbInbound.up - dbInbound.down) ]]</td>\n                      </tr>\n                    </table>\n                  </template>\n                  <a-tag :color=\"usageColor(dbInbound.up + dbInbound.down, app.trafficDiff, dbInbound.total)\">\n                    [[ sizeFormat(dbInbound.up + dbInbound.down) ]] /\n                    <template v-if=\"dbInbound.total > 0\">\n                        [[ sizeFormat(dbInbound.total) ]]\n                    </template>\n                    <template v-else>\n                      <svg style=\"fill: currentColor; height: 10px;\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\">\n                        <path d=\"M484.4 96C407 96 349.2 164.1 320 208.5C290.8 164.1 233 96 155.6 96C69.75 96 0 167.8 0 256s69.75 160 155.6 160C233.1 416 290.8 347.9 320 303.5C349.2 347.9 407 416 484.4 416C570.3 416 640 344.2 640 256S570.3 96 484.4 96zM155.6 368C96.25 368 48 317.8 48 256s48.25-112 107.6-112c67.75 0 120.5 82.25 137.1 112C276 285.8 223.4 368 155.6 368zM484.4 368c-67.75 0-120.5-82.25-137.1-112C364 226.2 416.6 144 484.4 144C543.8 144 592 194.2 592 256S543.8 368 484.4 368z\" />\n                      </svg>\n                    </template>\n                  </a-tag>\n                </a-popover>\n              </template>\n              <template slot=\"enable\" slot-scope=\"text, dbInbound\">\n                <a-switch v-model=\"dbInbound.enable\" @change=\"switchEnable(dbInbound.id,dbInbound.enable)\"></a-switch>\n              </template>\n              <template slot=\"expiryTime\" slot-scope=\"text, dbInbound\">\n                <a-popover v-if=\"dbInbound.expiryTime > 0\" :overlay-class-name=\"themeSwitcher.currentTheme\">\n                  <template slot=\"content\">\n                    [[ DateUtil.formatMillis(dbInbound.expiryTime) ]]\n                  </template>\n                  <a-tag style=\"min-width: 50px;\" :color=\"usageColor(new Date().getTime(), app.expireDiff, dbInbound._expiryTime)\">\n                    [[ remainedDays(dbInbound._expiryTime) ]]\n                  </a-tag>\n                </a-popover>\n                <a-tag v-else color=\"purple\" class=\"infinite-tag\">&infin;</a-tag>\n              </template>\n              <template slot=\"info\" slot-scope=\"text, dbInbound\">\n                <a-popover placement=\"bottomRight\" :overlay-class-name=\"themeSwitcher.currentTheme\" trigger=\"click\">\n                  <template slot=\"content\">\n                    <table cellpadding=\"2\">\n                      <tr>\n                        <td>{{ i18n \"pages.inbounds.protocol\" }}</td>\n                        <td>\n                          <a-tag style=\"margin:0;\" color=\"purple\">[[ dbInbound.protocol ]]</a-tag>\n                          <template v-if=\"dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS\">\n                            <a-tag style=\"margin:0;\" color=\"blue\">[[ dbInbound.toInbound().stream.network ]]</a-tag>\n                            <a-tag style=\"margin:0;\" v-if=\"dbInbound.toInbound().stream.isTls\" color=\"green\">tls</a-tag>\n                            <a-tag style=\"margin:0;\" v-if=\"dbInbound.toInbound().stream.isReality\" color=\"green\">reality</a-tag>\n                          </template>\n                        </td>\n                      </tr>\n                      <tr>\n                        <td>{{ i18n \"pages.inbounds.port\" }}</td>\n                        <td><a-tag>[[ dbInbound.port ]]</a-tag></td>\n                      </tr>\n                      <tr v-if=\"clientCount[dbInbound.id]\">\n                        <td>{{ i18n \"clients\" }}</td>\n                        <td>\n                          <a-tag style=\"margin:0;\" color=\"blue\">[[ clientCount[dbInbound.id].clients ]]</a-tag>\n                          <a-popover title='{{ i18n \"disabled\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                              <p v-for=\"clientEmail in clientCount[dbInbound.id].deactive\">[[ clientEmail ]]</p>\n                            </template>\n                            <a-tag style=\"margin:0; padding: 0 2px;\" v-if=\"clientCount[dbInbound.id].deactive.length\">[[ clientCount[dbInbound.id].deactive.length ]]</a-tag>\n                          </a-popover>\n                          <a-popover title='{{ i18n \"depleted\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                              <p v-for=\"clientEmail in clientCount[dbInbound.id].depleted\">[[ clientEmail ]]</p>\n                            </template>\n                            <a-tag style=\"margin:0; padding: 0 2px;\" color=\"red\" v-if=\"clientCount[dbInbound.id].depleted.length\">[[ clientCount[dbInbound.id].depleted.length ]]</a-tag>\n                          </a-popover>\n                          <a-popover title='{{ i18n \"depletingSoon\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                              <p v-for=\"clientEmail in clientCount[dbInbound.id].expiring\">[[ clientEmail ]]</p>\n                            </template>\n                            <a-tag style=\"margin:0; padding: 0 2px;\" color=\"orange\" v-if=\"clientCount[dbInbound.id].expiring.length\">[[ clientCount[dbInbound.id].expiring.length ]]</a-tag>\n                          </a-popover>\n                          <a-popover title='{{ i18n \"online\" }}' :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                              <p v-for=\"clientEmail in clientCount[dbInbound.id].online\">[[ clientEmail ]]</p>\n                            </template>\n                            <a-tag style=\"margin:0; padding: 0 2px;\" color=\"green\" v-if=\"clientCount[dbInbound.id].online.length\">[[ clientCount[dbInbound.id].online.length ]]</a-tag>\n                          </a-popover>\n                        </td>\n                      </tr>\n                      <tr>\n                        <td>{{ i18n \"pages.inbounds.traffic\" }}</td>\n                        <td>\n                          <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                            <template slot=\"content\">\n                              <table cellpadding=\"2\" width=\"100%\">\n                                <tr>\n                                  <td>↑[[ sizeFormat(dbInbound.up) ]]</td>\n                                  <td>↓[[ sizeFormat(dbInbound.down) ]]</td>\n                                </tr>\n                                <tr v-if=\"dbInbound.total > 0 &&  dbInbound.up + dbInbound.down < dbInbound.total\">\n                                  <td>{{ i18n \"remained\" }}</td>\n                                  <td>[[ sizeFormat(dbInbound.total - dbInbound.up - dbInbound.down) ]]</td>\n                                </tr>\n                              </table>\n                            </template>\n                            <a-tag :color=\"usageColor(dbInbound.up + dbInbound.down, app.trafficDiff, dbInbound.total)\">\n                                [[ sizeFormat(dbInbound.up + dbInbound.down) ]] /\n                                <template v-if=\"dbInbound.total > 0\">\n                                    [[ sizeFormat(dbInbound.total) ]]\n                                </template>\n                              <template v-else>&infin;</template>\n                            </a-tag>\n                          </a-popover>\n                        </td>\n                      </tr>\n                      <tr>\n                        <td>{{ i18n \"pages.inbounds.expireDate\" }}</td>\n                        <td>\n                          <a-tag style=\"min-width: 50px; text-align: center;\" v-if=\"dbInbound.expiryTime > 0\" :color=\"dbInbound.isExpiry? 'red': 'blue'\">\n                            [[ DateUtil.formatMillis(dbInbound.expiryTime) ]]\n                          </a-tag>\n                          <a-tag v-else style=\"text-align: center;\" color=\"purple\" class=\"infinite-tag\">&infin;</a-tag>\n                        </td>\n                      </tr>\n                    </table>\n                  </template>\n                  <a-badge>\n                    <a-icon v-if=\"!dbInbound.enable\" slot=\"count\" type=\"pause-circle\" :style=\"'color: ' + themeSwitcher.isDarkTheme ? '#2c3950' : '#bcbcbc'\"></a-icon>\n                    <a-button shape=\"round\" size=\"small\" style=\"font-size: 14px; padding: 0 10px;\">\n                      <a-icon type=\"info\"></a-icon>\n                    </a-button>\n                  </a-badge>\n                </a-popover>\n              </template>\n              <template slot=\"expandedRowRender\" slot-scope=\"record\">\n                <a-table\n                  :row-key=\"client => client.id\"\n                  :columns=\"isMobile ? innerMobileColumns : innerColumns\"\n                  :data-source=\"getInboundClients(record)\"\n                  :pagination=pagination(getInboundClients(record))\n                  :style=\"isMobile ? 'margin: -12px 2px -13px;' : 'margin: -12px 22px -13px;'\">\n                  {{template \"client_table\"}}\n                </a-table>\n              </template>\n            </a-table>\n          </a-card>\n        </transition>\n      </a-spin>\n    </a-layout-content>\n  </a-layout>\n</a-layout>\n{{template \"js\" .}}\n<script src=\"{{ .base_path }}assets/base64/base64.min.js\"></script>\n<script src=\"{{ .base_path }}assets/qrcode/qrious2.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/clipboard/clipboard.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/uri/URI.min.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/model/xray.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/js/model/dbinbound.js?{{ .cur_ver }}\"></script>\n{{template \"component/themeSwitcher\" .}}\n{{template \"component/persianDatepicker\" .}}\n<script>\n    const columns = [{\n        title: \"ID\",\n        align: 'right',\n        dataIndex: \"id\",\n        width: 30,\n        responsive: [\"xs\"],\n    }, {\n        title: '{{ i18n \"pages.inbounds.operate\" }}',\n        align: 'center',\n        width: 30,\n        scopedSlots: { customRender: 'action' },\n    }, {\n        title: '{{ i18n \"pages.inbounds.enable\" }}',\n        align: 'center',\n        width: 30,\n        scopedSlots: { customRender: 'enable' },\n    }, {\n        title: '{{ i18n \"pages.inbounds.remark\" }}',\n        align: 'center',\n        width: 60,\n        dataIndex: \"remark\",\n    }, {\n        title: '{{ i18n \"pages.inbounds.port\" }}',\n        align: 'center',\n        dataIndex: \"port\",\n        width: 40,\n    }, {\n        title: '{{ i18n \"pages.inbounds.protocol\" }}',\n        align: 'left',\n        width: 70,\n        scopedSlots: { customRender: 'protocol' },\n    }, {\n        title: '{{ i18n \"clients\" }}',\n        align: 'left',\n        width: 50,\n        scopedSlots: { customRender: 'clients' },\n    }, {\n        title: '{{ i18n \"pages.inbounds.traffic\" }}',\n        align: 'center',\n        width: 60,\n        scopedSlots: { customRender: 'traffic' },\n    }, {\n        title: '{{ i18n \"pages.inbounds.expireDate\" }}',\n        align: 'center',\n        width: 40,\n        scopedSlots: { customRender: 'expiryTime' },\n    }];\n\n    const mobileColumns = [{\n        title: \"ID\",\n        align: 'right',\n        dataIndex: \"id\",\n        width: 10,\n        responsive: [\"s\"],\n    }, {\n        title: '{{ i18n \"pages.inbounds.operate\" }}',\n        align: 'center',\n        width: 25,\n        scopedSlots: { customRender: 'action' },\n    }, {\n        title: '{{ i18n \"pages.inbounds.remark\" }}',\n        align: 'left',\n        width: 70,\n        dataIndex: \"remark\",\n    }, {\n        title: '{{ i18n \"pages.inbounds.info\" }}',\n        align: 'center',\n        width: 10,\n        scopedSlots: { customRender: 'info' },\n    }];\n\n    const innerColumns = [\n        { title: '{{ i18n \"pages.inbounds.operate\" }}', width: 65, scopedSlots: { customRender: 'actions' } },\n        { title: '{{ i18n \"pages.inbounds.enable\" }}', width: 30, scopedSlots: { customRender: 'enable' } },\n        { title: '{{ i18n \"online\" }}', width: 30, scopedSlots: { customRender: 'online' } },\n        { title: '{{ i18n \"pages.inbounds.client\" }}', width: 80, scopedSlots: { customRender: 'client' } },\n        { title: '{{ i18n \"pages.inbounds.traffic\" }}', width: 80, align: 'center', scopedSlots: { customRender: 'traffic' } },\n        { title: '{{ i18n \"pages.inbounds.expireDate\" }}', width: 100, align: 'center', scopedSlots: { customRender: 'expiryTime' } },\n    ];\n\n    const innerMobileColumns = [\n        { title: '{{ i18n \"pages.inbounds.operate\" }}', width: 10, align: 'center', scopedSlots: { customRender: 'actionMenu' } },\n        { title: '{{ i18n \"pages.inbounds.client\" }}', width: 90, align: 'left', scopedSlots: { customRender: 'client' } },\n        { title: '{{ i18n \"pages.inbounds.info\" }}', width: 10, align: 'center', scopedSlots: { customRender: 'info' } },\n    ];\n\n    const app = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#app',\n        data: {\n            siderDrawer,\n            themeSwitcher,\n            persianDatepicker,\n            spinning: false,\n            inbounds: [],\n            dbInbounds: [],\n            searchKey: '',\n            enableFilter: false,\n            filterBy: '',\n            searchedInbounds: [],\n            expireDiff: 0,\n            trafficDiff: 0,\n            defaultCert: '',\n            defaultKey: '',\n            clientCount: [],\n            onlineClients: [],\n            isRefreshEnabled: localStorage.getItem(\"isRefreshEnabled\") === \"true\" ? true : false,\n            refreshing: false,\n            refreshInterval: Number(localStorage.getItem(\"refreshInterval\")) || 5000,\n            subSettings: {\n                enable : false,\n                subURI : '',\n                subJsonURI : '',\n            },\n            remarkModel: '-ieo',\n            datepicker: 'gregorian',\n            tgBotEnable: false,\n            showAlert: false,\n            ipLimitEnable: false,\n            pageSize: 50,\n            isMobile: window.innerWidth <= 768,\n        },\n        methods: {\n            loading(spinning = true) {\n                this.spinning = spinning;\n            },\n            async getDBInbounds() {\n                this.refreshing = true;\n                const msg = await HttpUtil.post('/panel/inbound/list');\n                if (!msg.success) {\n                    this.refreshing = false;\n                    return;\n                }\n\n                await this.getOnlineUsers();\n                this.setInbounds(msg.obj);\n                setTimeout(() => {\n                    this.refreshing = false;\n                }, 500);\n            },\n            async getOnlineUsers() {\n                const msg = await HttpUtil.post('/panel/inbound/onlines');\n                if (!msg.success) {\n                    return;\n                }\n                this.onlineClients = msg.obj != null ? msg.obj : [];\n            },\n            async getDefaultSettings() {\n                const msg = await HttpUtil.post('/panel/setting/defaultSettings');\n                if (!msg.success) {\n                    return;\n                }\n                with(msg.obj){\n                    this.expireDiff = expireDiff * 86400000;\n                    this.trafficDiff = trafficDiff * 1073741824;\n                    this.defaultCert = defaultCert;\n                    this.defaultKey = defaultKey;\n                    this.tgBotEnable = tgBotEnable;\n                    this.subSettings = {\n                        enable : subEnable,\n                        subURI: subURI,\n                        subJsonURI: subJsonURI\n                    };\n                    this.pageSize = pageSize;\n                    this.remarkModel = remarkModel;\n                    this.datepicker = datepicker;\n                    this.ipLimitEnable = ipLimitEnable;\n                }\n            },\n            setInbounds(dbInbounds) {\n                this.inbounds.splice(0);\n                this.dbInbounds.splice(0);\n                this.clientCount.splice(0);\n                for (const inbound of dbInbounds) {\n                    const dbInbound = new DBInbound(inbound);\n                    to_inbound = dbInbound.toInbound()\n                    this.inbounds.push(to_inbound);\n                    this.dbInbounds.push(dbInbound);\n                    if ([Protocols.VMESS, Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(inbound.protocol)) {\n                        if (inbound.protocol === Protocols.SHADOWSOCKS && (!to_inbound.isSSMultiUser)) {\n                            continue;\n                        }\n                        this.clientCount[inbound.id] = this.getClientCounts(inbound, to_inbound);\n                    }\n                }\n                if(this.enableFilter){\n                    this.filterInbounds();\n                } else {\n                    this.searchInbounds(this.searchKey);\n                }\n            },\n            getClientCounts(dbInbound, inbound) {\n                let clientCount = 0, active = [], deactive = [], depleted = [], expiring = [], online = [];\n                clients = inbound.clients;\n                clientStats = dbInbound.clientStats\n                now = new Date().getTime()\n                if (clients) {\n                    clientCount = clients.length;\n                    if (dbInbound.enable) {\n                        clients.forEach(client => {\n                            if (client.enable) {\n                                active.push(client.email);\n                                if (this.isClientOnline(client.email)) online.push(client.email);\n                            } else {\n                                deactive.push(client.email);\n                            }\n                        });\n                        clientStats.forEach(client => {\n                            if (!client.enable) {\n                                depleted.push(client.email);\n                            } else {\n                                if ((client.expiryTime > 0 && (client.expiryTime - now < this.expireDiff)) ||\n                                    (client.total > 0 && (client.total - (client.up + client.down) < this.trafficDiff))) expiring.push(client.email);\n                            }\n                        });\n                    } else {\n                        clients.forEach(client => {\n                            deactive.push(client.email);\n                        });\n                    }\n                }\n                return {\n                    clients: clientCount,\n                    active: active,\n                    deactive: deactive,\n                    depleted: depleted,\n                    expiring: expiring,\n                    online: online,\n                };\n            },\n\n            searchInbounds(key) {\n                if (ObjectUtil.isEmpty(key)) {\n                    this.searchedInbounds = this.dbInbounds.slice();\n                } else {\n                    this.searchedInbounds.splice(0, this.searchedInbounds.length);\n                    this.dbInbounds.forEach(inbound => {\n                        if (ObjectUtil.deepSearch(inbound, key)) {\n                            const newInbound = new DBInbound(inbound);\n                            const inboundSettings = JSON.parse(inbound.settings);\n                            if (inboundSettings.hasOwnProperty('clients')) {\n                                const searchedSettings = { \"clients\": [] };\n                                inboundSettings.clients.forEach(client => {\n                                    if (ObjectUtil.deepSearch(client, key)) {\n                                        searchedSettings.clients.push(client);\n                                    }\n                                });\n                                newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, searchedSettings);\n                            }\n                            this.searchedInbounds.push(newInbound);\n                        }\n                    });\n                }\n            },\n            filterInbounds() {\n                if (ObjectUtil.isEmpty(this.filterBy)) {\n                    this.searchedInbounds = this.dbInbounds.slice();\n                } else {\n                    this.searchedInbounds.splice(0, this.searchedInbounds.length);\n                    this.dbInbounds.forEach(inbound => {\n                        const newInbound = new DBInbound(inbound);\n                        const inboundSettings = JSON.parse(inbound.settings);\n                        if (this.clientCount[inbound.id] && this.clientCount[inbound.id].hasOwnProperty(this.filterBy)){\n                            const list = this.clientCount[inbound.id][this.filterBy];\n                            if (list.length > 0) {\n                                const filteredSettings = { \"clients\": [] };\n                                inboundSettings.clients.forEach(client => {\n                                    if (list.includes(client.email)) {\n                                        filteredSettings.clients.push(client);\n                                    }\n                                });\n                                newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, filteredSettings);\n                                this.searchedInbounds.push(newInbound);\n                            }\n                        }\n                    });\n                }\n            },\n            toggleFilter(){\n                if(this.enableFilter) {\n                    this.searchKey = '';\n                } else {\n                    this.filterBy = '';\n                    this.searchedInbounds = this.dbInbounds.slice();\n                }\n            },\n            generalActions(action) {\n                switch (action.key) {\n                    case \"import\":\n                        this.importInbound();\n                        break;\n                    case \"export\":\n                        this.exportAllLinks();\n                        break;\n                    case \"subs\":\n                        this.exportAllSubs();\n                        break;\n                    case \"resetInbounds\":\n                        this.resetAllTraffic();\n                        break;\n                    case \"resetClients\":\n                        this.resetAllClientTraffics(-1);\n                        break;\n                    case \"delDepletedClients\":\n                        this.delDepletedClients(-1)\n                        break;\n                }\n            },\n            clickAction(action, dbInbound) {\n                switch (action.key) {\n                    case \"qrcode\":\n                        this.showQrcode(dbInbound.id);\n                        break;\n                    case \"showInfo\":\n                        this.showInfo(dbInbound.id);\n                        break;\n                    case \"edit\":\n                        this.openEditInbound(dbInbound.id);\n                        break;\n                    case \"addClient\":\n                        this.openAddClient(dbInbound.id)\n                        break;\n                    case \"addBulkClient\":\n                        this.openAddBulkClient(dbInbound.id)\n                        break;\n                    case \"export\":\n                        this.inboundLinks(dbInbound.id);\n                        break;\n                    case \"subs\":\n                        this.exportSubs(dbInbound.id);\n                        break;\n                    case \"clipboard\":\n                        this.copyToClipboard(dbInbound.id);\n                        break;\n                    case \"resetTraffic\":\n                        this.resetTraffic(dbInbound.id);\n                        break;\n                    case \"resetClients\":\n                        this.resetAllClientTraffics(dbInbound.id);\n                        break;\n                    case \"clone\":\n                        this.openCloneInbound(dbInbound);\n                        break;\n                    case \"delete\":\n                        this.delInbound(dbInbound.id);\n                        break;\n                    case \"delDepletedClients\":\n                        this.delDepletedClients(dbInbound.id)\n                        break;\n                }\n            },\n            openCloneInbound(dbInbound) {\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.cloneInbound\"}} \\\"' + dbInbound.remark + '\\\"',\n                    content: '{{ i18n \"pages.inbounds.cloneInboundContent\"}}',\n                    okText: '{{ i18n \"pages.inbounds.cloneInboundOk\"}}',\n                    class: themeSwitcher.currentTheme,\n                    cancelText: '{{ i18n \"cancel\" }}',\n                    onOk: () => {\n                        const baseInbound = dbInbound.toInbound();\n                        dbInbound.up = 0;\n                        dbInbound.down = 0;\n                        this.cloneInbound(baseInbound, dbInbound);\n                    },\n                });\n            },\n            async cloneInbound(baseInbound, dbInbound) {\n                const data = {\n                    up: dbInbound.up,\n                    down: dbInbound.down,\n                    total: dbInbound.total,\n                    remark: dbInbound.remark + \" - Cloned\",\n                    enable: dbInbound.enable,\n                    expiryTime: dbInbound.expiryTime,\n\n                    listen: '',\n                    port: RandomUtil.randomIntRange(10000, 60000),\n                    protocol: baseInbound.protocol,\n                    settings: Inbound.Settings.getSettings(baseInbound.protocol).toString(),\n                    streamSettings: baseInbound.stream.toString(),\n                    sniffing: baseInbound.sniffing.toString(),\n                };\n                await this.submit('/panel/inbound/add', data, inModal);\n            },\n            openAddInbound() {\n                inModal.show({\n                    title: '{{ i18n \"pages.inbounds.addInbound\"}}',\n                    okText: '{{ i18n \"pages.inbounds.create\"}}',\n                    cancelText: '{{ i18n \"close\" }}',\n                    confirm: async (inbound, dbInbound) => {\n                        await this.addInbound(inbound, dbInbound, inModal);\n                    },\n                    isEdit: false\n                });\n            },\n            openEditInbound(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                const inbound = dbInbound.toInbound();\n                inModal.show({\n                    title: '{{ i18n \"pages.inbounds.modifyInbound\"}}',\n                    okText: '{{ i18n \"pages.inbounds.update\"}}',\n                    cancelText: '{{ i18n \"close\" }}',\n                    inbound: inbound,\n                    dbInbound: dbInbound,\n                    confirm: async (inbound, dbInbound) => {\n                        await this.updateInbound(inbound, dbInbound);\n                    },\n                    isEdit: true\n                });\n            },\n            async addInbound(inbound, dbInbound) {\n                const data = {\n                    up: dbInbound.up,\n                    down: dbInbound.down,\n                    total: dbInbound.total,\n                    remark: dbInbound.remark,\n                    enable: dbInbound.enable,\n                    expiryTime: dbInbound.expiryTime,\n\n                    listen: inbound.listen,\n                    port: inbound.port,\n                    protocol: inbound.protocol,\n                    settings: inbound.settings.toString(),\n                };\n                if (inbound.canEnableStream()) data.streamSettings = inbound.stream.toString();\n                data.sniffing = inbound.sniffing.toString();\n\n                await this.submit('/panel/inbound/add', data, inModal);\n            },\n            async updateInbound(inbound, dbInbound) {\n                const data = {\n                    up: dbInbound.up,\n                    down: dbInbound.down,\n                    total: dbInbound.total,\n                    remark: dbInbound.remark,\n                    enable: dbInbound.enable,\n                    expiryTime: dbInbound.expiryTime,\n\n                    listen: inbound.listen,\n                    port: inbound.port,\n                    protocol: inbound.protocol,\n                    settings: inbound.settings.toString(),\n                };\n                if (inbound.canEnableStream()) data.streamSettings = inbound.stream.toString();\n                data.sniffing = inbound.sniffing.toString();\n\n                await this.submit(`/panel/inbound/update/${dbInbound.id}`, data, inModal);\n            },\n            openAddClient(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                clientModal.show({\n                    title: '{{ i18n \"pages.client.add\"}}',\n                    okText: '{{ i18n \"pages.client.submitAdd\"}}',\n                    dbInbound: dbInbound,\n                    confirm: async (clients, dbInboundId) => {\n                        await this.addClient(clients, dbInboundId, clientModal);\n                    },\n                    isEdit: false\n                });\n            },\n            openAddBulkClient(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                clientsBulkModal.show({\n                    title: '{{ i18n \"pages.client.bulk\"}} ' + dbInbound.remark,\n                    okText: '{{ i18n \"pages.client.bulk\"}}',\n                    dbInbound: dbInbound,\n                    confirm: async (clients, dbInboundId) => {\n                        await this.addClient(clients, dbInboundId, clientsBulkModal);\n                    },\n                });\n            },\n            openEditClient(dbInboundId, client) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                clients = this.getInboundClients(dbInbound);\n                index = this.findIndexOfClient(dbInbound.protocol, clients, client);\n                clientModal.show({\n                    title: '{{ i18n \"pages.client.edit\"}}',\n                    okText: '{{ i18n \"pages.client.submitEdit\"}}',\n                    dbInbound: dbInbound,\n                    index: index,\n                    confirm: async (client, dbInboundId, clientId) => {\n                        clientModal.loading();\n                        await this.updateClient(client, dbInboundId, clientId);\n                        clientModal.close();\n                    },\n                    isEdit: true\n                });\n            },\n            findIndexOfClient(protocol, clients, client) {\n                switch (protocol) {\n                    case Protocols.TROJAN:\n                    case Protocols.SHADOWSOCKS:\n                        return clients.findIndex(item => item.password === client.password && item.email === client.email);\n                    default: return clients.findIndex(item => item.id === client.id && item.email === client.email);\n                }\n            },\n            async addClient(clients, dbInboundId, modal) {\n                const data = {\n                    id: dbInboundId,\n                    settings: '{\"clients\": [' + clients.toString() + ']}',\n                };\n                await this.submit(`/panel/inbound/addClient`, data, modal);\n            },\n            async updateClient(client, dbInboundId, clientId) {\n                const data = {\n                    id: dbInboundId,\n                    settings: '{\"clients\": [' + client.toString() + ']}',\n                };\n                await this.submit(`/panel/inbound/updateClient/${clientId}`, data, clientModal);\n            },\n            resetTraffic(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.resetTraffic\"}}' + ' #' + dbInboundId,\n                    content: '{{ i18n \"pages.inbounds.resetTrafficContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"reset\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: () => {\n                        const inbound = dbInbound.toInbound();\n                        dbInbound.up = 0;\n                        dbInbound.down = 0;\n                        this.updateInbound(inbound, dbInbound);\n                    },\n                });\n            },\n            delInbound(dbInboundId) {\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.deleteInbound\"}}' + ' #' + dbInboundId,\n                    content: '{{ i18n \"pages.inbounds.deleteInboundContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"delete\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: () => this.submit('/panel/inbound/del/' + dbInboundId),\n                });\n            },\n            delClient(dbInboundId, client,confirmation = true) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                clientId = this.getClientId(dbInbound.protocol, client);\n                if (confirmation){\n                    this.$confirm({\n                        title: '{{ i18n \"pages.inbounds.deleteClient\"}}' + ' ' + client.email,\n                        content: '{{ i18n \"pages.inbounds.deleteClientContent\"}}',\n                        class: themeSwitcher.currentTheme,\n                        okText: '{{ i18n \"delete\"}}',\n                        cancelText: '{{ i18n \"cancel\"}}',\n                        onOk: () => this.submit(`/panel/inbound/${dbInboundId}/delClient/${clientId}`),\n                    });\n                } else {\n                    this.submit(`/panel/inbound/${dbInboundId}/delClient/${clientId}`);\n                }\n            },\n            getClientId(protocol, client) {\n                switch (protocol) {\n                    case Protocols.TROJAN: return client.password;\n                    case Protocols.SHADOWSOCKS: return client.email;\n                    default: return client.id;\n                }\n            },\n            checkFallback(dbInbound) {\n                newDbInbound = new DBInbound(dbInbound);\n                if (dbInbound.listen.startsWith(\"@\")){\n                    rootInbound = this.inbounds.find((i) => \n                        i.isTcp && \n                        ['trojan','vless'].includes(i.protocol) &&\n                        i.settings.fallbacks.find(f => f.dest === dbInbound.listen)\n                    );\n                    if (rootInbound) {\n                        newDbInbound.listen = rootInbound.listen;\n                        newDbInbound.port = rootInbound.port;\n                        newInbound = newDbInbound.toInbound();\n                        newInbound.stream.security = rootInbound.stream.security;\n                        newInbound.stream.tls = rootInbound.stream.tls;\n                        newInbound.stream.externalProxy = rootInbound.stream.externalProxy;\n                        newDbInbound.streamSettings = newInbound.stream.toString();\n                    }\n                }\n                return newDbInbound;\n            },\n            showQrcode(dbInboundId, client) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                newDbInbound = this.checkFallback(dbInbound);\n                qrModal.show('{{ i18n \"qrCode\"}}', newDbInbound, client);\n            },\n            showInfo(dbInboundId, client) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                index=0;\n                if (dbInbound.isMultiUser()){\n                    inbound = dbInbound.toInbound();\n                    clients = inbound.clients;\n                    index = this.findIndexOfClient(dbInbound.protocol, clients, client);\n                }\n                newDbInbound = this.checkFallback(dbInbound);\n                infoModal.show(newDbInbound, index);\n            },\n            switchEnable(dbInboundId,state) {\n              dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n              dbInbound.enable = state;\n              this.submit(`/panel/inbound/update/${dbInboundId}`, dbInbound);\n            },\n            async switchEnableClient(dbInboundId, client) {\n                this.loading()\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                inbound = dbInbound.toInbound();\n                clients = inbound.clients;\n                index = this.findIndexOfClient(dbInbound.protocol, clients, client);\n                clients[index].enable = !clients[index].enable;\n                clientId = this.getClientId(dbInbound.protocol, clients[index]);\n                await this.updateClient(clients[index], dbInboundId, clientId);\n                this.loading(false);\n            },\n            async submit(url, data, modal) {\n                const msg = await HttpUtil.postWithModal(url, data, modal);\n                if (msg.success) {\n                    await this.getDBInbounds();\n                }\n            },\n            getInboundClients(dbInbound) {\n                return dbInbound.toInbound().clients;\n            },\n            resetClientTraffic(client, dbInboundId, confirmation = true) {\n                if (confirmation){\n                    this.$confirm({\n                        title: '{{ i18n \"pages.inbounds.resetTraffic\"}}' + ' ' + client.email,\n                        content: '{{ i18n \"pages.inbounds.resetTrafficContent\"}}',\n                        class: themeSwitcher.currentTheme,\n                        okText: '{{ i18n \"reset\"}}',\n                        cancelText: '{{ i18n \"cancel\"}}',\n                        onOk: () => this.submit('/panel/inbound/' + dbInboundId + '/resetClientTraffic/' + client.email),\n                    })\n                } else {\n                    this.submit('/panel/inbound/' + dbInboundId + '/resetClientTraffic/' + client.email);\n                }\n            },\n            resetAllTraffic() {\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.resetAllTrafficTitle\"}}',\n                    content: '{{ i18n \"pages.inbounds.resetAllTrafficContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"reset\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: () => this.submit('/panel/inbound/resetAllTraffics'),\n                });\n            },\n            resetAllClientTraffics(dbInboundId) {\n                this.$confirm({\n                    title: dbInboundId > 0 ? '{{ i18n \"pages.inbounds.resetInboundClientTrafficTitle\"}}' : '{{ i18n \"pages.inbounds.resetAllClientTrafficTitle\"}}',\n                    content: dbInboundId > 0 ? '{{ i18n \"pages.inbounds.resetInboundClientTrafficContent\"}}' : '{{ i18n \"pages.inbounds.resetAllClientTrafficContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"reset\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: () => this.submit('/panel/inbound/resetAllClientTraffics/' + dbInboundId),\n                })\n            },\n            delDepletedClients(dbInboundId) {\n                this.$confirm({\n                    title: '{{ i18n \"pages.inbounds.delDepletedClientsTitle\"}}',\n                    content: '{{ i18n \"pages.inbounds.delDepletedClientsContent\"}}',\n                    class: themeSwitcher.currentTheme,\n                    okText: '{{ i18n \"delete\"}}',\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: () => this.submit('/panel/inbound/delDepletedClients/' + dbInboundId),\n                })\n            },\n            isExpiry(dbInbound, index) {\n                return dbInbound.toInbound().isExpiry(index);\n            },\n            getUpStats(dbInbound, email) {\n                if (email.length == 0) return 0;\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                return clientStats ? clientStats.up : 0;\n            },\n            getDownStats(dbInbound, email) {\n                if (email.length == 0) return 0;\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                return clientStats ? clientStats.down : 0;\n            },\n            getSumStats(dbInbound, email) {\n                if (email.length == 0) return 0;\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                return clientStats ? clientStats.up + clientStats.down : 0;\n            },\n            getRemStats(dbInbound, email) {\n                if (email.length == 0) return 0;\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                if (!clientStats) return 0;\n                remained = clientStats.total - (clientStats.up + clientStats.down);\n                return remained>0 ? remained : 0;\n            },\n            clientStatsColor(dbInbound, email) {\n                if (email.length == 0) return clientUsageColor();\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                return clientUsageColor(clientStats, app.trafficDiff)\n            },\n            statsProgress(dbInbound, email) {\n                if (email.length == 0) return 100;\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                if (!clientStats) return 0;\n                if (clientStats.total == 0) return 100;\n                return 100*(clientStats.down + clientStats.up)/clientStats.total;\n            },\n            expireProgress(expTime, reset) {\n                now = new Date().getTime();\n                remainedSeconds = expTime < 0 ? -expTime/1000 : (expTime-now)/1000;\n                resetSeconds = reset * 86400;\n                if (remainedSeconds >= resetSeconds) return 0;\n                return 100*(1-(remainedSeconds/resetSeconds));\n            },\n            remainedDays(expTime){\n                if (expTime == 0) return null;\n                if (expTime < 0) return formatSecond(expTime/-1000);\n                now = new Date().getTime();\n                if (expTime < now) return '{{ i18n \"depleted\" }}';\n                return formatSecond((expTime-now)/1000);\n            },\n            statsExpColor(dbInbound, email){\n                if (email.length == 0) return '#7a316f';\n                clientStats = dbInbound.clientStats.find(stats => stats.email === email);\n                if (!clientStats) return '#7a316f';\n                statsColor = usageColor(clientStats.down + clientStats.up, this.trafficDiff, clientStats.total);\n                expColor = usageColor(new Date().getTime(), this.expireDiff, clientStats.expiryTime);\n                switch (true) {\n                    case statsColor == \"red\" || expColor == \"red\":\n                        return \"#cf3c3c\"; // Red\n                    case statsColor == \"orange\" || expColor == \"orange\":\n                        return \"#f37b24\"; // Orange\n                    case statsColor == \"green\" || expColor == \"green\":\n                        return \"#008771\"; // Green\n                    default:\n                        return \"#7a316f\"; // purple\n                }\n            },\n            isClientEnabled(dbInbound, email) {\n                clientStats = dbInbound.clientStats ? dbInbound.clientStats.find(stats => stats.email === email) : null;\n                return clientStats ? clientStats['enable'] : true;\n            },\n            isClientOnline(email) {\n                return this.onlineClients.includes(email);\n            },\n            isRemovable(dbInboundId) {\n                return this.getInboundClients(this.dbInbounds.find(row => row.id === dbInboundId)).length > 1;\n            },\n            inboundLinks(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                newDbInbound = this.checkFallback(dbInbound);\n                txtModal.show('{{ i18n \"pages.inbounds.export\"}}', newDbInbound.genInboundLinks(this.remarkModel), newDbInbound.remark);\n            },\n            exportSubs(dbInboundId) {\n                const dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                const clients = this.getInboundClients(dbInbound);\n                let subLinks = []\n                if (clients != null){\n                    clients.forEach(c => {\n                        if (c.subId && c.subId.length>0){\n                            subLinks.push(this.subSettings.subURI + c.subId + \"?name=\" + c.subId)\n                        }\n                    })\n                }\n                txtModal.show(\n                    '{{ i18n \"pages.inbounds.export\"}} - {{ i18n \"pages.settings.subSettings\" }}',\n                    [...new Set(subLinks)].join('\\n'),\n                    dbInbound.remark + \"-Subs\");\n            },\n            importInbound() {\n                promptModal.open({\n                    title: '{{ i18n \"pages.inbounds.importInbound\" }}',\n                    type: 'textarea',\n                    value: '',\n                    okText: '{{ i18n \"pages.inbounds.import\" }}',\n                    confirm: async (dbInboundText) => {\n                        await this.submit('/panel/inbound/import', {data: dbInboundText}, promptModal);\n                    },\n                });\n            },\n            exportAllSubs() {\n                let subLinks = []\n                for (const dbInbound of this.dbInbounds) {\n                    const clients = this.getInboundClients(dbInbound);\n                    if (clients != null){\n                        clients.forEach(c => {\n                            if (c.subId && c.subId.length>0){\n                                subLinks.push(this.subSettings.subURI + c.subId + \"?name=\" + c.subId)\n                            }\n                        })\n                    }\n                }\n                txtModal.show(\n                    '{{ i18n \"pages.inbounds.export\"}} - {{ i18n \"pages.settings.subSettings\" }}',\n                    [...new Set(subLinks)].join('\\r\\n'),\n                    'All-Inbounds-Subs');\n            },\n            exportAllLinks() {\n                let copyText = [];\n                for (const dbInbound of this.dbInbounds) {\n                    copyText.push(dbInbound.genInboundLinks(this.remarkModel));\n                }\n                txtModal.show('{{ i18n \"pages.inbounds.export\"}}', copyText.join('\\r\\n'), 'All-Inbounds');\n            },\n            copyToClipboard(dbInboundId) {\n                dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);\n                txtModal.show('{{ i18n \"pages.inbounds.inboundData\" }}', JSON.stringify(dbInbound, null, 2));\n            },\n            async startDataRefreshLoop() {\n                while (this.isRefreshEnabled) {\n                    try {\n                        await this.getDBInbounds();\n                    } catch (e) {\n                        console.error(e);\n                    }\n                    await PromiseUtil.sleep(this.refreshInterval);\n                }\n            },\n            toggleRefresh() {\n                localStorage.setItem(\"isRefreshEnabled\", this.isRefreshEnabled);\n                if (this.isRefreshEnabled) {\n                    this.startDataRefreshLoop();\n                }\n            },\n            changeRefreshInterval() {\n                localStorage.setItem(\"refreshInterval\", this.refreshInterval);\n            },\n            async manualRefresh() {\n                if (!this.refreshing) {\n                    this.spinning = true;\n                    await this.getDBInbounds();\n                    this.spinning = false;\n                }\n            },\n            pagination(obj){\n                if (this.pageSize > 0 && obj.length>this.pageSize) {\n                    // Set page options based on object size\n                    sizeOptions = [];\n                    for (i=this.pageSize;i<=obj.length;i=i+this.pageSize) {\n                        sizeOptions.push(i.toString());\n                    }\n                    // Add option to see all in one page\n                    sizeOptions.push(i.toString());\n\n                    p = {\n                        showSizeChanger: true,\n                        size: 'small',\n                        position: 'bottom',\n                        pageSize: this.pageSize,\n                        pageSizeOptions: sizeOptions\n                    };\n                    return p;\n                }\n                return false\n            },\n            onResize() {\n                this.isMobile = window.innerWidth <= 768;\n            }\n        },\n        watch: {\n            searchKey: debounce(function (newVal) {\n                this.searchInbounds(newVal);\n            }, 500)\n        },\n        mounted() {\n            if (window.location.protocol !== \"https:\") {\n                this.showAlert = true;\n            }\n            window.addEventListener('resize', this.onResize);\n            this.onResize();\n            this.loading();\n            this.getDefaultSettings();\n            if (this.isRefreshEnabled) {\n                this.startDataRefreshLoop();\n            }\n            else {\n                this.getDBInbounds();\n            }\n            this.loading(false);\n        },\n        computed: {\n            total() {\n                let down = 0, up = 0;\n                let clients = 0, deactive = [], depleted = [], expiring = [];\n                this.dbInbounds.forEach(dbInbound => {\n                    down += dbInbound.down;\n                    up += dbInbound.up;\n                    if (this.clientCount[dbInbound.id]) {\n                        clients += this.clientCount[dbInbound.id].clients;\n                        deactive = deactive.concat(this.clientCount[dbInbound.id].deactive);\n                        depleted = depleted.concat(this.clientCount[dbInbound.id].depleted);\n                        expiring = expiring.concat(this.clientCount[dbInbound.id].expiring);\n                    }\n                });\n                return {\n                    down: down,\n                    up: up,\n                    clients: clients,\n                    deactive: deactive,\n                    depleted: depleted,\n                    expiring: expiring,\n                };\n            }\n        },\n    });\n</script>\n\n{{template \"inboundModal\"}}\n{{template \"promptModal\"}}\n{{template \"qrcodeModal\"}}\n{{template \"textModal\"}}\n{{template \"inboundInfoModal\"}}\n{{template \"clientsModal\"}}\n{{template \"clientsBulkModal\"}}\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n    @media (min-width: 769px) {\n        .ant-layout-content {\n            margin: 24px 16px;\n        }\n        .ant-card-hoverable {\n            margin-inline: 0.3rem;\n        }\n    }\n    .ant-col-sm-24 {\n        margin-top: 10px;\n    }\n    .ant-card-dark h2 {\n        color: var(--dark-color-text-primary);\n    }\n</style>\n\n<body>\n  <a-layout id=\"app\" v-cloak :class=\"themeSwitcher.currentTheme\">\n    {{ template \"commonSider\" . }}\n    <a-layout id=\"content-layout\">\n      <a-layout-content>\n        <a-spin :spinning=\"spinning\" :delay=\"200\" :tip=\"loadingTip\">\n          <transition name=\"list\" appear>\n            <a-alert type=\"error\" v-if=\"showAlert\" style=\"margin-bottom: 10px\"\n              message='{{ i18n \"secAlertTitle\" }}'\n              color=\"red\"\n              description='{{ i18n \"secAlertSsl\" }}'\n              show-icon closable>\n            </a-alert>\n          </transition>\n          <transition name=\"list\" appear>\n            <a-row>\n              <a-card hoverable>\n                <a-row>\n                  <a-col :sm=\"24\" :md=\"12\">\n                    <a-row>\n                      <a-col :span=\"12\" style=\"text-align: center\">\n                        <a-progress type=\"dashboard\" status=\"normal\"\n                          :stroke-color=\"status.cpu.color\"\n                          :percent=\"status.cpu.percent\"></a-progress>\n                        <div><b>CPU:</b> [[ cpuCoreFormat(status.cpuCores) ]] <a-tooltip>\n                          <a-icon type=\"area-chart\"></a-icon> \n                          <template slot=\"title\">\n                            <div><b>Logical Processors:</b> [[ (status.logicalPro) ]]</div>\n                            <div><b>Speed:</b> [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]</div>\n                          </template>\n                        </a-tooltip></div>\n                      </a-col>\n                      <a-col :span=\"12\" style=\"text-align: center\">\n                        <a-progress type=\"dashboard\" status=\"normal\"\n                          :stroke-color=\"status.mem.color\"\n                          :percent=\"status.mem.percent\"></a-progress>\n                        <div>\n                          <b>{{ i18n \"pages.index.memory\"}}:</b> [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]]\n                        </div>\n                      </a-col>\n                    </a-row>\n                  </a-col>\n                  <a-col :sm=\"24\" :md=\"12\">\n                    <a-row>\n                      <a-col :span=\"12\" style=\"text-align: center\">\n                        <a-progress type=\"dashboard\" status=\"normal\"\n                          :stroke-color=\"status.swap.color\"\n                          :percent=\"status.swap.percent\"></a-progress>\n                        <div>\n                          <b>Swap:</b> [[ sizeFormat(status.swap.current) ]] / [[ sizeFormat(status.swap.total) ]]\n                        </div>\n                      </a-col>\n                      <a-col :span=\"12\" style=\"text-align: center\">\n                        <a-progress type=\"dashboard\" status=\"normal\"\n                          :stroke-color=\"status.disk.color\"\n                          :percent=\"status.disk.percent\"></a-progress>\n                        <div>\n                          <b>{{ i18n \"pages.index.hard\"}}:</b> [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]]\n                        </div>\n                      </a-col>\n                    </a-row>\n                  </a-col>\n                </a-row>\n              </a-card>\n            </a-row>\n          </transition>\n          <transition name=\"list\" appear>\n            <a-row>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>3X-UI:</b>\n                  <a rel=\"noopener\" href=\"https://github.com/xeefei/3x-ui/releases\" target=\"_blank\"><a-tag color=\"green\">v{{ .cur_ver }}</a-tag></a>\n                  <a rel=\"noopener\" href=\"https://t.me/is_Chat_Bot\" target=\"_blank\"><a-tag color=\"green\">TG私聊交流</a-tag></a>\n                  <a rel=\"noopener\" href=\"https://t.me/XUI_CN\" target=\"_blank\"><a-tag color=\"green\">〔3X-UI〕中文交流群</a-tag></a>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>{{ i18n \"pages.index.operationHours\" }}:</b>\n                  <a-tag :color=\"status.xray.color\">Xray: [[ formatSecond(status.appStats.uptime) ]]</a-tag>\n                  <a-tag color=\"green\">OS: [[ formatSecond(status.uptime) ]]</a-tag>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>{{ i18n \"pages.index.xrayStatus\" }}:</b>\n                  <a-tag style=\"text-transform: capitalize;\" :color=\"status.xray.color\">[[ status.xray.state ]] </a-tag>\n                  <a-popover v-if=\"status.xray.state === State.Error\" :overlay-class-name=\"themeSwitcher.currentTheme\">\n                    <span slot=\"title\" style=\"font-size: 12pt\">An error occurred while running Xray\n                      <a-tag color=\"purple\" style=\"cursor: pointer; float: right;\" @click=\"openLogs()\">{{ i18n \"pages.index.logs\" }}</a-tag>\n                    </span>\n                    <template slot=\"content\">\n                      <p style=\"max-width: 400px\" v-for=\"line in status.xray.errorMsg.split('\\n')\">[[ line ]]</p>\n                    </template>\n                    <a-icon type=\"question-circle\"></a-icon>\n                  </a-popover>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"stopXrayService\">{{ i18n \"pages.index.stopXray\" }}</a-tag>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"restartXrayService\">{{ i18n \"pages.index.restartXray\" }}</a-tag>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"openSelectV2rayVersion\">v[[ status.xray.version ]]</a-tag>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>{{ i18n \"menu.link\" }}:</b>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"openLogs()\">{{ i18n \"pages.index.logs\" }}</a-tag>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"openConfig\">{{ i18n \"pages.index.config\" }}</a-tag>\n                  <a-tag color=\"purple\" style=\"cursor: pointer;\" @click=\"openBackup\">{{ i18n \"pages.index.backup\" }}</a-tag>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>{{ i18n \"pages.index.systemLoad\" }}:</b>\n                  <a-tag color=\"green\">\n                    <a-tooltip>\n                          [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]\n                      <template slot=\"title\">\n                        {{ i18n \"pages.index.systemLoadDesc\" }}\n                      </template>\n                    </a-tooltip>\n                  </a-tag>\n                  <a rel=\"noopener\" href=\"https://ping.pe\" target=\"_blank\"><a-tag color=\"green\">端口检测</a-tag></a>\n                  <a rel=\"noopener\" href=\"https://www.speedtest.net\" target=\"_blank\"><a-tag color=\"green\">网络测速</a-tag></a>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <b>{{ i18n \"usage\"}}:</b>\n                  <a-tag color=\"green\"> RAM: [[ sizeFormat(status.appStats.mem) ]] </a-tag>\n                  <a-tag color=\"green\"> Threads: [[ status.appStats.threads ]] </a-tag>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <a-row>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"global\"></a-icon> IPv4\n                          <template slot=\"title\">\n                            [[ status.publicIP.ipv4 ]]\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"global\"></a-icon> IPv6\n                          <template slot=\"title\">\n                            [[ status.publicIP.ipv6 ]]\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                  </a-row>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <a-row>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"swap\"></a-icon> TCP: [[ status.tcpCount ]]\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.connectionTcpCountDesc\" }}\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"swap\"></a-icon> UDP: [[ status.udpCount ]]\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.connectionUdpCountDesc\" }}\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                  </a-row>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <a-row>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"arrow-up\"></a-icon> Up: [[ sizeFormat(status.netIO.up) ]]/s\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.upSpeed\" }}\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"arrow-down\"></a-icon> Down: [[ sizeFormat(status.netIO.down) ]]/s\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.downSpeed\" }}\n                          </template>\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                  </a-row>\n                </a-card>\n              </a-col>\n              <a-col :sm=\"24\" :lg=\"12\">\n                <a-card hoverable>\n                  <a-row>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"cloud-upload\"></a-icon>\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.totalSent\" }}\n                          </template> Out: [[ sizeFormat(status.netTraffic.sent) ]]\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                    <a-col :span=\"12\">\n                      <a-tag>\n                        <a-tooltip>\n                          <a-icon type=\"cloud-download\"></a-icon>\n                          <template slot=\"title\">\n                            {{ i18n \"pages.index.totalReceive\" }}\n                          </template> In: [[ sizeFormat(status.netTraffic.recv) ]]\n                        </a-tooltip>\n                      </a-tag>\n                    </a-col>\n                  </a-row>\n                </a-card>\n              </a-col>\n            </a-row>\n          </transition>\n        </a-spin>\n      </a-layout-content>\n    </a-layout>\n    <a-modal id=\"version-modal\" v-model=\"versionModal.visible\" title='{{ i18n \"pages.index.xraySwitch\" }}' :closable=\"true\"\n        @ok=\"() => versionModal.visible = false\" :class=\"themeSwitcher.currentTheme\" footer=\"\">\n      <a-alert type=\"warning\" style=\"margin-bottom: 12px; width: fit-content\"\n        message='{{ i18n \"pages.index.xraySwitchClickDesk\" }}' show-icon></a-alert>\n      <template v-for=\"version, index in versionModal.versions\">\n        <a-tag :color=\"index % 2 == 0 ? 'purple' : 'green'\" style=\"margin-right: 12px; margin-bottom: 12px\"\n          @click=\"switchV2rayVersion(version)\">\n          [[ version ]]\n        </a-tag>\n      </template>\n    </a-modal>\n    <a-modal id=\"log-modal\" v-model=\"logModal.visible\"\n        :closable=\"true\" @cancel=\"() => logModal.visible = false\"\n        :class=\"themeSwitcher.currentTheme\"\n        width=\"800px\" footer=\"\">\n      <template slot=\"title\">\n        {{ i18n \"pages.index.logs\" }}\n        <a-icon :spin=\"logModal.loading\"\n          type=\"sync\"\n          style=\"vertical-align: middle; margin-left: 10px;\"\n          :disabled=\"logModal.loading\"\n          @click=\"openLogs()\">\n        </a-icon>\n      </template>\n      <a-form layout=\"inline\">\n        <a-form-item style=\"margin-right: 0.5rem;\">\n          <a-input-group compact>\n            <a-select size=\"small\" v-model=\"logModal.rows\" style=\"width:70px;\"\n                @change=\"openLogs()\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n              <a-select-option value=\"10\">10</a-select-option>\n              <a-select-option value=\"20\">20</a-select-option>\n              <a-select-option value=\"50\">50</a-select-option>\n              <a-select-option value=\"100\">100</a-select-option>\n            </a-select>\n            <a-select size=\"small\" v-model=\"logModal.level\" style=\"width:95px;\"\n                @change=\"openLogs()\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n              <a-select-option value=\"debug\">Debug</a-select-option>\n              <a-select-option value=\"info\">Info</a-select-option>\n              <a-select-option value=\"notice\">Notice</a-select-option>\n              <a-select-option value=\"warning\">Warning</a-select-option>\n              <a-select-option value=\"err\">Error</a-select-option>\n            </a-select>\n          </a-input-group>\n        </a-form-item>\n        <a-form-item>\n          <a-checkbox v-model=\"logModal.syslog\" @change=\"openLogs()\">SysLog</a-checkbox>\n        </a-form-item>\n        <a-form-item style=\"float: right;\">\n          <a-button type=\"primary\" icon=\"download\"\n            :href=\"'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs?.join('\\n'))\" download=\"x-ui.log\">\n          </a-button>\n        </a-form-item>\n      </a-form>\n      <div class=\"ant-input\" style=\"height: auto; max-height: 500px; overflow: auto; margin-top: 0.5rem;\" v-html=\"logModal.formattedLogs\"></div>\n    </a-modal>\n    <a-modal id=\"backup-modal\" v-model=\"backupModal.visible\" :title=\"backupModal.title\"\n        :closable=\"true\" footer=\"\"\n        :class=\"themeSwitcher.currentTheme\">\n      <a-alert type=\"warning\" style=\"margin-bottom: 10px; width: fit-content\"\n        :message=\"backupModal.description\"\n        show-icon>\n      </a-alert>\n      <a-space direction=\"horizontal\" style=\"text-align: center; margin-bottom: 10px;\">\n        <a-button type=\"primary\" @click=\"exportDatabase()\">\n            [[ backupModal.exportText ]]\n        </a-button>\n        <a-button type=\"primary\" @click=\"importDatabase()\">\n            [[ backupModal.importText ]]\n        </a-button>\n      </a-space>\n    </a-modal>\n  </a-layout>\n{{template \"js\" .}}\n<script src=\"{{ .base_path }}assets/clipboard/clipboard.min.js?{{ .cur_ver }}\"></script>\n{{template \"component/themeSwitcher\" .}}\n{{template \"textModal\"}}\n<script>\n    const State = {\n        Running: \"running\",\n        Stop: \"stop\",\n        Error: \"error\",\n    }\n    Object.freeze(State);\n\n    class CurTotal {\n\n        constructor(current, total) {\n            this.current = current;\n            this.total = total;\n        }\n\n        get percent() {\n            if (this.total === 0) {\n                return 0;\n            }\n            return toFixed(this.current / this.total * 100, 2);\n        }\n\n        get color() {\n            const percent = this.percent;\n            if (percent < 80) {\n                return '#008771'; // Green\n            } else if (percent < 90) {\n                return \"#f37b24\"; // Orange\n            } else {\n                return \"#cf3c3c\"; // Red\n            }\n        }\n    }\n\n    class Status {\n        constructor(data) {\n            this.cpu = new CurTotal(0, 0);\n            this.cpuCores = 0;\n            this.logicalPro = 0;\n            this.cpuSpeedMhz = 0;\n            this.disk = new CurTotal(0, 0);\n            this.loads = [0, 0, 0];\n            this.mem = new CurTotal(0, 0);\n            this.netIO = { up: 0, down: 0 };\n            this.netTraffic = { sent: 0, recv: 0 };\n            this.publicIP = { ipv4: 0, ipv6: 0 };\n            this.swap = new CurTotal(0, 0);\n            this.tcpCount = 0;\n            this.udpCount = 0;\n            this.uptime = 0;\n            this.appUptime = 0;\n            this.appStats = {threads: 0, mem: 0, uptime: 0};\n            this.xray = { state: State.Stop, errorMsg: \"\", version: \"\", color: \"\" };\n\n            if (data == null) {\n                return;\n            }\n            this.cpu = new CurTotal(data.cpu, 100);\n            this.cpuCores = data.cpuCores;\n            this.logicalPro = data.logicalPro;\n            this.cpuSpeedMhz = data.cpuSpeedMhz;\n            this.disk = new CurTotal(data.disk.current, data.disk.total);\n            this.loads = data.loads.map(load => toFixed(load, 2));\n            this.mem = new CurTotal(data.mem.current, data.mem.total);\n            this.netIO = data.netIO;\n            this.netTraffic = data.netTraffic;\n            this.publicIP = data.publicIP;\n            this.swap = new CurTotal(data.swap.current, data.swap.total);\n            this.tcpCount = data.tcpCount;\n            this.udpCount = data.udpCount;\n            this.uptime = data.uptime;\n            this.appUptime = data.appUptime;\n            this.appStats = data.appStats;\n            this.xray = data.xray;\n            switch (this.xray.state) {\n                case State.Running:\n                    this.xray.color = \"green\";\n                    break;\n                case State.Stop:\n                    this.xray.color = \"orange\";\n                    break;\n                case State.Error:\n                    this.xray.color = \"red\";\n                    break;\n                default:\n                    this.xray.color = \"gray\";\n            }\n        }\n    }\n\n    const versionModal = {\n        visible: false,\n        versions: [],\n        show(versions) {\n            this.visible = true;\n            this.versions = versions;\n        },\n        hide() {\n            this.visible = false;\n        },\n    };\n\n    const logModal = {\n        visible: false,\n        logs: [],\n        rows: 20,\n        level: 'info',\n        syslog: false,\n        loading: false,\n        show(logs) {\n            this.visible = true;\n            this.logs = logs; \n            this.formattedLogs = this.logs?.length > 0 ? this.formatLogs(this.logs) : \"No Record...\";\n        },\n        formatLogs(logs) {\n            let formattedLogs = '';\n            const levels = [\"DEBUG\",\"INFO\",\"NOTICE\",\"WARNING\",\"ERROR\"];\n            const levelColors = [\"#3c89e8\",\"#008771\",\"#008771\",\"#f37b24\",\"#e04141\",\"#bcbcbc\"];\n\n            logs.forEach((log, index) => {\n                let [data, message] = log.split(\" - \",2);\n                const parts = data.split(\" \")\n                if(index>0) formattedLogs += '<br>';\n\n                if (parts.length === 3) {\n                    const d = parts[0];\n                    const t = parts[1];\n                    const level = parts[2];\n                    const levelIndex = levels.indexOf(level,levels) || 5;\n\n                    //formattedLogs += `<span style=\"color: gray;\">${index + 1}.</span>`;\n                    formattedLogs += `<span style=\"color: ${levelColors[0]};\">${d} ${t}</span> `;\n                    formattedLogs += `<span style=\"color: ${levelColors[levelIndex]}\">${level}</span>`;\n                } else {\n                    const levelIndex = levels.indexOf(data,levels) || 5;\n                    formattedLogs += `<span style=\"color: ${levelColors[levelIndex]}\">${data}</span>`;\n                }\n\n                if(message){\n                    if(message.startsWith(\"XRAY:\"))\n                        message = \"<b>XRAY: </b>\" + message.substring(5);\n                    else\n                        message = \"<b>X-UI: </b>\" + message;\n                }\n\n                formattedLogs += message ? ' - ' + message : '';\n            });\n\n            return formattedLogs;\n        },\n        hide() {\n            this.visible = false;\n        },\n    };\n\n    const backupModal = {\n        visible: false,\n        title: '',\n        description: '',\n        exportText: '',\n        importText: '',\n        show({\n            title = '{{ i18n \"pages.index.backupTitle\" }}',\n            description = '{{ i18n \"pages.index.backupDescription\" }}',\n            exportText = '{{ i18n \"pages.index.exportDatabase\" }}',\n            importText = '{{ i18n \"pages.index.importDatabase\" }}',\n        }) {\n            this.title = title;\n            this.description = description;\n            this.exportText = exportText;\n            this.importText = importText;\n            this.visible = true;\n        },\n        hide() {\n            this.visible = false;\n        },\n    };\n\n    const app = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#app',\n        data: {\n            siderDrawer,\n            themeSwitcher,\n            status: new Status(),\n            versionModal,\n            logModal,\n            backupModal,\n            spinning: false,\n            loadingTip: '{{ i18n \"loading\"}}',\n            showAlert: false,\n        },\n        methods: {\n            loading(spinning, tip = '{{ i18n \"loading\"}}') {\n                this.spinning = spinning;\n                this.loadingTip = tip;\n            },\n            async getStatus() {\n                try {\n                    const msg = await HttpUtil.post('/server/status');\n                    if (msg.success) {\n                        this.setStatus(msg.obj);\n                    }\n                } catch (e) {\n                    console.error(\"Failed to get status:\", e);\n                }\n            },\n            setStatus(data) {\n                this.status = new Status(data);\n            },\n            async openSelectV2rayVersion() {\n                this.loading(true);\n                const msg = await HttpUtil.post('server/getXrayVersion');\n                this.loading(false);\n                if (!msg.success) {\n                    return;\n                }\n                versionModal.show(msg.obj);\n            },\n            switchV2rayVersion(version) {\n                this.$confirm({\n                    title: '{{ i18n \"pages.index.xraySwitchVersionDialog\"}}',\n                    content: '{{ i18n \"pages.index.xraySwitchVersionDialogDesc\"}}' + ` ${version}?`,\n                    okText: '{{ i18n \"confirm\"}}',\n                    class: themeSwitcher.currentTheme,\n                    cancelText: '{{ i18n \"cancel\"}}',\n                    onOk: async () => {\n                        versionModal.hide();\n                        this.loading(true, '{{ i18n \"pages.index.dontRefresh\"}}');\n                        await HttpUtil.post(`/server/installXray/${version}`);\n                        this.loading(false);\n                    },\n                });\n            },\n            async stopXrayService() {\n                this.loading(true);\n                const msg = await HttpUtil.post('server/stopXrayService');\n                this.loading(false);\n                if (!msg.success) {\n                    return;\n                }\n            },\n            async restartXrayService() {\n                this.loading(true);\n                const msg = await HttpUtil.post('server/restartXrayService');\n                this.loading(false);\n                if (!msg.success) {\n                    return;\n                }\n            },\n            async openLogs(){\n                logModal.loading = true;\n                const msg = await HttpUtil.post('server/logs/'+logModal.rows,{level: logModal.level, syslog: logModal.syslog});\n                if (!msg.success) {\n                    return;\n                }\n                logModal.show(msg.obj);\n                await PromiseUtil.sleep(500);\n                logModal.loading = false;\n            },\n            async openConfig() {\n                this.loading(true);\n                const msg = await HttpUtil.post('server/getConfigJson');\n                this.loading(false);\n                if (!msg.success) {\n                    return;\n                }\n                txtModal.show('config.json', JSON.stringify(msg.obj, null, 2), 'config.json');\n            },\n            openBackup() {\n                backupModal.show({\n                    title: '{{ i18n \"pages.index.backupTitle\" }}',\n                    description: '{{ i18n \"pages.index.backupDescription\" }}',\n                    exportText: '{{ i18n \"pages.index.exportDatabase\" }}',\n                    importText: '{{ i18n \"pages.index.importDatabase\" }}',\n                });\n            },\n            exportDatabase() {\n                window.location = basePath + 'server/getDb';\n            },\n            importDatabase() {\n                const fileInput = document.createElement('input');\n                fileInput.type = 'file';\n                fileInput.accept = '.db';\n                fileInput.addEventListener('change', async (event) => {\n                    const dbFile = event.target.files[0];\n                    if (dbFile) {\n                        const formData = new FormData();\n                        formData.append('db', dbFile);\n                        backupModal.hide();\n                        this.loading(true);\n                        const uploadMsg = await HttpUtil.post('server/importDB', formData, {\n                            headers: {\n                                'Content-Type': 'multipart/form-data',\n                            }\n                        });\n                        this.loading(false);\n                        if (!uploadMsg.success) {\n                            return;\n                        }\n                        this.loading(true);\n                        const restartMsg = await HttpUtil.post(\"/panel/setting/restartPanel\");\n                        this.loading(false);\n                        if (restartMsg.success) {\n                            this.loading(true);\n                            await PromiseUtil.sleep(5000);\n                            location.reload();\n                        }\n                    }\n                });\n                fileInput.click();\n            },\n        },\n        async mounted() {\n            if (window.location.protocol !== \"https:\") {\n                this.showAlert = true;\n            }\n            while (true) {\n                try {\n                    await this.getStatus();\n                } catch (e) {\n                    console.error(e);\n                }\n                await PromiseUtil.sleep(2000);\n            }\n        },\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/navigation.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>实用导航&技巧</title>\n    <style>\n        body {\n            background-color: #151F31;\n            color: white;\n            font-family: Arial, sans-serif;\n            margin: 0;\n            padding: 0;\n            display: flex;\n        }\n        .sidebar {\n            width: 150px;\n            background-color: #151F31;\n            padding: 20px;\n        }\n        .sidebar h2 {\n            color: #fff;\n            margin-top: 0;\n        }\n        .sidebar button {\n            background-color: #2C3E56;\n            color: #008000; /* 绿色字体 */\n            border: none;\n            padding: 10px 20px;\n            margin-bottom: 10px;\n            cursor: pointer;\n            display: block;\n            width: 100%;\n            border-radius: 15px; /* 增加圆角幅度 */\n            font-weight: bold; /* 加粗字体 */\n        }\n        .sidebar button:hover {\n            background-color: #4A90E2;\n        }\n        .sidebar .friend-links {\n            margin-top: auto;\n            text-align: center;\n            margin-bottom: 12px; /* 调整友情链接下边距 */\n        }\n        .sidebar .friend-links a {\n            color: #0080FF; /* 蓝色字体 */\n            text-decoration: none;\n            display: block;\n            margin-bottom: 10px;\n        }\n        .separator {\n            width: 15px;\n            background-color: #34495e;\n        }\n        .content {\n            flex: 1;\n            padding: 20px;\n            padding-top: 0; /* 移除顶部空白 */\n        }\n    </style>\n</head>\n<body>\n    <div class=\"sidebar\">\n        <button onclick=\"history.back()\">返回上一步</button>\n        <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n        <div class=\"friend-links\">\n            <a href=\"https://chat.openai.com/\">ChatGPT</a>\n            <a href=\"https://github.com/xeefei/3x-ui\">项目地址</a>\n            <a href=\"https://t.me/XUI_CN\">3X-UI交流群</a>\n            <a href=\"https://www.youtube.com/results?search_query=4k%E6%B5%8B%E9%80%9F\">油管4K测速</a>\n            <a href=\"https://whatismyipaddress.com/\">我的IP查询</a>\n            <a href=\"https://translate.google.com/?hl=zh-CN\">Google翻译</a>\n            <a href=\"https://xtls.github.io/\">Project X</a>\n            <a href=\"https://t.me/Kensimon_xee\">预留&占位</a>\n            <a href=\"https://t.me/is_Chat_Bot\">联系作者</a>\n        <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n        <button onclick=\"window.scrollTo(0, 0)\">回滚至顶部</button>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n        <button onclick=\"history.back()\">返回到面板</button>\n        </div>\n    </div>\n    <div class=\"separator\"></div>\n    <div class=\"content\">\n        <h3>一、【3x-ui】中文交流群：<a href=\"https://t.me/XUI_CN\">https://t.me/XUI_CN</a></h3>\n        <h3>       【3x-ui】详细安装流程步骤：<a href=\"https://xeefei.github.io/xufei/2024/05/3x-ui/\">https://xeefei.github.io/xufei/2024/05/3x-ui/</a></h3>\n\n        <h3>二、判断VPS服务器的IP是否【送中】？</h3>\n        <p>***点击打开：<a href=\"https://music.youtube.com/\">https://music.youtube.com/</a>，能正常打开访问，就代表【没送中】，反之就是送中了。</p>\n        <p>***如果送中了如何解决去【拉回来】？</p>\n        <p>1：关闭/取消登录了谷歌账户的APP定位权限/授权；2：将常用的一个谷歌账号的位置记录功能打开；3：在电脑上打开Chrome/谷歌浏览器，登录开了位置记录功能的谷歌账号，安装Location Guard拓展插件<a href=\"https://chrome.google.com/webstore/detail/location-guard/cfohepagpmnodfdmjliccbbigdkfcgia\">https://chrome.google.com/webstore/detail/location-guard/cfohepagpmnodfdmjliccbbigdkfcgia</a>（也可在其他支持此插件的浏览器使用）；4：打开Location Guard插件，选择Fixed Location，并在给出的地图上单击，即可标记上你想要IP所处的国家/地区\nGoogle IP定位错误，使用Location Guard修改；5：转换到Options选项，Default level默认设置为Use fixed location；6：打开谷歌地图google.com/maps，点击右下角定位授权图标，使google maps获取当前“我的GPS位置”\nGoogle IP定位错误，使用Location Guard修改GPS位置地址；7：谷歌搜索my ip，即可看到谷歌IP定位到了刚才地图上标记的位置；8：在此网页向谷歌报告IP问题：<a href=\"https://support.google.com/websearch/workflow/9308722\">https://support.google.com/websearch/workflow/9308722</a></p>\n\n        <h3>三、在自己的VPS服务器部署【订阅转换】功能</h3>\n        <p>如何把vless/vmess等协议转换成Clash/Surge等软件支持的格式？\n 1、进入脚本输入x-ui命令调取面板，选择第【24】选项安装订阅转换模块，\n 2、等待安装【订阅转换】成功之后，访问地址：你的IP:18080（端口号）进行转换，\n 3、因为在转换过程中需要调取后端API，所以请确保端口25500是打开放行的，\n4、在得到【转换链接】之后，只要你的VPS服务器25500端口是能ping通的，就能导入Clash/Surge等软件成功下载配置，\n5、此功能集成到3x-ui面板中，是为了保证安全，通过调取24选项把【订阅转换】功能部署在自己的VPS中，不会造成链接泄露。</p>\n\n        <h3>四、如何保护自己的IP不被墙被封？</h3>\n        <p>1、使用的代理协议要安全，加密是必备，推荐使用vless+reality+vision协议组合，\n2、因为有时节点会共享，在不同的地区，多个省份之间不要共同连接同一个IP，\n3、连接同一个IP就算了，不要同一个端口，不要同IP+同端口到处漫游，要分开，\n4、同一台VPS，不要在一天内一直大流量去下载东西使用，不要流量过高要切换，\n5、创建【入站协议】的时候，尽量用【高位端口】，比如40000--65000之间的端口号。\n提醒：为什么在特殊时期，比如：两会，春节等被封得最严重最惨？\n尼玛同一个IP+同一个端口号，多个省份去漫游，跟开飞机场一样！不封你，封谁的IP和端口？\n总结：不要多终端/多省份/多个朋友/共同使用同一个IP和端口号！使用3x-ui多创建几个【入站】，\n多做几条备用，各用各的！各行其道才比较安全！GFW的思维模式是干掉机场，机场的特征个人用户不要去沾染，自然IP就保护好了。</p>\n\n        <h3>五、检测IP纯净度的方法：</h3>\n        <p>网址：<a href=\"https://scamalytics.com/\">https://scamalytics.com/</a>，输入IP进行检测，看【欺诈分数】，分数越高IP越脏。</p>\n\n        <h3>六、常见的软件工具：</h3>\n        <ol>\n            <p>1、Windows系统v2rayN：<a href=\"https://github.com/2dust/v2rayN\">https://github.com/2dust/v2rayN</a></p>\n            <p>2、安卓手机版【v2rayNG】：<a href=\"https://github.com/2dust/v2rayNG\">https://github.com/2dust/v2rayNG</a></p>\n            <p>3、苹果手机IOS【小火箭】：<a href=\"https://apple02.com/\">https://apple02.com/</a></p>\n            <p>4、苹果MacOS电脑【Clash Verge】：<a href=\"https://github.com/clash-verge-rev/clash-verge-rev/releases\">https://github.com/clash-verge-rev/clash-verge-rev/releases</a></p>\n        </ol>\n\n        <h3>七、查看节点【指定端口】的网络连接数/命令：</h3>\n        <p>netstat -ntu | grep :节点端口 | grep ESTABLISHED | awk '{print $5}'</p>\n\n        <h3>八、用3x-ui如何实现【自己偷自己】？</h3>\n                <p>其实很简单，只要你为面板设置了证书，\n                       开启了HTTPS登录，就可以将3x-ui自身作为web server，\n                       无需Nginx等，这里给一个示例：\n                       其中目标网站（Dest）请填写面板监听端口，\n                       可选域名（SNI）填写面板登录域名，\n                       如果您使用其他web server（如nginx）等，\n                       将目标网站改为对应监听端口也可。\n                       需要说明的是，如果您处于白名单地区，自己“偷”自己并不适合你；其次，可选域名一项实际上可以填写任意SNI，只要客户端保持一致即可，不过并不推荐这样做。</p>\n\n        <h3>九、【接码】网站：</h3>\n        <p>网址：<a href=\"https://sms-activate.org/cn\">https://sms-activate.org/cn</a>，直接注册账号购买。</p>\n\n        <h3>十、一些MJJ经常逛的网站和群组：</h3>\n        <ol>\n            <p>1、NodeSeek论坛：<a href=\"https://www.nodeseek.com/\">https://www.nodeseek.com/</a></p>\n            <p>2、V2EX论坛：<a href=\"https://www.v2ex.com/\">https://www.v2ex.com/</a></p>\n            <p>3、搬瓦工TG群：<a href=\"https://t.me/BWHOfficial\">https://t.me/BWHOfficial</a></p>\n            <p>4、Xray的官方群：<a href=\"https://t.me/projectXray\">https://t.me/projectXray</a></p>\n            <p>5、Dmit交流群：<a href=\"https://t.me/DmitChat\">https://t.me/DmitChat</a></p>\n            <p>6、白丝云用户群：<a href=\"https://t.me/+VHZLKELTQyzPNgOV\">https://t.me/+VHZLKELTQyzPNgOV</a></p>\n            <p>7、NameSilo域名注册：<a href=\"https://www.namesilo.com/\">https://www.namesilo.com/</a></p>\n        </ol>\n\n        <h3>十一、若此项目对你有帮助，你正想购买VPS的话，可以走一下我的AFF：</h3>\n        <ol>\n            <p>1、搬瓦工GIA线路：<a href=\"https://bandwagonhost.com/aff.php?aff=75015\">https://bandwagonhost.com/aff.php?aff=75015</a></p>\n            <p>2、Dmit高端GIA：<a href=\"https://www.dmit.io/aff.php?aff=9326\">https://www.dmit.io/aff.php?aff=9326</a></p>\n            <p>3、白丝云【4837】：<a href=\"https://cloudsilk.io/aff.php?aff=706\">https://cloudsilk.io/aff.php?aff=706</a></p>\n        </ol>\n\n        <h3>十二、若需要进行GV保号，请主动发信息到：+1 215 346 6666</h3>\n\n        <h3>十三、项目〔声明和注意〕</h3>\n        <ol>\n            <p>1、声明： 此项目仅供个人学习、交流使用，请遵守当地法律法规，勿用于非法用途；请勿用于生产环境；</a></p>\n            <p>2、注意： 在使用此项目和〔教程〕过程中，若因违反以上声明使用规则而产生的一切后果由使用者自负。</a></p>\n        </ol>\n    </div>\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/settings.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n  @media (min-width: 769px) {\n    .ant-layout-content {\n      margin: 24px 16px;\n    }\n  }\n  @media (max-width: 768px) {\n    .ant-tabs-nav .ant-tabs-tab {\n      margin: 0;\n      padding: 12px .5rem;\n    }\n  }\n  .ant-tabs-bar {\n    margin: 0;\n  }\n  .ant-list-item {\n    display: block;\n  }\n  .alert-msg {\n    color: rgb(194, 117, 18);\n    font-weight: normal;\n    font-size: 16px;\n    padding: .5rem 1rem;\n    text-align: center;\n    background: rgb(255 145 0 / 15%);\n    margin: 1.5rem 2.5rem 0rem 2.5rem;\n    border-radius: .5rem;\n    transition: all 0.5s;\n    animation: signal 3s cubic-bezier(0.18, 0.89, 0.32, 1.28) infinite;\n  }\n  .alert-msg:hover {\n    cursor: default;\n    transition-duration: .3s;\n    animation: signal 0.9s ease infinite;\n  }\n  @keyframes signal {\n    0% {\n      box-shadow: 0 0 0 0 rgba(194, 118, 18, 0.5);\n    }\n\n    50% {\n      box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);\n    }\n\n    100% {\n      box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);\n    }\n  }\n  .alert-msg>i {\n    color: inherit;\n    font-size: 24px;\n  }\n  .collapse-title {\n    color: inherit;\n    font-weight: bold;\n    font-size: 18px;\n    padding: 10px 20px;\n    border-bottom: 2px solid;\n  }\n  .collapse-title>i {\n    color: inherit;\n    font-size: 24px;\n  }\n  .ant-collapse-content-box .ant-list-item {\n    border-bottom: none !important;\n  }\n  .red-placeholder input::placeholder {\n    color: red;\n  }\n</style>\n<body>\n  <a-layout id=\"app\" v-cloak :class=\"themeSwitcher.currentTheme\">\n    {{ template \"commonSider\" . }}\n    <a-layout id=\"content-layout\">\n      <a-layout-content>\n        <a-spin :spinning=\"spinning\" :delay=\"500\" tip='{{ i18n \"loading\"}}'>\n          <transition name=\"list\" appear>\n            <a-alert type=\"error\" v-if=\"confAlerts.length>0\" style=\"margin-bottom: 10px;\"\n                message='{{ i18n \"secAlertTitle\" }}'\n                color=\"red\"\n                show-icon closable>\n              <template slot=\"description\">\n                <b>{{ i18n \"secAlertConf\" }}</b>\n                <ul><li v-for=\"a in confAlerts\">[[ a ]]</li></ul>\n              </template>\n            </a-alert>\n          </transition>\n          <a-space direction=\"vertical\">\n            <a-card hoverable style=\"margin-bottom: .5rem; overflow-x: hidden;\">\n              <a-row style=\"display: flex; flex-wrap: wrap; align-items: center;\">\n                <a-col :xs=\"24\" :sm=\"10\" style=\"padding: 4px;\">\n                  <a-space direction=\"horizontal\">\n                    <a-button type=\"primary\" :disabled=\"saveBtnDisable\" @click=\"updateAllSetting\">{{ i18n \"pages.settings.save\" }}</a-button>\n                    <a-button type=\"danger\" :disabled=\"!saveBtnDisable\" @click=\"restartPanel\">{{ i18n \"pages.settings.restartPanel\" }}</a-button>\n                  </a-space>\n                </a-col>\n                <a-col :xs=\"24\" :sm=\"14\">\n                  <template>\n                    <div>\n                      <a-back-top :target=\"() => document.getElementById('content-layout')\" visibility-height=\"200\"></a-back-top>\n                      <a-alert type=\"warning\" style=\"float: right; width: fit-content\"\n                        message='{{ i18n \"pages.settings.infoDesc\" }}'\n                        show-icon>\n                      </a-alert>\n                    </div>\n                  </template>\n                </a-col>\n              </a-row>\n            </a-card>\n            <a-tabs default-active-key=\"1\">\n              <a-tab-pane key=\"1\" tab='{{ i18n \"pages.settings.panelSettings\"}}'>\n                <a-list item-layout=\"horizontal\">\n                  <a-list-item>\n                    <a-row style=\"padding: 20px\">\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.remarkModel\"}}'>\n                          <template slot=\"description\">{{ i18n \"pages.settings.sampleRemark\"}}: <i>#[[ remarkSample ]]</i></template>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-input-group style=\"width: 100%;\">\n                          <a-select style=\"padding-right: .5rem; min-width: 80%; width: auto;\"\n                              mode=\"multiple\"\n                              v-model=\"remarkModel\"\n                              :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                            <a-select-option v-for=\"(value, key) in remarkModels\" :value=\"key\">[[ value ]]</a-select-option>\n                          </a-select>\n                          <a-select style=\"width: 20%;\" v-model=\"remarkSeparator\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                            <a-select-option v-for=\"key in remarkSeparators\" :value=\"key\">[[ key ]]</a-select-option>\n                          </a-select>\n                        </a-input-group>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.panelListeningIP\"}}' desc='{{ i18n \"pages.settings.panelListeningIPDesc\"}}' v-model=\"allSetting.webListen\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.panelListeningDomain\"}}' desc='{{ i18n \"pages.settings.panelListeningDomainDesc\"}}' v-model=\"allSetting.webDomain\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.panelPort\"}}' desc='{{ i18n \"pages.settings.panelPortDesc\"}}' v-model=\"allSetting.webPort\" :min=\"1\" :max=\"65531\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.publicKeyPath\"}}' desc='{{ i18n \"pages.settings.publicKeyPathDesc\"}}' v-model=\"allSetting.webCertFile\" placeholder=\"/root/.acme.sh/域名_ecc/域名.cer（路径演示）\" class=\"red-placeholder\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.privateKeyPath\"}}' desc='{{ i18n \"pages.settings.privateKeyPathDesc\"}}' v-model=\"allSetting.webKeyFile\" placeholder=\"/root/.acme.sh/域名_ecc/域名.key（路径演示）\" class=\"red-placeholder\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.panelUrlPath\"}}' desc='{{ i18n \"pages.settings.panelUrlPathDesc\"}}' v-model=\"allSetting.webBasePath\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.sessionMaxAge\" }}' desc='{{ i18n \"pages.settings.sessionMaxAgeDesc\" }}' v-model=\"allSetting.sessionMaxAge\" :min=\"0\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.pageSize\" }}' desc='{{ i18n \"pages.settings.pageSizeDesc\" }}' v-model=\"allSetting.pageSize\" :min=\"0\" :step=\"5\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.expireTimeDiff\" }}' desc='{{ i18n \"pages.settings.expireTimeDiffDesc\" }}' v-model=\"allSetting.expireDiff\" :min=\"0\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.trafficDiff\" }}' desc='{{ i18n \"pages.settings.trafficDiffDesc\" }}' v-model=\"allSetting.trafficDiff\" :min=\"0\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.timeZone\"}}' desc='{{ i18n \"pages.settings.timeZoneDesc\"}}' v-model=\"allSetting.timeLocation\"></setting-list-item>\n                  <a-list-item>\n                    <a-row style=\"padding: 20px\">\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.datepicker\"}}'>\n                          <template slot=\"description\">{{ i18n \"pages.settings.datepickerDescription\"}}</template>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <template>\n                          <a-select style=\"width: 100%\" :dropdown-class-name=\"themeSwitcher.currentTheme\" v-model=\"datepicker\">\n                            <a-select-option v-for=\"item in datepickerList\" :value=\"item.value\">\n                              <span v-text=\"item.name\"></span>\n                            </a-select-option>\n                          </a-select>\n                        </template>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                  <a-list-item>\n                    <a-row style=\"padding: 20px\">\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title=\"Language\"></a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <template>\n                          <a-select ref=\"selectLang\"\n                              v-model=\"lang\"\n                              @change=\"setLang(lang)\"\n                              :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                              style=\"width: 100%\">\n                            <a-select-option :value=\"l.value\" :label=\"l.value\" v-for=\"l in supportLangs\">\n                              <span role=\"img\" :aria-label=\"l.name\" v-text=\"l.icon\"></span> &nbsp;&nbsp; <span v-text=\"l.name\"></span>\n                            </a-select-option>\n                          </a-select>\n                        </template>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                </a-list>\n              </a-tab-pane>\n              <a-tab-pane key=\"2\" tab='{{ i18n \"pages.settings.securitySettings\"}}' style=\"padding: 20px;\">\n                <a-divider>{{ i18n \"pages.settings.security.admin\"}}</a-divider>\n                <a-form layout=\"horizontal\" :colon=\"false\" style=\"float: left; margin-bottom: 2rem;\" :label-col=\"{ md: {span:10} }\" :wrapper-col=\"{ md: {span:14} }\">\n                  <a-form-item label='{{ i18n \"pages.settings.oldUsername\"}}'>\n                    <a-input autocomplete=\"username\" v-model=\"user.oldUsername\"></a-input>\n                  </a-form-item>\n                  <a-form-item label='{{ i18n \"pages.settings.currentPassword\"}}'>\n                    <password-input autocomplete=\"current-password\" v-model=\"user.oldPassword\"></password-input>\n                  </a-form-item>\n                  <a-form-item label='{{ i18n \"pages.settings.newUsername\"}}'>\n                    <a-input v-model=\"user.newUsername\"></a-input>\n                  </a-form-item>\n                  <a-form-item label='{{ i18n \"pages.settings.newPassword\"}}'>\n                    <password-input autocomplete=\"new-password\" v-model=\"user.newPassword\"></password-input>\n                  </a-form-item>\n                  <a-form-item label=\" \">\n                    <a-button type=\"primary\" @click=\"updateUser\">{{ i18n \"confirm\" }}</a-button>\n                  </a-form-item>\n                </a-form>\n                <a-divider>{{ i18n \"pages.settings.security.secret\"}}</a-divider>\n                <a-form style=\"padding: 0 20px;\">\n                  <a-list-item>\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.security.loginSecurity\" }}'\n                          description='{{ i18n \"pages.settings.security.loginSecurityDesc\" }}'>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <template>\n                          <a-switch @change=\"toggleToken(allSetting.secretEnable)\" v-model=\"allSetting.secretEnable\"></a-switch>\n                          <a-icon style=\"margin-left: 1rem;\" v-if=\"allSetting.secretEnable\" :spin=\"this.changeSecret\" type=\"sync\" @click=\"getNewSecret\"></a-icon>\n                        </template>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                  <a-list-item>\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.security.secretToken\" }}'\n                          description='{{ i18n \"pages.settings.security.secretTokenDesc\" }}'>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <template>\n                          <a-textarea type=\"text\" :disabled=\"!allSetting.secretEnable\" v-model=\"user.loginSecret\"></a-textarea>\n                        </template>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                  <a-button type=\"primary\" :loading=\"this.changeSecret\" @click=\"updateSecret\">{{ i18n \"confirm\" }}</a-button>\n                </a-form>\n              </a-tab-pane>\n              <a-tab-pane key=\"3\" tab='{{ i18n \"pages.settings.TGBotSettings\"}}'>\n                <a-list item-layout=\"horizontal\">\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.telegramBotEnable\" }}' desc='{{ i18n \"pages.settings.telegramBotEnableDesc\" }}' v-model=\"allSetting.tgBotEnable\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.telegramToken\"}}' desc='{{ i18n \"pages.settings.telegramTokenDesc\"}}' v-model=\"allSetting.tgBotToken\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.telegramChatId\"}}' desc='{{ i18n \"pages.settings.telegramChatIdDesc\"}}' v-model=\"allSetting.tgBotChatId\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.telegramNotifyTime\"}}' desc='{{ i18n \"pages.settings.telegramNotifyTimeDesc\"}}' v-model=\"allSetting.tgRunTime\"></setting-list-item>\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.tgNotifyBackup\" }}' desc='{{ i18n \"pages.settings.tgNotifyBackupDesc\" }}' v-model=\"allSetting.tgBotBackup\"></setting-list-item>\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.tgNotifyLogin\" }}' desc='{{ i18n \"pages.settings.tgNotifyLoginDesc\" }}' v-model=\"allSetting.tgBotLoginNotify\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.tgNotifyCpu\" }}' desc='{{ i18n \"pages.settings.tgNotifyCpuDesc\" }}' v-model=\"allSetting.tgCpu\" :min=\"0\" :max=\"100\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.telegramProxy\"}}' desc='{{ i18n \"pages.settings.telegramProxyDesc\"}}' v-model=\"allSetting.tgBotProxy\" placeholder=\"socks5://user:pass@host:port\"></setting-list-item>\n                  <a-list-item>\n                    <a-row style=\"padding: 20px\">\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title=\"Telegram Bot Language\" />\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <template>\n                          <a-select ref=\"selectBotLang\" v-model=\"allSetting.tgLang\" :dropdown-class-name=\"themeSwitcher.currentTheme\" style=\"width: 100%\">\n                            <a-select-option :value=\"l.value\" :label=\"l.value\" v-for=\"l in supportLangs\">\n                              <span role=\"img\" :aria-label=\"l.name\" v-text=\"l.icon\"></span> &nbsp;&nbsp; <span v-text=\"l.name\"></span>\n                            </a-select-option>\n                          </a-select>\n                        </template>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                </a-list>\n              </a-tab-pane>\n              <a-tab-pane key=\"4\" tab='{{ i18n \"pages.settings.subSettings\" }}'>\n                <a-list item-layout=\"horizontal\">\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.subEnable\"}}' desc='{{ i18n \"pages.settings.subEnableDesc\"}}' v-model=\"allSetting.subEnable\"></setting-list-item>\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.subEncrypt\"}}' desc='{{ i18n \"pages.settings.subEncryptDesc\"}}' v-model=\"allSetting.subEncrypt\"></setting-list-item>\n                  <setting-list-item type=\"switch\" title='{{ i18n \"pages.settings.subShowInfo\"}}' desc='{{ i18n \"pages.settings.subShowInfoDesc\"}}' v-model=\"allSetting.subShowInfo\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subListen\"}}' desc='{{ i18n \"pages.settings.subListenDesc\"}}' v-model=\"allSetting.subListen\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subDomain\"}}' desc='{{ i18n \"pages.settings.subDomainDesc\"}}' v-model=\"allSetting.subDomain\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.subPort\"}}' desc='{{ i18n \"pages.settings.subPortDesc\"}}' v-model.number=\"allSetting.subPort\" :min=\"1\" :max=\"65531\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subPath\"}}' desc='{{ i18n \"pages.settings.subPathDesc\"}}' v-model=\"allSetting.subPath\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subCertPath\"}}' desc='{{ i18n \"pages.settings.subCertPathDesc\"}}' v-model=\"allSetting.subCertFile\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subKeyPath\"}}' desc='{{ i18n \"pages.settings.subKeyPathDesc\"}}' v-model=\"allSetting.subKeyFile\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subURI\"}}' desc='{{ i18n \"pages.settings.subURIDesc\"}}' v-model=\"allSetting.subURI\" placeholder=\"(http|https)://domain[:port]/path/\"></setting-list-item>\n                  <setting-list-item type=\"number\" title='{{ i18n \"pages.settings.subUpdates\"}}' desc='{{ i18n \"pages.settings.subUpdatesDesc\"}}' v-model=\"allSetting.subUpdates\" :min=\"1\"></setting-list-item>\n                </a-list>\n              </a-tab-pane>\n              <a-tab-pane key=\"5\" tab='{{ i18n \"pages.settings.subSettings\" }} Json' v-if=\"allSetting.subEnable\">\n                <a-list item-layout=\"horizontal\">\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subPath\"}}' desc='{{ i18n \"pages.settings.subPathDesc\"}}' v-model=\"allSetting.subJsonPath\"></setting-list-item>\n                  <setting-list-item type=\"text\" title='{{ i18n \"pages.settings.subURI\"}}' desc='{{ i18n \"pages.settings.subURIDesc\"}}' v-model=\"allSetting.subJsonURI\" placeholder=\"(http|https)://domain[:port]/path/\"></setting-list-item>\n                  <a-list-item style=\"padding: 20px\">\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.fragment\"}}'>\n                          <template slot=\"description\">{{ i18n \"pages.settings.fragmentDesc\"}}</template>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-switch v-model=\"fragment\"></a-switch>\n                      </a-col>\n                    </a-row>\n                    <a-collapse v-if=\"fragment\" style=\"margin-top: 14px;\">\n                      <a-collapse-panel header='{{ i18n \"pages.settings.fragmentSett\"}}' v-if=\"fragment\">\n                        <a-list-item style=\"padding: 10px 20px\">\n                          <a-row>\n                            <a-col :lg=\"24\" :xl=\"12\">\n                              <a-list-item-meta title='Packets'></a-list-item-meta>\n                            </a-col>\n                            <a-col :lg=\"24\" :xl=\"12\">\n                              <a-select v-model=\"fragmentPackets\" style=\"width: 100%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                                <a-select-option :value=\"p\" :label=\"p\" v-for=\"p in ['1-1', '1-3', 'tlshello']\"> [[ p ]] </a-select-option>\n                              </a-select>\n                            </a-col>\n                          </a-row>\n                        </a-list-item>\n                        <setting-list-item style=\"padding: 10px 20px\" type=\"text\" title='Length' v-model=\"fragmentLength\" placeholder=\"100-200\"></setting-list-item>\n                        <setting-list-item style=\"padding: 10px 20px\" type=\"text\" title='Interval' v-model=\"fragmentInterval\" placeholder=\"10-20\"></setting-list-item>\n                      </a-collapse-panel>\n                    </a-collapse>\n                  </a-list-item>\n                  <a-list-item style=\"padding: 20px\">\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.mux\"}}'>\n                          <template slot=\"description\">{{ i18n \"pages.settings.muxDesc\"}}</template>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-switch v-model=\"enableMux\"></a-switch>\n                      </a-col>\n                    </a-row>\n                    <a-collapse v-if=\"enableMux\" style=\"margin-top: 14px;\">\n                      <a-collapse-panel header='{{ i18n \"pages.settings.muxSett\"}}'>\n                        <setting-list-item style=\"padding: 10px 20px\" type=\"number\" title='Concurrency' v-model=\"muxConcurrency\" :min=\"-1\" :max=\"1024\"></setting-list-item>\n                        <setting-list-item style=\"padding: 10px 20px\" type=\"number\" title='xudp Concurrency' v-model=\"muxXudpConcurrency\" :min=\"-1\" :max=\"1024\"></setting-list-item>\n                        <a-list-item style=\"padding: 10px 20px\">\n                          <a-row>\n                            <a-col :lg=\"24\" :xl=\"12\">\n                              <a-list-item-meta title='xudp UDP 443'></a-list-item-meta>\n                            </a-col>\n                            <a-col :lg=\"24\" :xl=\"12\">\n                              <a-select v-model=\"muxXudpProxyUDP443\" style=\"width: 100%\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                                <a-select-option :value=\"p\" :label=\"p\" v-for=\"p in ['reject', 'allow', 'skip']\"> [[ p ]] </a-select-option>\n                              </a-select>\n                            </a-col>\n                          </a-row>\n                        </a-list-item>\n                      </a-collapse-panel>\n                    </a-collapse>\n                  </a-list-item>\n                  <a-list-item style=\"padding: 20px\">\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.settings.direct\"}}'>\n                          <template slot=\"description\">{{ i18n \"pages.settings.directDesc\"}}</template>\n                        </a-list-item-meta>\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-switch v-model=\"enableDirect\"></a-switch>\n                      </a-col>\n                    </a-row>\n                    <a-collapse v-if=\"enableDirect\" style=\"margin-top: 14px;\">\n                      <a-collapse-panel header='{{ i18n \"pages.settings.directSett\"}}'>\n                        <a-list-item style=\"padding: 10px 20px\">\n                          <a-checkbox-group v-model=\"directCountries\" name=\"Countries\" :options=\"countryOptions\"></a-checkbox-group>\n                        </a-list-item>\n                      </a-collapse-panel>\n                    </a-collapse>\n                  </a-list-item>\n                </a-list>\n              </a-tab-pane>\n            </a-tabs>\n          </a-space>\n        </a-spin>\n      </a-layout-content>\n    </a-layout>\n  </a-layout>\n{{template \"js\" .}}\n<script src=\"{{ .base_path }}assets/js/model/setting.js?{{ .cur_ver }}\"></script>\n{{template \"component/themeSwitcher\" .}}\n{{template \"component/password\" .}}\n{{template \"component/setting\"}}\n<script>\n  const app = new Vue({\n    delimiters: ['[[', ']]'],\n    el: '#app',\n    data: {\n      siderDrawer,\n      themeSwitcher,\n      spinning: false,\n      changeSecret: false,\n      oldAllSetting: new AllSetting(),\n      allSetting: new AllSetting(),\n      saveBtnDisable: true,\n      user: {},\n      lang: getLang(),\n      remarkModels: { i: 'Inbound', e: 'Email', o: 'Other' },\n      remarkSeparators: [' ', '-', '_', '@', ':', '~', '|', ',', '.', '/'],\n      datepickerList: [{ name: 'Gregorian (Standard)', value: 'gregorian' }, { name: 'Jalalian (شمسی)', value: 'jalalian' }],\n      remarkSample: '',\n      defaultFragment: {\n        tag: \"fragment\",\n        protocol: \"freedom\",\n        settings: {\n          domainStrategy: \"AsIs\",\n          fragment: {\n            packets: \"tlshello\",\n            length: \"100-200\",\n            interval: \"10-20\"\n          }\n        },\n        streamSettings: {\n          sockopt: {\n            tcpKeepAliveIdle: 100,\n            tcpMptcp: true,\n            tcpNoDelay: true\n          }\n        }\n      },\n      defaultMux: {\n        enabled: true,\n        concurrency: 8,\n        xudpConcurrency: 16,\n        xudpProxyUDP443: \"reject\"\n      },\n      defaultRules: [\n        {\n          type: \"field\",\n          outboundTag: \"direct\",\n          domain: [\n            \"geosite:category-ir\",\n            \"geosite:cn\"\n          ],\n          \"enabled\": true\n        },\n        {\n          type: \"field\",\n          outboundTag: \"direct\",\n          ip: [\n            \"geoip:private\",\n            \"geoip:ir\",\n            \"geoip:cn\"\n          ],\n          enabled: true\n        },\n      ],\n      countryOptions: [\n        { label: 'Private IP/Domain', value: 'private' },\n        { label: '🇮🇷 Iran', value: 'ir' },\n        { label: '🇨🇳 China', value: 'cn' },\n        { label: '🇷🇺 Russia', value: 'ru' },\n      ],\n      get remarkModel() {\n        rm = this.allSetting.remarkModel;\n        return rm.length > 1 ? rm.substring(1).split('') : [];\n      },\n      set remarkModel(value) {\n        rs = this.allSetting.remarkModel[0];\n        this.allSetting.remarkModel = rs + value.join('');\n        this.changeRemarkSample();\n      },\n      get remarkSeparator() {\n        return this.allSetting.remarkModel.length > 1 ? this.allSetting.remarkModel.charAt(0) : '-';\n      },\n      set remarkSeparator(value) {\n        this.allSetting.remarkModel = value + this.allSetting.remarkModel.substring(1);\n        this.changeRemarkSample();\n      },\n      get datepicker() {\n        return this.allSetting.datepicker ? this.allSetting.datepicker : 'gregorian';\n      },\n      set datepicker(value) {\n        this.allSetting.datepicker = value;\n      },\n      changeRemarkSample() {\n        sample = []\n        this.remarkModel.forEach(r => sample.push(this.remarkModels[r]));\n        this.remarkSample = sample.length == 0 ? '' : sample.join(this.remarkSeparator);\n      }\n    },\n    methods: {\n      loading(spinning = true) {\n        this.spinning = spinning;\n      },\n      async getAllSetting() {\n        this.loading(true);\n        const msg = await HttpUtil.post(\"/panel/setting/all\");\n        this.loading(false);\n        if (msg.success) {\n          this.oldAllSetting = new AllSetting(msg.obj);\n          this.allSetting = new AllSetting(msg.obj);\n          app.changeRemarkSample();\n          this.saveBtnDisable = true;\n        }\n        await this.fetchUserSecret();\n      },\n      async updateAllSetting() {\n        this.loading(true);\n        const msg = await HttpUtil.post(\"/panel/setting/update\", this.allSetting);\n        this.loading(false);\n        if (msg.success) {\n          await this.getAllSetting();\n        }\n      },\n      async updateUser() {\n        this.loading(true);\n        const msg = await HttpUtil.post(\"/panel/setting/updateUser\", this.user);\n        this.loading(false);\n        if (msg.success) {\n          this.user = {};\n          window.location.replace(basePath + \"logout\");\n        }\n      },\n      async restartPanel() {\n        await new Promise(resolve => {\n          this.$confirm({\n            title: '{{ i18n \"pages.settings.restartPanel\" }}',\n            content: '{{ i18n \"pages.settings.restartPanelDesc\" }}',\n            class: themeSwitcher.currentTheme,\n            okText: '{{ i18n \"sure\" }}',\n            cancelText: '{{ i18n \"cancel\" }}',\n            onOk: () => resolve(),\n          });\n        });\n        this.loading(true);\n        const msg = await HttpUtil.post(\"/panel/setting/restartPanel\");\n        this.loading(false);\n        if (msg.success) {\n          this.loading(true);\n          await PromiseUtil.sleep(5000);\n          let { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting;\n          const isTLS = webCertFile !== \"\" || webKeyFile !== \"\";\n          const url = buildURL({ host, port, isTLS, base, path: \"panel/settings\" });\n          window.location.replace(url);\n        }\n      },\n      async fetchUserSecret() {\n        this.loading(true);\n        const userMessage = await HttpUtil.post(\"/panel/setting/getUserSecret\", this.user);\n        if (userMessage.success) {\n          this.user = userMessage.obj;\n        }\n        this.loading(false);\n      },\n      async updateSecret() {\n        this.loading(true);\n        const msg = await HttpUtil.post(\"/panel/setting/updateUserSecret\", this.user);\n        if (msg && msg.obj) {\n          this.user = msg.obj;\n        }\n        this.loading(false);\n        await this.updateAllSetting();\n      },\n      generateRandomString(length) {\n        var chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n        let randomString = \"\";\n        for (let i = 0; i < length; i++) {\n          randomString += chars[Math.floor(Math.random() * chars.length)];\n        }\n        return randomString;\n      },\n      async getNewSecret() {\n        if (!this.changeSecret) {\n          this.changeSecret = true;\n          this.user.loginSecret = '';\n          const newSecret = this.generateRandomString(64);\n          await PromiseUtil.sleep(1000);\n          this.user.loginSecret = newSecret;\n          this.changeSecret = false;\n        }\n      },\n      async toggleToken(value) {\n        if (value) {\n          await this.getNewSecret();\n        } else {\n          this.user.loginSecret = \"\";\n        }\n      },\n    },\n    computed: {\n      fragment: {\n        get: function () { return this.allSetting?.subJsonFragment != \"\"; },\n        set: function (v) {\n          this.allSetting.subJsonFragment = v ? JSON.stringify(this.defaultFragment) : \"\";\n        }\n      },\n      fragmentPackets: {\n        get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.packets : \"\"; },\n        set: function (v) {\n          if (v != \"\") {\n            newFragment = JSON.parse(this.allSetting.subJsonFragment);\n            newFragment.settings.fragment.packets = v;\n            this.allSetting.subJsonFragment = JSON.stringify(newFragment);\n          }\n        }\n      },\n      fragmentLength: {\n        get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.length : \"\"; },\n        set: function (v) {\n          if (v != \"\") {\n            newFragment = JSON.parse(this.allSetting.subJsonFragment);\n            newFragment.settings.fragment.length = v;\n            this.allSetting.subJsonFragment = JSON.stringify(newFragment);\n          }\n        }\n      },\n      fragmentInterval: {\n        get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.interval : \"\"; },\n        set: function (v) {\n          if (v != \"\") {\n            newFragment = JSON.parse(this.allSetting.subJsonFragment);\n            newFragment.settings.fragment.interval = v;\n            this.allSetting.subJsonFragment = JSON.stringify(newFragment);\n          }\n        }\n      },\n      enableMux: {\n        get: function () { return this.allSetting?.subJsonMux != \"\"; },\n        set: function (v) {\n          this.allSetting.subJsonMux = v ? JSON.stringify(this.defaultMux) : \"\";\n        }\n      },\n      muxConcurrency: {\n        get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).concurrency : -1; },\n        set: function (v) {\n          newMux = JSON.parse(this.allSetting.subJsonMux);\n          newMux.concurrency = v;\n          this.allSetting.subJsonMux = JSON.stringify(newMux);\n        }\n      },\n      muxXudpConcurrency: {\n        get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).xudpConcurrency : -1; },\n        set: function (v) {\n          newMux = JSON.parse(this.allSetting.subJsonMux);\n          newMux.xudpConcurrency = v;\n          this.allSetting.subJsonMux = JSON.stringify(newMux);\n        }\n      },\n      muxXudpProxyUDP443: {\n        get: function () { return this.enableMux ? JSON.parse(this.allSetting.subJsonMux).xudpProxyUDP443 : \"reject\"; },\n        set: function (v) {\n          newMux = JSON.parse(this.allSetting.subJsonMux);\n          newMux.xudpProxyUDP443 = v;\n          this.allSetting.subJsonMux = JSON.stringify(newMux);\n        }\n      },\n      enableDirect: {\n        get: function () { return this.allSetting?.subJsonRules != \"\"; },\n        set: function (v) {\n          this.allSetting.subJsonRules = v ? JSON.stringify(this.defaultRules) : \"\";\n        }\n      },\n      directCountries: {\n        get: function () {\n          if (!this.enableDirect) return [];\n          rules = JSON.parse(this.allSetting.subJsonRules);\n          return Array.isArray(rules) ? rules[1].ip.map(d => d.replace(\"geoip:\", \"\")) : [];\n        },\n        set: function (v) {\n          rules = JSON.parse(this.allSetting.subJsonRules);\n          if (!Array.isArray(rules)) return;\n          rules[0].domain = [];\n          rules[1].ip = [];\n          v.forEach(d => {\n            let category = '';\n            if ([\"cn\", \"private\"].includes(d)) {\n              category = \"\";\n            } else if (d === 'ru') {\n              category = \"category-gov-\";\n            } else {\n              category = \"category-\";\n            }\n            rules[0].domain.push(\"geosite:\" + category + d);\n            rules[1].ip.push(\"geoip:\" + d);\n          });\n          this.allSetting.subJsonRules = JSON.stringify(rules);\n        }\n      },\n      confAlerts: {\n        get: function () {\n          if (!this.allSetting) return [];\n          var alerts = []\n          if (window.location.protocol !== \"https:\") alerts.push('{{ i18n \"secAlertSSL\" }}');\n          if (this.allSetting.webPort == 54321) alerts.push('{{ i18n \"secAlertPanelPort\" }}');\n          panelPath = window.location.pathname.split('/').length < 4\n          if (panelPath && this.allSetting.webBasePath == '/') alerts.push('{{ i18n \"secAlertPanelURI\" }}');\n          if (this.allSetting.subEnable) {\n            subPath = this.allSetting.subURI.length > 0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath;\n            if (subPath == '/sub/') alerts.push('{{ i18n \"secAlertSubURI\" }}');\n            subJsonPath = this.allSetting.subJsonURI.length > 0 ? new URL(this.allSetting.subJsonURI).pathname : this.allSetting.subJsonPath;\n            if (subJsonPath == '/json/') alerts.push('{{ i18n \"secAlertSubJsonURI\" }}');\n          }\n          return alerts\n        }\n      }\n    },\n    async mounted() {\n      await this.getAllSetting();\n      while (true) {\n        await PromiseUtil.sleep(1000);\n        this.saveBtnDisable = this.oldAllSetting.equals(this.allSetting);\n      }\n    }\n  });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/warp_modal.html",
    "content": "{{define \"warpModal\"}}\n<a-modal id=\"warp-modal\" v-model=\"warpModal.visible\" title=\"Cloudflare WARP\"\n         :confirm-loading=\"warpModal.confirmLoading\" :closable=\"true\" :mask-closable=\"true\"\n         :footer=\"null\" :class=\"themeSwitcher.currentTheme\">\n    <template v-if=\"ObjectUtil.isEmpty(warpModal.warpData)\">\n        <a-button icon=\"api\" @click=\"register\" :loading=\"warpModal.confirmLoading\">{{ i18n \"pages.inbounds.create\" }}</a-button>\n    </template>\n    <template v-else>\n        <table style=\"margin: 5px 0; width: 100%;\">\n            <tr class=\"client-table-odd-row\">\n                <td>Access Token</td>\n                <td>[[ warpModal.warpData.access_token ]]</td>\n            </tr>\n            <tr>\n                <td>Device ID</td>\n                <td>[[ warpModal.warpData.device_id ]]</td>\n            </tr>\n            <tr class=\"client-table-odd-row\">\n                <td>License Key</td>\n                <td>[[ warpModal.warpData.license_key ]]</td>\n            </tr>\n            <tr>\n                <td>Private Key</td>\n                <td>[[ warpModal.warpData.private_key ]]</td>\n            </tr>\n        </table>\n        <a-divider style=\"margin: 0;\">{{ i18n \"pages.xray.outbound.settings\" }}</a-divider>\n        <a-collapse style=\"margin: 10px 0;\">\n            <a-collapse-panel header='WARP/WARP+ License Key'>\n                <a-form :colon=\"false\" :label-col=\"{ md: {span:6} }\" :wrapper-col=\"{ md: {span:14} }\">\n                    <a-form-item label=\"Key\">\n                        <a-input v-model=\"warpPlus\"></a-input>\n                        <a-button @click=\"updateLicense(warpPlus)\" :disabled=\"warpPlus.length<26\" :loading=\"warpModal.confirmLoading\">{{ i18n \"pages.inbounds.update\" }}</a-button>\n                    </a-form-item>\n                </a-form>\n            </a-collapse-panel>\n        </a-collapse>\n        <a-divider style=\"margin: 0;\">{{ i18n \"pages.xray.outbound.accountInfo\" }}</a-divider>\n        <a-button icon=\"sync\" @click=\"getConfig\" style=\"margin-top: 5px; margin-bottom: 10px;\" :loading=\"warpModal.confirmLoading\" type=\"primary\">{{ i18n \"info\" }}</a-button>\n        <template v-if=\"!ObjectUtil.isEmpty(warpModal.warpConfig)\">\n            <table style=\"width: 100%\">\n                <tr class=\"client-table-odd-row\">\n                    <td>Device Name</td>\n                    <td>[[ warpModal.warpConfig.name ]]</td>\n                </tr>\n                <tr>\n                    <td>Device Model</td>\n                    <td>[[ warpModal.warpConfig.model ]]</td>\n                </tr>\n                <tr class=\"client-table-odd-row\">\n                    <td>Device Enabled</td>\n                    <td>[[ warpModal.warpConfig.enabled ]]</td>\n                </tr>\n            <template v-if=\"!ObjectUtil.isEmpty(warpModal.warpConfig.account)\">\n                <tr>\n                    <td>Account Type</td>\n                    <td>[[ warpModal.warpConfig.account.account_type ]]</td>\n                </tr>\n                <tr class=\"client-table-odd-row\">\n                    <td>Role</td>\n                    <td>[[ warpModal.warpConfig.account.role ]]</td>\n                </tr>\n                <tr>\n                    <td>WARP+ Data</td>\n                    <td>[[ sizeFormat(warpModal.warpConfig.account.premium_data) ]]</td>\n                </tr>\n                <tr class=\"client-table-odd-row\">\n                    <td>Quota</td>\n                    <td>[[ sizeFormat(warpModal.warpConfig.account.quota) ]]</td>\n                </tr>\n                <tr v-if=\"!ObjectUtil.isEmpty(warpModal.warpConfig.account.usage)\">\n                    <td>Usage</td>\n                    <td>[[ sizeFormat(warpModal.warpConfig.account.usage) ]]</td>\n                </tr>\n            </template>\n            </table>\n            <a-divider style=\"margin: 10px 0;\">{{ i18n \"pages.xray.outbound.outboundStatus\" }}</a-divider>\n            <a-form :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n                    <template v-if=\"warpOutboundIndex>=0\">\n                        <a-tag color=\"green\" style=\"line-height: 31px;\">{{ i18n \"enabled\" }}</a-tag>\n                        <a-button @click=\"resetOutbound\" :loading=\"warpModal.confirmLoading\" type=\"danger\">{{ i18n \"reset\" }}</a-button>\n                    </template>\n                    <template v-else>\n                        <a-tag color=\"orange\" style=\"line-height: 31px;\">{{ i18n \"disabled\" }}</a-tag>\n                        <a-button @click=\"addOutbound\" :loading=\"warpModal.confirmLoading\" type=\"primary\">{{ i18n \"pages.xray.outbound.addOutbound\" }}</a-button>\n                    </template>\n                </a-form-item>\n            </a-form>\n        </template>\n    </template>\n</a-modal>\n<script>\n\n    const warpModal = {\n        visible: false,\n        confirmLoading: false,\n        warpData: null,\n        warpConfig: null,\n        warpOutbound: null,\n        show() {\n            this.visible = true;\n            this.warpConfig = null;\n            this.getData();\n\n        },\n        close() {\n            this.visible = false;\n            this.loading(false);\n        },\n        loading(loading=true) {\n            this.confirmLoading = loading;\n        },\n        async getData(){\n            this.loading(true);\n            const msg = await HttpUtil.post('/panel/xray/warp/data');\n            this.loading(false);\n            if (msg.success) {\n                this.warpData = msg.obj.length>0 ? JSON.parse(msg.obj): null;\n            }\n        },\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#warp-modal',\n        data: {\n            warpModal: warpModal,\n            warpPlus: '',\n        },\n        methods: {\n            collectConfig() {\n                config = warpModal.warpConfig.config;\n                peer = config.peers[0];\n                if(config){\n                    warpModal.warpOutbound = Outbound.fromJson({\n                        tag: 'warp',\n                        protocol: Protocols.Wireguard,\n                        settings: {\n                            mtu: 1420,\n                            secretKey: warpModal.warpData.private_key,\n                            address: Object.values(config.interface.addresses),\n                            domainStrategy: 'ForceIP',\n                            peers: [{\n                                publicKey: peer.public_key,\n                                endpoint: peer.endpoint.host,\n                            }],\n                            kernelMode: false\n                        }\n                    });\n                }\n            },\n            async register(){\n                warpModal.loading(true);\n                keys = Wireguard.generateKeypair();\n                const msg = await HttpUtil.post('/panel/xray/warp/reg',keys);\n                if (msg.success) {\n                    resp = JSON.parse(msg.obj);\n                    warpModal.warpData = resp.data;\n                    warpModal.warpConfig = resp.config;\n                    this.collectConfig();\n                }\n                warpModal.loading(false);\n            },\n            async updateLicense(l){\n                warpModal.loading(true);\n                const msg = await HttpUtil.post('/panel/xray/warp/license',{license: l});\n                if (msg.success) {\n                    warpModal.warpData = JSON.parse(msg.obj);\n                    warpModal.warpConfig = null;\n                    this.warpPlus = '';\n                }\n                warpModal.loading(false);\n            },\n            async getConfig(){\n                warpModal.loading(true);\n                const msg = await HttpUtil.post('/panel/xray/warp/config');\n                warpModal.loading(false);\n                if (msg.success) {\n                    warpModal.warpConfig = JSON.parse(msg.obj);\n                    this.collectConfig();\n                }\n            },\n            addOutbound(){\n                app.templateSettings.outbounds.push(warpModal.warpOutbound.toJson());\n                app.outboundSettings = JSON.stringify(app.templateSettings.outbounds);\n                warpModal.close();\n            },\n            resetOutbound(){\n                app.templateSettings.outbounds[this.warpOutboundIndex] = warpModal.warpOutbound.toJson();\n                app.outboundSettings = JSON.stringify(app.templateSettings.outbounds);\n                warpModal.close();\n            }\n        },\n        computed: {\n            warpOutboundIndex: {\n                get: function() {\n                    return app.templateSettings ? app.templateSettings.outbounds.findIndex((o) => o.tag == 'warp') : -1;\n                }\n            }\n        }\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/xray.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<link rel=\"stylesheet\" href=\"{{ .base_path }}assets/codemirror/codemirror.css?{{ .cur_ver }}\">\n<link rel=\"stylesheet\" href=\"{{ .base_path }}assets/codemirror/fold/foldgutter.css\">\n<link rel=\"stylesheet\" href=\"{{ .base_path }}assets/codemirror/xq.css?{{ .cur_ver }}\">\n<link rel=\"stylesheet\" href=\"{{ .base_path }}assets/codemirror/lint/lint.css\">\n\n<script src=\"{{ .base_path }}assets/base64/base64.min.js\"></script>\n<script src=\"{{ .base_path }}assets/js/model/outbound.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/codemirror.js?{{ .cur_ver }}\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/javascript.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/jshint.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/jsonlint.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/lint/lint.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/lint/javascript-lint.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/hint/javascript-hint.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/fold/foldcode.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/fold/foldgutter.js\"></script>\n<script src=\"{{ .base_path }}assets/codemirror/fold/brace-fold.js\"></script>\n<style>\n    @media (min-width: 769px) {\n        .ant-layout-content {\n            margin: 24px 16px;\n        }\n    }\n    @media (max-width: 768px) {\n        .ant-tabs-nav .ant-tabs-tab {\n            margin: 0;\n            padding: 12px .5rem;\n        }\n        .ant-table-thead > tr > th,\n        .ant-table-tbody > tr > td {\n            padding: 10px 0px;\n        }\n    }\n    .ant-tabs-bar {\n        margin: 0;\n    }\n    .ant-list-item {\n        display: block;\n    }\n    .collapse-title {\n        color: inherit;\n        font-weight: bold;\n        font-size: 18px;\n        padding: 10px 20px;\n        border-bottom: 2px solid;\n    }\n    .collapse-title > i {\n        color: inherit;\n        font-size: 24px;\n    }\n    .ant-collapse-content-box > li {\n        padding: 12px 0 0 0 !important;\n    }\n    .ant-list-item > li {\n        padding: 10px 20px !important;\n    }\n</style>\n<body>\n  <a-layout id=\"app\" v-cloak :class=\"themeSwitcher.currentTheme\">\n    {{ template \"commonSider\" . }}\n    <a-layout id=\"content-layout\">\n      <a-layout-content>\n        <a-spin :spinning=\"spinning\" :delay=\"500\" tip='{{ i18n \"loading\"}}'>\n          <transition name=\"list\" appear>\n            <a-alert type=\"error\" v-if=\"showAlert\" style=\"margin-bottom: 10px\"\n              message='{{ i18n \"secAlertTitle\" }}'\n              color=\"red\"\n              description='{{ i18n \"secAlertSsl\" }}'\n              show-icon closable>\n            </a-alert>\n          </transition>\n          <a-space direction=\"vertical\">\n            <a-card hoverable style=\"margin-bottom: .5rem;\">\n              <a-row style=\"display: flex; flex-wrap: wrap; align-items: center;\">\n                <a-col :xs=\"24\" :sm=\"10\" style=\"padding: 4px;\">\n                  <a-space direction=\"horizontal\">\n                    <a-button type=\"primary\" :disabled=\"saveBtnDisable\" @click=\"updateXraySetting\">{{ i18n \"pages.xray.save\" }}</a-button>\n                    <a-button type=\"danger\" :disabled=\"!saveBtnDisable\" @click=\"restartXray\">{{ i18n \"pages.xray.restart\" }}</a-button>\n                    <a-popover v-if=\"restartResult\"\n                        :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <span slot=\"title\" style=\"font-size: 12pt\">Error in running xray-core</span>\n                      <template slot=\"content\">\n                        <p style=\"max-width: 400px\" v-for=\"line in restartResult.split('\\n')\">[[ line ]]</p>\n                      </template>\n                      <a-icon type=\"question-circle\"></a-icon>\n                    </a-popover>\n                  </a-space>\n                </a-col>\n                <a-col :xs=\"24\" :sm=\"14\">\n                  <template>\n                    <div>\n                      <a-back-top :target=\"() => document.getElementById('content-layout')\" visibility-height=\"200\"></a-back-top>\n                      <a-alert type=\"warning\" style=\"float: right; width: fit-content\" message='{{ i18n \"pages.settings.infoDesc\" }}' show-icon>\n                      </a-alert>\n                    </div>\n                  </template>\n                </a-col>\n              </a-row>\n            </a-card>\n            <a-tabs class=\"ant-card-dark-box-nohover\" default-active-key=\"1\"\n                @change=\"(activeKey) => { this.changePage(activeKey); }\"\n                :class=\"themeSwitcher.currentTheme\">\n              <a-tab-pane key=\"tpl-basic\" tab='{{ i18n \"pages.xray.basicTemplate\"}}' style=\"padding-top: 20px;\">\n                <a-collapse>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.generalConfigs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.generalConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <a-row style=\"padding: 10px 20px\">\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-list-item-meta title='{{ i18n \"pages.xray.FreedomStrategy\" }}'\n                            description='{{ i18n \"pages.xray.FreedomStrategyDesc\" }}'>\n                          </a-list-item-meta>\n                        </a-col>\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <template>\n                            <a-select v-model=\"freedomStrategy\" :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                                style=\"width: 100%\">\n                              <a-select-option v-for=\"s in OutboundDomainStrategies\" :value=\"s\">[[ s ]]</a-select-option>\n                            </a-select>\n                          </template>\n                        </a-col>\n                      </a-row>\n                      <a-row style=\"padding: 10px 20px\">\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-list-item-meta title='{{ i18n \"pages.xray.RoutingStrategy\" }}'\n                            description='{{ i18n \"pages.xray.RoutingStrategyDesc\" }}'>\n                          </a-list-item-meta>\n                        </a-col>\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-select v-model=\"routingStrategy\" :dropdown-class-name=\"themeSwitcher.currentTheme\"\n                              style=\"width: 100%\">\n                            <a-select-option v-for=\"s in routingDomainStrategies\" :value=\"s\">[[ s ]]</a-select-option>\n                          </a-select>\n                        </a-col>\n                      </a-row>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.logConfigs\" }}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.logConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <a-row style=\"padding: 10px 20px\">\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-list-item-meta title='{{ i18n \"pages.xray.logLevel\" }}'\n                            description='{{ i18n \"pages.xray.logLevelDesc\" }}'>\n                          </a-list-item-meta>\n                        </a-col>\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <template>\n                            <a-select v-model=\"setLogLevel\" :dropdown-class-name=\"themeSwitcher.currentTheme\" style=\"width: 100%\">\n                              <a-select-option v-for=\"s in logLevel\" :value=\"s\">[[ s ]]</a-select-option>\n                            </a-select>\n                          </template>\n                        </a-col>\n                      </a-row>\n                      <a-row style=\"padding: 10px 20px\">\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-list-item-meta title='{{ i18n \"pages.xray.accessLog\" }}'\n                            description='{{ i18n \"pages.xray.accessLogDesc\" }}'>\n                          </a-list-item-meta>\n                        </a-col>\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <template>\n                            <a-select v-model=\"accessLog\" :dropdown-class-name=\"themeSwitcher.currentTheme\" style=\"width: 100%\">\n                              <a-select-option v-for=\"s in access\" :key=\"s\" :value=\"s\">[[ s ]]</a-select-option>\n                            </a-select>\n                          </template>\n                        </a-col>\n                      </a-row>\n                      <a-row style=\"padding: 10px 20px\">\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <a-list-item-meta title='{{ i18n \"pages.xray.errorLog\" }}'\n                            description='{{ i18n \"pages.xray.errorLogDesc\" }}'>\n                          </a-list-item-meta>\n                        </a-col>\n                        <a-col :lg=\"24\" :xl=\"12\">\n                          <template>\n                            <a-select v-model=\"errorLog\" :dropdown-class-name=\"themeSwitcher.currentTheme\" style=\"width: 100%\">\n                              <a-select-option v-for=\"s in error\" :key=\"s\" :value=\"s\">[[ s ]]</a-select-option>\n                            </a-select>\n                          </template>\n                        </a-col>\n                      </a-row>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.blockConfigs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.blockConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.Torrent\"}}' desc='{{ i18n \"pages.xray.TorrentDesc\"}}' v-model=\"torrentSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.PrivateIp\"}}' desc='{{ i18n \"pages.xray.PrivateIpDesc\"}}' v-model=\"privateIpSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.Ads\"}}' desc='{{ i18n \"pages.xray.AdsDesc\"}}' v-model=\"AdsSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.Family\"}}' desc='{{ i18n \"pages.xray.FamilyDesc\"}}' v-model=\"familyProtectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.Security\"}}' desc='{{ i18n \"pages.xray.SecurityDesc\"}}' v-model=\"SecuritySettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.Speedtest\"}}' desc='{{ i18n \"pages.xray.SpeedtestDesc\"}}' v-model=\"SpeedTestSettings\"></setting-list-item>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.blockCountryConfigs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.blockCountryConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.IRIp\"}}' desc='{{ i18n \"pages.xray.IRIpDesc\"}}' v-model=\"IRIpSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.IRDomain\"}}' desc='{{ i18n \"pages.xray.IRDomainDesc\"}}' v-model=\"IRDomainSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.ChinaIp\"}}' desc='{{ i18n \"pages.xray.ChinaIpDesc\"}}' v-model=\"ChinaIpSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.ChinaDomain\"}}' desc='{{ i18n \"pages.xray.ChinaDomainDesc\"}}' v-model=\"ChinaDomainSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.RussiaIp\"}}' desc='{{ i18n \"pages.xray.RussiaIpDesc\"}}' v-model=\"RussiaIpSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.RussiaDomain\"}}' desc='{{ i18n \"pages.xray.RussiaDomainDesc\"}}' v-model=\"RussiaDomainSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.VNIp\"}}' desc='{{ i18n \"pages.xray.VNIpDesc\"}}' v-model=\"VNIpSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.VNDomain\"}}' desc='{{ i18n \"pages.xray.VNDomainDesc\"}}' v-model=\"VNDomainSettings\"></setting-list-item>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.directCountryConfigs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.directCountryConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectIRIp\"}}' desc='{{ i18n \"pages.xray.DirectIRIpDesc\"}}' v-model=\"IRIpDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectIRDomain\"}}' desc='{{ i18n \"pages.xray.DirectIRDomainDesc\"}}' v-model=\"IRDomainDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectChinaIp\"}}' desc='{{ i18n \"pages.xray.DirectChinaIpDesc\"}}' v-model=\"ChinaIpDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectChinaDomain\"}}' desc='{{ i18n \"pages.xray.DirectChinaDomainDesc\"}}' v-model=\"ChinaDomainDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectRussiaIp\"}}' desc='{{ i18n \"pages.xray.DirectRussiaIpDesc\"}}' v-model=\"RussiaIpDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectRussiaDomain\"}}' desc='{{ i18n \"pages.xray.DirectRussiaDomainDesc\"}}' v-model=\"RussiaDomainDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectVNIp\"}}' desc='{{ i18n \"pages.xray.DirectVNIpDesc\"}}' v-model=\"VNIpDirectSettings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.DirectVNDomain\"}}' desc='{{ i18n \"pages.xray.DirectVNDomainDesc\"}}' v-model=\"VNDomainDirectSettings\"></setting-list-item>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.ipv4Configs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.ipv4ConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.GoogleIPv4\"}}' desc='{{ i18n \"pages.xray.GoogleIPv4Desc\"}}' v-model=\"GoogleIPv4Settings\"></setting-list-item>\n                      <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.NetflixIPv4\"}}' desc='{{ i18n \"pages.xray.NetflixIPv4Desc\"}}' v-model=\"NetflixIPv4Settings\"></setting-list-item>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.xray.warpConfigs\"}}'>\n                    <a-row :xs=\"24\" :sm=\"24\" :lg=\"12\">\n                      <a-alert type=\"warning\" style=\"text-align: center;\">\n                        <template slot=\"message\">\n                          <a-icon type=\"exclamation-circle\" theme=\"filled\" style=\"color: #FFA031\"></a-icon>\n                          {{ i18n \"pages.xray.warpConfigsDesc\" }}\n                        </template>\n                      </a-alert>\n                    </a-row>\n                    <a-list-item>\n                      <template v-if=\"WarpExist\">\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.GoogleWARP\"}}' desc='{{ i18n \"pages.xray.GoogleWARPDesc\"}}' v-model=\"GoogleWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.OpenAIWARP\"}}' desc='{{ i18n \"pages.xray.OpenAIWARPDesc\"}}' v-model=\"OpenAIWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.NetflixWARP\"}}' desc='{{ i18n \"pages.xray.NetflixWARPDesc\"}}' v-model=\"NetflixWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.SpotifyWARP\"}}' desc='{{ i18n \"pages.xray.SpotifyWARPDesc\"}}' v-model=\"SpotifyWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.MetaWARP\"}}' desc='{{ i18n \"pages.xray.MetaWARPDesc\"}}' v-model=\"MetaWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.AppleWARP\"}}' desc='{{ i18n \"pages.xray.AppleWARPDesc\"}}' v-model=\"AppleWARPSettings\"></setting-list-item>\n                        <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.RedditWARP\"}}' desc='{{ i18n \"pages.xray.RedditWARPDesc\"}}' v-model=\"RedditWARPSettings\"></setting-list-item>\n                      </template>\n                      <a-button style=\"margin-left: 20px;\" v-else type=\"primary\" icon=\"cloud\" @click=\"showWarp()\">WARP</a-button>\n                    </a-list-item>\n                  </a-collapse-panel>\n                  <a-collapse-panel header='{{ i18n \"pages.settings.resetDefaultConfig\"}}'>\n                    <a-space direction=\"horizontal\" style=\"padding: 0 20px\">\n                      <a-button type=\"danger\" @click=\"resetXrayConfigToDefault\">{{ i18n \"pages.settings.resetDefaultConfig\" }}</a-button>\n                    </a-space>\n                  </a-collapse-panel>\n                </a-collapse>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-routing\" tab='{{ i18n \"pages.xray.Routings\"}}' style=\"padding-top: 20px;\">\n                <a-button type=\"primary\" icon=\"plus\" @click=\"addRule\">{{ i18n \"pages.xray.rules.add\" }}</a-button>\n                <a-table-sortable :columns=\"isMobile ? rulesMobileColumns : rulesColumns\" bordered\n                    :row-key=\"r => r.key\"\n                    :data-source=\"routingRuleData\"\n                    :scroll=\"isMobile ? {} : { x: 1000 }\"\n                    :pagination=\"false\"\n                    :indent-size=\"0\" \n                    :style=\"isMobile ? 'padding: 5px 0' : 'margin-top: 10px;'\"\n                    v-on:onSort=\"replaceRule\">\n                  <template slot=\"action\" slot-scope=\"text, rule, index\">\n                    <table-sort-trigger :item-index=\"index\"></table-sort-trigger>\n                    <span class=\"ant-table-row-index\"> [[ index+1 ]] </span>\n                    <a-dropdown :trigger=\"['click']\">\n                      <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                      <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                        <a-menu-item v-if=\"index>0\" @click=\"replaceRule(index,0)\">\n                          <a-icon type=\"vertical-align-top\"></a-icon>\n                          {{ i18n \"pages.xray.rules.first\"}}\n                        </a-menu-item>\n                        <a-menu-item v-if=\"index>0\" @click=\"replaceRule(index,index-1)\">\n                          <a-icon type=\"arrow-up\"></a-icon>\n                          {{ i18n \"pages.xray.rules.up\"}}\n                        </a-menu-item>\n                        <a-menu-item v-if=\"index<routingRuleData.length-1\" @click=\"replaceRule(index,index+1)\">\n                          <a-icon type=\"arrow-down\"></a-icon>\n                          {{ i18n \"pages.xray.rules.down\"}}\n                        </a-menu-item>\n                        <a-menu-item v-if=\"index<routingRuleData.length-1\" @click=\"replaceRule(index,routingRuleData.length-1)\">\n                          <a-icon type=\"vertical-align-bottom\"></a-icon>\n                          {{ i18n \"pages.xray.rules.last\"}}\n                        </a-menu-item>\n                        <a-menu-item @click=\"editRule(index)\">\n                          <a-icon type=\"edit\"></a-icon>\n                          {{ i18n \"edit\" }}\n                        </a-menu-item>\n                        <a-menu-item @click=\"deleteRule(index)\">\n                          <span style=\"color: #FF4D4F\">\n                            <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                          </span>\n                        </a-menu-item>\n                      </a-menu>\n                    </a-dropdown>\n                  </template>\n                  <template slot=\"inbound\" slot-scope=\"text, rule, index\">\n                    <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-if=\"rule.inboundTag\">Inbound Tag: [[ rule.inboundTag ]]</p>\n                        <p v-if=\"rule.user\">User email: [[ rule.user ]]</p>\n                      </template>\n                      [[ [rule.inboundTag,rule.user].join('\\n') ]]\n                    </a-popover>\n                  </template>\n                  <template slot=\"outbound\" slot-scope=\"text, rule, index\">\n                    <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-if=\"rule.outboundTag\">Outbound Tag: [[ rule.outboundTag ]]</p>\n                      </template>\n                      [[ rule.outboundTag ]]\n                    </a-popover>\n                  </template>\n                  <template slot=\"balancer\" slot-scope=\"text, rule, index\">\n                    <a-popover :overlay-class-name=\"themeSwitcher.currentTheme\">\n                      <template slot=\"content\">\n                        <p v-if=\"rule.balancerTag\">Balancer Tag: [[ rule.balancerTag ]]</p>\n                      </template>\n                      [[ rule.balancerTag ]]\n                    </a-popover>\n                  </template>\n                  <template slot=\"info\" slot-scope=\"text, rule, index\">\n                    <a-popover placement=\"bottomRight\"\n                        v-if=\"(rule.source+rule.sourcePort+rule.network+rule.protocol+rule.attrs+rule.ip+rule.domain+rule.port).length>0\"\n                        :overlay-class-name=\"themeSwitcher.currentTheme\" trigger=\"click\">\n                      <template slot=\"content\">\n                        <table cellpadding=\"2\" style=\"max-width: 300px;\">\n                          <tr v-if=\"rule.source\">\n                            <td>Source</td>\n                            <td><a-tag color=\"blue\" v-for=\"r in rule.source.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.sourcePort\">\n                            <td>Source Port</td>\n                            <td><a-tag color=\"green\" v-for=\"r in rule.sourcePort.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.network\">\n                            <td>Network</td>\n                            <td><a-tag color=\"blue\" v-for=\"r in rule.network.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.protocol\">\n                            <td>Protocol</td>\n                            <td><a-tag color=\"green\" v-for=\"r in rule.protocol.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.attrs\">\n                            <td>Attrs</td>\n                            <td><a-tag color=\"blue\" v-for=\"r in rule.attrs.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.ip\">\n                            <td>IP</td>\n                            <td><a-tag color=\"green\" v-for=\"r in rule.ip.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.domain\">\n                            <td>Domain</td>\n                            <td><a-tag color=\"blue\" v-for=\"r in rule.domain.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.port\">\n                            <td>Port</td>\n                            <td><a-tag color=\"green\" v-for=\"r in rule.port.split(',')\">[[ r ]]</a-tag></td>\n                          </tr>\n                          <tr v-if=\"rule.balancerTag\">\n                            <td>Balancer Tag</td>\n                            <td><a-tag color=\"blue\">[[ rule.balancerTag ]]</a-tag></td>\n                          </tr>\n                        </table>\n                      </template>\n                      <a-button shape=\"round\" size=\"small\" style=\"font-size: 14px; padding: 0 10px;\">\n                        <a-icon type=\"info\"></a-icon>\n                      </a-button>\n                    </a-popover>\n                  </template>\n                </a-table-sortable>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-outbound\" tab='{{ i18n \"pages.xray.Outbounds\"}}' style=\"padding-top: 20px;\" force-render=\"true\">\n                <a-row>\n                  <a-col :xs=\"12\" :sm=\"12\" :lg=\"12\">\n                    <a-button type=\"primary\" icon=\"plus\" @click=\"addOutbound()\" style=\"margin-bottom: 10px;\">\n                      {{ i18n \"pages.xray.outbound.addOutbound\" }}\n                    </a-button>\n                    <a-button type=\"primary\" icon=\"cloud\" @click=\"showWarp()\" style=\"margin-bottom: 10px;\">WARP</a-button>\n                  </a-col>\n                  <a-col :xs=\"12\" :sm=\"12\" :lg=\"12\" style=\"text-align: right;\">\n                    <a-icon type=\"sync\" :spin=\"refreshing\" @click=\"refreshOutboundTraffic()\" style=\"margin: 0 5px;\"></a-icon>\n                    <a-popconfirm placement=\"topRight\" @confirm=\"resetOutboundTraffic(-1)\"\n                        title='{{ i18n \"pages.inbounds.resetTrafficContent\"}}'\n                        :overlay-class-name=\"themeSwitcher.currentTheme\"\n                        ok-text='{{ i18n \"reset\"}}'\n                        cancel-text='{{ i18n \"cancel\"}}'>\n                      <a-icon slot=\"icon\" type=\"question-circle-o\" :style=\"themeSwitcher.isDarkTheme ? 'color: #008771' : 'color: #008771'\"></a-icon>\n                      <a-icon type=\"retweet\" style=\"cursor: pointer;\"></a-icon>\n                    </a-popconfirm>\n                  </a-col>\n                </a-row>\n                <a-table :columns=\"outboundColumns\" bordered\n                    :row-key=\"r => r.key\"\n                    :data-source=\"outboundData\"\n                    :scroll=\"isMobile ? {} : { x: 200 }\"\n                    :pagination=\"false\"\n                    :indent-size=\"0\"\n                    :style=\"isMobile ? 'padding: 5px 5px' : 'margin-right: 1px;'\">\n                  <template slot=\"action\" slot-scope=\"text, outbound, index\">\n                    [[ index+1 ]]\n                    <a-dropdown :trigger=\"['click']\">\n                      <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                      <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                        <a-menu-item v-if=\"index>0\" @click=\"setFirstOutbound(index)\">\n                          <a-icon type=\"vertical-align-top\"></a-icon>\n                          {{ i18n \"pages.xray.rules.first\"}}\n                        </a-menu-item>\n                        <a-menu-item @click=\"editOutbound(index)\">\n                          <a-icon type=\"edit\"></a-icon>\n                          {{ i18n \"edit\" }}\n                        </a-menu-item>\n                        <a-menu-item @click=\"resetOutboundTraffic(index)\">\n                          <span>\n                            <a-icon type=\"retweet\"></a-icon> {{ i18n \"pages.inbounds.resetTraffic\"}}\n                          </span>\n                        </a-menu-item>\n                        <a-menu-item @click=\"deleteOutbound(index)\">\n                          <span style=\"color: #FF4D4F\">\n                            <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                          </span>\n                        </a-menu-item>\n                      </a-menu>\n                    </a-dropdown>\n                  </template>\n                  <template slot=\"address\" slot-scope=\"text, outbound, index\">\n                    <p style=\"margin: 0 5px;\" v-for=\"addr in findOutboundAddress(outbound)\">[[ addr ]]</p>\n                  </template>\n                  <template slot=\"protocol\" slot-scope=\"text, outbound, index\">\n                    <a-tag style=\"margin:0;\" color=\"purple\">[[ outbound.protocol ]]</a-tag>\n                    <template v-if=\"[Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks].includes(outbound.protocol)\">\n                      <a-tag style=\"margin:0;\" color=\"blue\">[[ outbound.streamSettings.network ]]</a-tag>\n                      <a-tag style=\"margin:0;\" v-if=\"outbound.streamSettings.security=='tls'\" color=\"green\">tls</a-tag>\n                      <a-tag style=\"margin:0;\" v-if=\"outbound.streamSettings.security=='reality'\" color=\"green\">reality</a-tag>\n                    </template>\n                  </template>\n                  <template slot=\"traffic\" slot-scope=\"text, outbound, index\">\n                    <a-tag color=\"green\">[[ findOutboundTraffic(outbound) ]]</a-tag>\n                  </template>\n                </a-table>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-reverse\" tab='{{ i18n \"pages.xray.outbound.reverse\"}}' style=\"padding-top: 20px;\" force-render=\"true\">\n                <a-button type=\"primary\" icon=\"plus\" @click=\"addReverse()\" style=\"margin-bottom: 10px;\">\n                  {{ i18n \"pages.xray.outbound.addReverse\" }}\n                </a-button>\n                <a-table :columns=\"reverseColumns\" bordered v-if=\"reverseData.length>0\"\n                    :row-key=\"r => r.key\"\n                    :data-source=\"reverseData\"\n                    :scroll=\"isMobile ? {} : { x: 200 }\"\n                    :pagination=\"false\"\n                    :indent-size=\"0\"\n                    :style=\"isMobile ? 'padding: 5px 0' : 'margin-left: 1px;'\">\n                  <template slot=\"action\" slot-scope=\"text, reverse, index\">\n                    [[ index+1 ]]\n                    <a-dropdown :trigger=\"['click']\">\n                      <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                      <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                        <a-menu-item @click=\"editReverse(index)\">\n                          <a-icon type=\"edit\"></a-icon>\n                          {{ i18n \"edit\" }}\n                        </a-menu-item>\n                        <a-menu-item @click=\"deleteReverse(index)\">\n                          <span style=\"color: #FF4D4F\">\n                            <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                          </span>\n                        </a-menu-item>\n                      </a-menu>\n                    </a-dropdown>\n                  </template>\n                </a-table>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-balancer\" tab='{{ i18n \"pages.xray.Balancers\"}}' style=\"padding-top: 20px;\" force-render=\"true\">\n                <a-button type=\"primary\" icon=\"plus\" @click=\"addBalancer()\" style=\"margin-bottom: 10px;\">\n                  {{ i18n \"pages.xray.balancer.addBalancer\"}}\n                </a-button>\n                <a-table :columns=\"balancerColumns\" bordered v-if=\"balancersData.length>0\"\n                    :row-key=\"r => r.key\"\n                    :data-source=\"balancersData\"\n                    :scroll=\"isMobile ? {} : { x: 200 }\"\n                    :pagination=\"false\"\n                    :indent-size=\"0\"\n                    :style=\"isMobile ? 'padding: 5px 0' : 'margin-left: 1px;'\">\n                  <template slot=\"action\" slot-scope=\"text, balancer, index\">\n                    [[ index+1 ]]\n                    <a-dropdown :trigger=\"['click']\">\n                      <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                      <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                        <a-menu-item @click=\"editBalancer(index)\">\n                          <a-icon type=\"edit\"></a-icon>\n                          {{ i18n \"edit\" }}\n                        </a-menu-item>\n                        <a-menu-item @click=\"deleteBalancer(index)\">\n                          <span style=\"color: #FF4D4F\">\n                            <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                          </span>\n                        </a-menu-item>\n                      </a-menu>\n                    </a-dropdown>\n                  </template>\n                  <template slot=\"strategy\" slot-scope=\"text, balancer, index\">\n                    <a-tag style=\"margin:0;\" v-if=\"balancer.strategy=='random'\" color=\"purple\">Random</a-tag>\n                    <a-tag style=\"margin:0;\" v-if=\"balancer.strategy=='roundRobin'\" color=\"green\">Round Robin</a-tag>\n                    <a-tag style=\"margin:0;\" v-if=\"balancer.strategy=='leastLoad'\" color=\"green\">Least Load</a-tag>\n                    <a-tag style=\"margin:0;\" v-if=\"balancer.strategy=='leastPing'\" color=\"green\">Least Ping</a-tag>\n                  </template>\n                  <template slot=\"selector\" slot-scope=\"text, balancer, index\">\n                    <a-tag class=\"info-large-tag\" style=\"margin:1;\" v-for=\"sel in balancer.selector\">[[ sel ]]</a-tag>\n                  </template>\n                </a-table>\n                <a-radio-group\n                    v-if=\"observatoryEnable || burstObservatoryEnable\"\n                    v-model=\"obsSettings\"\n                    @change=\"changeObsCode\"\n                    button-style=\"solid\"\n                    style=\"margin: 10px 0;\"\n                    :size=\"isMobile ? 'small' : ''\">\n                  <a-radio-button value=\"observatory\" v-if=\"observatoryEnable\">Observatory</a-radio-button>\n                  <a-radio-button value=\"burstObservatory\" v-if=\"burstObservatoryEnable\">Burst Observatory</a-radio-button>\n                </a-radio-group>\n                <textarea style=\"position:absolute; left: -800px;\" id=\"obsSetting\"></textarea>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-dns\" tab='DNS' style=\"padding-top: 20px;\" force-render=\"true\">\n                <setting-list-item type=\"switch\" title='{{ i18n \"pages.xray.dns.enable\" }}' desc='{{ i18n \"pages.xray.dns.enableDesc\" }}' v-model=\"enableDNS\"></setting-list-item>\n                <template v-if=\"enableDNS\">\n                  <setting-list-item style=\"padding: 10px 20px\" type=\"text\" title='{{ i18n \"pages.xray.dns.tag\" }}' desc='{{ i18n \"pages.xray.dns.tagDesc\" }}' v-model=\"dnsTag\"></setting-list-item>\n                  <a-list-item style=\"padding: 10px 20px\">\n                    <a-row>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-list-item-meta title='{{ i18n \"pages.xray.dns.strategy\" }}' description='{{ i18n \"pages.xray.dns.strategyDesc\" }}' />\n                      </a-col>\n                      <a-col :lg=\"24\" :xl=\"12\">\n                        <a-select\n                            v-model=\"dnsStrategy\"\n                            style=\"width: 100%\"\n                            :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                          <a-select-option :value=\"l\" :label=\"l\" v-for=\"l in ['UseIP', 'UseIPv4', 'UseIPv6']\">\n                            [[ l ]]\n                          </a-select-option>\n                        </a-select>\n                      </a-col>\n                    </a-row>\n                  </a-list-item>\n                  <a-divider>DNS</a-divider>\n                  <a-button type=\"primary\" icon=\"plus\" @click=\"addDNSServer()\" style=\"margin-bottom: 10px;\">{{ i18n \"pages.xray.dns.add\" }}</a-button>\n                  <a-table :columns=\"dnsColumns\" bordered v-if=\"dnsServers.length>0\"\n                      :row-key=\"r => r.key\"\n                      :data-source=\"dnsServers\"\n                      :scroll=\"isMobile ? {} : { x: 200 }\"\n                      :pagination=\"false\"\n                      :indent-size=\"0\"\n                      :style=\"isMobile ? 'padding: 5px 0' : 'margin-left: 1px;'\">\n                    <template slot=\"action\" slot-scope=\"text,dns,index\">\n                        [[ index+1 ]]\n                      <a-dropdown :trigger=\"['click']\">\n                        <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                        <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                          <a-menu-item @click=\"editDNSServer(index)\">\n                            <a-icon type=\"edit\"></a-icon>\n                            {{ i18n \"edit\" }}\n                          </a-menu-item>\n                          <a-menu-item @click=\"deleteDNSServer(index)\">\n                            <span style=\"color: #FF4D4F\">\n                              <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                            </span>\n                          </a-menu-item>\n                        </a-menu>\n                      </a-dropdown>\n                    </template>\n                    <template slot=\"address\" slot-scope=\"dns,index\">\n                      <span v-if=\"typeof dns == 'object'\">[[ dns.address ]]</span>\n                      <span v-else>[[ dns ]]</span>\n                    </template>\n                    <template slot=\"domain\" slot-scope=\"dns,index\">\n                      <span v-if=\"typeof dns == 'object'\">[[ dns.domains.join(\",\") ]]</span>\n                    </template>\n                  </a-table>\n                  <a-divider>Fake DNS</a-divider>\n                  <a-button type=\"primary\" icon=\"plus\" @click=\"addFakedns()\" style=\"margin-bottom: 10px;\">{{ i18n \"pages.xray.fakedns.add\" }}</a-button>\n                  <a-table :columns=\"fakednsColumns\" bordered v-if=\"fakeDns && fakeDns.length>0\" :row-key=\"r => r.key\"\n                      :data-source=\"fakeDns\" :scroll=\"isMobile ? {} : { x: 200 }\" :pagination=\"false\" :indent-size=\"0\"\n                      :style=\"isMobile ? 'padding: 5px 0' : 'margin-left: 1px;'\">\n                    <template slot=\"action\" slot-scope=\"text,fakedns,index\">\n                        [[ index+1 ]]\n                      <a-dropdown :trigger=\"['click']\">\n                        <a-icon @click=\"e => e.preventDefault()\" type=\"more\" style=\"font-size: 16px; text-decoration: bold;\"></a-icon>\n                        <a-menu slot=\"overlay\" :theme=\"themeSwitcher.currentTheme\">\n                          <a-menu-item @click=\"editFakedns(index)\">\n                            <a-icon type=\"edit\"></a-icon>\n                            {{ i18n \"edit\" }}\n                          </a-menu-item>\n                          <a-menu-item @click=\"deleteFakedns(index)\">\n                            <span style=\"color: #FF4D4F\">\n                              <a-icon type=\"delete\"></a-icon> {{ i18n \"delete\"}}\n                            </span>\n                          </a-menu-item>\n                        </a-menu>\n                      </a-dropdown>\n                    </template>\n                  </a-table>\n                </template>\n              </a-tab-pane>\n              <a-tab-pane key=\"tpl-advanced\" tab='{{ i18n \"pages.xray.advancedTemplate\"}}' style=\"padding-top: 20px;\" force-render=\"true\">\n                <a-list-item-meta title='{{ i18n \"pages.xray.Template\"}}' description='{{ i18n \"pages.xray.TemplateDesc\"}}'></a-list-item-meta>\n                <a-radio-group v-model=\"advSettings\" @change=\"changeCode\" button-style=\"solid\" style=\"margin: 10px 0;\" :size=\"isMobile ? 'small' : ''\">\n                  <a-radio-button value=\"xraySetting\">{{ i18n \"pages.xray.completeTemplate\"}}</a-radio-button>\n                  <a-radio-button value=\"inboundSettings\">{{ i18n \"pages.xray.Inbounds\" }}</a-radio-button>\n                  <a-radio-button value=\"outboundSettings\">{{ i18n \"pages.xray.Outbounds\" }}</a-radio-button>\n                  <a-radio-button value=\"routingRuleSettings\">{{ i18n \"pages.xray.Routings\" }}</a-radio-button>\n                </a-radio-group>\n                <textarea style=\"position:absolute; left: -800px;\" id=\"xraySetting\"></textarea>\n              </a-tab-pane>\n            </a-tabs>\n          </a-space>\n        </a-spin>\n      </a-layout-content>\n    </a-layout>\n  </a-layout>\n{{template \"js\" .}}\n{{template \"component/themeSwitcher\" .}}\n{{template \"component/sortableTable\" .}}\n{{template \"component/setting\"}}\n{{template \"ruleModal\"}}\n{{template \"outModal\"}}\n{{template \"reverseModal\"}}\n{{template \"balancerModal\"}}\n{{template \"dnsModal\"}}\n{{template \"fakednsModal\"}}\n{{template \"warpModal\"}}\n<script>\n        const rulesColumns = [\n        { title: \"#\", align: 'center', width: 15, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.rules.source\"}}', children: [\n            { title: 'IP', dataIndex: \"source\", align: 'center', width: 20, ellipsis: true },\n            { title: 'Port', dataIndex: 'sourcePort', align: 'center', width: 10, ellipsis: true } ]},\n        { title: '{{ i18n \"pages.inbounds.network\"}}', children: [\n            { title: 'L4', dataIndex: 'network', align: 'center', width: 10 },\n            { title: 'Protocol', dataIndex: 'protocol', align: 'center', width: 10, ellipsis: true },\n            { title: 'Attrs', dataIndex: 'attrs', align: 'center', width: 20, ellipsis: true } ]}, \n        { title: '{{ i18n \"pages.xray.rules.dest\"}}', children: [\n            { title: 'IP', dataIndex: 'ip', align: 'center', width: 20, ellipsis: true },\n            { title: 'Domain', dataIndex: 'domain', align: 'center', width: 20, ellipsis: true },\n            { title: 'Port', dataIndex: 'port', align: 'center', width: 10, ellipsis: true }]},\n        { title: '{{ i18n \"pages.xray.rules.inbound\"}}', children: [\n            { title: 'Inbound Tag', dataIndex: 'inboundTag', align: 'center', width: 15, ellipsis: true },\n            { title: 'Client Email', dataIndex: 'user', align: 'center', width: 20, ellipsis: true }]},\n        { title: '{{ i18n \"pages.xray.rules.outbound\"}}', dataIndex: 'outboundTag', align: 'center', width: 15 },\n        { title: '{{ i18n \"pages.xray.rules.balancer\"}}', dataIndex: 'balancerTag', align: 'center', width: 15 },\n    ];\n\n    const rulesMobileColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.rules.inbound\"}}', align: 'center', width: 50, ellipsis: true, scopedSlots: { customRender: 'inbound' } },\n        { title: '{{ i18n \"pages.xray.rules.outbound\"}}', align: 'center', width: 50, ellipsis: true, scopedSlots: { customRender: 'outbound' } },\n        { title: '{{ i18n \"pages.xray.rules.info\"}}', align: 'center', width: 50, ellipsis: true, scopedSlots: { customRender: 'info' } },\n    ];\n\n    const outboundColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.outbound.tag\"}}', dataIndex: 'tag', align: 'center', width: 50 },\n        { title: '{{ i18n \"protocol\"}}', align: 'center', width: 50, scopedSlots: { customRender: 'protocol' }  },\n        { title: '{{ i18n \"pages.xray.outbound.address\"}}', align: 'center', width: 50, scopedSlots: { customRender: 'address' } },\n        { title: '{{ i18n \"pages.inbounds.traffic\" }}', align: 'center', width: 50, scopedSlots: { customRender: 'traffic' } },\n    ];\n\n    const reverseColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.outbound.type\"}}', dataIndex: 'type', align: 'center', width: 50 },\n        { title: '{{ i18n \"pages.xray.outbound.tag\"}}', dataIndex: 'tag', align: 'center', width: 50 },\n        { title: '{{ i18n \"pages.xray.outbound.domain\"}}', dataIndex: 'domain', align: 'center', width: 50 },\n    ];\n\n    const balancerColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.balancer.tag\"}}', dataIndex: 'tag', align: 'center', width: 50 },\n        { title: '{{ i18n \"pages.xray.balancer.balancerStrategy\"}}', align: 'center', width: 50, scopedSlots: { customRender: 'strategy' }},\n        { title: '{{ i18n \"pages.xray.balancer.balancerSelectors\"}}', align: 'center', width: 100, scopedSlots: { customRender: 'selector' }},\n    ];\n\n    const dnsColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.outbound.address\"}}', align: 'center', width: 50, scopedSlots: { customRender: 'address' } },\n        { title: '{{ i18n \"pages.xray.dns.domains\"}}', align: 'center', width: 50, scopedSlots: { customRender: 'domain' } },\n    ];\n\n    const fakednsColumns = [\n        { title: \"#\", align: 'center', width: 20, scopedSlots: { customRender: 'action' } },\n        { title: '{{ i18n \"pages.xray.fakedns.ipPool\"}}', dataIndex: 'ipPool', align: 'center', width: 50 },\n        { title: '{{ i18n \"pages.xray.fakedns.poolSize\"}}', dataIndex: 'poolSize', align: 'center', width: 50 },\n    ];\n\n    const app = new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#app',\n        data: {\n            siderDrawer,\n            themeSwitcher,\n            isDarkTheme: themeSwitcher.isDarkTheme,\n            spinning: false,\n            oldXraySetting: '',\n            xraySetting: '',\n            inboundTags: [],\n            outboundsTraffic: [],\n            saveBtnDisable: true,\n            refreshing: false,\n            restartResult: '',\n            showAlert: false,\n            isMobile: window.innerWidth <= 768,\n            advSettings: 'xraySetting',\n            obsSettings: '',\n            cm: null,\n            cmOptions: {\n                lineNumbers: true,\n                mode: \"application/json\",\n                lint: true,\n                styleActiveLine: true,\n                matchBrackets: true,\n                theme: \"xq\",\n                autoCloseTags: true,\n                lineWrapping: true,\n                indentUnit: 2,\n                indentWithTabs: true,\n                smartIndent: true,\n                tabSize: 2,\n                lineWiseCopyCut: false,\n                foldGutter: true,\n                gutters: [\n                    \"CodeMirror-lint-markers\",\n                    \"CodeMirror-linenumbers\",\n                    \"CodeMirror-foldgutter\",\n                ],\n            },\n            ipv4Settings: {\n                tag: \"IPv4\",\n                protocol: \"freedom\",\n                settings: {\n                    domainStrategy: \"UseIPv4\"\n                }\n            },\n            directSettings: {\n                tag: \"direct\",\n                protocol: \"freedom\"\n            },\n            routingDomainStrategies: [\"AsIs\", \"IPIfNonMatch\", \"IPOnDemand\"],\n            logLevel: [\"none\" , \"debug\" , \"info\" , \"warning\", \"error\"],\n            access: [],\n            error: [],\n            settingsData: {\n                protocols: {\n                    bittorrent: [\"bittorrent\"],\n                },\n                ips: {\n                    local: [\"geoip:private\"],\n                    cn: [\"geoip:cn\"],\n                    ir: [\"ext:geoip_IR.dat:ir\"],\n                    ru: [\"geoip:ru\"],\n                    vn: [\"ext:geoip_VN.dat:vn\"],\n                },\n                domains: {\n                    ads: [\n                        \"geosite:category-ads-all\",\n                        \"ext:geosite_IR.dat:category-ads-all\"\n                    ],\n                    security: [\n                        \"ext:geosite_IR.dat:malware\",\n                        \"ext:geosite_IR.dat:phishing\",\n                        \"ext:geosite_IR.dat:cryptominers\"\n                    ],\n                    speedtest: [\"geosite:speedtest\"],\n                    openai: [\"geosite:openai\"],\n                    google: [\"geosite:google\"],\n                    spotify: [\"geosite:spotify\"],\n                    netflix: [\"geosite:netflix\"],\n                    meta: [\"geosite:meta\"],\n                    apple: [\"geosite:apple\"],\n                    reddit: [\"geosite:reddit\"],\n                    cn: [\n                        \"geosite:cn\",\n                        \"regexp:.*\\\\.cn$\"\n                    ],\n                    ru: [\n                        \"geosite:category-gov-ru\",\n                        \"regexp:.*\\\\.ru$\"\n                    ],\n                    ir: [\n                        \"regexp:.*\\\\.ir$\",\n                        \"regexp:.*\\\\.xn--mgba3a4f16a$\",  // .ایران\n                        \"ext:geosite_IR.dat:ir\"\n                    ],\n                    vn: [\n                        \"regexp:.*\\\\.vn$\",\n                        \"ext:geosite_VN.dat:vn\",\n                        \"ext:geosite_VN.dat:ads\"\n                    ]\n                },\n                familyProtectDNS: {\n                    \"servers\": [\n                        \"1.1.1.3\",  // https://developers.cloudflare.com/1.1.1.1/setup/\n                        \"1.0.0.3\",\n                        \"2606:4700:4700::1113\",\n                        \"2606:4700:4700::1003\"\n                    ],\n                    \"queryStrategy\": \"UseIP\"\n                },\n            },\n            defaultObservatory: {\n                subjectSelector: [],\n                probeURL: \"http://www.google.com/gen_204\",\n                probeInterval: \"10m\",\n                enableConcurrency: true\n            },\n            defaultBurstObservatory: {\n                subjectSelector: [],\n                pingConfig: {\n                    destination: \"http://www.google.com/gen_204\",\n                    interval: \"30m\",\n                    connectivity: \"http://connectivitycheck.platform.hicloud.com/generate_204\",\n                    timeout: \"10s\",\n                    sampling: 2\n                }\n            }\n        },\n        methods: {\n            loading(spinning = true) {\n                this.spinning = spinning;\n            },\n            async getOutboundsTraffic() {\n                const msg = await HttpUtil.get(\"/panel/xray/getOutboundsTraffic\");\n                if (msg.success) {\n                    this.outboundsTraffic = msg.obj;\n                }\n            },\n            async getXraySetting() {\n                this.loading(true);\n                const msg = await HttpUtil.post(\"/panel/xray/\");\n                this.loading(false);\n                if (msg.success) {\n                    result = JSON.parse(msg.obj);\n                    xs = JSON.stringify(result.xraySetting, null, 2);\n                    this.oldXraySetting = xs;\n                    this.xraySetting = xs;\n                    this.inboundTags = result.inboundTags;\n                    this.saveBtnDisable = true;\n                }\n            },\n            async updateXraySetting() {\n                this.loading(true);\n                const msg = await HttpUtil.post(\"/panel/xray/update\", {xraySetting : this.xraySetting});\n                this.loading(false);\n                if (msg.success) {\n                    await this.getXraySetting();\n                }\n            },\n            async restartXray() {\n                this.loading(true);\n                const msg = await HttpUtil.post(\"server/restartXrayService\");\n                this.loading(false);\n                if (msg.success) {\n                    await PromiseUtil.sleep(500);\n                    await this.getXrayResult();\n                }\n                this.loading(false);\n            },\n            async getXrayResult() {\n                const msg = await HttpUtil.get(\"/panel/xray/getXrayResult\");\n                if (msg.success) {\n                    this.restartResult=msg.obj;\n                    if(msg.obj.length > 1) Vue.prototype.$message.error(msg.obj);\n                }\n            },\n            async fetchUserSecret() {\n                this.loading(true);\n                const userMessage = await HttpUtil.post(\"/panel/setting/getUserSecret\", this.user);\n                if (userMessage.success) {\n                    this.user = userMessage.obj;\n                }\n                this.loading(false);\n            },\n            async updateSecret() {\n                this.loading(true);\n                const msg = await HttpUtil.post(\"/panel/setting/updateUserSecret\", this.user);\n                if (msg.success) {\n                    this.user = msg.obj;\n                    window.location.replace(basePath + \"logout\");\n                }\n                this.loading(false);\n                await this.updateXraySetting();\n            },\n            generateRandomString(length) {\n                var chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n                let randomString = \"\";\n                for (let i = 0; i < length; i++) {\n                    randomString += chars[Math.floor(Math.random() * chars.length)];\n                }\n                return randomString;\n            },\n            async getNewSecret() {\n                this.loading(true);\n                await PromiseUtil.sleep(600);\n                const newSecret = this.generateRandomString(64);\n                this.user.loginSecret = newSecret;\n                document.getElementById(\"token\").textContent = newSecret;\n                this.loading(false);\n            },\n            async toggleToken(value) {\n                if (value) {\n                    await this.getNewSecret();\n                } else {\n                    this.user.loginSecret = \"\";\n                }\n            },\n            async resetXrayConfigToDefault() {\n                this.loading(true);\n                const msg = await HttpUtil.get(\"/panel/setting/getDefaultJsonConfig\");\n                this.loading(false);\n                if (msg.success) {\n                    this.templateSettings = JSON.parse(JSON.stringify(msg.obj, null, 2));\n                    this.saveBtnDisable = true;\n                }\n            },\n            changePage(pageKey) {\n                if(pageKey == 'tpl-advanced') this.changeCode();\n                if(pageKey == 'tpl-balancer') this.changeObsCode();\n            },\n            syncRulesWithOutbound(tag, setting) {\n                const newTemplateSettings = this.templateSettings;\n                const haveRules = newTemplateSettings.routing.rules.some((r) => r?.outboundTag === tag);\n                const outboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.tag === tag);\n                if (!haveRules && outboundIndex > 0) {\n                    newTemplateSettings.outbounds.splice(outboundIndex);\n                }\n                if (haveRules && outboundIndex < 0) {\n                    newTemplateSettings.outbounds.push(setting);\n                }\n                this.templateSettings = newTemplateSettings;\n            },\n            templateRuleGetter(routeSettings) {\n                const { property, outboundTag } = routeSettings;\n                let result = [];\n                if (this.templateSettings != null) {\n                    this.templateSettings.routing.rules.forEach(\n                        (routingRule) => {\n                            if (\n                                routingRule.hasOwnProperty(property) &&\n                                routingRule.hasOwnProperty(\"outboundTag\") &&\n                                routingRule.outboundTag === outboundTag\n                            ) {\n                                result.push(...routingRule[property]);\n                            }\n                        }\n                    );\n                }\n                return result;\n            },\n            templateRuleSetter(routeSettings) {\n                const { data, property, outboundTag } = routeSettings;\n                const oldTemplateSettings = this.templateSettings;\n                const newTemplateSettings = oldTemplateSettings;\n                currentProperty = this.templateRuleGetter({ outboundTag, property })\n                if (currentProperty.length == 0) {\n                    const propertyRule = {\n                        type: \"field\",\n                        outboundTag,\n                        [property]: data\n                    };\n                    newTemplateSettings.routing.rules.push(propertyRule);\n                }\n                else {\n                    const newRules = [];\n                    insertedOnce = false;\n                    newTemplateSettings.routing.rules.forEach(\n                        (routingRule) => {\n                            if (\n                                routingRule.hasOwnProperty(property) &&\n                                routingRule.hasOwnProperty(\"outboundTag\") &&\n                                routingRule.outboundTag === outboundTag\n                            ) {\n                                if (!insertedOnce && data.length > 0) {\n                                    insertedOnce = true;\n                                    routingRule[property] = data;\n                                    newRules.push(routingRule);\n                                }\n                            }\n                            else {\n                                newRules.push(routingRule);\n                            }\n                        }\n                    );\n                    newTemplateSettings.routing.rules = newRules;\n                }\n                this.templateSettings = newTemplateSettings;\n            },\n            changeCode() {\n                if(this.cm != null) {\n                    this.cm.toTextArea();\n                }\n                textAreaObj = document.getElementById('xraySetting');\n                textAreaObj.value = this[this.advSettings];\n                this.cm = CodeMirror.fromTextArea(textAreaObj, this.cmOptions);\n                this.cm.on('change',editor => {\n                    value = editor.getValue();\n                    if (this.isJsonString(value)) {\n                        this[this.advSettings] = value;\n                    }\n                });\n            },\n            changeObsCode() {\n                if (this.obsSettings == ''){\n                    return\n                }\n                if(this.cm != null) {\n                    this.cm.toTextArea();\n                }\n                textAreaObj = document.getElementById('obsSetting');\n                textAreaObj.value = this[this.obsSettings];\n                this.cm = CodeMirror.fromTextArea(textAreaObj, this.cmOptions);\n                this.cm.on('change',editor => {\n                    value = editor.getValue();\n                    if(this.isJsonString(value)){\n                        this[this.obsSettings] = value;\n                    }\n                });\n            },\n            isJsonString(str) {\n                try {\n                    JSON.parse(str);\n                } catch (e) {\n                    return false;\n                }\n                return true;\n            },\n            findOutboundTraffic(o) {\n                for (const otraffic of this.outboundsTraffic) {\n                    if (otraffic.tag == o.tag) {\n                        return sizeFormat(otraffic.up) + ' / ' + sizeFormat(otraffic.down);\n                    }\n                }\n                return sizeFormat(0) + ' / ' + sizeFormat(0);\n            },\n            findOutboundAddress(o) {\n                serverObj = null;\n                switch(o.protocol){\n                    case Protocols.VMess:\n                    case Protocols.VLESS:\n                        serverObj = o.settings.vnext;\n                        break;\n                    case Protocols.HTTP:\n                    case Protocols.Socks:\n                    case Protocols.Shadowsocks:\n                    case Protocols.Trojan:\n                        serverObj = o.settings.servers;\n                        break;\n                    case Protocols.DNS:\n                        return [o.settings?.address + ':' + o.settings?.port];\n                        case Protocols.Wireguard:\n                        return o.settings.peers.map(peer => peer.endpoint);\n                    default:\n                        return null;\n                }\n                return serverObj ? serverObj.map(obj => obj.address + ':' + obj.port) : null;\n            },\n            addOutbound(){\n                outModal.show({\n                    title: '{{ i18n \"pages.xray.outbound.addOutbound\"}}',\n                    okText: '{{ i18n \"pages.xray.outbound.addOutbound\" }}',\n                    confirm: (outbound) => {\n                        outModal.loading();\n                        if(outbound.tag.length > 0){\n                            this.templateSettings.outbounds.push(outbound);\n                            this.outboundSettings = JSON.stringify(this.templateSettings.outbounds);\n                        }\n                        outModal.close();\n                    },\n                    isEdit: false,\n                    tags: this.templateSettings.outbounds.map(obj => obj.tag)\n                });\n            },\n            editOutbound(index){\n                outModal.show({\n                    title: '{{ i18n \"pages.xray.outbound.editOutbound\"}} ' + (index+1),\n                    outbound: app.templateSettings.outbounds[index],\n                    confirm: (outbound) => {\n                        outModal.loading();\n                        this.templateSettings.outbounds[index] = outbound;\n                        this.outboundSettings = JSON.stringify(this.templateSettings.outbounds);\n                        outModal.close();\n                    },\n                    isEdit: true,\n                    tags: this.outboundData.filter((o) => o.key != index ).map(obj => obj.tag)\n                });\n            },\n            deleteOutbound(index){\n                outbounds = this.templateSettings.outbounds;\n                outbounds.splice(index,1);\n                this.outboundSettings = JSON.stringify(outbounds);\n            },\n            setFirstOutbound(index){\n                outbounds = this.templateSettings.outbounds;\n                outbounds.splice(0, 0, outbounds.splice(index, 1)[0]);\n                this.outboundSettings = JSON.stringify(outbounds);\n            },\n            addReverse(){\n                reverseModal.show({\n                    title: '{{ i18n \"pages.xray.outbound.addReverse\"}}',\n                    okText: '{{ i18n \"pages.xray.outbound.addReverse\" }}',\n                    confirm: (reverse, rules) => {\n                        reverseModal.loading();\n                        if(reverse.tag.length > 0){\n                            newTemplateSettings = this.templateSettings;\n                            if(newTemplateSettings.reverse == undefined) newTemplateSettings.reverse = {};\n                            if(newTemplateSettings.reverse[reverse.type+'s']  == undefined) newTemplateSettings.reverse[reverse.type+'s'] = [];\n                            newTemplateSettings.reverse[reverse.type+'s'].push({ tag: reverse.tag, domain: reverse.domain });\n                            this.templateSettings = newTemplateSettings;\n\n                            // Add related rules\n                            this.templateSettings.routing.rules.push(...rules);\n                            this.routingRuleSettings = JSON.stringify(this.templateSettings.routing.rules);\n                        }\n                        reverseModal.close();\n                    },\n                    isEdit: false\n                });\n            },\n            editReverse(index){\n                if(this.reverseData[index].type == \"bridge\") {\n                    oldRules = this.templateSettings.routing.rules.filter(r => r.inboundTag && r.inboundTag[0] == this.reverseData[index].tag);\n                } else {\n                    oldRules = this.templateSettings.routing.rules.filter(r => r.outboundTag && r.outboundTag == this.reverseData[index].tag);\n                }\n                reverseModal.show({\n                    title: '{{ i18n \"pages.xray.outbound.editReverse\"}} ' + (index+1),\n                    reverse: this.reverseData[index],\n                    rules: oldRules,\n                    confirm: (reverse, rules) => {\n                        reverseModal.loading();\n                        if(reverse.tag.length > 0){\n                            oldData = this.reverseData[index];\n                            newTemplateSettings = this.templateSettings;\n                            oldReverseIndex = newTemplateSettings.reverse[oldData.type+'s'].findIndex(rs => rs.tag == oldData.tag);\n                            oldRuleIndex0 = oldRules.length>0 ? newTemplateSettings.routing.rules.findIndex(r => JSON.stringify(r) == JSON.stringify(oldRules[0])) : -1;\n                            oldRuleIndex1 = oldRules.length==2 ? newTemplateSettings.routing.rules.findIndex(r => JSON.stringify(r) == JSON.stringify(oldRules[1])) : -1;\n                            if(oldData.type == reverse.type){\n                                newTemplateSettings.reverse[oldData.type + 's'][oldReverseIndex] = { tag: reverse.tag, domain: reverse.domain };\n                            } else {\n                                newTemplateSettings.reverse[oldData.type+'s'].splice(oldReverseIndex,1);\n                                // delete empty object\n                                if(newTemplateSettings.reverse[oldData.type+'s'].length == 0) Reflect.deleteProperty(newTemplateSettings.reverse, oldData.type+'s');\n                                // add other type of reverse if it is not exist\n                                if(!newTemplateSettings.reverse[reverse.type+'s']) newTemplateSettings.reverse[reverse.type+'s'] = [];\n                                newTemplateSettings.reverse[reverse.type+'s'].push({ tag: reverse.tag, domain: reverse.domain });\n                            }\n                            this.templateSettings = newTemplateSettings;\n\n                            // Adjust Rules\n                            newRules = this.templateSettings.routing.rules;\n                            oldRuleIndex0 != -1 ? newRules[oldRuleIndex0] = rules[0] : newRules.push(rules[0]);\n                            oldRuleIndex1 != -1 ? newRules[oldRuleIndex1] = rules[1] : newRules.push(rules[1]);\n                            this.routingRuleSettings = JSON.stringify(newRules);\n                        }\n                        reverseModal.close();\n                    },\n                    isEdit: true\n                });\n            },\n            deleteReverse(index){\n                oldData = this.reverseData[index];\n                newTemplateSettings = this.templateSettings;\n                reverseTypeObj = newTemplateSettings.reverse[oldData.type+'s'];\n                realIndex = reverseTypeObj.findIndex(r => r.tag==oldData.tag && r.domain==oldData.domain);\n                newTemplateSettings.reverse[oldData.type+'s'].splice(realIndex,1);\n\n                // delete empty objects\n                if(reverseTypeObj.length == 0) Reflect.deleteProperty(newTemplateSettings.reverse, oldData.type+'s');\n                if(Object.keys(newTemplateSettings.reverse).length === 0) Reflect.deleteProperty(newTemplateSettings, 'reverse');\n\n                // delete related routing rules\n                newRules = newTemplateSettings.routing.rules;\n                if(oldData.type == \"bridge\"){\n                    newRules = newTemplateSettings.routing.rules.filter(r => !( r.inboundTag && r.inboundTag.length == 1 && r.inboundTag[0] == oldData.tag));\n                } else if(oldData.type == \"portal\"){\n                    newRules = newTemplateSettings.routing.rules.filter(r => r.outboundTag != oldData.tag);\n                }\n                newTemplateSettings.routing.rules = newRules;\n\n                this.templateSettings = newTemplateSettings;\n            },\n            async refreshOutboundTraffic() {\n                if (!this.refreshing) {\n                    this.refreshing = true;\n                    await this.getOutboundsTraffic();\n\n                    data = []\n                    if (this.templateSettings != null) {\n                        this.templateSettings.outbounds.forEach((o, index) => {\n                            data.push({'key': index, ...o});\n                        });\n                    }\n\n                    this.outboundData = data;\n                    this.refreshing = false;\n                }\n            },\n            async resetOutboundTraffic(index) {\n                let tag = \"-alltags-\";\n                if (index >= 0) {\n                    tag = this.outboundData[index].tag ? this.outboundData[index].tag : \"\"\n                }\n                const msg = await HttpUtil.post(\"/panel/xray/resetOutboundsTraffic\", { tag: tag });\n                if (msg.success) {\n                    await this.refreshOutboundTraffic();\n                }\n            },\n            addBalancer() {\n                balancerModal.show({\n                    title: '{{ i18n \"pages.xray.balancer.addBalancer\"}}',\n                    okText: '{{ i18n \"pages.xray.balancer.addBalancer\"}}',\n                    balancerTags: this.balancersData.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag),\n                    balancer: {\n                        tag: '',\n                        strategy: 'random',\n                        selector: []\n                    },\n                    confirm: (balancer) => {\n                        balancerModal.loading();\n                        newTemplateSettings = this.templateSettings;\n                        if (newTemplateSettings.routing.balancers == undefined) {\n                            newTemplateSettings.routing.balancers = [];\n                        }\n                        let tmpBalancer = {\n                            'tag': balancer.tag,\n                            'selector': balancer.selector\n                        };\n                        if (balancer.strategy && balancer.strategy != 'random') {\n                            tmpBalancer.strategy = {\n                                'type': balancer.strategy\n                            };\n                            if (balancer.strategy == 'leastPing'){\n                                if (!newTemplateSettings.observatory)\n                                    newTemplateSettings.observatory = this.defaultObservatory;\n                                if (!newTemplateSettings.observatory.subjectSelector.includes(balancer.tag))\n                                    newTemplateSettings.observatory.subjectSelector.push(balancer.tag);\n                            }\n                            if (balancer.strategy == 'leastLoad'){\n                                if (!newTemplateSettings.burstObservatory)\n                                    newTemplateSettings.burstObservatory = this.defaultBurstObservatory;\n                                if (!newTemplateSettings.burstObservatory.subjectSelector.includes(balancer.tag))\n                                    newTemplateSettings.burstObservatory.subjectSelector.push(balancer.tag);\n                            }\n                        }\n                        newTemplateSettings.routing.balancers.push(tmpBalancer);\n                        this.templateSettings = newTemplateSettings;\n                        balancerModal.close();\n                        this.changeObsCode();\n                    },\n                    isEdit: false\n                });\n            },\n            editBalancer(index) {\n                const oldTag = this.balancersData[index].tag;\n                balancerModal.show({\n                    title: '{{ i18n \"pages.xray.balancer.editBalancer\"}}',\n                    okText: '{{ i18n \"sure\" }}',\n                    balancerTags: this.balancersData.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag),\n                    balancer: this.balancersData[index],\n                    confirm: (balancer) => {\n                        balancerModal.loading();\n                        newTemplateSettings = this.templateSettings;\n\n                        let tmpBalancer = {\n                            'tag': balancer.tag,\n                            'selector': balancer.selector\n                        };\n\n                        // Remove old tag\n                        if (newTemplateSettings.observatory){\n                            newTemplateSettings.observatory.subjectSelector = newTemplateSettings.observatory.subjectSelector.filter(s => s != oldTag);\n                        }\n                        if (newTemplateSettings.burstObservatory){\n                            newTemplateSettings.burstObservatory.subjectSelector = newTemplateSettings.burstObservatory.subjectSelector.filter(s => s != oldTag);\n                        }\n\n                        if (balancer.strategy && balancer.strategy != 'random') {\n                            tmpBalancer.strategy = {\n                                'type': balancer.strategy\n                            };\n                            if (balancer.strategy == 'leastPing'){\n                                if (!newTemplateSettings.observatory)\n                                    newTemplateSettings.observatory = this.defaultObservatory;\n                                if (!newTemplateSettings.observatory.subjectSelector.includes(balancer.tag))\n                                    newTemplateSettings.observatory.subjectSelector.push(balancer.tag);\n                            }\n                            if (balancer.strategy == 'leastLoad'){\n                                if (!newTemplateSettings.burstObservatory)\n                                    newTemplateSettings.burstObservatory = this.defaultBurstObservatory;\n                                if (!newTemplateSettings.burstObservatory.subjectSelector.includes(balancer.tag))\n                                    newTemplateSettings.burstObservatory.subjectSelector.push(balancer.tag);\n                            }\n                        }\n\n                        newTemplateSettings.routing.balancers[index] = tmpBalancer;\n                        // change edited tag if used in rule section\n                        if (oldTag != balancer.tag) {\n                            newTemplateSettings.routing.rules.forEach((rule) => {\n                                if (rule.balancerTag && rule.balancerTag == oldTag) {\n                                    rule.balancerTag = balancer.tag;\n                                }\n                            });\n                        }\n                        this.templateSettings = newTemplateSettings;\n                        balancerModal.close();\n                        this.changeObsCode();\n                    },\n                    isEdit: true\n                });\n            },\n            deleteBalancer(index) {\n                let newTemplateSettings = { ...this.templateSettings };\n\n                // Remove from balancers\n                const removedBalancer = this.balancersData.splice(index, 1)[0];\n\n                // Remove from settings\n                let realIndex = newTemplateSettings.routing.balancers.findIndex((b) => b.tag === removedBalancer.tag);\n                newTemplateSettings.routing.balancers.splice(realIndex, 1);\n\n                // Remove tag from observatory\n                if (newTemplateSettings.observatory){\n                    newTemplateSettings.observatory.subjectSelector = newTemplateSettings.observatory.subjectSelector.filter(s => s != removedBalancer.tag);\n                }\n                if (newTemplateSettings.burstObservatory){\n                    newTemplateSettings.burstObservatory.subjectSelector = newTemplateSettings.burstObservatory.subjectSelector.filter(s => s != removedBalancer.tag);\n                }\n\n                // Remove related routing rules\n                newTemplateSettings.routing.rules.forEach((rule) => {\n                    if (rule.balancerTag === removedBalancer.tag) {\n                        delete rule.balancerTag;\n                    }\n                });\n                \n                // Update balancers property to an empty array if there are no more balancers\n                if (newTemplateSettings.routing.balancers.length === 0) {\n                    delete newTemplateSettings.routing.balancers;\n                }\n                this.templateSettings = newTemplateSettings;\n                this.changeObsCode()\n            },\n            addDNSServer(){\n                dnsModal.show({\n                    title: '{{ i18n \"pages.xray.dns.add\" }}',\n                    confirm: (dnsServer) => {\n                        dnsServers = this.dnsServers;\n                        dnsServers.push(dnsServer);\n                        this.dnsServers = dnsServers;\n                        dnsModal.close();\n                    },\n                    isEdit: false\n                });\n            },\n            editDNSServer(index){\n                dnsModal.show({\n                    title: '{{ i18n \"pages.xray.dns.edit\" }} #' + (index+1),\n                    dnsServer: this.dnsServers[index],\n                    confirm: (dnsServer) => {\n                        dnsServers = this.dnsServers;\n                        dnsServers[index] = dnsServer;\n                        this.dnsServers = dnsServers;\n                        dnsModal.close();\n                    },\n                    isEdit: true\n                });\n            },\n            deleteDNSServer(index){\n                newDnsServers = this.dnsServers;\n                newDnsServers.splice(index,1);\n                this.dnsServers = newDnsServers;\n            },\n            addFakedns() {\n                fakednsModal.show({\n                    title: '{{ i18n \"pages.xray.fakedns.add\" }}',\n                    confirm: (item) => {\n                        fakeDns = this.fakeDns?? [];\n                        fakeDns.push(item);\n                        this.fakeDns = fakeDns;\n                        fakednsModal.close();\n                    },\n                    isEdit: false\n                });\n            },\n            editFakedns(index){\n                fakednsModal.show({\n                    title: '{{ i18n \"pages.xray.fakedns.edit\" }} #' + (index+1),\n                    fakeDns: this.fakeDns[index],\n                    confirm: (item) => {\n                        fakeDns = this.fakeDns;\n                        fakeDns[index] = item;\n                        this.fakeDns = fakeDns;\n                        fakednsModal.close();\n                    },\n                    isEdit: true\n                });\n            },\n            deleteFakedns(index){\n                fakeDns = this.fakeDns;\n                fakeDns.splice(index,1);\n                this.fakeDns = fakeDns;\n            },\n            addRule(){\n                ruleModal.show({\n                    title: '{{ i18n \"pages.xray.rules.add\"}}',\n                    okText: '{{ i18n \"pages.xray.rules.add\" }}',\n                    confirm: (rule) => {\n                        ruleModal.loading();\n                        if(JSON.stringify(rule).length > 3){\n                            this.templateSettings.routing.rules.push(rule);\n                            this.routingRuleSettings = JSON.stringify(this.templateSettings.routing.rules);\n                        }\n                        ruleModal.close();\n                    },\n                    isEdit: false\n                });\n            },\n            editRule(index){\n                ruleModal.show({\n                    title: '{{ i18n \"pages.xray.rules.edit\"}} ' + (index+1),\n                    rule: app.templateSettings.routing.rules[index],\n                    confirm: (rule) => {\n                        ruleModal.loading();\n                        if(JSON.stringify(rule).length > 3){\n                            this.templateSettings.routing.rules[index] = rule;\n                            this.routingRuleSettings = JSON.stringify(this.templateSettings.routing.rules);\n                        }\n                        ruleModal.close();\n                    },\n                    isEdit: true\n                });\n            },\n            replaceRule(old_index,new_index){\n                rules = this.templateSettings.routing.rules;\n                if (new_index >= rules.length) rules.push(undefined);\n                rules.splice(new_index, 0, rules.splice(old_index, 1)[0]);\n                this.routingRuleSettings = JSON.stringify(rules);\n            },\n            deleteRule(index){\n                rules = this.templateSettings.routing.rules;\n                rules.splice(index,1);\n                this.routingRuleSettings = JSON.stringify(rules);\n            },\n            showWarp(){\n                warpModal.show();\n            }\n        },\n        async mounted() {\n            if (window.location.protocol !== \"https:\") {\n                this.showAlert = true;\n            }\n            await this.getXraySetting();\n            await this.getXrayResult();\n            await this.getOutboundsTraffic();\n            while (true) {\n                await PromiseUtil.sleep(800);\n                this.saveBtnDisable = this.oldXraySetting === this.xraySetting;\n            }\n        },\n        computed: {\n            templateSettings: {\n                get: function () {\n                    const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null;\n                    let accessLogPath = \"./access.log\";\n                    let errorLogPath = \"./error.log\";\n\n                    if (parsedSettings && parsedSettings.log) {\n                        if (parsedSettings.log.access && parsedSettings.log.access !== \"none\") {\n                            accessLogPath = parsedSettings.log.access;\n                        }\n                        if (parsedSettings.log.error && parsedSettings.log.error !== \"none\") {\n                            errorLogPath = parsedSettings.log.error;\n                        }\n                    }\n\n                    this.access = [\"none\", accessLogPath];\n                    this.error = [\"none\", errorLogPath];\n                    return parsedSettings;\n                },\n                set: function (newValue) {\n                    if (newValue && newValue.log) {\n                        this.xraySetting = JSON.stringify(newValue, null, 2);\n                        this.access = [\"none\", newValue.log.access || \"./access.log\"];\n                        this.error = [\"none\", newValue.log.error || \"./error.log\"];\n                    }\n                },\n            },\n            inboundSettings: {\n                get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.inbounds, null, 2) : null; },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.inbounds = JSON.parse(newValue);\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            outboundSettings: {\n                get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.outbounds, null, 2) : null; },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.outbounds = JSON.parse(newValue);\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            outboundData: {\n                get: function () {\n                    data = []\n                    if (this.templateSettings != null) {\n                        this.templateSettings.outbounds.forEach((o, index) => {\n                            data.push({'key': index, ...o});\n                        });\n                    }\n                    return data;\n                },\n            },\n            reverseData: {\n                get: function () {\n                    data = []\n                    if (this.templateSettings != null && this.templateSettings.reverse != null) {\n                        if(this.templateSettings.reverse.bridges) {\n                            this.templateSettings.reverse.bridges.forEach((o, index) => {\n                                data.push({'key': index, 'type':'bridge', ...o});\n                            });\n                        }\n                        if(this.templateSettings.reverse.portals){\n                            this.templateSettings.reverse.portals.forEach((o, index) => {\n                                data.push({'key': index, 'type':'portal', ...o});\n                            });\n                        }\n                    }\n                    return data;\n                },\n            },\n            routingRuleSettings: {\n                get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.routing.rules, null, 2) : null; },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.routing.rules = JSON.parse(newValue);\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            routingRuleData: {\n                get: function () {\n                    data = [];\n                    if (this.templateSettings != null) {\n                        this.templateSettings.routing.rules.forEach((r, index) => {\n                            data.push({'key': index, ...r});\n                        });\n                        // Make rules readable\n                        data.forEach(r => {\n                            if(r.domain) r.domain = r.domain.join(',')\n                            if(r.ip) r.ip = r.ip.join(',')\n                            if(r.source) r.source = r.source.join(',');\n                            if(r.user) r.user = r.user.join(',')\n                            if(r.inboundTag) r.inboundTag = r.inboundTag.join(',')\n                            if(r.protocol) r.protocol = r.protocol.join(',')\n                            if(r.attrs) r.attrs = JSON.stringify(r.attrs, null, 2)\n                        });\n                    }\n                    return data;\n                }\n            },\n            balancersData: {\n                get: function () {\n                    data = []\n                    if (this.templateSettings != null && this.templateSettings.routing != null && this.templateSettings.routing.balancers != null) {\n                        this.templateSettings.routing.balancers.forEach((o, index) => {\n                            data.push({\n                                'key': index,\n                                'tag': o.tag ? o.tag : \"\",\n                                'strategy': o.strategy?.type ?? \"random\",\n                                'selector': o.selector ? o.selector : []\n                            });\n                        });\n                    }\n                    return data;\n                }\n            },\n            observatory: {\n                get: function () { \n                    return this.templateSettings?.observatory ? JSON.stringify(this.templateSettings.observatory, null, 2) : null;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.observatory = JSON.parse(newValue);\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            burstObservatory: {\n                get: function () { \n                    return this.templateSettings?.burstObservatory ? JSON.stringify(this.templateSettings.burstObservatory, null, 2) : null; \n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.burstObservatory = JSON.parse(newValue);\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            observatoryEnable: {\n                get: function () { return this.templateSettings != null && this.templateSettings.observatory },\n                set: function (v) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.observatory = v ? this.defaultObservatory : undefined;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            burstObservatoryEnable: {\n                get: function () { return this.templateSettings != null && this.templateSettings.burstObservatory },\n                set: function (v) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.burstObservatory = v ? this.defaultBurstObservatory : undefined;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            freedomStrategy: {\n                get: function () {\n                    if (!this.templateSettings) return \"AsIs\";\n                    freedomOutbound = this.templateSettings.outbounds.find((o) => o.protocol === \"freedom\" && o.tag == \"direct\");\n                    if (!freedomOutbound) return \"AsIs\";\n                    if (!freedomOutbound.settings || !freedomOutbound.settings.domainStrategy) return \"AsIs\";\n                    return freedomOutbound.settings.domainStrategy;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    freedomOutboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.protocol === \"freedom\" && o.tag == \"direct\");\n                    if(freedomOutboundIndex == -1){\n                        newTemplateSettings.outbounds.push({protocol: \"freedom\", tag: \"direct\", settings: { \"domainStrategy\": newValue }});\n                    } else if (!newTemplateSettings.outbounds[freedomOutboundIndex].settings) {\n                        newTemplateSettings.outbounds[freedomOutboundIndex].settings = {\"domainStrategy\": newValue};\n                    } else {\n                        newTemplateSettings.outbounds[freedomOutboundIndex].settings.domainStrategy = newValue;\n                    }\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            routingStrategy: {\n                get: function () {\n                    if (!this.templateSettings || !this.templateSettings.routing || !this.templateSettings.routing.domainStrategy) return \"AsIs\";\n                    return this.templateSettings.routing.domainStrategy;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.routing.domainStrategy = newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            setLogLevel: {\n                get: function () {\n                    if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.loglevel) return \"warning\";\n                    return this.templateSettings.log.loglevel;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.log.loglevel = newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            accessLog: {\n                get: function () {\n                    if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.access) return \"\";\n                    return this.templateSettings.log.access;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.log.access = newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            errorLog: {\n                get: function () {\n                    if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.error) return \"\";\n                    return this.templateSettings.log.error;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.log.error = newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            blockedIPs: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"blocked\", property: \"ip\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"blocked\", property: \"ip\", data: newValue });\n                }\n            },\n            blockedDomains: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"blocked\", property: \"domain\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"blocked\", property: \"domain\", data: newValue });\n                }\n            },\n            blockedProtocols: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"blocked\", property: \"protocol\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"blocked\", property: \"protocol\", data: newValue });\n                }\n            },\n            directIPs: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"direct\", property: \"ip\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"direct\", property: \"ip\", data: newValue });\n                    this.syncRulesWithOutbound(\"direct\", this.directSettings);\n                }\n            },\n            directDomains: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"direct\", property: \"domain\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"direct\", property: \"domain\", data: newValue });\n                    this.syncRulesWithOutbound(\"direct\", this.directSettings);\n                }\n            },\n            ipv4Domains: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"IPv4\", property: \"domain\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"IPv4\", property: \"domain\", data: newValue });\n                    this.syncRulesWithOutbound(\"IPv4\", this.ipv4Settings);\n                }\n            },\n            warpDomains: {\n                get: function () {\n                    return this.templateRuleGetter({ outboundTag: \"warp\", property: \"domain\" });\n                },\n                set: function (newValue) {\n                    this.templateRuleSetter({ outboundTag: \"warp\", property: \"domain\", data: newValue });\n                }\n            },\n            torrentSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedProtocols = [...this.blockedProtocols, ...this.settingsData.protocols.bittorrent];\n                    } else {\n                        this.blockedProtocols = this.blockedProtocols.filter(data => !this.settingsData.protocols.bittorrent.includes(data));\n                    }\n                },\n            },\n            privateIpSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.local, this.blockedIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.local];\n                    } else {\n                        this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.local.includes(data));\n                    }\n                },\n            },\n            AdsSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.ads, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.ads];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.ads.includes(data));\n                    }\n                },\n            },\n            SecuritySettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.security, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.security];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.security.includes(data));\n                    }\n                },\n            },\n            SpeedTestSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.speedtest, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.speedtest];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.speedtest.includes(data));\n                    }\n                },\n            },\n            familyProtectSettings: {\n                get: function () {\n                    if (!this.templateSettings || !this.templateSettings.dns || !this.templateSettings.dns.servers) return false;\n                    return doAllItemsExist(this.settingsData.familyProtectDNS.servers, this.templateSettings.dns.servers);\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    if (newValue) {\n                        newTemplateSettings.dns = this.settingsData.familyProtectDNS;\n                    } else {\n                        newTemplateSettings.dns.servers = newTemplateSettings.dns?.servers?.filter(data => !this.settingsData.familyProtectDNS.servers.includes(data))\n                    }\n                    this.templateSettings = newTemplateSettings;\n                },\n            },\n            GoogleIPv4Settings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.google, this.ipv4Domains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.ipv4Domains = [...this.ipv4Domains, ...this.settingsData.domains.google];\n                    } else {\n                        this.ipv4Domains = this.ipv4Domains.filter(data => !this.settingsData.domains.google.includes(data));\n                    }\n                },\n            },\n            NetflixIPv4Settings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.netflix, this.ipv4Domains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.ipv4Domains = [...this.ipv4Domains, ...this.settingsData.domains.netflix];\n                    } else {\n                        this.ipv4Domains = this.ipv4Domains.filter(data => !this.settingsData.domains.netflix.includes(data));\n                    }\n                },\n            },\n            IRIpSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.ir, this.blockedIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.ir];\n                    } else {\n                        this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.ir.includes(data));\n                    }\n                }\n            },\n            IRDomainSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.ir, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.ir];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.ir.includes(data));\n                    }\n                }\n            },\n            ChinaIpSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.cn, this.blockedIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.cn];\n                    } else {\n                        this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.cn.includes(data));\n                    }\n                }\n            },\n            ChinaDomainSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.cn, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.cn];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.cn.includes(data));\n                    }\n                }\n            },\n            RussiaIpSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.ru, this.blockedIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.ru];\n                    } else {\n                        this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.ru.includes(data));\n                    }\n                }\n            },\n            RussiaDomainSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.ru, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.ru];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.ru.includes(data));\n                    }\n                }\n            },\n            VNIpSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.vn, this.blockedIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedIPs = [...this.blockedIPs, ...this.settingsData.ips.vn];\n                    } else {\n                        this.blockedIPs = this.blockedIPs.filter(data => !this.settingsData.ips.vn.includes(data));\n                    }\n                }\n            },\n            VNDomainSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.vn, this.blockedDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.blockedDomains = [...this.blockedDomains, ...this.settingsData.domains.vn];\n                    } else {\n                        this.blockedDomains = this.blockedDomains.filter(data => !this.settingsData.domains.vn.includes(data));\n                    }\n                }\n            },\n            IRIpDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.ir, this.directIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directIPs = [...this.directIPs, ...this.settingsData.ips.ir];\n                    } else {\n                        this.directIPs = this.directIPs.filter(data => !this.settingsData.ips.ir.includes(data));\n                    }\n                }\n            },\n            IRDomainDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.ir, this.directDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directDomains = [...this.directDomains, ...this.settingsData.domains.ir];\n                    } else {\n                        this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.ir.includes(data));\n                    }\n                }\n            },\n            ChinaIpDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.cn, this.directIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directIPs = [...this.directIPs, ...this.settingsData.ips.cn];\n                    } else {\n                        this.directIPs = this.directIPs.filter(data => !this.settingsData.ips.cn.includes(data));\n                    }\n                }\n            },\n            ChinaDomainDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.cn, this.directDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directDomains = [...this.directDomains, ...this.settingsData.domains.cn];\n                    } else {\n                        this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.cn.includes(data));\n                    }\n                }\n            },\n            RussiaIpDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.ru, this.directIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directIPs = [...this.directIPs, ...this.settingsData.ips.ru];\n                    } else {\n                        this.directIPs = this.directIPs.filter(data => !this.settingsData.ips.ru.includes(data));\n                    }\n                }\n            },\n            RussiaDomainDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.ru, this.directDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directDomains = [...this.directDomains, ...this.settingsData.domains.ru];\n                    } else {\n                        this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.ru.includes(data));\n                    }\n                }\n            },\n            VNIpDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.ips.vn, this.directIPs);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directIPs = [...this.directIPs, ...this.settingsData.ips.vn];\n                    } else {\n                        this.directIPs = this.directIPs.filter(data => !this.settingsData.ips.vn.includes(data));\n                    }\n                }\n            },\n            VNDomainDirectSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.vn, this.directDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.directDomains = [...this.directDomains, ...this.settingsData.domains.vn];\n                    } else {\n                        this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.vn.includes(data));\n                    }\n                }\n            },\n            WarpExist: {\n                get: function() {\n                    return this.templateSettings ? this.templateSettings.outbounds.findIndex((o) => o.tag == \"warp\")>=0  : false;\n                },\n            },\n            GoogleWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.google, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.google];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.google.includes(data));\n                    }\n                },\n            },\n            OpenAIWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.openai, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.openai];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.openai.includes(data));\n                    }\n                },\n            },\n            NetflixWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.netflix, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.netflix];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.netflix.includes(data));\n                    }\n                },\n            },\n            MetaWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.meta, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.meta];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.meta.includes(data));\n                    }\n                },\n            },\n            AppleWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.apple, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.apple];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.apple.includes(data));\n                    }\n                },\n            },\n            RedditWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.reddit, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.reddit];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.reddit.includes(data));\n                    }\n                },\n            },\n            SpotifyWARPSettings: {\n                get: function () {\n                    return doAllItemsExist(this.settingsData.domains.spotify, this.warpDomains);\n                },\n                set: function (newValue) {\n                    if (newValue) {\n                        this.warpDomains = [...this.warpDomains, ...this.settingsData.domains.spotify];\n                    } else {\n                        this.warpDomains = this.warpDomains.filter(data => !this.settingsData.domains.spotify.includes(data));\n                    }\n                },\n            },\n            enableDNS: {\n                get: function () {\n                    return this.templateSettings ? this.templateSettings.dns != null : false;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    if (newValue) {\n                        newTemplateSettings.dns = { servers: [], queryStrategy: \"UseIP\", tag: \"dns_inbound\" };\n                        newTemplateSettings.fakedns = null; \n                    } else {\n                        delete newTemplateSettings.dns;\n                        delete newTemplateSettings.fakedns;\n                    }\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            dnsTag: {\n                get: function () {\n                    return this.enableDNS ? this.templateSettings.dns.tag : \"\";\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.dns.tag =  newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            dnsStrategy: {\n                get: function () {\n                    return this.enableDNS ? this.templateSettings.dns.queryStrategy : null;\n                },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.dns.queryStrategy =  newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            dnsServers: {\n                get: function () { return this.enableDNS ? this.templateSettings.dns.servers : []; },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    newTemplateSettings.dns.servers =  newValue;\n                    this.templateSettings = newTemplateSettings;\n                }\n            },\n            fakeDns: {\n                get: function () { return this.templateSettings && this.templateSettings.fakedns ? this.templateSettings.fakedns : []; },\n                set: function (newValue) {\n                    newTemplateSettings = this.templateSettings;\n                    if (this.enableDNS) {\n                        newTemplateSettings.fakedns = newValue.length > 0 ? newValue : null;\n                    } else {\n                        delete newTemplateSettings.fakedns;\n                    }\n                    this.templateSettings = newTemplateSettings;\n                }\n            }\n        },\n    });\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "web/html/xui/xray_balancer_modal.html",
    "content": "{{define \"balancerModal\"}}\n<a-modal \n    id=\"balancer-modal\"\n    v-model=\"balancerModal.visible\"\n    :title=\"balancerModal.title\"\n    @ok=\"balancerModal.ok\"\n    :confirm-loading=\"balancerModal.confirmLoading\"\n    :ok-button-props=\"{ props: { disabled: !balancerModal.isValid } }\"\n    :closable=\"true\"\n    :mask-closable=\"false\"\n    :ok-text=\"balancerModal.okText\"\n    cancel-text='{{ i18n \"close\" }}'\n    :class=\"themeSwitcher.currentTheme\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"pages.xray.balancer.tag\" }}' has-feedback\n            :validate-status=\"balancerModal.duplicateTag? 'warning' : 'success'\">\n            <a-input v-model.trim=\"balancerModal.balancer.tag\" @change=\"balancerModal.check()\"\n                placeholder='{{ i18n \"pages.xray.balancer.tagDesc\" }}'></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.balancer.balancerStrategy\" }}'>\n            <a-select v-model=\"balancerModal.balancer.strategy\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option value=\"random\">Random</a-select-option>\n                <a-select-option value=\"roundRobin\">Round Robin</a-select-option>\n                <a-select-option value=\"leastLoad\">Least Load</a-select-option>\n                <a-select-option value=\"leastPing\">Least Ping</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.balancer.balancerSelectors\" }}' has-feedback \n        :validate-status=\"balancerModal.emptySelector? 'warning' : 'success'\">\n            <a-select v-model=\"balancerModal.balancer.selector\" mode=\"tags\" @change=\"balancerModal.checkSelector()\"\n                :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"tag in balancerModal.outboundTags\" :value=\"tag\">[[ tag ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        </table>\n    </a-form>\n</a-modal>\n<script>\n    const balancerModal = {\n        title: '',\n        visible: false,\n        confirmLoading: false,\n        okText: '{{ i18n \"sure\" }}',\n        isEdit: false,\n        confirm: null,\n        duplicateTag: false,\n        emptySelector: false,\n        balancer: {\n            tag: '',\n            strategy: 'random',\n            selector: []\n        },\n        outboundTags: [],\n        balancerTags:[],\n        ok() {\n            if (balancerModal.balancer.selector.length == 0) {\n                balancerModal.emptySelector = true;\n                return;\n            }\n            balancerModal.emptySelector = false;\n            ObjectUtil.execute(balancerModal.confirm, balancerModal.balancer);\n        },\n        show({ title = '', okText = '{{ i18n \"sure\" }}', balancerTags = [], balancer, confirm = (balancer) => { }, isEdit = false }) {\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.visible = true;\n            if (isEdit) {\n                balancerModal.balancer = balancer;\n            } else {\n                balancerModal.balancer = {\n                    tag: '',\n                    strategy: 'random',\n                    selector: []\n                };\n            }\n            this.balancerTags = balancerTags.filter((tag) => tag != balancer.tag);\n            this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag);\n            this.isEdit = isEdit;\n            this.check();\n            this.checkSelector();\n        },\n        close() {\n            this.visible = false;\n            this.loading(false);\n        },\n        loading(loading=true) {\n            this.confirmLoading = loading;\n        },\n        check() {\n            if (this.balancer.tag == '' || this.balancerTags.includes(this.balancer.tag)) {\n                this.duplicateTag = true;\n                this.isValid = false;\n            } else {\n                this.duplicateTag = false;\n                this.isValid = true;\n            }\n        },\n        checkSelector() {\n            this.emptySelector = this.balancer.selector.length == 0;\n        }\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#balancer-modal',\n        data: {\n            balancerModal: balancerModal\n        },\n        methods: {\n        }\n    });\n\n</script>\n{{end}}"
  },
  {
    "path": "web/html/xui/xray_outbound_modal.html",
    "content": "{{define \"outModal\"}}\n<a-modal id=\"out-modal\" v-model=\"outModal.visible\" :title=\"outModal.title\" @ok=\"outModal.ok\"\n         :confirm-loading=\"outModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n         :ok-button-props=\"{ props: { disabled: !outModal.isValid } }\" style=\"overflow: hidden;\"\n         :ok-text=\"outModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n         {{template \"form/outbound\"}}\n</a-modal>\n<script>\n\n    const outModal = {\n        title: '',\n        visible: false,\n        confirmLoading: false,\n        okText: '{{ i18n \"sure\" }}',\n        isEdit: false,\n        confirm: null,\n        outbound: new Outbound(),\n        jsonMode: false,\n        link: '',\n        cm: null,\n        duplicateTag: false,\n        isValid: true,\n        activeKey: '1',\n        tags: [],\n        ok() {\n            ObjectUtil.execute(outModal.confirm, outModal.outbound.toJson());\n        },\n        show({ title='', okText='{{ i18n \"sure\" }}', outbound, confirm=(outbound)=>{}, isEdit=false, tags=[]  }) {\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.jsonMode = false;\n            this.link = '';\n            this.activeKey = '1';\n            this.visible = true;\n            this.outbound = isEdit ? Outbound.fromJson(outbound) : new Outbound();\n            this.isEdit = isEdit;\n            this.tags = tags;\n            this.check()\n        },\n        close() {\n            outModal.visible = false;\n            outModal.loading(false);\n        },\n        loading(loading=true) {\n            outModal.confirmLoading = loading;\n        },\n        check(){\n            if(outModal.outbound.tag == '' || outModal.tags.includes(outModal.outbound.tag)){\n                this.duplicateTag = true;\n                this.isValid = false;\n            } else {\n                this.duplicateTag = false;\n                this.isValid = true;\n            }\n        },\n        toggleJson(jsonTab) {\n            textAreaObj = document.getElementById('outboundJson');\n            if(jsonTab){\n                if(this.cm != null) {\n                        this.cm.toTextArea();\n                        this.cm=null;\n                }\n                textAreaObj.value = JSON.stringify(this.outbound.toJson(), null, 2);\n                this.cm = CodeMirror.fromTextArea(textAreaObj, app.cmOptions);\n                this.cm.on('change',editor => {\n                    value = editor.getValue();\n                    if(this.isJsonString(value)){\n                        this.outbound = Outbound.fromJson(JSON.parse(value));\n                        this.check();\n                    }\n                });\n                this.activeKey = '2';\n            } else {\n                if(this.cm != null) {\n                        this.cm.toTextArea();\n                        this.cm=null;\n                }\n                this.activeKey = '1';\n            }\n        },\n        isJsonString(str) {\n            try {\n                JSON.parse(str);\n            } catch (e) {\n                return false;\n            }\n            return true;\n        },\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#out-modal',\n        data: {\n            outModal: outModal,\n            get outbound() {\n                return outModal.outbound;\n            },\n        },\n        methods: {\n            streamNetworkChange() {\n                if (this.outModal.outbound.protocol == Protocols.VLESS && !outModal.outbound.canEnableTlsFlow()) {\n                    delete this.outModal.outbound.settings.flow;\n                }\n            },\n            canEnableTls() {\n                return this.outModal.outbound.canEnableTls();\n            },\n            convertLink(){\n                newOutbound = Outbound.fromLink(outModal.link);\n                if(newOutbound){\n                    this.outModal.outbound = newOutbound;\n                    this.outModal.toggleJson(true);\n                    this.outModal.check();\n                    this.$message.success('Link imported successfully...');      \n                    outModal.link = '';\n                } else {\n                    this.$message.error('Wrong Link!');\n                    outModal.link = '';\n                }\n            },\n        },\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/xray_reverse_modal.html",
    "content": "{{define \"reverseModal\"}}\n<a-modal id=\"reverse-modal\" v-model=\"reverseModal.visible\" :title=\"reverseModal.title\" @ok=\"reverseModal.ok\"\n         :confirm-loading=\"reverseModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n         :ok-text=\"reverseModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"pages.xray.outbound.type\" }}'>\n            <a-select v-model=\"reverseModal.reverse.type\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x,y in reverseTypes\" :value=\"y\">[[ x ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.outbound.tag\" }}'>\n            <a-input v-model.trim=\"reverseModal.reverse.tag\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.outbound.domain\" }}'>\n            <a-input v-model.trim=\"reverseModal.reverse.domain\"></a-input>\n        </a-form-item>\n        <template v-if=\"reverseModal.reverse.type=='bridge'\">\n        <a-form-item label='{{ i18n \"pages.xray.outbound.intercon\" }}'>\n            <a-select v-model=\"reverseModal.rules[0].outboundTag\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x in reverseModal.outboundTags\" :value=\"x\">[[ x ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.outbound\" }}'>\n            <a-select v-model=\"reverseModal.rules[1].outboundTag\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x in reverseModal.outboundTags\" :value=\"x\">[[ x ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        </template>\n        <template v-else>\n            <a-form-item label='{{ i18n \"pages.xray.outbound.intercon\" }}'>\n                <a-checkbox-group\n                    v-model=\"reverseModal.rules[0].inboundTag\"\n                    :options=\"reverseModal.inboundTags\"></a-checkbox-group>\n            </a-form-item>\n            <a-form-item label='{{ i18n \"pages.xray.rules.inbound\" }}'>\n                <a-checkbox-group\n                    v-model=\"reverseModal.rules[1].inboundTag\"\n                    :options=\"reverseModal.inboundTags\"></a-checkbox-group>\n            </a-form-item>\n        </template>\n    </a-form>\n</a-modal>\n<script>\n    const reverseModal = {\n        title: '',\n        visible: false,\n        confirmLoading: false,\n        okText: '{{ i18n \"sure\" }}',\n        isEdit: false,\n        confirm: null,\n        reverse: {\n            tag: \"\",\n            type: \"\",\n            domain: \"\"\n        },\n        rules: [\n            { outboundTag: '', inboundTag: []},\n            { outboundTag: '', inboundTag: []}\n        ],\n        inboundTags: [],\n        outboundTags: [],\n        ok() {\n            reverseModal.rules[0].domain = [\"full:\" + reverseModal.reverse.domain];\n            reverseModal.rules[0].type = 'field';\n            reverseModal.rules[1].type = 'field';\n\n            if(reverseModal.reverse.type == 'bridge'){\n                reverseModal.rules[0].inboundTag = [reverseModal.reverse.tag];\n                reverseModal.rules[1].inboundTag = [reverseModal.reverse.tag];\n            } else {\n                reverseModal.rules[0].outboundTag = reverseModal.reverse.tag;\n                reverseModal.rules[1].outboundTag = reverseModal.reverse.tag;\n            }\n            ObjectUtil.execute(reverseModal.confirm, reverseModal.reverse, reverseModal.rules);\n        },\n        show({ title='', okText='{{ i18n \"sure\" }}', reverse, rules, confirm=(reverse, rules)=>{}, isEdit=false  }) {\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.visible = true;\n            if(isEdit) {\n                this.reverse = {\n                    tag: reverse.tag,\n                    type: reverse.type,\n                    domain: reverse.domain,\n                };\n                    reverse;\n                rules0 = rules.filter(r => r.domain != null);\n                if(rules0.length == 0) rules0 = [{ outboundTag: '', domain: [\"full:\" + this.reverse.domain], inboundTag: []}];\n                rules1 = rules.filter(r => r.domain == null);\n                if(rules1.length == 0) rules1 = [{ outboundTag: '', inboundTag: []}];\n                this.rules = [];\n                this.rules.push({\n                    domain: rules0[0].domain,\n                    outboundTag: rules0[0].outboundTag,\n                    inboundTag: rules0.map(r => r.inboundTag).flat()\n                });\n                this.rules.push({\n                    outboundTag: rules1[0].outboundTag,\n                    inboundTag: rules1.map(r => r.inboundTag).flat()\n                });\n            } else {\n                this.reverse = {\n                    tag: \"reverse-\" + app.reverseData.length,\n                    type: \"bridge\",\n                    domain: \"reverse.xui\"\n                }\n                this.rules = [\n                    { outboundTag: '', inboundTag: []},\n                    { outboundTag: '', inboundTag: []}\n                ]\n            }\n            this.isEdit = isEdit;\n            this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);\n            this.inboundTags.push(...app.inboundTags);\n            if (app.enableDNS && !ObjectUtil.isEmpty(app.dnsTag)) this.inboundTags.push(app.dnsTag)\n            this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag);\n        },\n        close() {\n            reverseModal.visible = false;\n            reverseModal.loading(false);\n        },\n        loading(loading=true) {\n            reverseModal.confirmLoading = loading;\n        },\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#reverse-modal',\n        data: {\n            reverseModal: reverseModal,\n            reverseTypes: { bridge: '{{ i18n \"pages.xray.outbound.bridge\" }}', portal:'{{ i18n \"pages.xray.outbound.portal\" }}'},\n        },\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/html/xui/xray_rule_modal.html",
    "content": "{{define \"ruleModal\"}}\n<a-modal id=\"rule-modal\" v-model=\"ruleModal.visible\" :title=\"ruleModal.title\" @ok=\"ruleModal.ok\"\n         :confirm-loading=\"ruleModal.confirmLoading\" :closable=\"true\" :mask-closable=\"false\"\n         :ok-text=\"ruleModal.okText\" cancel-text='{{ i18n \"close\" }}' :class=\"themeSwitcher.currentTheme\">\n    <a-form :colon=\"false\" :label-col=\"{ md: {span:8} }\" :wrapper-col=\"{ md: {span:14} }\">\n        <a-form-item label='{{ i18n \"pages.xray.rules.DomainMatcher\" }}'>\n                    <a-select v-model=\"ruleModal.rule.domainMatcher\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                        <a-select-option v-for=\"dm in ['','hybrid','linear']\" :value=\"dm\">[[ dm ]]</a-select-option>\n                    </a-select>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.SourceIPs\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.source\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.SourcePort\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.sourcePort\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.Network\" }}'>\n            <a-select v-model=\"ruleModal.rule.network\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x in ['','TCP','UDP','TCP,UDP']\" :value=\"x\">[[ x ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.Protocol\" }}'>\n            <a-select v-model=\"ruleModal.rule.protocol\" mode=\"multiple\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"x in ['http','tls','bittorrent']\" :value=\"x\">[[ x ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.Attributes\" }}'>\n            <a-button size=\"small\" style=\"margin-left: 10px\" @click=\"ruleModal.rule.attrs.push(['', ''])\">+</a-button>\n        </a-form-item>\n        <a-form-item :wrapper-col=\"{span: 24}\">\n            <a-input-group compact v-for=\"(attr,index) in ruleModal.rule.attrs\">\n                <a-input style=\"width: 50%\" v-model=\"attr[0]\" placeholder='{{ i18n \"pages.inbounds.stream.general.name\" }}'>\n                    <template slot=\"addonBefore\" style=\"margin: 0;\">[[ index+1 ]]</template>\n                </a-input>\n                <a-input style=\"width: 50%\" v-model=\"attr[1]\" placeholder='{{ i18n \"pages.inbounds.stream.general.value\" }}'>\n                    <a-button slot=\"addonAfter\" size=\"small\" @click=\"ruleModal.rule.attrs.splice(index,1)\">-</a-button>\n                </a-input>\n            </a-input-group>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    IP <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.ip\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.Domain\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.domain\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.User\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.user\"></a-input>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.rules.useComma\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.Port\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-input v-model.trim=\"ruleModal.rule.port\"></a-input>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.InboundTag\" }}'>\n            <a-select v-model=\"ruleModal.rule.inboundTag\" mode=\"multiple\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"tag in ruleModal.inboundTags\" :value=\"tag\">[[ tag ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item label='{{ i18n \"pages.xray.rules.OutboundTag\" }}'>\n            <a-select v-model=\"ruleModal.rule.outboundTag\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"tag in ruleModal.outboundTags\" :value=\"tag\">[[ tag ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n        <a-form-item>\n            <template slot=\"label\">\n                <a-tooltip>\n                    <template slot=\"title\">\n                        <span>{{ i18n \"pages.xray.balancer.balancerDesc\" }}</span>\n                    </template>\n                    {{ i18n \"pages.xray.rules.BalancerTag\" }} <a-icon type=\"question-circle\"></a-icon>\n                </a-tooltip>\n            </template>\n            <a-select v-model=\"ruleModal.rule.balancerTag\" :dropdown-class-name=\"themeSwitcher.currentTheme\">\n                <a-select-option v-for=\"tag in ruleModal.balancerTags\" :value=\"tag\">[[ tag ]]</a-select-option>\n            </a-select>\n        </a-form-item>\n    </table>\n    </a-form>\n</a-modal>\n<script>\n\n    const ruleModal = {\n        title: '',\n        visible: false,\n        confirmLoading: false,\n        okText: '{{ i18n \"sure\" }}',\n        isEdit: false,\n        confirm: null,\n        rule: {\n            type: \"field\",\n            domainMatcher: \"\",\n            domain: \"\",\n            ip: \"\",\n            port: \"\",\n            sourcePort: \"\",\n            network: \"\",\n            source: \"\",\n            user: \"\",\n            inboundTag: [],\n            protocol: [],\n            attrs: [],\n            outboundTag: \"\",\n            balancerTag: \"\",\n        },\n        inboundTags: [],\n        outboundTags: [],\n        users: [],\n        balancerTags: [],\n        ok() {\n            newRule = ruleModal.getResult();\n            ObjectUtil.execute(ruleModal.confirm, newRule);\n        },\n        show({ title='', okText='{{ i18n \"sure\" }}', rule, confirm=(rule)=>{}, isEdit=false  }) {\n            this.title = title;\n            this.okText = okText;\n            this.confirm = confirm;\n            this.visible = true;\n            if(isEdit) {\n                this.rule.domainMatcher = rule.domainMatcher;\n                this.rule.domain = rule.domain ? rule.domain.join(',') : [];\n                this.rule.ip = rule.ip ? rule.ip.join(',') : [];\n                this.rule.port = rule.port;\n                this.rule.sourcePort = rule.sourcePort;\n                this.rule.network = rule.network;\n                this.rule.source = rule.source ? rule.source.join(',') : [];\n                this.rule.user = rule.user ? rule.user.join(',') : [];\n                this.rule.inboundTag = rule.inboundTag;\n                this.rule.protocol = rule.protocol;\n                this.rule.attrs = rule.attrs ? Object.entries(rule.attrs) : [];\n                this.rule.outboundTag = rule.outboundTag;\n                this.rule.balancerTag = rule.balancerTag ? rule.balancerTag : \"\";\n            } else {\n                this.rule = {\n                    domainMatcher: \"\",\n                    domain: \"\",\n                    ip: \"\",\n                    port: \"\",\n                    sourcePort: \"\",\n                    network: \"\",\n                    source: \"\",\n                    user: \"\",\n                    inboundTag: [],\n                    protocol: [],\n                    attrs: [],\n                    outboundTag: \"\",\n                    balancerTag: \"\",\n                }\n            }\n            this.isEdit = isEdit;\n            this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);\n            this.inboundTags.push(...app.inboundTags);\n            if (app.enableDNS && !ObjectUtil.isEmpty(app.dnsTag)) this.inboundTags.push(app.dnsTag)\n            this.outboundTags = [\"\", ...app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)];\n            if(app.templateSettings.reverse){\n                if(app.templateSettings.reverse.bridges) {\n                    this.inboundTags.push(...app.templateSettings.reverse.bridges.map(b => b.tag));\n                }\n                if(app.templateSettings.reverse.portals) this.outboundTags.push(...app.templateSettings.reverse.portals.map(b => b.tag));\n            }\n\n            if (app.templateSettings.routing && app.templateSettings.routing.balancers) {\n                this.balancerTags = [ \"\", ...app.templateSettings.routing.balancers.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)];\n            }\n        },\n        close() {\n            ruleModal.visible = false;\n            ruleModal.loading(false);\n        },\n        loading(loading=true) {\n            ruleModal.confirmLoading = loading;\n        },\n        getResult() {\n            value = ruleModal.rule;\n            rule = {};\n            newRule = {};\n            rule.type = \"field\";\n            rule.domainMatcher = value.domainMatcher;\n            rule.domain = value.domain.length>0 ? value.domain.split(',') : [];\n            rule.ip = value.ip.length>0 ? value.ip.split(',') : [];\n            rule.port = value.port;\n            rule.sourcePort = value.sourcePort;\n            rule.network = value.network;\n            rule.source = value.source.length>0 ? value.source.split(',') : [];\n            rule.user = value.user.length>0 ? value.user.split(',') : [];\n            rule.inboundTag = value.inboundTag;\n            rule.protocol = value.protocol;\n            rule.attrs = Object.fromEntries(value.attrs);\n            rule.outboundTag = value.outboundTag == \"\" ? undefined : value.outboundTag;\n            rule.balancerTag = value.balancerTag == \"\" ? undefined : value.balancerTag;\n\n            for (const [key, value] of Object.entries(rule)) {\n                if (\n                value !== null &&\n                value !== undefined &&\n                !(Array.isArray(value) && value.length === 0) &&\n                !(typeof value === 'object' && Object.keys(value).length === 0) &&\n                value !== ''\n                ) {\n                    newRule[key] = value;\n                }\n            }\n            return newRule;\n        }\n    };\n\n    new Vue({\n        delimiters: ['[[', ']]'],\n        el: '#rule-modal',\n        data: {\n            ruleModal: ruleModal,\n        }\n    });\n\n</script>\n{{end}}\n"
  },
  {
    "path": "web/job/check_client_ip_job.go",
    "content": "package job\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/xray\"\n)\n\ntype CheckClientIpJob struct {\n\tlastClear     int64\n\tdisAllowedIps []string\n}\n\nvar job *CheckClientIpJob\n\nfunc NewCheckClientIpJob() *CheckClientIpJob {\n\tjob = new(CheckClientIpJob)\n\treturn job\n}\n\nfunc (j *CheckClientIpJob) Run() {\n\tif j.lastClear == 0 {\n\t\tj.lastClear = time.Now().Unix()\n\t}\n\n\tshouldClearAccessLog := false\n\tf2bInstalled := j.checkFail2BanInstalled()\n\tisAccessLogAvailable := j.checkAccessLogAvailable(f2bInstalled)\n\n\tif j.hasLimitIp() {\n\t\tif f2bInstalled && isAccessLogAvailable {\n\t\t\tshouldClearAccessLog = j.processLogFile()\n\t\t} else {\n\t\t\tif !f2bInstalled {\n\t\t\t\tlogger.Warning(\"[iplimit] fail2ban is not installed. IP limiting may not work properly.\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif shouldClearAccessLog || isAccessLogAvailable && time.Now().Unix()-j.lastClear > 3600 {\n\t\tj.clearAccessLog()\n\t}\n}\n\nfunc (j *CheckClientIpJob) clearAccessLog() {\n\tlogAccessP, err := os.OpenFile(xray.GetAccessPersistentLogPath(), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)\n\tj.checkError(err)\n\n\t// get access log path to open it\n\taccessLogPath, err := xray.GetAccessLogPath()\n\tj.checkError(err)\n\n\t// reopen the access log file for reading\n\tfile, err := os.Open(accessLogPath)\n\tj.checkError(err)\n\n\t// copy access log content to persistent file\n\t_, err = io.Copy(logAccessP, file)\n\tj.checkError(err)\n\n\t// close the file after copying content\n\tlogAccessP.Close()\n\tfile.Close()\n\n\t// clean access log\n\terr = os.Truncate(accessLogPath, 0)\n\tj.checkError(err)\n\tj.lastClear = time.Now().Unix()\n}\n\nfunc (j *CheckClientIpJob) hasLimitIp() bool {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\n\terr := db.Model(model.Inbound{}).Find(&inbounds).Error\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tfor _, inbound := range inbounds {\n\t\tif inbound.Settings == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tsettings := map[string][]model.Client{}\n\t\tjson.Unmarshal([]byte(inbound.Settings), &settings)\n\t\tclients := settings[\"clients\"]\n\n\t\tfor _, client := range clients {\n\t\t\tlimitIp := client.LimitIP\n\t\t\tif limitIp > 0 {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (j *CheckClientIpJob) processLogFile() bool {\n\taccessLogPath, err := xray.GetAccessLogPath()\n\tj.checkError(err)\n\n\tfile, err := os.Open(accessLogPath)\n\tj.checkError(err)\n\n\tInboundClientIps := make(map[string][]string)\n\n\tscanner := bufio.NewScanner(file)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\n\t\tipRegx, _ := regexp.Compile(`(\\d+\\.\\d+\\.\\d+\\.\\d+).* accepted`)\n\t\temailRegx, _ := regexp.Compile(`email:.+`)\n\n\t\tmatches := ipRegx.FindStringSubmatch(line)\n\t\tif len(matches) > 1 {\n\t\t\tip := matches[1]\n\t\t\tif ip == \"127.0.0.1\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmatchesEmail := emailRegx.FindString(line)\n\t\t\tif matchesEmail == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmatchesEmail = strings.TrimSpace(strings.Split(matchesEmail, \"email: \")[1])\n\n\t\t\tif InboundClientIps[matchesEmail] != nil {\n\t\t\t\tif j.contains(InboundClientIps[matchesEmail], ip) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tInboundClientIps[matchesEmail] = append(InboundClientIps[matchesEmail], ip)\n\t\t\t} else {\n\t\t\t\tInboundClientIps[matchesEmail] = append(InboundClientIps[matchesEmail], ip)\n\t\t\t}\n\t\t}\n\t}\n\n\tj.checkError(scanner.Err())\n\tfile.Close()\n\n\tshouldCleanLog := false\n\n\tfor clientEmail, ips := range InboundClientIps {\n\t\tinboundClientIps, err := j.getInboundClientIps(clientEmail)\n\t\tsort.Strings(ips)\n\t\tif err != nil {\n\t\t\tj.addInboundClientIps(clientEmail, ips)\n\t\t} else {\n\t\t\tshouldCleanLog = j.updateInboundClientIps(inboundClientIps, clientEmail, ips)\n\t\t}\n\t}\n\n\treturn shouldCleanLog\n}\n\nfunc (j *CheckClientIpJob) checkFail2BanInstalled() bool {\n\tcmd := \"fail2ban-client\"\n\targs := []string{\"-h\"}\n\terr := exec.Command(cmd, args...).Run()\n\treturn err == nil\n}\n\nfunc (j *CheckClientIpJob) checkAccessLogAvailable(handleWarning bool) bool {\n\tisAvailable := true\n\twarningMsg := \"\"\n\taccessLogPath, err := xray.GetAccessLogPath()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\t// access log is not available if it is set to 'none' or an empty string\n\tswitch accessLogPath {\n\tcase \"none\":\n\t\twarningMsg = \"Access log is set to 'none', check your Xray Configs\"\n\t\tisAvailable = false\n\tcase \"\":\n\t\twarningMsg = \"Access log doesn't exist in your Xray Configs\"\n\t\tisAvailable = false\n\t}\n\n\tif handleWarning && warningMsg != \"\" {\n\t\tlogger.Warning(warningMsg)\n\t}\n\treturn isAvailable\n}\n\nfunc (j *CheckClientIpJob) checkError(e error) {\n\tif e != nil {\n\t\tlogger.Warning(\"client ip job err:\", e)\n\t}\n}\n\nfunc (j *CheckClientIpJob) contains(s []string, str string) bool {\n\tfor _, v := range s {\n\t\tif v == str {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (j *CheckClientIpJob) getInboundClientIps(clientEmail string) (*model.InboundClientIps, error) {\n\tdb := database.GetDB()\n\tInboundClientIps := &model.InboundClientIps{}\n\terr := db.Model(model.InboundClientIps{}).Where(\"client_email = ?\", clientEmail).First(InboundClientIps).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn InboundClientIps, nil\n}\n\nfunc (j *CheckClientIpJob) addInboundClientIps(clientEmail string, ips []string) error {\n\tinboundClientIps := &model.InboundClientIps{}\n\tjsonIps, err := json.Marshal(ips)\n\tj.checkError(err)\n\n\tinboundClientIps.ClientEmail = clientEmail\n\tinboundClientIps.Ips = string(jsonIps)\n\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err == nil {\n\t\t\ttx.Commit()\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\terr = tx.Save(inboundClientIps).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (j *CheckClientIpJob) updateInboundClientIps(inboundClientIps *model.InboundClientIps, clientEmail string, ips []string) bool {\n\tjsonIps, err := json.Marshal(ips)\n\tif err != nil {\n\t\tlogger.Error(\"failed to marshal IPs to JSON:\", err)\n\t\treturn false\n\t}\n\n\tinboundClientIps.ClientEmail = clientEmail\n\tinboundClientIps.Ips = string(jsonIps)\n\n\t// Fetch inbound settings by client email\n\tinbound, err := j.getInboundByEmail(clientEmail)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to fetch inbound settings for email %s: %s\", clientEmail, err)\n\t\treturn false\n\t}\n\n\tif inbound.Settings == \"\" {\n\t\tlogger.Debug(\"wrong data:\", inbound)\n\t\treturn false\n\t}\n\n\t// Unmarshal settings to get client limits\n\tsettings := map[string][]model.Client{}\n\tjson.Unmarshal([]byte(inbound.Settings), &settings)\n\tclients := settings[\"clients\"]\n\tshouldCleanLog := false\n\tj.disAllowedIps = []string{}\n\n\t// Open log file for IP limits\n\tlogIpFile, err := os.OpenFile(xray.GetIPLimitLogPath(), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to open IP limit log file: %s\", err)\n\t\treturn false\n\t}\n\tdefer logIpFile.Close()\n\tlog.SetOutput(logIpFile)\n\tlog.SetFlags(log.LstdFlags)\n\n\t// Check client IP limits\n\tfor _, client := range clients {\n\t\tif client.Email == clientEmail {\n\t\t\tlimitIp := client.LimitIP\n\n\t\t\tif limitIp > 0 && inbound.Enable {\n\t\t\t\tshouldCleanLog = true\n\n\t\t\t\tif limitIp < len(ips) {\n\t\t\t\t\tj.disAllowedIps = append(j.disAllowedIps, ips[limitIp:]...)\n\t\t\t\t\tfor i := limitIp; i < len(ips); i++ {\n\t\t\t\t\t\tlogger.Debugf(\"[LIMIT_IP] Email = %s || SRC = %s\", clientEmail, ips[i])\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsort.Strings(j.disAllowedIps)\n\n\tif len(j.disAllowedIps) > 0 {\n\t\tlogger.Debug(\"disAllowedIps:\", j.disAllowedIps)\n\t}\n\n\tdb := database.GetDB()\n\terr = db.Save(inboundClientIps).Error\n\tif err != nil {\n\t\tlogger.Error(\"failed to save inboundClientIps:\", err)\n\t\treturn false\n\t}\n\n\treturn shouldCleanLog\n}\n\nfunc (j *CheckClientIpJob) getInboundByEmail(clientEmail string) (*model.Inbound, error) {\n\tdb := database.GetDB()\n\tvar inbounds *model.Inbound\n\n\terr := db.Model(model.Inbound{}).Where(\"settings LIKE ?\", \"%\"+clientEmail+\"%\").Find(&inbounds).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn inbounds, nil\n}\n"
  },
  {
    "path": "web/job/check_cpu_usage.go",
    "content": "package job\n\nimport (\n\t\"strconv\"\n\t\"time\"\n\n\t\"x-ui/web/service\"\n\n\t\"github.com/shirou/gopsutil/v4/cpu\"\n)\n\ntype CheckCpuJob struct {\n\ttgbotService   service.Tgbot\n\tsettingService service.SettingService\n}\n\nfunc NewCheckCpuJob() *CheckCpuJob {\n\treturn new(CheckCpuJob)\n}\n\n// Here run is a interface method of Job interface\nfunc (j *CheckCpuJob) Run() {\n\tthreshold, _ := j.settingService.GetTgCpu()\n\n\t// get latest status of server\n\tpercent, err := cpu.Percent(1*time.Second, false)\n\tif err == nil && percent[0] > float64(threshold) {\n\t\tmsg := j.tgbotService.I18nBot(\"tgbot.messages.cpuThreshold\",\n\t\t\t\"Percent==\"+strconv.FormatFloat(percent[0], 'f', 2, 64),\n\t\t\t\"Threshold==\"+strconv.Itoa(threshold))\n\n\t\tj.tgbotService.SendMsgToTgbotAdmins(msg)\n\t}\n}\n"
  },
  {
    "path": "web/job/check_hash_storage.go",
    "content": "package job\n\nimport (\n\t\"x-ui/web/service\"\n)\n\ntype CheckHashStorageJob struct {\n\ttgbotService service.Tgbot\n}\n\nfunc NewCheckHashStorageJob() *CheckHashStorageJob {\n\treturn new(CheckHashStorageJob)\n}\n\n// Here Run is an interface method of the Job interface\nfunc (j *CheckHashStorageJob) Run() {\n\t// Remove expired hashes from storage\n\tj.tgbotService.GetHashStorage().RemoveExpiredHashes()\n}\n"
  },
  {
    "path": "web/job/check_xray_running_job.go",
    "content": "package job\n\nimport (\n\t\"x-ui/logger\"\n\t\"x-ui/web/service\"\n)\n\ntype CheckXrayRunningJob struct {\n\txrayService service.XrayService\n\n\tcheckTime int\n}\n\nfunc NewCheckXrayRunningJob() *CheckXrayRunningJob {\n\treturn new(CheckXrayRunningJob)\n}\n\nfunc (j *CheckXrayRunningJob) Run() {\n\tif j.xrayService.IsXrayRunning() {\n\t\tj.checkTime = 0\n\t} else {\n\t\tj.checkTime++\n\t\t// only restart if it's down 2 times in a row\n\t\tif j.checkTime > 1 {\n\t\t\terr := j.xrayService.RestartXray(false)\n\t\t\tj.checkTime = 0\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"Restart xray failed:\", err)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "web/job/clear_logs_job.go",
    "content": "package job\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"x-ui/logger\"\n\t\"x-ui/xray\"\n)\n\ntype ClearLogsJob struct{}\n\nfunc NewClearLogsJob() *ClearLogsJob {\n\treturn new(ClearLogsJob)\n}\n\n// ensureFileExists creates the necessary directories and file if they don't exist\nfunc ensureFileExists(path string) error {\n\tdir := filepath.Dir(path)\n\tif err := os.MkdirAll(dir, 0755); err != nil {\n\t\treturn err\n\t}\n\n\tfile, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0644)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfile.Close()\n\treturn nil\n}\n\n// Here Run is an interface method of the Job interface\nfunc (j *ClearLogsJob) Run() {\n\tlogFiles := []string{xray.GetIPLimitLogPath(), xray.GetIPLimitBannedLogPath(), xray.GetAccessPersistentLogPath()}\n\tlogFilesPrev := []string{xray.GetIPLimitBannedPrevLogPath(), xray.GetAccessPersistentPrevLogPath()}\n\n\t// Ensure all log files and their paths exist\n\tfor _, path := range append(logFiles, logFilesPrev...) {\n\t\tif err := ensureFileExists(path); err != nil {\n\t\t\tlogger.Warning(\"Failed to ensure log file exists:\", path, \"-\", err)\n\t\t}\n\t}\n\n\t// Clear log files and copy to previous logs\n\tfor i := 0; i < len(logFiles); i++ {\n\t\tif i > 0 {\n\t\t\t// Copy to previous logs\n\t\t\tlogFilePrev, err := os.OpenFile(logFilesPrev[i-1], os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Failed to open previous log file for writing:\", logFilesPrev[i-1], \"-\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tlogFile, err := os.OpenFile(logFiles[i], os.O_RDONLY, 0644)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Failed to open current log file for reading:\", logFiles[i], \"-\", err)\n\t\t\t\tlogFilePrev.Close()\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t_, err = io.Copy(logFilePrev, logFile)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Failed to copy log file:\", logFiles[i], \"to\", logFilesPrev[i-1], \"-\", err)\n\t\t\t}\n\n\t\t\tlogFile.Close()\n\t\t\tlogFilePrev.Close()\n\t\t}\n\n\t\terr := os.Truncate(logFiles[i], 0)\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"Failed to truncate log file:\", logFiles[i], \"-\", err)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "web/job/stats_notify_job.go",
    "content": "package job\n\nimport (\n\t\"x-ui/web/service\"\n)\n\ntype LoginStatus byte\n\nconst (\n\tLoginSuccess LoginStatus = 1\n\tLoginFail    LoginStatus = 0\n)\n\ntype StatsNotifyJob struct {\n\txrayService  service.XrayService\n\ttgbotService service.Tgbot\n}\n\nfunc NewStatsNotifyJob() *StatsNotifyJob {\n\treturn new(StatsNotifyJob)\n}\n\n// Here run is a interface method of Job interface\nfunc (j *StatsNotifyJob) Run() {\n\tif !j.xrayService.IsXrayRunning() {\n\t\treturn\n\t}\n\tj.tgbotService.SendReport()\n}\n"
  },
  {
    "path": "web/job/xray_traffic_job.go",
    "content": "package job\n\nimport (\n\t\"x-ui/logger\"\n\t\"x-ui/web/service\"\n)\n\ntype XrayTrafficJob struct {\n\txrayService     service.XrayService\n\tinboundService  service.InboundService\n\toutboundService service.OutboundService\n}\n\nfunc NewXrayTrafficJob() *XrayTrafficJob {\n\treturn new(XrayTrafficJob)\n}\n\nfunc (j *XrayTrafficJob) Run() {\n\tif !j.xrayService.IsXrayRunning() {\n\t\treturn\n\t}\n\ttraffics, clientTraffics, err := j.xrayService.GetXrayTraffic()\n\tif err != nil {\n\t\treturn\n\t}\n\terr, needRestart0 := j.inboundService.AddTraffic(traffics, clientTraffics)\n\tif err != nil {\n\t\tlogger.Warning(\"add inbound traffic failed:\", err)\n\t}\n\terr, needRestart1 := j.outboundService.AddTraffic(traffics, clientTraffics)\n\tif err != nil {\n\t\tlogger.Warning(\"add outbound traffic failed:\", err)\n\t}\n\tif needRestart0 || needRestart1 {\n\t\tj.xrayService.SetToNeedRestart()\n\t}\n}\n"
  },
  {
    "path": "web/locale/locale.go",
    "content": "package locale\n\nimport (\n\t\"embed\"\n\t\"io/fs\"\n\t\"strings\"\n\n\t\"x-ui/logger\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/nicksnyder/go-i18n/v2/i18n\"\n\t\"github.com/pelletier/go-toml/v2\"\n\t\"golang.org/x/text/language\"\n)\n\nvar (\n\ti18nBundle   *i18n.Bundle\n\tLocalizerWeb *i18n.Localizer\n\tLocalizerBot *i18n.Localizer\n)\n\ntype I18nType string\n\nconst (\n\tBot I18nType = \"bot\"\n\tWeb I18nType = \"web\"\n)\n\ntype SettingService interface {\n\tGetTgLang() (string, error)\n}\n\nfunc InitLocalizer(i18nFS embed.FS, settingService SettingService) error {\n\t// set default bundle to english\n\ti18nBundle = i18n.NewBundle(language.MustParse(\"en-US\"))\n\ti18nBundle.RegisterUnmarshalFunc(\"toml\", toml.Unmarshal)\n\n\t// parse files\n\tif err := parseTranslationFiles(i18nFS, i18nBundle); err != nil {\n\t\treturn err\n\t}\n\n\t// setup bot locale\n\tif err := initTGBotLocalizer(settingService); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc createTemplateData(params []string, seperator ...string) map[string]interface{} {\n\tvar sep string = \"==\"\n\tif len(seperator) > 0 {\n\t\tsep = seperator[0]\n\t}\n\n\ttemplateData := make(map[string]interface{})\n\tfor _, param := range params {\n\t\tparts := strings.SplitN(param, sep, 2)\n\t\ttemplateData[parts[0]] = parts[1]\n\t}\n\n\treturn templateData\n}\n\nfunc I18n(i18nType I18nType, key string, params ...string) string {\n\tvar localizer *i18n.Localizer\n\n\tswitch i18nType {\n\tcase \"bot\":\n\t\tlocalizer = LocalizerBot\n\tcase \"web\":\n\t\tlocalizer = LocalizerWeb\n\tdefault:\n\t\tlogger.Errorf(\"Invalid type for I18n: %s\", i18nType)\n\t\treturn \"\"\n\t}\n\n\ttemplateData := createTemplateData(params)\n\n\tmsg, err := localizer.Localize(&i18n.LocalizeConfig{\n\t\tMessageID:    key,\n\t\tTemplateData: templateData,\n\t})\n\tif err != nil {\n\t\tlogger.Errorf(\"Failed to localize message: %v\", err)\n\t\treturn \"\"\n\t}\n\n\treturn msg\n}\n\nfunc initTGBotLocalizer(settingService SettingService) error {\n\tbotLang, err := settingService.GetTgLang()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tLocalizerBot = i18n.NewLocalizer(i18nBundle, botLang)\n\treturn nil\n}\n\nfunc LocalizerMiddleware() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tvar lang string\n\n\t\tif cookie, err := c.Request.Cookie(\"lang\"); err == nil {\n\t\t\tlang = cookie.Value\n\t\t} else {\n\t\t\tlang = c.GetHeader(\"Accept-Language\")\n\t\t}\n\n\t\tLocalizerWeb = i18n.NewLocalizer(i18nBundle, lang)\n\n\t\tc.Set(\"localizer\", LocalizerWeb)\n\t\tc.Set(\"I18n\", I18n)\n\t\tc.Next()\n\t}\n}\n\nfunc parseTranslationFiles(i18nFS embed.FS, i18nBundle *i18n.Bundle) error {\n\terr := fs.WalkDir(i18nFS, \"translation\",\n\t\tfunc(path string, d fs.DirEntry, err error) error {\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif d.IsDir() {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tdata, err := i18nFS.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\t_, err = i18nBundle.ParseMessageFileBytes(data, path)\n\t\t\treturn err\n\t\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "web/middleware/domainValidator.go",
    "content": "package middleware\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc DomainValidatorMiddleware(domain string) gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\thost := c.GetHeader(\"X-Forwarded-Host\")\n\t\tif host == \"\" {\n\t\t\thost = c.GetHeader(\"X-Real-IP\")\n\t\t}\n\t\tif host == \"\" {\n\t\t\thost, _, _ := net.SplitHostPort(c.Request.Host)\n\t\t\tif host != domain {\n\t\t\t\tc.AbortWithStatus(http.StatusForbidden)\n\t\t\t\treturn\n\t\t\t}\n\t\tc.Next()\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "web/middleware/redirect.go",
    "content": "package middleware\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc RedirectMiddleware(basePath string) gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\t// Redirect from old '/xui' path to '/panel'\n\t\tredirects := map[string]string{\n\t\t\t\"panel/API\": \"panel/api\",\n\t\t\t\"xui/API\":   \"panel/api\",\n\t\t\t\"xui\":       \"panel\",\n\t\t}\n\n\t\tpath := c.Request.URL.Path\n\t\tfor from, to := range redirects {\n\t\t\tfrom, to = basePath+from, basePath+to\n\n\t\t\tif strings.HasPrefix(path, from) {\n\t\t\t\tnewPath := to + path[len(from):]\n\n\t\t\t\tc.Redirect(http.StatusMovedPermanently, newPath)\n\t\t\t\tc.Abort()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tc.Next()\n\t}\n}\n"
  },
  {
    "path": "web/network/auto_https_conn.go",
    "content": "package network\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"sync\"\n)\n\ntype AutoHttpsConn struct {\n\tnet.Conn\n\n\tfirstBuf []byte\n\tbufStart int\n\n\treadRequestOnce sync.Once\n}\n\nfunc NewAutoHttpsConn(conn net.Conn) net.Conn {\n\treturn &AutoHttpsConn{\n\t\tConn: conn,\n\t}\n}\n\nfunc (c *AutoHttpsConn) readRequest() bool {\n\tc.firstBuf = make([]byte, 2048)\n\tn, err := c.Conn.Read(c.firstBuf)\n\tc.firstBuf = c.firstBuf[:n]\n\tif err != nil {\n\t\treturn false\n\t}\n\treader := bytes.NewReader(c.firstBuf)\n\tbufReader := bufio.NewReader(reader)\n\trequest, err := http.ReadRequest(bufReader)\n\tif err != nil {\n\t\treturn false\n\t}\n\tresp := http.Response{\n\t\tHeader: http.Header{},\n\t}\n\tresp.StatusCode = http.StatusTemporaryRedirect\n\tlocation := fmt.Sprintf(\"https://%v%v\", request.Host, request.RequestURI)\n\tresp.Header.Set(\"Location\", location)\n\tresp.Write(c.Conn)\n\tc.Close()\n\tc.firstBuf = nil\n\treturn true\n}\n\nfunc (c *AutoHttpsConn) Read(buf []byte) (int, error) {\n\tc.readRequestOnce.Do(func() {\n\t\tc.readRequest()\n\t})\n\n\tif c.firstBuf != nil {\n\t\tn := copy(buf, c.firstBuf[c.bufStart:])\n\t\tc.bufStart += n\n\t\tif c.bufStart >= len(c.firstBuf) {\n\t\t\tc.firstBuf = nil\n\t\t}\n\t\treturn n, nil\n\t}\n\n\treturn c.Conn.Read(buf)\n}\n"
  },
  {
    "path": "web/network/auto_https_listener.go",
    "content": "package network\n\nimport \"net\"\n\ntype AutoHttpsListener struct {\n\tnet.Listener\n}\n\nfunc NewAutoHttpsListener(listener net.Listener) net.Listener {\n\treturn &AutoHttpsListener{\n\t\tListener: listener,\n\t}\n}\n\nfunc (l *AutoHttpsListener) Accept() (net.Conn, error) {\n\tconn, err := l.Listener.Accept()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewAutoHttpsConn(conn), nil\n}\n"
  },
  {
    "path": "web/service/config.json",
    "content": "{\n  \"log\": {\n    \"access\": \"none\",\n    \"dnsLog\": false,\n    \"error\": \"./error.log\",\n    \"loglevel\": \"warning\"\n  },\n  \"api\": {\n    \"tag\": \"api\",\n    \"services\": [\n      \"HandlerService\",\n      \"LoggerService\",\n      \"StatsService\"\n    ]\n  },\n  \"inbounds\": [\n    {\n      \"tag\": \"api\",\n      \"listen\": \"127.0.0.1\",\n      \"port\": 62789,\n      \"protocol\": \"dokodemo-door\",\n      \"settings\": {\n        \"address\": \"127.0.0.1\"\n      }\n    }\n  ],\n  \"outbounds\": [\n    {\n      \"tag\": \"direct\",\n      \"protocol\": \"freedom\",\n      \"settings\": {\n        \"domainStrategy\": \"UseIP\"\n      }\n    },\n    {\n      \"tag\": \"blocked\",\n      \"protocol\": \"blackhole\",\n      \"settings\": {}\n    }\n  ],\n  \"policy\": {\n    \"levels\": {\n      \"0\": {\n        \"statsUserDownlink\": true,\n        \"statsUserUplink\": true\n      }\n    },\n    \"system\": {\n      \"statsInboundDownlink\": true,\n      \"statsInboundUplink\": true,\n      \"statsOutboundDownlink\": true,\n      \"statsOutboundUplink\": true\n    }\n  },\n  \"routing\": {\n    \"domainStrategy\": \"AsIs\",\n    \"rules\": [\n      {\n        \"type\": \"field\",\n        \"inboundTag\": [\n          \"api\"\n        ],\n        \"outboundTag\": \"api\"\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"blocked\",\n        \"ip\": [\n          \"geoip:private\"\n        ]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"blocked\",\n        \"protocol\": [\n          \"bittorrent\"\n        ]\n      }\n    ]\n  },\n  \"stats\": {}\n}"
  },
  {
    "path": "web/service/inbound.go",
    "content": "package service\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/xray\"\n\n\t\"gorm.io/gorm\"\n)\n\ntype InboundService struct {\n\txrayApi xray.XrayAPI\n}\n\nfunc (s *InboundService) GetInbounds(userId int) ([]*model.Inbound, error) {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\terr := db.Model(model.Inbound{}).Preload(\"ClientStats\").Where(\"user_id = ?\", userId).Find(&inbounds).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\treturn nil, err\n\t}\n\treturn inbounds, nil\n}\n\nfunc (s *InboundService) GetAllInbounds() ([]*model.Inbound, error) {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\terr := db.Model(model.Inbound{}).Preload(\"ClientStats\").Find(&inbounds).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\treturn nil, err\n\t}\n\treturn inbounds, nil\n}\n\nfunc (s *InboundService) checkPortExist(listen string, port int, ignoreId int) (bool, error) {\n\tdb := database.GetDB()\n\tif listen == \"\" || listen == \"0.0.0.0\" || listen == \"::\" || listen == \"::0\" {\n\t\tdb = db.Model(model.Inbound{}).Where(\"port = ?\", port)\n\t} else {\n\t\tdb = db.Model(model.Inbound{}).\n\t\t\tWhere(\"port = ?\", port).\n\t\t\tWhere(\n\t\t\t\tdb.Model(model.Inbound{}).Where(\n\t\t\t\t\t\"listen = ?\", listen,\n\t\t\t\t).Or(\n\t\t\t\t\t\"listen = \\\"\\\"\",\n\t\t\t\t).Or(\n\t\t\t\t\t\"listen = \\\"0.0.0.0\\\"\",\n\t\t\t\t).Or(\n\t\t\t\t\t\"listen = \\\"::\\\"\",\n\t\t\t\t).Or(\n\t\t\t\t\t\"listen = \\\"::0\\\"\"))\n\t}\n\tif ignoreId > 0 {\n\t\tdb = db.Where(\"id != ?\", ignoreId)\n\t}\n\tvar count int64\n\terr := db.Count(&count).Error\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn count > 0, nil\n}\n\nfunc (s *InboundService) GetClients(inbound *model.Inbound) ([]model.Client, error) {\n\tsettings := map[string][]model.Client{}\n\tjson.Unmarshal([]byte(inbound.Settings), &settings)\n\tif settings == nil {\n\t\treturn nil, fmt.Errorf(\"setting is null\")\n\t}\n\n\tclients := settings[\"clients\"]\n\tif clients == nil {\n\t\treturn nil, nil\n\t}\n\treturn clients, nil\n}\n\nfunc (s *InboundService) getAllEmails() ([]string, error) {\n\tdb := database.GetDB()\n\tvar emails []string\n\terr := db.Raw(`\n\t\tSELECT JSON_EXTRACT(client.value, '$.email')\n\t\tFROM inbounds,\n\t\t\tJSON_EACH(JSON_EXTRACT(inbounds.settings, '$.clients')) AS client\n\t\t`).Scan(&emails).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn emails, nil\n}\n\nfunc (s *InboundService) contains(slice []string, str string) bool {\n\tfor _, s := range slice {\n\t\tif s == str {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (s *InboundService) checkEmailsExistForClients(clients []model.Client) (string, error) {\n\tallEmails, err := s.getAllEmails()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar emails []string\n\tfor _, client := range clients {\n\t\tif client.Email != \"\" {\n\t\t\tif s.contains(emails, client.Email) {\n\t\t\t\treturn client.Email, nil\n\t\t\t}\n\t\t\tif s.contains(allEmails, client.Email) {\n\t\t\t\treturn client.Email, nil\n\t\t\t}\n\t\t\temails = append(emails, client.Email)\n\t\t}\n\t}\n\treturn \"\", nil\n}\n\nfunc (s *InboundService) checkEmailExistForInbound(inbound *model.Inbound) (string, error) {\n\tclients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tallEmails, err := s.getAllEmails()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar emails []string\n\tfor _, client := range clients {\n\t\tif client.Email != \"\" {\n\t\t\tif s.contains(emails, client.Email) {\n\t\t\t\treturn client.Email, nil\n\t\t\t}\n\t\t\tif s.contains(allEmails, client.Email) {\n\t\t\t\treturn client.Email, nil\n\t\t\t}\n\t\t\temails = append(emails, client.Email)\n\t\t}\n\t}\n\treturn \"\", nil\n}\n\nfunc (s *InboundService) AddInbound(inbound *model.Inbound) (*model.Inbound, bool, error) {\n\texist, err := s.checkPortExist(inbound.Listen, inbound.Port, 0)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\tif exist {\n\t\treturn inbound, false, common.NewError(\"Port already exists:\", inbound.Port)\n\t}\n\n\texistEmail, err := s.checkEmailExistForInbound(inbound)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\tif existEmail != \"\" {\n\t\treturn inbound, false, common.NewError(\"Duplicate email:\", existEmail)\n\t}\n\n\tclients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\n\t// Secure client ID\n\tfor _, client := range clients {\n\t\tif inbound.Protocol == \"trojan\" {\n\t\t\tif client.Password == \"\" {\n\t\t\t\treturn inbound, false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\tif client.Email == \"\" {\n\t\t\t\treturn inbound, false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t} else {\n\t\t\tif client.ID == \"\" {\n\t\t\t\treturn inbound, false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t}\n\t}\n\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\tdefer func() {\n\t\tif err == nil {\n\t\t\ttx.Commit()\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\terr = tx.Save(inbound).Error\n\tif err == nil {\n\t\tif len(inbound.ClientStats) == 0 {\n\t\t\tfor _, client := range clients {\n\t\t\t\ts.AddClientStat(tx, inbound.Id, &client)\n\t\t\t}\n\t\t}\n\t} else {\n\t\treturn inbound, false, err\n\t}\n\n\tneedRestart := false\n\tif inbound.Enable {\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\tinboundJson, err1 := json.MarshalIndent(inbound.GenXrayInboundConfig(), \"\", \"  \")\n\t\tif err1 != nil {\n\t\t\tlogger.Debug(\"Unable to marshal inbound config:\", err1)\n\t\t}\n\n\t\terr1 = s.xrayApi.AddInbound(inboundJson)\n\t\tif err1 == nil {\n\t\t\tlogger.Debug(\"New inbound added by api:\", inbound.Tag)\n\t\t} else {\n\t\t\tlogger.Debug(\"Unable to add inbound by api:\", err1)\n\t\t\tneedRestart = true\n\t\t}\n\t\ts.xrayApi.Close()\n\t}\n\n\treturn inbound, needRestart, err\n}\n\nfunc (s *InboundService) DelInbound(id int) (bool, error) {\n\tdb := database.GetDB()\n\n\tvar tag string\n\tneedRestart := false\n\tresult := db.Model(model.Inbound{}).Select(\"tag\").Where(\"id = ? and enable = ?\", id, true).First(&tag)\n\tif result.Error == nil {\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\terr1 := s.xrayApi.DelInbound(tag)\n\t\tif err1 == nil {\n\t\t\tlogger.Debug(\"Inbound deleted by api:\", tag)\n\t\t} else {\n\t\t\tlogger.Debug(\"Unable to delete inbound by api:\", err1)\n\t\t\tneedRestart = true\n\t\t}\n\t\ts.xrayApi.Close()\n\t} else {\n\t\tlogger.Debug(\"No enabled inbound founded to removing by api\", tag)\n\t}\n\n\t// Delete client traffics of inbounds\n\terr := db.Where(\"inbound_id = ?\", id).Delete(xray.ClientTraffic{}).Error\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinbound, err := s.GetInbound(id)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tclients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tfor _, client := range clients {\n\t\terr := s.DelClientIPs(db, client.Email)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t}\n\n\treturn needRestart, db.Delete(model.Inbound{}, id).Error\n}\n\nfunc (s *InboundService) GetInbound(id int) (*model.Inbound, error) {\n\tdb := database.GetDB()\n\tinbound := &model.Inbound{}\n\terr := db.Model(model.Inbound{}).First(inbound, id).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn inbound, nil\n}\n\nfunc (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound, bool, error) {\n\texist, err := s.checkPortExist(inbound.Listen, inbound.Port, inbound.Id)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\tif exist {\n\t\treturn inbound, false, common.NewError(\"Port already exists:\", inbound.Port)\n\t}\n\n\toldInbound, err := s.GetInbound(inbound.Id)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\n\ttag := oldInbound.Tag\n\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ttx.Rollback()\n\t\t} else {\n\t\t\ttx.Commit()\n\t\t}\n\t}()\n\n\terr = s.updateClientTraffics(tx, oldInbound, inbound)\n\tif err != nil {\n\t\treturn inbound, false, err\n\t}\n\n\toldInbound.Up = inbound.Up\n\toldInbound.Down = inbound.Down\n\toldInbound.Total = inbound.Total\n\toldInbound.Remark = inbound.Remark\n\toldInbound.Enable = inbound.Enable\n\toldInbound.ExpiryTime = inbound.ExpiryTime\n\toldInbound.Listen = inbound.Listen\n\toldInbound.Port = inbound.Port\n\toldInbound.Protocol = inbound.Protocol\n\toldInbound.Settings = inbound.Settings\n\toldInbound.StreamSettings = inbound.StreamSettings\n\toldInbound.Sniffing = inbound.Sniffing\n\tif inbound.Listen == \"\" || inbound.Listen == \"0.0.0.0\" || inbound.Listen == \"::\" || inbound.Listen == \"::0\" {\n\t\toldInbound.Tag = fmt.Sprintf(\"inbound-%v\", inbound.Port)\n\t} else {\n\t\toldInbound.Tag = fmt.Sprintf(\"inbound-%v:%v\", inbound.Listen, inbound.Port)\n\t}\n\n\tneedRestart := false\n\ts.xrayApi.Init(p.GetAPIPort())\n\tif s.xrayApi.DelInbound(tag) == nil {\n\t\tlogger.Debug(\"Old inbound deleted by api:\", tag)\n\t}\n\tif inbound.Enable {\n\t\tinboundJson, err2 := json.MarshalIndent(oldInbound.GenXrayInboundConfig(), \"\", \"  \")\n\t\tif err2 != nil {\n\t\t\tlogger.Debug(\"Unable to marshal updated inbound config:\", err2)\n\t\t\tneedRestart = true\n\t\t} else {\n\t\t\terr2 = s.xrayApi.AddInbound(inboundJson)\n\t\t\tif err2 == nil {\n\t\t\t\tlogger.Debug(\"Updated inbound added by api:\", oldInbound.Tag)\n\t\t\t} else {\n\t\t\t\tlogger.Debug(\"Unable to update inbound by api:\", err2)\n\t\t\t\tneedRestart = true\n\t\t\t}\n\t\t}\n\t}\n\ts.xrayApi.Close()\n\n\treturn inbound, needRestart, tx.Save(oldInbound).Error\n}\n\nfunc (s *InboundService) updateClientTraffics(tx *gorm.DB, oldInbound *model.Inbound, newInbound *model.Inbound) error {\n\toldClients, err := s.GetClients(oldInbound)\n\tif err != nil {\n\t\treturn err\n\t}\n\tnewClients, err := s.GetClients(newInbound)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar emailExists bool\n\n\tfor _, oldClient := range oldClients {\n\t\temailExists = false\n\t\tfor _, newClient := range newClients {\n\t\t\tif oldClient.Email == newClient.Email {\n\t\t\t\temailExists = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !emailExists {\n\t\t\terr = s.DelClientStat(tx, oldClient.Email)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tfor _, newClient := range newClients {\n\t\temailExists = false\n\t\tfor _, oldClient := range oldClients {\n\t\t\tif newClient.Email == oldClient.Email {\n\t\t\t\temailExists = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !emailExists {\n\t\t\terr = s.AddClientStat(tx, oldInbound.Id, &newClient)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *InboundService) AddInboundClient(data *model.Inbound) (bool, error) {\n\tclients, err := s.GetClients(data)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(data.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tinterfaceClients := settings[\"clients\"].([]interface{})\n\texistEmail, err := s.checkEmailsExistForClients(clients)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif existEmail != \"\" {\n\t\treturn false, common.NewError(\"Duplicate email:\", existEmail)\n\t}\n\n\toldInbound, err := s.GetInbound(data.Id)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\t// Secure client ID\n\tfor _, client := range clients {\n\t\tif oldInbound.Protocol == \"trojan\" {\n\t\t\tif client.Password == \"\" {\n\t\t\t\treturn false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t} else if oldInbound.Protocol == \"shadowsocks\" {\n\t\t\tif client.Email == \"\" {\n\t\t\t\treturn false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t} else {\n\t\t\tif client.ID == \"\" {\n\t\t\t\treturn false, common.NewError(\"empty client ID\")\n\t\t\t}\n\t\t}\n\t}\n\n\tvar oldSettings map[string]interface{}\n\terr = json.Unmarshal([]byte(oldInbound.Settings), &oldSettings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldClients := oldSettings[\"clients\"].([]interface{})\n\toldClients = append(oldClients, interfaceClients...)\n\n\toldSettings[\"clients\"] = oldClients\n\n\tnewSettings, err := json.MarshalIndent(oldSettings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldInbound.Settings = string(newSettings)\n\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ttx.Rollback()\n\t\t} else {\n\t\t\ttx.Commit()\n\t\t}\n\t}()\n\n\tneedRestart := false\n\ts.xrayApi.Init(p.GetAPIPort())\n\tfor _, client := range clients {\n\t\tif len(client.Email) > 0 {\n\t\t\ts.AddClientStat(tx, data.Id, &client)\n\t\t\tif client.Enable {\n\t\t\t\tcipher := \"\"\n\t\t\t\tif oldInbound.Protocol == \"shadowsocks\" {\n\t\t\t\t\tcipher = oldSettings[\"method\"].(string)\n\t\t\t\t}\n\t\t\t\terr1 := s.xrayApi.AddUser(string(oldInbound.Protocol), oldInbound.Tag, map[string]interface{}{\n\t\t\t\t\t\"email\":    client.Email,\n\t\t\t\t\t\"id\":       client.ID,\n\t\t\t\t\t\"flow\":     client.Flow,\n\t\t\t\t\t\"password\": client.Password,\n\t\t\t\t\t\"cipher\":   cipher,\n\t\t\t\t})\n\t\t\t\tif err1 == nil {\n\t\t\t\t\tlogger.Debug(\"Client added by api:\", client.Email)\n\t\t\t\t} else {\n\t\t\t\t\tlogger.Debug(\"Error in adding client by api:\", err1)\n\t\t\t\t\tneedRestart = true\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tneedRestart = true\n\t\t}\n\t}\n\ts.xrayApi.Close()\n\n\treturn needRestart, tx.Save(oldInbound).Error\n}\n\nfunc (s *InboundService) DelInboundClient(inboundId int, clientId string) (bool, error) {\n\toldInbound, err := s.GetInbound(inboundId)\n\tif err != nil {\n\t\tlogger.Error(\"Load Old Data Error\")\n\t\treturn false, err\n\t}\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(oldInbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\temail := \"\"\n\tclient_key := \"id\"\n\tif oldInbound.Protocol == \"trojan\" {\n\t\tclient_key = \"password\"\n\t}\n\tif oldInbound.Protocol == \"shadowsocks\" {\n\t\tclient_key = \"email\"\n\t}\n\n\tinterfaceClients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor _, client := range interfaceClients {\n\t\tc := client.(map[string]interface{})\n\t\tc_id := c[client_key].(string)\n\t\tif c_id == clientId {\n\t\t\temail = c[\"email\"].(string)\n\t\t} else {\n\t\t\tnewClients = append(newClients, client)\n\t\t}\n\t}\n\n\tif len(newClients) == 0 {\n\t\treturn false, common.NewError(\"no client remained in Inbound\")\n\t}\n\n\tsettings[\"clients\"] = newClients\n\tnewSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldInbound.Settings = string(newSettings)\n\n\tdb := database.GetDB()\n\terr = s.DelClientStat(db, email)\n\tif err != nil {\n\t\tlogger.Error(\"Delete stats Data Error\")\n\t\treturn false, err\n\t}\n\n\terr = s.DelClientIPs(db, email)\n\tif err != nil {\n\t\tlogger.Error(\"Error in delete client IPs\")\n\t\treturn false, err\n\t}\n\tneedRestart := false\n\tif len(email) > 0 {\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\terr1 := s.xrayApi.RemoveUser(oldInbound.Tag, email)\n\t\tif err1 == nil {\n\t\t\tlogger.Debug(\"Client deleted by api:\", email)\n\t\t\tneedRestart = false\n\t\t} else {\n\t\t\tlogger.Debug(\"Unable to del client by api:\", err1)\n\t\t\tneedRestart = true\n\t\t}\n\t\ts.xrayApi.Close()\n\t}\n\treturn needRestart, db.Save(oldInbound).Error\n}\n\nfunc (s *InboundService) UpdateInboundClient(data *model.Inbound, clientId string) (bool, error) {\n\tclients, err := s.GetClients(data)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(data.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tinterfaceClients := settings[\"clients\"].([]interface{})\n\n\toldInbound, err := s.GetInbound(data.Id)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldClients, err := s.GetClients(oldInbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldEmail := \"\"\n\tnewClientId := \"\"\n\tclientIndex := 0\n\tfor index, oldClient := range oldClients {\n\t\toldClientId := \"\"\n\t\tif oldInbound.Protocol == \"trojan\" {\n\t\t\toldClientId = oldClient.Password\n\t\t\tnewClientId = clients[0].Password\n\t\t} else if oldInbound.Protocol == \"shadowsocks\" {\n\t\t\toldClientId = oldClient.Email\n\t\t\tnewClientId = clients[0].Email\n\t\t} else {\n\t\t\toldClientId = oldClient.ID\n\t\t\tnewClientId = clients[0].ID\n\t\t}\n\t\tif clientId == oldClientId {\n\t\t\toldEmail = oldClient.Email\n\t\t\tclientIndex = index\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Validate new client ID\n\tif newClientId == \"\" {\n\t\treturn false, common.NewError(\"empty client ID\")\n\t}\n\n\tif len(clients[0].Email) > 0 && clients[0].Email != oldEmail {\n\t\texistEmail, err := s.checkEmailsExistForClients(clients)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif existEmail != \"\" {\n\t\t\treturn false, common.NewError(\"Duplicate email:\", existEmail)\n\t\t}\n\t}\n\n\tvar oldSettings map[string]interface{}\n\terr = json.Unmarshal([]byte(oldInbound.Settings), &oldSettings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tsettingsClients := oldSettings[\"clients\"].([]interface{})\n\tsettingsClients[clientIndex] = interfaceClients[0]\n\toldSettings[\"clients\"] = settingsClients\n\n\tnewSettings, err := json.MarshalIndent(oldSettings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\toldInbound.Settings = string(newSettings)\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ttx.Rollback()\n\t\t} else {\n\t\t\ttx.Commit()\n\t\t}\n\t}()\n\n\tif len(clients[0].Email) > 0 {\n\t\tif len(oldEmail) > 0 {\n\t\t\terr = s.UpdateClientStat(tx, oldEmail, &clients[0])\n\t\t\tif err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\terr = s.UpdateClientIPs(tx, oldEmail, clients[0].Email)\n\t\t\tif err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t} else {\n\t\t\ts.AddClientStat(tx, data.Id, &clients[0])\n\t\t}\n\t} else {\n\t\terr = s.DelClientStat(tx, oldEmail)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\terr = s.DelClientIPs(tx, oldEmail)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t}\n\tneedRestart := false\n\tif len(oldEmail) > 0 {\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\terr1 := s.xrayApi.RemoveUser(oldInbound.Tag, oldEmail)\n\t\tif err1 == nil {\n\t\t\tlogger.Debug(\"Old client deleted by api:\", clients[0].Email)\n\t\t} else {\n\t\t\tlogger.Debug(\"Error in deleting client by api:\", err1)\n\t\t\tneedRestart = true\n\t\t}\n\t\tif clients[0].Enable {\n\t\t\tcipher := \"\"\n\t\t\tif oldInbound.Protocol == \"shadowsocks\" {\n\t\t\t\tcipher = oldSettings[\"method\"].(string)\n\t\t\t}\n\t\t\terr1 := s.xrayApi.AddUser(string(oldInbound.Protocol), oldInbound.Tag, map[string]interface{}{\n\t\t\t\t\"email\":    clients[0].Email,\n\t\t\t\t\"id\":       clients[0].ID,\n\t\t\t\t\"flow\":     clients[0].Flow,\n\t\t\t\t\"password\": clients[0].Password,\n\t\t\t\t\"cipher\":   cipher,\n\t\t\t})\n\t\t\tif err1 == nil {\n\t\t\t\tlogger.Debug(\"Client edited by api:\", clients[0].Email)\n\t\t\t} else {\n\t\t\t\tlogger.Debug(\"Error in adding client by api:\", err1)\n\t\t\t\tneedRestart = true\n\t\t\t}\n\t\t}\n\t\ts.xrayApi.Close()\n\t} else {\n\t\tlogger.Debug(\"Client old email not found\")\n\t\tneedRestart = true\n\t}\n\treturn needRestart, tx.Save(oldInbound).Error\n}\n\nfunc (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (error, bool) {\n\tvar err error\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ttx.Rollback()\n\t\t} else {\n\t\t\ttx.Commit()\n\t\t}\n\t}()\n\terr = s.addInboundTraffic(tx, inboundTraffics)\n\tif err != nil {\n\t\treturn err, false\n\t}\n\terr = s.addClientTraffic(tx, clientTraffics)\n\tif err != nil {\n\t\treturn err, false\n\t}\n\n\tneedRestart0, count, err := s.autoRenewClients(tx)\n\tif err != nil {\n\t\tlogger.Warning(\"Error in renew clients:\", err)\n\t} else if count > 0 {\n\t\tlogger.Debugf(\"%v clients renewed\", count)\n\t}\n\n\tneedRestart1, count, err := s.disableInvalidClients(tx)\n\tif err != nil {\n\t\tlogger.Warning(\"Error in disabling invalid clients:\", err)\n\t} else if count > 0 {\n\t\tlogger.Debugf(\"%v clients disabled\", count)\n\t}\n\n\tneedRestart2, count, err := s.disableInvalidInbounds(tx)\n\tif err != nil {\n\t\tlogger.Warning(\"Error in disabling invalid inbounds:\", err)\n\t} else if count > 0 {\n\t\tlogger.Debugf(\"%v inbounds disabled\", count)\n\t}\n\treturn nil, (needRestart0 || needRestart1 || needRestart2)\n}\n\nfunc (s *InboundService) addInboundTraffic(tx *gorm.DB, traffics []*xray.Traffic) error {\n\tif len(traffics) == 0 {\n\t\treturn nil\n\t}\n\n\tvar err error\n\n\tfor _, traffic := range traffics {\n\t\tif traffic.IsInbound {\n\t\t\terr = tx.Model(&model.Inbound{}).Where(\"tag = ?\", traffic.Tag).\n\t\t\t\tUpdates(map[string]interface{}{\n\t\t\t\t\t\"up\":   gorm.Expr(\"up + ?\", traffic.Up),\n\t\t\t\t\t\"down\": gorm.Expr(\"down + ?\", traffic.Down),\n\t\t\t\t}).Error\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *InboundService) addClientTraffic(tx *gorm.DB, traffics []*xray.ClientTraffic) (err error) {\n\tif len(traffics) == 0 {\n\t\t// Empty onlineUsers\n\t\tif p != nil {\n\t\t\tp.SetOnlineClients(nil)\n\t\t}\n\t\treturn nil\n\t}\n\n\tvar onlineClients []string\n\n\temails := make([]string, 0, len(traffics))\n\tfor _, traffic := range traffics {\n\t\temails = append(emails, traffic.Email)\n\t}\n\tdbClientTraffics := make([]*xray.ClientTraffic, 0, len(traffics))\n\terr = tx.Model(xray.ClientTraffic{}).Where(\"email IN (?)\", emails).Find(&dbClientTraffics).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Avoid empty slice error\n\tif len(dbClientTraffics) == 0 {\n\t\treturn nil\n\t}\n\n\tdbClientTraffics, err = s.adjustTraffics(tx, dbClientTraffics)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor dbTraffic_index := range dbClientTraffics {\n\t\tfor traffic_index := range traffics {\n\t\t\tif dbClientTraffics[dbTraffic_index].Email == traffics[traffic_index].Email {\n\t\t\t\tdbClientTraffics[dbTraffic_index].Up += traffics[traffic_index].Up\n\t\t\t\tdbClientTraffics[dbTraffic_index].Down += traffics[traffic_index].Down\n\n\t\t\t\t// Add user in onlineUsers array on traffic\n\t\t\t\tif traffics[traffic_index].Up+traffics[traffic_index].Down > 0 {\n\t\t\t\t\tonlineClients = append(onlineClients, traffics[traffic_index].Email)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set onlineUsers\n\tp.SetOnlineClients(onlineClients)\n\n\terr = tx.Save(dbClientTraffics).Error\n\tif err != nil {\n\t\tlogger.Warning(\"AddClientTraffic update data \", err)\n\t}\n\n\treturn nil\n}\n\nfunc (s *InboundService) adjustTraffics(tx *gorm.DB, dbClientTraffics []*xray.ClientTraffic) ([]*xray.ClientTraffic, error) {\n\tinboundIds := make([]int, 0, len(dbClientTraffics))\n\tfor _, dbClientTraffic := range dbClientTraffics {\n\t\tif dbClientTraffic.ExpiryTime < 0 {\n\t\t\tinboundIds = append(inboundIds, dbClientTraffic.InboundId)\n\t\t}\n\t}\n\n\tif len(inboundIds) > 0 {\n\t\tvar inbounds []*model.Inbound\n\t\terr := tx.Model(model.Inbound{}).Where(\"id IN (?)\", inboundIds).Find(&inbounds).Error\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor inbound_index := range inbounds {\n\t\t\tsettings := map[string]interface{}{}\n\t\t\tjson.Unmarshal([]byte(inbounds[inbound_index].Settings), &settings)\n\t\t\tclients, ok := settings[\"clients\"].([]interface{})\n\t\t\tif ok {\n\t\t\t\tvar newClients []interface{}\n\t\t\t\tfor client_index := range clients {\n\t\t\t\t\tc := clients[client_index].(map[string]interface{})\n\t\t\t\t\tfor traffic_index := range dbClientTraffics {\n\t\t\t\t\t\tif dbClientTraffics[traffic_index].ExpiryTime < 0 && c[\"email\"] == dbClientTraffics[traffic_index].Email {\n\t\t\t\t\t\t\toldExpiryTime := c[\"expiryTime\"].(float64)\n\t\t\t\t\t\t\tnewExpiryTime := (time.Now().Unix() * 1000) - int64(oldExpiryTime)\n\t\t\t\t\t\t\tc[\"expiryTime\"] = newExpiryTime\n\t\t\t\t\t\t\tdbClientTraffics[traffic_index].ExpiryTime = newExpiryTime\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t\t\t}\n\t\t\t\tsettings[\"clients\"] = newClients\n\t\t\t\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tinbounds[inbound_index].Settings = string(modifiedSettings)\n\t\t\t}\n\t\t}\n\t\terr = tx.Save(inbounds).Error\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"AddClientTraffic update inbounds \", err)\n\t\t\tlogger.Error(inbounds)\n\t\t}\n\t}\n\n\treturn dbClientTraffics, nil\n}\n\nfunc (s *InboundService) autoRenewClients(tx *gorm.DB) (bool, int64, error) {\n\t// check for time expired\n\tvar traffics []*xray.ClientTraffic\n\tnow := time.Now().Unix() * 1000\n\tvar err, err1 error\n\n\terr = tx.Model(xray.ClientTraffic{}).Where(\"reset > 0 and expiry_time > 0 and expiry_time <= ?\", now).Find(&traffics).Error\n\tif err != nil {\n\t\treturn false, 0, err\n\t}\n\t// return if there is no client to renew\n\tif len(traffics) == 0 {\n\t\treturn false, 0, nil\n\t}\n\n\tvar inbound_ids []int\n\tvar inbounds []*model.Inbound\n\tneedRestart := false\n\tvar clientsToAdd []struct {\n\t\tprotocol string\n\t\ttag      string\n\t\tclient   map[string]interface{}\n\t}\n\n\tfor _, traffic := range traffics {\n\t\tinbound_ids = append(inbound_ids, traffic.InboundId)\n\t}\n\terr = tx.Model(model.Inbound{}).Where(\"id IN ?\", inbound_ids).Find(&inbounds).Error\n\tif err != nil {\n\t\treturn false, 0, err\n\t}\n\tfor inbound_index := range inbounds {\n\t\tsettings := map[string]interface{}{}\n\t\tjson.Unmarshal([]byte(inbounds[inbound_index].Settings), &settings)\n\t\tclients := settings[\"clients\"].([]interface{})\n\t\tfor client_index := range clients {\n\t\t\tc := clients[client_index].(map[string]interface{})\n\t\t\tfor traffic_index, traffic := range traffics {\n\t\t\t\tif traffic.Email == c[\"email\"].(string) {\n\t\t\t\t\tnewExpiryTime := traffic.ExpiryTime\n\t\t\t\t\tfor newExpiryTime < now {\n\t\t\t\t\t\tnewExpiryTime += (int64(traffic.Reset) * 86400000)\n\t\t\t\t\t}\n\t\t\t\t\tc[\"expiryTime\"] = newExpiryTime\n\t\t\t\t\ttraffics[traffic_index].ExpiryTime = newExpiryTime\n\t\t\t\t\ttraffics[traffic_index].Down = 0\n\t\t\t\t\ttraffics[traffic_index].Up = 0\n\t\t\t\t\tif !traffic.Enable {\n\t\t\t\t\t\ttraffics[traffic_index].Enable = true\n\t\t\t\t\t\tclientsToAdd = append(clientsToAdd,\n\t\t\t\t\t\t\tstruct {\n\t\t\t\t\t\t\t\tprotocol string\n\t\t\t\t\t\t\t\ttag      string\n\t\t\t\t\t\t\t\tclient   map[string]interface{}\n\t\t\t\t\t\t\t}{\n\t\t\t\t\t\t\t\tprotocol: string(inbounds[inbound_index].Protocol),\n\t\t\t\t\t\t\t\ttag:      inbounds[inbound_index].Tag,\n\t\t\t\t\t\t\t\tclient:   c,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tclients[client_index] = interface{}(c)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsettings[\"clients\"] = clients\n\t\tnewSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\t\tif err != nil {\n\t\t\treturn false, 0, err\n\t\t}\n\t\tinbounds[inbound_index].Settings = string(newSettings)\n\t}\n\terr = tx.Save(inbounds).Error\n\tif err != nil {\n\t\treturn false, 0, err\n\t}\n\terr = tx.Save(traffics).Error\n\tif err != nil {\n\t\treturn false, 0, err\n\t}\n\tif p != nil {\n\t\terr1 = s.xrayApi.Init(p.GetAPIPort())\n\t\tif err1 != nil {\n\t\t\treturn true, int64(len(traffics)), nil\n\t\t}\n\t\tfor _, clientToAdd := range clientsToAdd {\n\t\t\terr1 = s.xrayApi.AddUser(clientToAdd.protocol, clientToAdd.tag, clientToAdd.client)\n\t\t\tif err1 != nil {\n\t\t\t\tneedRestart = true\n\t\t\t}\n\t\t}\n\t\ts.xrayApi.Close()\n\t}\n\treturn needRestart, int64(len(traffics)), nil\n}\n\nfunc (s *InboundService) disableInvalidInbounds(tx *gorm.DB) (bool, int64, error) {\n\tnow := time.Now().Unix() * 1000\n\tneedRestart := false\n\n\tif p != nil {\n\t\tvar tags []string\n\t\terr := tx.Table(\"inbounds\").\n\t\t\tSelect(\"inbounds.tag\").\n\t\t\tWhere(\"((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?\", now, true).\n\t\t\tScan(&tags).Error\n\t\tif err != nil {\n\t\t\treturn false, 0, err\n\t\t}\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\tfor _, tag := range tags {\n\t\t\terr1 := s.xrayApi.DelInbound(tag)\n\t\t\tif err1 == nil {\n\t\t\t\tlogger.Debug(\"Inbound disabled by api:\", tag)\n\t\t\t} else {\n\t\t\t\tlogger.Debug(\"Error in disabling inbound by api:\", err1)\n\t\t\t\tneedRestart = true\n\t\t\t}\n\t\t}\n\t\ts.xrayApi.Close()\n\t}\n\n\tresult := tx.Model(model.Inbound{}).\n\t\tWhere(\"((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?\", now, true).\n\t\tUpdate(\"enable\", false)\n\terr := result.Error\n\tcount := result.RowsAffected\n\treturn needRestart, count, err\n}\n\nfunc (s *InboundService) disableInvalidClients(tx *gorm.DB) (bool, int64, error) {\n\tnow := time.Now().Unix() * 1000\n\tneedRestart := false\n\n\tif p != nil {\n\t\tvar results []struct {\n\t\t\tTag   string\n\t\t\tEmail string\n\t\t}\n\n\t\terr := tx.Table(\"inbounds\").\n\t\t\tSelect(\"inbounds.tag, client_traffics.email\").\n\t\t\tJoins(\"JOIN client_traffics ON inbounds.id = client_traffics.inbound_id\").\n\t\t\tWhere(\"((client_traffics.total > 0 AND client_traffics.up + client_traffics.down >= client_traffics.total) OR (client_traffics.expiry_time > 0 AND client_traffics.expiry_time <= ?)) AND client_traffics.enable = ?\", now, true).\n\t\t\tScan(&results).Error\n\t\tif err != nil {\n\t\t\treturn false, 0, err\n\t\t}\n\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\tfor _, result := range results {\n\t\t\terr1 := s.xrayApi.RemoveUser(result.Tag, result.Email)\n\t\t\tif err1 == nil {\n\t\t\t\tlogger.Debug(\"Client disabled by api:\", result.Email)\n\t\t\t} else {\n\t\t\t\tlogger.Debug(\"Error in disabling client by api:\", err1)\n\t\t\t\tneedRestart = true\n\t\t\t}\n\t\t}\n\t\ts.xrayApi.Close()\n\t}\n\tresult := tx.Model(xray.ClientTraffic{}).\n\t\tWhere(\"((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?\", now, true).\n\t\tUpdate(\"enable\", false)\n\terr := result.Error\n\tcount := result.RowsAffected\n\treturn needRestart, count, err\n}\n\nfunc (s *InboundService) GetInboundTags() (string, error) {\n\tdb := database.GetDB()\n\tvar inboundTags []string\n\terr := db.Model(model.Inbound{}).Select(\"tag\").Find(&inboundTags).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\treturn \"\", err\n\t}\n\ttags, _ := json.Marshal(inboundTags)\n\treturn string(tags), nil\n}\n\nfunc (s *InboundService) MigrationRemoveOrphanedTraffics() {\n\tdb := database.GetDB()\n\tdb.Exec(`\n\t\tDELETE FROM client_traffics\n\t\tWHERE email NOT IN (\n\t\t\tSELECT JSON_EXTRACT(client.value, '$.email')\n\t\t\tFROM inbounds,\n\t\t\t\tJSON_EACH(JSON_EXTRACT(inbounds.settings, '$.clients')) AS client\n\t\t)\n\t`)\n}\n\nfunc (s *InboundService) AddClientStat(tx *gorm.DB, inboundId int, client *model.Client) error {\n\tclientTraffic := xray.ClientTraffic{}\n\tclientTraffic.InboundId = inboundId\n\tclientTraffic.Email = client.Email\n\tclientTraffic.Total = client.TotalGB\n\tclientTraffic.ExpiryTime = client.ExpiryTime\n\tclientTraffic.Enable = true\n\tclientTraffic.Up = 0\n\tclientTraffic.Down = 0\n\tclientTraffic.Reset = client.Reset\n\tresult := tx.Create(&clientTraffic)\n\terr := result.Error\n\treturn err\n}\n\nfunc (s *InboundService) UpdateClientStat(tx *gorm.DB, email string, client *model.Client) error {\n\tresult := tx.Model(xray.ClientTraffic{}).\n\t\tWhere(\"email = ?\", email).\n\t\tUpdates(map[string]interface{}{\n\t\t\t\"enable\":      true,\n\t\t\t\"email\":       client.Email,\n\t\t\t\"total\":       client.TotalGB,\n\t\t\t\"expiry_time\": client.ExpiryTime,\n\t\t\t\"reset\":       client.Reset,\n\t\t})\n\terr := result.Error\n\treturn err\n}\n\nfunc (s *InboundService) UpdateClientIPs(tx *gorm.DB, oldEmail string, newEmail string) error {\n\treturn tx.Model(model.InboundClientIps{}).Where(\"client_email = ?\", oldEmail).Update(\"client_email\", newEmail).Error\n}\n\nfunc (s *InboundService) DelClientStat(tx *gorm.DB, email string) error {\n\treturn tx.Where(\"email = ?\", email).Delete(xray.ClientTraffic{}).Error\n}\n\nfunc (s *InboundService) DelClientIPs(tx *gorm.DB, email string) error {\n\treturn tx.Where(\"client_email = ?\", email).Delete(model.InboundClientIps{}).Error\n}\n\nfunc (s *InboundService) GetClientInboundByTrafficID(trafficId int) (traffic *xray.ClientTraffic, inbound *model.Inbound, err error) {\n\tdb := database.GetDB()\n\tvar traffics []*xray.ClientTraffic\n\terr = db.Model(xray.ClientTraffic{}).Where(\"id = ?\", trafficId).Find(&traffics).Error\n\tif err != nil {\n\t\tlogger.Warningf(\"Error retrieving ClientTraffic with trafficId %d: %v\", trafficId, err)\n\t\treturn nil, nil, err\n\t}\n\tif len(traffics) > 0 {\n\t\tinbound, err = s.GetInbound(traffics[0].InboundId)\n\t\treturn traffics[0], inbound, err\n\t}\n\treturn nil, nil, nil\n}\n\nfunc (s *InboundService) GetClientInboundByEmail(email string) (traffic *xray.ClientTraffic, inbound *model.Inbound, err error) {\n\tdb := database.GetDB()\n\tvar traffics []*xray.ClientTraffic\n\terr = db.Model(xray.ClientTraffic{}).Where(\"email = ?\", email).Find(&traffics).Error\n\tif err != nil {\n\t\tlogger.Warningf(\"Error retrieving ClientTraffic with email %s: %v\", email, err)\n\t\treturn nil, nil, err\n\t}\n\tif len(traffics) > 0 {\n\t\tinbound, err = s.GetInbound(traffics[0].InboundId)\n\t\treturn traffics[0], inbound, err\n\t}\n\treturn nil, nil, nil\n}\n\nfunc (s *InboundService) GetClientByEmail(clientEmail string) (*xray.ClientTraffic, *model.Client, error) {\n\ttraffic, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif inbound == nil {\n\t\treturn nil, nil, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\tclients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tfor _, client := range clients {\n\t\tif client.Email == clientEmail {\n\t\t\treturn traffic, &client, nil\n\t\t}\n\t}\n\n\treturn nil, nil, common.NewError(\"Client Not Found In Inbound For Email:\", clientEmail)\n}\n\nfunc (s *InboundService) SetClientTelegramUserID(trafficId int, tgId int64) (bool, error) {\n\ttraffic, inbound, err := s.GetClientInboundByTrafficID(trafficId)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, common.NewError(\"Inbound Not Found For Traffic ID:\", trafficId)\n\t}\n\n\tclientEmail := traffic.Email\n\n\toldClients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tclientId := \"\"\n\n\tfor _, oldClient := range oldClients {\n\t\tif oldClient.Email == clientEmail {\n\t\t\tif inbound.Protocol == \"trojan\" {\n\t\t\t\tclientId = oldClient.Password\n\t\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\t\tclientId = oldClient.Email\n\t\t\t} else {\n\t\t\t\tclientId = oldClient.ID\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(clientId) == 0 {\n\t\treturn false, common.NewError(\"Client Not Found For Email:\", clientEmail)\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(inbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tclients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor client_index := range clients {\n\t\tc := clients[client_index].(map[string]interface{})\n\t\tif c[\"email\"] == clientEmail {\n\t\t\tc[\"tgId\"] = tgId\n\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t}\n\t}\n\tsettings[\"clients\"] = newClients\n\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinbound.Settings = string(modifiedSettings)\n\tneedRestart, err := s.UpdateInboundClient(inbound, clientId)\n\treturn needRestart, err\n}\n\nfunc (s *InboundService) checkIsEnabledByEmail(clientEmail string) (bool, error) {\n\t_, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\tclients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tisEnable := false\n\n\tfor _, client := range clients {\n\t\tif client.Email == clientEmail {\n\t\t\tisEnable = client.Enable\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn isEnable, err\n}\n\nfunc (s *InboundService) ToggleClientEnableByEmail(clientEmail string) (bool, bool, error) {\n\t_, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, false, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\toldClients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, false, err\n\t}\n\n\tclientId := \"\"\n\tclientOldEnabled := false\n\n\tfor _, oldClient := range oldClients {\n\t\tif oldClient.Email == clientEmail {\n\t\t\tif inbound.Protocol == \"trojan\" {\n\t\t\t\tclientId = oldClient.Password\n\t\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\t\tclientId = oldClient.Email\n\t\t\t} else {\n\t\t\t\tclientId = oldClient.ID\n\t\t\t}\n\t\t\tclientOldEnabled = oldClient.Enable\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(clientId) == 0 {\n\t\treturn false, false, common.NewError(\"Client Not Found For Email:\", clientEmail)\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(inbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, false, err\n\t}\n\tclients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor client_index := range clients {\n\t\tc := clients[client_index].(map[string]interface{})\n\t\tif c[\"email\"] == clientEmail {\n\t\t\tc[\"enable\"] = !clientOldEnabled\n\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t}\n\t}\n\tsettings[\"clients\"] = newClients\n\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, false, err\n\t}\n\tinbound.Settings = string(modifiedSettings)\n\n\tneedRestart, err := s.UpdateInboundClient(inbound, clientId)\n\tif err != nil {\n\t\treturn false, needRestart, err\n\t}\n\n\treturn !clientOldEnabled, needRestart, nil\n}\n\nfunc (s *InboundService) ResetClientIpLimitByEmail(clientEmail string, count int) (bool, error) {\n\t_, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\toldClients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tclientId := \"\"\n\n\tfor _, oldClient := range oldClients {\n\t\tif oldClient.Email == clientEmail {\n\t\t\tif inbound.Protocol == \"trojan\" {\n\t\t\t\tclientId = oldClient.Password\n\t\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\t\tclientId = oldClient.Email\n\t\t\t} else {\n\t\t\t\tclientId = oldClient.ID\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(clientId) == 0 {\n\t\treturn false, common.NewError(\"Client Not Found For Email:\", clientEmail)\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(inbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tclients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor client_index := range clients {\n\t\tc := clients[client_index].(map[string]interface{})\n\t\tif c[\"email\"] == clientEmail {\n\t\t\tc[\"limitIp\"] = count\n\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t}\n\t}\n\tsettings[\"clients\"] = newClients\n\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinbound.Settings = string(modifiedSettings)\n\tneedRestart, err := s.UpdateInboundClient(inbound, clientId)\n\treturn needRestart, err\n}\n\nfunc (s *InboundService) ResetClientExpiryTimeByEmail(clientEmail string, expiry_time int64) (bool, error) {\n\t_, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\toldClients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tclientId := \"\"\n\n\tfor _, oldClient := range oldClients {\n\t\tif oldClient.Email == clientEmail {\n\t\t\tif inbound.Protocol == \"trojan\" {\n\t\t\t\tclientId = oldClient.Password\n\t\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\t\tclientId = oldClient.Email\n\t\t\t} else {\n\t\t\t\tclientId = oldClient.ID\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(clientId) == 0 {\n\t\treturn false, common.NewError(\"Client Not Found For Email:\", clientEmail)\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(inbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tclients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor client_index := range clients {\n\t\tc := clients[client_index].(map[string]interface{})\n\t\tif c[\"email\"] == clientEmail {\n\t\t\tc[\"expiryTime\"] = expiry_time\n\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t}\n\t}\n\tsettings[\"clients\"] = newClients\n\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinbound.Settings = string(modifiedSettings)\n\tneedRestart, err := s.UpdateInboundClient(inbound, clientId)\n\treturn needRestart, err\n}\n\nfunc (s *InboundService) ResetClientTrafficLimitByEmail(clientEmail string, totalGB int) (bool, error) {\n\tif totalGB < 0 {\n\t\treturn false, common.NewError(\"totalGB must be >= 0\")\n\t}\n\t_, inbound, err := s.GetClientInboundByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif inbound == nil {\n\t\treturn false, common.NewError(\"Inbound Not Found For Email:\", clientEmail)\n\t}\n\n\toldClients, err := s.GetClients(inbound)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tclientId := \"\"\n\n\tfor _, oldClient := range oldClients {\n\t\tif oldClient.Email == clientEmail {\n\t\t\tif inbound.Protocol == \"trojan\" {\n\t\t\t\tclientId = oldClient.Password\n\t\t\t} else if inbound.Protocol == \"shadowsocks\" {\n\t\t\t\tclientId = oldClient.Email\n\t\t\t} else {\n\t\t\t\tclientId = oldClient.ID\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(clientId) == 0 {\n\t\treturn false, common.NewError(\"Client Not Found For Email:\", clientEmail)\n\t}\n\n\tvar settings map[string]interface{}\n\terr = json.Unmarshal([]byte(inbound.Settings), &settings)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tclients := settings[\"clients\"].([]interface{})\n\tvar newClients []interface{}\n\tfor client_index := range clients {\n\t\tc := clients[client_index].(map[string]interface{})\n\t\tif c[\"email\"] == clientEmail {\n\t\t\tc[\"totalGB\"] = totalGB * 1024 * 1024 * 1024\n\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t}\n\t}\n\tsettings[\"clients\"] = newClients\n\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinbound.Settings = string(modifiedSettings)\n\tneedRestart, err := s.UpdateInboundClient(inbound, clientId)\n\treturn needRestart, err\n}\n\nfunc (s *InboundService) ResetClientTrafficByEmail(clientEmail string) error {\n\tdb := database.GetDB()\n\n\tresult := db.Model(xray.ClientTraffic{}).\n\t\tWhere(\"email = ?\", clientEmail).\n\t\tUpdates(map[string]interface{}{\"enable\": true, \"up\": 0, \"down\": 0})\n\n\terr := result.Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (s *InboundService) ResetClientTraffic(id int, clientEmail string) (bool, error) {\n\tneedRestart := false\n\n\ttraffic, err := s.GetClientTrafficByEmail(clientEmail)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tif !traffic.Enable {\n\t\tinbound, err := s.GetInbound(id)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tclients, err := s.GetClients(inbound)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tfor _, client := range clients {\n\t\t\tif client.Email == clientEmail {\n\t\t\t\ts.xrayApi.Init(p.GetAPIPort())\n\t\t\t\tcipher := \"\"\n\t\t\t\tif string(inbound.Protocol) == \"shadowsocks\" {\n\t\t\t\t\tvar oldSettings map[string]interface{}\n\t\t\t\t\terr = json.Unmarshal([]byte(inbound.Settings), &oldSettings)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn false, err\n\t\t\t\t\t}\n\t\t\t\t\tcipher = oldSettings[\"method\"].(string)\n\t\t\t\t}\n\t\t\t\terr1 := s.xrayApi.AddUser(string(inbound.Protocol), inbound.Tag, map[string]interface{}{\n\t\t\t\t\t\"email\":    client.Email,\n\t\t\t\t\t\"id\":       client.ID,\n\t\t\t\t\t\"flow\":     client.Flow,\n\t\t\t\t\t\"password\": client.Password,\n\t\t\t\t\t\"cipher\":   cipher,\n\t\t\t\t})\n\t\t\t\tif err1 == nil {\n\t\t\t\t\tlogger.Debug(\"Client enabled due to reset traffic:\", clientEmail)\n\t\t\t\t} else {\n\t\t\t\t\tlogger.Debug(\"Error in enabling client by api:\", err1)\n\t\t\t\t\tneedRestart = true\n\t\t\t\t}\n\t\t\t\ts.xrayApi.Close()\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\ttraffic.Up = 0\n\ttraffic.Down = 0\n\ttraffic.Enable = true\n\n\tdb := database.GetDB()\n\terr = db.Save(traffic).Error\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\treturn needRestart, nil\n}\n\nfunc (s *InboundService) ResetAllClientTraffics(id int) error {\n\tdb := database.GetDB()\n\n\twhereText := \"inbound_id \"\n\tif id == -1 {\n\t\twhereText += \" > ?\"\n\t} else {\n\t\twhereText += \" = ?\"\n\t}\n\n\tresult := db.Model(xray.ClientTraffic{}).\n\t\tWhere(whereText, id).\n\t\tUpdates(map[string]interface{}{\"enable\": true, \"up\": 0, \"down\": 0})\n\n\terr := result.Error\n\treturn err\n}\n\nfunc (s *InboundService) ResetAllTraffics() error {\n\tdb := database.GetDB()\n\n\tresult := db.Model(model.Inbound{}).\n\t\tWhere(\"user_id > ?\", 0).\n\t\tUpdates(map[string]interface{}{\"up\": 0, \"down\": 0})\n\n\terr := result.Error\n\treturn err\n}\n\nfunc (s *InboundService) DelDepletedClients(id int) (err error) {\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\tdefer func() {\n\t\tif err == nil {\n\t\t\ttx.Commit()\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\twhereText := \"reset = 0 and inbound_id \"\n\tif id < 0 {\n\t\twhereText += \"> ?\"\n\t} else {\n\t\twhereText += \"= ?\"\n\t}\n\n\tdepletedClients := []xray.ClientTraffic{}\n\terr = db.Model(xray.ClientTraffic{}).Where(whereText+\" and enable = ?\", id, false).Select(\"inbound_id, GROUP_CONCAT(email) as email\").Group(\"inbound_id\").Find(&depletedClients).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, depletedClient := range depletedClients {\n\t\temails := strings.Split(depletedClient.Email, \",\")\n\t\toldInbound, err := s.GetInbound(depletedClient.InboundId)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvar oldSettings map[string]interface{}\n\t\terr = json.Unmarshal([]byte(oldInbound.Settings), &oldSettings)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\toldClients := oldSettings[\"clients\"].([]interface{})\n\t\tvar newClients []interface{}\n\t\tfor _, client := range oldClients {\n\t\t\tdeplete := false\n\t\t\tc := client.(map[string]interface{})\n\t\t\tfor _, email := range emails {\n\t\t\t\tif email == c[\"email\"].(string) {\n\t\t\t\t\tdeplete = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !deplete {\n\t\t\t\tnewClients = append(newClients, client)\n\t\t\t}\n\t\t}\n\t\tif len(newClients) > 0 {\n\t\t\toldSettings[\"clients\"] = newClients\n\n\t\t\tnewSettings, err := json.MarshalIndent(oldSettings, \"\", \"  \")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\toldInbound.Settings = string(newSettings)\n\t\t\terr = tx.Save(oldInbound).Error\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\t// Delete inbound if no client remains\n\t\t\ts.DelInbound(depletedClient.InboundId)\n\t\t}\n\t}\n\n\terr = tx.Where(whereText+\" and enable = ?\", id, false).Delete(xray.ClientTraffic{}).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (s *InboundService) GetClientTrafficTgBot(tgId int64) ([]*xray.ClientTraffic, error) {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\n\t// Retrieve inbounds where settings contain the given tgId\n\terr := db.Model(model.Inbound{}).Where(\"settings LIKE ?\", fmt.Sprintf(`%%\"tgId\": %d%%`, tgId)).Find(&inbounds).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\tlogger.Errorf(\"Error retrieving inbounds with tgId %d: %v\", tgId, err)\n\t\treturn nil, err\n\t}\n\n\tvar emails []string\n\tfor _, inbound := range inbounds {\n\t\tclients, err := s.GetClients(inbound)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"Error retrieving clients for inbound %d: %v\", inbound.Id, err)\n\t\t\tcontinue\n\t\t}\n\t\tfor _, client := range clients {\n\t\t\tif client.TgID == tgId {\n\t\t\t\temails = append(emails, client.Email)\n\t\t\t}\n\t\t}\n\t}\n\n\tvar traffics []*xray.ClientTraffic\n\terr = db.Model(xray.ClientTraffic{}).Where(\"email IN ?\", emails).Find(&traffics).Error\n\tif err != nil {\n\t\tif err == gorm.ErrRecordNotFound {\n\t\t\tlogger.Warning(\"No ClientTraffic records found for emails:\", emails)\n\t\t\treturn nil, nil\n\t\t}\n\t\tlogger.Errorf(\"Error retrieving ClientTraffic for emails %v: %v\", emails, err)\n\t\treturn nil, err\n\t}\n\n\treturn traffics, nil\n}\n\nfunc (s *InboundService) GetClientTrafficByEmail(email string) (traffic *xray.ClientTraffic, err error) {\n\tdb := database.GetDB()\n\tvar traffics []*xray.ClientTraffic\n\n\terr = db.Model(xray.ClientTraffic{}).Where(\"email = ?\", email).Find(&traffics).Error\n\tif err != nil {\n\t\tlogger.Warningf(\"Error retrieving ClientTraffic with email %s: %v\", email, err)\n\t\treturn nil, err\n\t}\n\tif len(traffics) > 0 {\n\t\treturn traffics[0], nil\n\t}\n\n\treturn nil, nil\n}\n\nfunc (s *InboundService) SearchClientTraffic(query string) (traffic *xray.ClientTraffic, err error) {\n\tdb := database.GetDB()\n\tinbound := &model.Inbound{}\n\ttraffic = &xray.ClientTraffic{}\n\n\t// Search for inbound settings that contain the query\n\terr = db.Model(model.Inbound{}).Where(\"settings LIKE ?\", \"%\\\"\"+query+\"\\\"%\").First(inbound).Error\n\tif err != nil {\n\t\tif err == gorm.ErrRecordNotFound {\n\t\t\tlogger.Warningf(\"Inbound settings containing query %s not found: %v\", query, err)\n\t\t\treturn nil, err\n\t\t}\n\t\tlogger.Errorf(\"Error searching for inbound settings with query %s: %v\", query, err)\n\t\treturn nil, err\n\t}\n\n\ttraffic.InboundId = inbound.Id\n\n\t// Unmarshal settings to get clients\n\tsettings := map[string][]model.Client{}\n\tif err := json.Unmarshal([]byte(inbound.Settings), &settings); err != nil {\n\t\tlogger.Errorf(\"Error unmarshalling inbound settings for inbound ID %d: %v\", inbound.Id, err)\n\t\treturn nil, err\n\t}\n\n\tclients := settings[\"clients\"]\n\tfor _, client := range clients {\n\t\tif (client.ID == query || client.Password == query) && client.Email != \"\" {\n\t\t\ttraffic.Email = client.Email\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif traffic.Email == \"\" {\n\t\tlogger.Warningf(\"No client found with query %s in inbound ID %d\", query, inbound.Id)\n\t\treturn nil, gorm.ErrRecordNotFound\n\t}\n\n\t// Retrieve ClientTraffic based on the found email\n\terr = db.Model(xray.ClientTraffic{}).Where(\"email = ?\", traffic.Email).First(traffic).Error\n\tif err != nil {\n\t\tif err == gorm.ErrRecordNotFound {\n\t\t\tlogger.Warningf(\"ClientTraffic for email %s not found: %v\", traffic.Email, err)\n\t\t\treturn nil, err\n\t\t}\n\t\tlogger.Errorf(\"Error retrieving ClientTraffic for email %s: %v\", traffic.Email, err)\n\t\treturn nil, err\n\t}\n\n\treturn traffic, nil\n}\n\nfunc (s *InboundService) GetInboundClientIps(clientEmail string) (string, error) {\n\tdb := database.GetDB()\n\tInboundClientIps := &model.InboundClientIps{}\n\terr := db.Model(model.InboundClientIps{}).Where(\"client_email = ?\", clientEmail).First(InboundClientIps).Error\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn InboundClientIps.Ips, nil\n}\n\nfunc (s *InboundService) ClearClientIps(clientEmail string) error {\n\tdb := database.GetDB()\n\n\tresult := db.Model(model.InboundClientIps{}).\n\t\tWhere(\"client_email = ?\", clientEmail).\n\t\tUpdate(\"ips\", \"\")\n\terr := result.Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (s *InboundService) SearchInbounds(query string) ([]*model.Inbound, error) {\n\tdb := database.GetDB()\n\tvar inbounds []*model.Inbound\n\terr := db.Model(model.Inbound{}).Preload(\"ClientStats\").Where(\"remark like ?\", \"%\"+query+\"%\").Find(&inbounds).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\treturn nil, err\n\t}\n\treturn inbounds, nil\n}\n\nfunc (s *InboundService) MigrationRequirements() {\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\tvar err error\n\tdefer func() {\n\t\tif err == nil {\n\t\t\ttx.Commit()\n\t\t} else {\n\t\t\ttx.Rollback()\n\t\t}\n\t}()\n\n\t// Fix inbounds based problems\n\tvar inbounds []*model.Inbound\n\terr = tx.Model(model.Inbound{}).Where(\"protocol IN (?)\", []string{\"vmess\", \"vless\", \"trojan\"}).Find(&inbounds).Error\n\tif err != nil && err != gorm.ErrRecordNotFound {\n\t\treturn\n\t}\n\tfor inbound_index := range inbounds {\n\t\tsettings := map[string]interface{}{}\n\t\tjson.Unmarshal([]byte(inbounds[inbound_index].Settings), &settings)\n\t\tclients, ok := settings[\"clients\"].([]interface{})\n\t\tif ok {\n\t\t\t// Fix Client configuration problems\n\t\t\tvar newClients []interface{}\n\t\t\tfor client_index := range clients {\n\t\t\t\tc := clients[client_index].(map[string]interface{})\n\n\t\t\t\t// Add email='' if it is not exists\n\t\t\t\tif _, ok := c[\"email\"]; !ok {\n\t\t\t\t\tc[\"email\"] = \"\"\n\t\t\t\t}\n\n\t\t\t\t// Convert string tgId to int64\n\t\t\t\tif _, ok := c[\"tgId\"]; ok {\n\t\t\t\t\tvar tgId interface{} = c[\"tgId\"]\n\t\t\t\t\tif tgIdStr, ok2 := tgId.(string); ok2 {\n\t\t\t\t\t\ttgIdInt64, err := strconv.ParseInt(strings.ReplaceAll(tgIdStr, \" \", \"\"), 10, 64)\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\tc[\"tgId\"] = tgIdInt64\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Remove \"flow\": \"xtls-rprx-direct\"\n\t\t\t\tif _, ok := c[\"flow\"]; ok {\n\t\t\t\t\tif c[\"flow\"] == \"xtls-rprx-direct\" {\n\t\t\t\t\t\tc[\"flow\"] = \"\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewClients = append(newClients, interface{}(c))\n\t\t\t}\n\t\t\tsettings[\"clients\"] = newClients\n\t\t\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tinbounds[inbound_index].Settings = string(modifiedSettings)\n\t\t}\n\n\t\t// Add client traffic row for all clients which has email\n\t\tmodelClients, err := s.GetClients(inbounds[inbound_index])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tfor _, modelClient := range modelClients {\n\t\t\tif len(modelClient.Email) > 0 {\n\t\t\t\tvar count int64\n\t\t\t\ttx.Model(xray.ClientTraffic{}).Where(\"email = ?\", modelClient.Email).Count(&count)\n\t\t\t\tif count == 0 {\n\t\t\t\t\ts.AddClientStat(tx, inbounds[inbound_index].Id, &modelClient)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttx.Save(inbounds)\n\n\t// Remove orphaned traffics\n\ttx.Where(\"inbound_id = 0\").Delete(xray.ClientTraffic{})\n\n\t// Migrate old MultiDomain to External Proxy\n\tvar externalProxy []struct {\n\t\tId             int\n\t\tPort           int\n\t\tStreamSettings []byte\n\t}\n\terr = tx.Raw(`select id, port, stream_settings\n\tfrom inbounds\n\tWHERE protocol in ('vmess','vless','trojan')\n\t  AND json_extract(stream_settings, '$.security') = 'tls'\n\t  AND json_extract(stream_settings, '$.tlsSettings.settings.domains') IS NOT NULL`).Scan(&externalProxy).Error\n\tif err != nil || len(externalProxy) == 0 {\n\t\treturn\n\t}\n\n\tfor _, ep := range externalProxy {\n\t\tvar reverses interface{}\n\t\tvar stream map[string]interface{}\n\t\tjson.Unmarshal(ep.StreamSettings, &stream)\n\t\tif tlsSettings, ok := stream[\"tlsSettings\"].(map[string]interface{}); ok {\n\t\t\tif settings, ok := tlsSettings[\"settings\"].(map[string]interface{}); ok {\n\t\t\t\tif domains, ok := settings[\"domains\"].([]interface{}); ok {\n\t\t\t\t\tfor _, domain := range domains {\n\t\t\t\t\t\tif domainMap, ok := domain.(map[string]interface{}); ok {\n\t\t\t\t\t\t\tdomainMap[\"forceTls\"] = \"same\"\n\t\t\t\t\t\t\tdomainMap[\"port\"] = ep.Port\n\t\t\t\t\t\t\tdomainMap[\"dest\"] = domainMap[\"domain\"].(string)\n\t\t\t\t\t\t\tdelete(domainMap, \"domain\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treverses = settings[\"domains\"]\n\t\t\t\tdelete(settings, \"domains\")\n\t\t\t}\n\t\t}\n\t\tstream[\"externalProxy\"] = reverses\n\t\tnewStream, _ := json.MarshalIndent(stream, \" \", \"  \")\n\t\ttx.Model(model.Inbound{}).Where(\"id = ?\", ep.Id).Update(\"stream_settings\", newStream)\n\t}\n\n\terr = tx.Raw(`UPDATE inbounds\n\tSET tag = REPLACE(tag, '0.0.0.0:', '')\n\tWHERE INSTR(tag, '0.0.0.0:') > 0;`).Error\n\tif err != nil {\n\t\treturn\n\t}\n}\n\nfunc (s *InboundService) MigrateDB() {\n\ts.MigrationRequirements()\n\ts.MigrationRemoveOrphanedTraffics()\n}\n\nfunc (s *InboundService) GetOnlineClients() []string {\n\treturn p.GetOnlineClients()\n}"
  },
  {
    "path": "web/service/outbound.go",
    "content": "package service\n\nimport (\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/xray\"\n\n\t\"gorm.io/gorm\"\n)\n\ntype OutboundService struct{}\n\nfunc (s *OutboundService) AddTraffic(traffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (error, bool) {\n\tvar err error\n\tdb := database.GetDB()\n\ttx := db.Begin()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ttx.Rollback()\n\t\t} else {\n\t\t\ttx.Commit()\n\t\t}\n\t}()\n\n\terr = s.addOutboundTraffic(tx, traffics)\n\tif err != nil {\n\t\treturn err, false\n\t}\n\n\treturn nil, false\n}\n\nfunc (s *OutboundService) addOutboundTraffic(tx *gorm.DB, traffics []*xray.Traffic) error {\n\tif len(traffics) == 0 {\n\t\treturn nil\n\t}\n\n\tvar err error\n\n\tfor _, traffic := range traffics {\n\t\tif traffic.IsOutbound {\n\n\t\t\tvar outbound model.OutboundTraffics\n\n\t\t\terr = tx.Model(&model.OutboundTraffics{}).Where(\"tag = ?\", traffic.Tag).\n\t\t\t\tFirstOrCreate(&outbound).Error\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\toutbound.Tag = traffic.Tag\n\t\t\toutbound.Up = outbound.Up + traffic.Up\n\t\t\toutbound.Down = outbound.Down + traffic.Down\n\t\t\toutbound.Total = outbound.Up + outbound.Down\n\n\t\t\terr = tx.Save(&outbound).Error\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *OutboundService) GetOutboundsTraffic() ([]*model.OutboundTraffics, error) {\n\tdb := database.GetDB()\n\tvar traffics []*model.OutboundTraffics\n\n\terr := db.Model(model.OutboundTraffics{}).Find(&traffics).Error\n\tif err != nil {\n\t\tlogger.Warning(\"Error retrieving OutboundTraffics: \", err)\n\t\treturn nil, err\n\t}\n\n\treturn traffics, nil\n}\n\nfunc (s *OutboundService) ResetOutboundTraffic(tag string) error {\n\tdb := database.GetDB()\n\n\twhereText := \"tag \"\n\tif tag == \"-alltags-\" {\n\t\twhereText += \" <> ?\"\n\t} else {\n\t\twhereText += \" = ?\"\n\t}\n\n\tresult := db.Model(model.OutboundTraffics{}).\n\t\tWhere(whereText, tag).\n\t\tUpdates(map[string]interface{}{\"up\": 0, \"down\": 0, \"total\": 0})\n\n\terr := result.Error\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "web/service/panel.go",
    "content": "package service\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"x-ui/logger\"\n)\n\ntype PanelService struct{}\n\nfunc (s *PanelService) RestartPanel(delay time.Duration) error {\n\tp, err := os.FindProcess(syscall.Getpid())\n\tif err != nil {\n\t\treturn err\n\t}\n\tgo func() {\n\t\ttime.Sleep(delay)\n\t\terr := p.Signal(syscall.SIGHUP)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"failed to send SIGHUP signal:\", err)\n\t\t}\n\t}()\n\treturn nil\n}\n"
  },
  {
    "path": "web/service/server.go",
    "content": "package service\n\nimport (\n\t\"archive/zip\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/config\"\n\t\"x-ui/database\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/util/sys\"\n\t\"x-ui/xray\"\n\n\t\"github.com/shirou/gopsutil/v4/cpu\"\n\t\"github.com/shirou/gopsutil/v4/disk\"\n\t\"github.com/shirou/gopsutil/v4/host\"\n\t\"github.com/shirou/gopsutil/v4/load\"\n\t\"github.com/shirou/gopsutil/v4/mem\"\n\t\"github.com/shirou/gopsutil/v4/net\"\n)\n\ntype ProcessState string\n\nconst (\n\tRunning ProcessState = \"running\"\n\tStop    ProcessState = \"stop\"\n\tError   ProcessState = \"error\"\n)\n\ntype Status struct {\n\tT           time.Time `json:\"-\"`\n\tCpu         float64   `json:\"cpu\"`\n\tCpuCores    int       `json:\"cpuCores\"`\n\tLogicalPro  int       `json:\"logicalPro\"`\n\tCpuSpeedMhz float64   `json:\"cpuSpeedMhz\"`\n\tMem         struct {\n\t\tCurrent uint64 `json:\"current\"`\n\t\tTotal   uint64 `json:\"total\"`\n\t} `json:\"mem\"`\n\tSwap struct {\n\t\tCurrent uint64 `json:\"current\"`\n\t\tTotal   uint64 `json:\"total\"`\n\t} `json:\"swap\"`\n\tDisk struct {\n\t\tCurrent uint64 `json:\"current\"`\n\t\tTotal   uint64 `json:\"total\"`\n\t} `json:\"disk\"`\n\tXray struct {\n\t\tState    ProcessState `json:\"state\"`\n\t\tErrorMsg string       `json:\"errorMsg\"`\n\t\tVersion  string       `json:\"version\"`\n\t} `json:\"xray\"`\n\tUptime   uint64    `json:\"uptime\"`\n\tLoads    []float64 `json:\"loads\"`\n\tTcpCount int       `json:\"tcpCount\"`\n\tUdpCount int       `json:\"udpCount\"`\n\tNetIO    struct {\n\t\tUp   uint64 `json:\"up\"`\n\t\tDown uint64 `json:\"down\"`\n\t} `json:\"netIO\"`\n\tNetTraffic struct {\n\t\tSent uint64 `json:\"sent\"`\n\t\tRecv uint64 `json:\"recv\"`\n\t} `json:\"netTraffic\"`\n\tPublicIP struct {\n\t\tIPv4 string `json:\"ipv4\"`\n\t\tIPv6 string `json:\"ipv6\"`\n\t} `json:\"publicIP\"`\n\tAppStats struct {\n\t\tThreads uint32 `json:\"threads\"`\n\t\tMem     uint64 `json:\"mem\"`\n\t\tUptime  uint64 `json:\"uptime\"`\n\t} `json:\"appStats\"`\n}\n\ntype Release struct {\n\tTagName string `json:\"tag_name\"`\n}\n\ntype ServerService struct {\n\txrayService    XrayService\n\tinboundService InboundService\n}\n\nfunc getPublicIP(url string) string {\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\treturn \"N/A\"\n\t}\n\tdefer resp.Body.Close()\n\n\tip, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"N/A\"\n\t}\n\n\tipString := string(ip)\n\tif ipString == \"\" {\n\t\treturn \"N/A\"\n\t}\n\n\treturn ipString\n}\n\nfunc (s *ServerService) GetStatus(lastStatus *Status) *Status {\n\tnow := time.Now()\n\tstatus := &Status{\n\t\tT: now,\n\t}\n\n\tpercents, err := cpu.Percent(0, false)\n\tif err != nil {\n\t\tlogger.Warning(\"get cpu percent failed:\", err)\n\t} else {\n\t\tstatus.Cpu = percents[0]\n\t}\n\n\tstatus.CpuCores, err = cpu.Counts(false)\n\tif err != nil {\n\t\tlogger.Warning(\"get cpu cores count failed:\", err)\n\t}\n\n\tstatus.LogicalPro = runtime.NumCPU()\n\tif p != nil && p.IsRunning() {\n\t\tstatus.AppStats.Uptime = p.GetUptime()\n\t} else {\n\t\tstatus.AppStats.Uptime = 0\n\t}\n\n\tcpuInfos, err := cpu.Info()\n\tif err != nil {\n\t\tlogger.Warning(\"get cpu info failed:\", err)\n\t} else if len(cpuInfos) > 0 {\n\t\tcpuInfo := cpuInfos[0]\n\t\tstatus.CpuSpeedMhz = cpuInfo.Mhz // setting CPU speed in MHz\n\t} else {\n\t\tlogger.Warning(\"could not find cpu info\")\n\t}\n\n\tupTime, err := host.Uptime()\n\tif err != nil {\n\t\tlogger.Warning(\"get uptime failed:\", err)\n\t} else {\n\t\tstatus.Uptime = upTime\n\t}\n\n\tmemInfo, err := mem.VirtualMemory()\n\tif err != nil {\n\t\tlogger.Warning(\"get virtual memory failed:\", err)\n\t} else {\n\t\tstatus.Mem.Current = memInfo.Used\n\t\tstatus.Mem.Total = memInfo.Total\n\t}\n\n\tswapInfo, err := mem.SwapMemory()\n\tif err != nil {\n\t\tlogger.Warning(\"get swap memory failed:\", err)\n\t} else {\n\t\tstatus.Swap.Current = swapInfo.Used\n\t\tstatus.Swap.Total = swapInfo.Total\n\t}\n\n\tdistInfo, err := disk.Usage(\"/\")\n\tif err != nil {\n\t\tlogger.Warning(\"get dist usage failed:\", err)\n\t} else {\n\t\tstatus.Disk.Current = distInfo.Used\n\t\tstatus.Disk.Total = distInfo.Total\n\t}\n\n\tavgState, err := load.Avg()\n\tif err != nil {\n\t\tlogger.Warning(\"get load avg failed:\", err)\n\t} else {\n\t\tstatus.Loads = []float64{avgState.Load1, avgState.Load5, avgState.Load15}\n\t}\n\n\tioStats, err := net.IOCounters(false)\n\tif err != nil {\n\t\tlogger.Warning(\"get io counters failed:\", err)\n\t} else if len(ioStats) > 0 {\n\t\tioStat := ioStats[0]\n\t\tstatus.NetTraffic.Sent = ioStat.BytesSent\n\t\tstatus.NetTraffic.Recv = ioStat.BytesRecv\n\n\t\tif lastStatus != nil {\n\t\t\tduration := now.Sub(lastStatus.T)\n\t\t\tseconds := float64(duration) / float64(time.Second)\n\t\t\tup := uint64(float64(status.NetTraffic.Sent-lastStatus.NetTraffic.Sent) / seconds)\n\t\t\tdown := uint64(float64(status.NetTraffic.Recv-lastStatus.NetTraffic.Recv) / seconds)\n\t\t\tstatus.NetIO.Up = up\n\t\t\tstatus.NetIO.Down = down\n\t\t}\n\t} else {\n\t\tlogger.Warning(\"can not find io counters\")\n\t}\n\n\tstatus.TcpCount, err = sys.GetTCPCount()\n\tif err != nil {\n\t\tlogger.Warning(\"get tcp connections failed:\", err)\n\t}\n\n\tstatus.UdpCount, err = sys.GetUDPCount()\n\tif err != nil {\n\t\tlogger.Warning(\"get udp connections failed:\", err)\n\t}\n\n\tstatus.PublicIP.IPv4 = getPublicIP(\"https://api.ipify.org\")\n\tstatus.PublicIP.IPv6 = getPublicIP(\"https://api6.ipify.org\")\n\n\tif s.xrayService.IsXrayRunning() {\n\t\tstatus.Xray.State = Running\n\t\tstatus.Xray.ErrorMsg = \"\"\n\t} else {\n\t\terr := s.xrayService.GetXrayErr()\n\t\tif err != nil {\n\t\t\tstatus.Xray.State = Error\n\t\t} else {\n\t\t\tstatus.Xray.State = Stop\n\t\t}\n\t\tstatus.Xray.ErrorMsg = s.xrayService.GetXrayResult()\n\t}\n\tstatus.Xray.Version = s.xrayService.GetXrayVersion()\n\tvar rtm runtime.MemStats\n\truntime.ReadMemStats(&rtm)\n\n\tstatus.AppStats.Mem = rtm.Sys\n\tstatus.AppStats.Threads = uint32(runtime.NumGoroutine())\n\tif p != nil && p.IsRunning() {\n\t\tstatus.AppStats.Uptime = p.GetUptime()\n\t} else {\n\t\tstatus.AppStats.Uptime = 0\n\t}\n\n\treturn status\n}\n\nfunc (s *ServerService) GetXrayVersions() ([]string, error) {\n\turl := \"https://api.github.com/repos/XTLS/Xray-core/releases\"\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer resp.Body.Close()\n\tbuffer := bytes.NewBuffer(make([]byte, 8192))\n\tbuffer.Reset()\n\t_, err = buffer.ReadFrom(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treleases := make([]Release, 0)\n\terr = json.Unmarshal(buffer.Bytes(), &releases)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar versions []string\n\tfor _, release := range releases {\n\t\tif release.TagName >= \"v1.7.5\" {\n\t\t\tversions = append(versions, release.TagName)\n\t\t}\n\t}\n\treturn versions, nil\n}\n\nfunc (s *ServerService) StopXrayService() (string error) {\n\terr := s.xrayService.StopXray()\n\tif err != nil {\n\t\tlogger.Error(\"stop xray failed:\", err)\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (s *ServerService) RestartXrayService() (string error) {\n\ts.xrayService.StopXray()\n\tdefer func() {\n\t\terr := s.xrayService.RestartXray(true)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"start xray failed:\", err)\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (s *ServerService) downloadXRay(version string) (string, error) {\n\tosName := runtime.GOOS\n\tarch := runtime.GOARCH\n\n\tswitch osName {\n\tcase \"darwin\":\n\t\tosName = \"macos\"\n\t}\n\n\tswitch arch {\n\tcase \"amd64\":\n\t\tarch = \"64\"\n\tcase \"arm64\":\n\t\tarch = \"arm64-v8a\"\n\tcase \"armv7\":\n\t\tarch = \"arm32-v7a\"\n\tcase \"armv6\":\n\t\tarch = \"arm32-v6\"\n\tcase \"armv5\":\n\t\tarch = \"arm32-v5\"\n\tcase \"386\":\n\t\tarch = \"32\"\n\tcase \"s390x\":\n\t\tarch = \"s390x\"\n\t}\n\n\tfileName := fmt.Sprintf(\"Xray-%s-%s.zip\", osName, arch)\n\turl := fmt.Sprintf(\"https://github.com/XTLS/Xray-core/releases/download/%s/%s\", version, fileName)\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tos.Remove(fileName)\n\tfile, err := os.Create(fileName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer file.Close()\n\n\t_, err = io.Copy(file, resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn fileName, nil\n}\n\nfunc (s *ServerService) UpdateXray(version string) error {\n\tzipFileName, err := s.downloadXRay(version)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tzipFile, err := os.Open(zipFileName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tzipFile.Close()\n\t\tos.Remove(zipFileName)\n\t}()\n\n\tstat, err := zipFile.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\treader, err := zip.NewReader(zipFile, stat.Size())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.xrayService.StopXray()\n\tdefer func() {\n\t\terr := s.xrayService.RestartXray(true)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"start xray failed:\", err)\n\t\t}\n\t}()\n\n\tcopyZipFile := func(zipName string, fileName string) error {\n\t\tzipFile, err := reader.Open(zipName)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tos.Remove(fileName)\n\t\tfile, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR|os.O_TRUNC, fs.ModePerm)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer file.Close()\n\t\t_, err = io.Copy(file, zipFile)\n\t\treturn err\n\t}\n\n\terr = copyZipFile(\"xray\", xray.GetBinaryPath())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (s *ServerService) GetLogs(count string, level string, syslog string) []string {\n\tc, _ := strconv.Atoi(count)\n\tvar lines []string\n\n\tif syslog == \"true\" {\n\t\tcmdArgs := []string{\"journalctl\", \"-u\", \"x-ui\", \"--no-pager\", \"-n\", count, \"-p\", level}\n\t\t// Run the command\n\t\tcmd := exec.Command(cmdArgs[0], cmdArgs[1:]...)\n\t\tvar out bytes.Buffer\n\t\tcmd.Stdout = &out\n\t\terr := cmd.Run()\n\t\tif err != nil {\n\t\t\treturn []string{\"Failed to run journalctl command!\"}\n\t\t}\n\t\tlines = strings.Split(out.String(), \"\\n\")\n\t} else {\n\t\tlines = logger.GetLogs(c, level)\n\t}\n\n\treturn lines\n}\n\nfunc (s *ServerService) GetConfigJson() (interface{}, error) {\n\tconfig, err := s.xrayService.GetXrayConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcontents, err := json.MarshalIndent(config, \"\", \"  \")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar jsonData interface{}\n\terr = json.Unmarshal(contents, &jsonData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn jsonData, nil\n}\n\nfunc (s *ServerService) GetDb() ([]byte, error) {\n\t// Update by manually trigger a checkpoint operation\n\terr := database.Checkpoint()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Open the file for reading\n\tfile, err := os.Open(config.GetDBPath())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\n\t// Read the file contents\n\tfileContents, err := io.ReadAll(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn fileContents, nil\n}\n\nfunc (s *ServerService) ImportDB(file multipart.File) error {\n\t// Check if the file is a SQLite database\n\tisValidDb, err := database.IsSQLiteDB(file)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error checking db file format: %v\", err)\n\t}\n\tif !isValidDb {\n\t\treturn common.NewError(\"Invalid db file format\")\n\t}\n\n\t// Reset the file reader to the beginning\n\t_, err = file.Seek(0, 0)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error resetting file reader: %v\", err)\n\t}\n\n\t// Save the file as temporary file\n\ttempPath := fmt.Sprintf(\"%s.temp\", config.GetDBPath())\n\t// Remove the existing fallback file (if any) before creating one\n\t_, err = os.Stat(tempPath)\n\tif err == nil {\n\t\terrRemove := os.Remove(tempPath)\n\t\tif errRemove != nil {\n\t\t\treturn common.NewErrorf(\"Error removing existing temporary db file: %v\", errRemove)\n\t\t}\n\t}\n\t// Create the temporary file\n\ttempFile, err := os.Create(tempPath)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error creating temporary db file: %v\", err)\n\t}\n\tdefer tempFile.Close()\n\n\t// Remove temp file before returning\n\tdefer os.Remove(tempPath)\n\n\t// Save uploaded file to temporary file\n\t_, err = io.Copy(tempFile, file)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error saving db: %v\", err)\n\t}\n\n\t// Check if we can init db or not\n\terr = database.InitDB(tempPath)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error checking db: %v\", err)\n\t}\n\n\t// Stop Xray\n\ts.StopXrayService()\n\n\t// Backup the current database for fallback\n\tfallbackPath := fmt.Sprintf(\"%s.backup\", config.GetDBPath())\n\t// Remove the existing fallback file (if any)\n\t_, err = os.Stat(fallbackPath)\n\tif err == nil {\n\t\terrRemove := os.Remove(fallbackPath)\n\t\tif errRemove != nil {\n\t\t\treturn common.NewErrorf(\"Error removing existing fallback db file: %v\", errRemove)\n\t\t}\n\t}\n\t// Move the current database to the fallback location\n\terr = os.Rename(config.GetDBPath(), fallbackPath)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Error backing up temporary db file: %v\", err)\n\t}\n\n\t// Remove the temporary file before returning\n\tdefer os.Remove(fallbackPath)\n\n\t// Move temp to DB path\n\terr = os.Rename(tempPath, config.GetDBPath())\n\tif err != nil {\n\t\terrRename := os.Rename(fallbackPath, config.GetDBPath())\n\t\tif errRename != nil {\n\t\t\treturn common.NewErrorf(\"Error moving db file and restoring fallback: %v\", errRename)\n\t\t}\n\t\treturn common.NewErrorf(\"Error moving db file: %v\", err)\n\t}\n\n\t// Migrate DB\n\terr = database.InitDB(config.GetDBPath())\n\tif err != nil {\n\t\terrRename := os.Rename(fallbackPath, config.GetDBPath())\n\t\tif errRename != nil {\n\t\t\treturn common.NewErrorf(\"Error migrating db and restoring fallback: %v\", errRename)\n\t\t}\n\t\treturn common.NewErrorf(\"Error migrating db: %v\", err)\n\t}\n\ts.inboundService.MigrateDB()\n\n\t// Start Xray\n\terr = s.RestartXrayService()\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Imported DB but Failed to start Xray: %v\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (s *ServerService) GetNewX25519Cert() (interface{}, error) {\n\t// Run the command\n\tcmd := exec.Command(xray.GetBinaryPath(), \"x25519\")\n\tvar out bytes.Buffer\n\tcmd.Stdout = &out\n\terr := cmd.Run()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlines := strings.Split(out.String(), \"\\n\")\n\n\tprivateKeyLine := strings.Split(lines[0], \":\")\n\tpublicKeyLine := strings.Split(lines[1], \":\")\n\n\tprivateKey := strings.TrimSpace(privateKeyLine[1])\n\tpublicKey := strings.TrimSpace(publicKeyLine[1])\n\n\tkeyPair := map[string]interface{}{\n\t\t\"privateKey\": privateKey,\n\t\t\"publicKey\":  publicKey,\n\t}\n\n\treturn keyPair, nil\n}\n"
  },
  {
    "path": "web/service/setting.go",
    "content": "package service\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/util/random\"\n\t\"x-ui/util/reflect_util\"\n\t\"x-ui/web/entity\"\n\t\"x-ui/xray\"\n)\n\n//go:embed config.json\nvar xrayTemplateConfig string\n\nvar defaultValueMap = map[string]string{\n\t\"xrayTemplateConfig\": xrayTemplateConfig,\n\t\"webListen\":          \"\",\n\t\"webDomain\":          \"\",\n\t\"webPort\":            \"2053\",\n\t\"webCertFile\":        \"\",\n\t\"webKeyFile\":         \"\",\n\t\"secret\":             random.Seq(32),\n\t\"webBasePath\":        \"/\",\n\t\"sessionMaxAge\":      \"0\",\n\t\"pageSize\":           \"50\",\n\t\"expireDiff\":         \"0\",\n\t\"trafficDiff\":        \"0\",\n\t\"remarkModel\":        \"-ieo\",\n\t\"timeLocation\":       \"Asia/Shanghai\",\n\t\"tgBotEnable\":        \"false\",\n\t\"tgBotToken\":         \"\",\n\t\"tgBotProxy\":         \"\",\n\t\"tgBotChatId\":        \"\",\n\t\"tgRunTime\":          \"@daily\",\n\t\"tgBotBackup\":        \"false\",\n\t\"tgBotLoginNotify\":   \"true\",\n\t\"tgCpu\":              \"0\",\n\t\"tgLang\":             \"zh-Hans\",\n\t\"secretEnable\":       \"false\",\n\t\"subEnable\":          \"false\",\n\t\"subListen\":          \"\",\n\t\"subPort\":            \"2096\",\n\t\"subPath\":            \"/sub/\",\n\t\"subDomain\":          \"\",\n\t\"subCertFile\":        \"\",\n\t\"subKeyFile\":         \"\",\n\t\"subUpdates\":         \"12\",\n\t\"subEncrypt\":         \"true\",\n\t\"subShowInfo\":        \"true\",\n\t\"subURI\":             \"\",\n\t\"subJsonPath\":        \"/json/\",\n\t\"subJsonURI\":         \"\",\n\t\"subJsonFragment\":    \"\",\n\t\"subJsonMux\":         \"\",\n\t\"subJsonRules\":       \"\",\n\t\"datepicker\":         \"gregorian\",\n\t\"warp\":               \"\",\n}\n\ntype SettingService struct{}\n\nfunc (s *SettingService) GetDefaultJsonConfig() (interface{}, error) {\n\tvar jsonData interface{}\n\terr := json.Unmarshal([]byte(xrayTemplateConfig), &jsonData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn jsonData, nil\n}\n\nfunc (s *SettingService) GetAllSetting() (*entity.AllSetting, error) {\n\tdb := database.GetDB()\n\tsettings := make([]*model.Setting, 0)\n\terr := db.Model(model.Setting{}).Not(\"key = ?\", \"xrayTemplateConfig\").Find(&settings).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tallSetting := &entity.AllSetting{}\n\tt := reflect.TypeOf(allSetting).Elem()\n\tv := reflect.ValueOf(allSetting).Elem()\n\tfields := reflect_util.GetFields(t)\n\n\tsetSetting := func(key, value string) (err error) {\n\t\tdefer func() {\n\t\t\tpanicErr := recover()\n\t\t\tif panicErr != nil {\n\t\t\t\terr = errors.New(fmt.Sprint(panicErr))\n\t\t\t}\n\t\t}()\n\n\t\tvar found bool\n\t\tvar field reflect.StructField\n\t\tfor _, f := range fields {\n\t\t\tif f.Tag.Get(\"json\") == key {\n\t\t\t\tfield = f\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif !found {\n\t\t\t// Some settings are automatically generated, no need to return to the front end to modify the user\n\t\t\treturn nil\n\t\t}\n\n\t\tfieldV := v.FieldByName(field.Name)\n\t\tswitch t := fieldV.Interface().(type) {\n\t\tcase int:\n\t\t\tn, err := strconv.ParseInt(value, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfieldV.SetInt(n)\n\t\tcase string:\n\t\t\tfieldV.SetString(value)\n\t\tcase bool:\n\t\t\tfieldV.SetBool(value == \"true\")\n\t\tdefault:\n\t\t\treturn common.NewErrorf(\"unknown field %v type %v\", key, t)\n\t\t}\n\t\treturn\n\t}\n\n\tkeyMap := map[string]bool{}\n\tfor _, setting := range settings {\n\t\terr := setSetting(setting.Key, setting.Value)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkeyMap[setting.Key] = true\n\t}\n\n\tfor key, value := range defaultValueMap {\n\t\tif keyMap[key] {\n\t\t\tcontinue\n\t\t}\n\t\terr := setSetting(key, value)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn allSetting, nil\n}\n\nfunc (s *SettingService) ResetSettings() error {\n\tdb := database.GetDB()\n\terr := db.Where(\"1 = 1\").Delete(model.Setting{}).Error\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn db.Model(model.User{}).\n\t\tWhere(\"1 = 1\").\n\t\tUpdate(\"login_secret\", \"\").Error\n}\n\nfunc (s *SettingService) getSetting(key string) (*model.Setting, error) {\n\tdb := database.GetDB()\n\tsetting := &model.Setting{}\n\terr := db.Model(model.Setting{}).Where(\"key = ?\", key).First(setting).Error\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn setting, nil\n}\n\nfunc (s *SettingService) saveSetting(key string, value string) error {\n\tsetting, err := s.getSetting(key)\n\tdb := database.GetDB()\n\tif database.IsNotFound(err) {\n\t\treturn db.Create(&model.Setting{\n\t\t\tKey:   key,\n\t\t\tValue: value,\n\t\t}).Error\n\t} else if err != nil {\n\t\treturn err\n\t}\n\tsetting.Key = key\n\tsetting.Value = value\n\treturn db.Save(setting).Error\n}\n\nfunc (s *SettingService) getString(key string) (string, error) {\n\tsetting, err := s.getSetting(key)\n\tif database.IsNotFound(err) {\n\t\tvalue, ok := defaultValueMap[key]\n\t\tif !ok {\n\t\t\treturn \"\", common.NewErrorf(\"key <%v> not in defaultValueMap\", key)\n\t\t}\n\t\treturn value, nil\n\t} else if err != nil {\n\t\treturn \"\", err\n\t}\n\treturn setting.Value, nil\n}\n\nfunc (s *SettingService) setString(key string, value string) error {\n\treturn s.saveSetting(key, value)\n}\n\nfunc (s *SettingService) getBool(key string) (bool, error) {\n\tstr, err := s.getString(key)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn strconv.ParseBool(str)\n}\n\nfunc (s *SettingService) setBool(key string, value bool) error {\n\treturn s.setString(key, strconv.FormatBool(value))\n}\n\nfunc (s *SettingService) getInt(key string) (int, error) {\n\tstr, err := s.getString(key)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn strconv.Atoi(str)\n}\n\nfunc (s *SettingService) setInt(key string, value int) error {\n\treturn s.setString(key, strconv.Itoa(value))\n}\n\nfunc (s *SettingService) GetXrayConfigTemplate() (string, error) {\n\treturn s.getString(\"xrayTemplateConfig\")\n}\n\nfunc (s *SettingService) GetListen() (string, error) {\n\treturn s.getString(\"webListen\")\n}\n\nfunc (s *SettingService) GetWebDomain() (string, error) {\n\treturn s.getString(\"webDomain\")\n}\n\nfunc (s *SettingService) GetTgBotToken() (string, error) {\n\treturn s.getString(\"tgBotToken\")\n}\n\nfunc (s *SettingService) SetTgBotToken(token string) error {\n\treturn s.setString(\"tgBotToken\", token)\n}\n\nfunc (s *SettingService) GetTgBotProxy() (string, error) {\n\treturn s.getString(\"tgBotProxy\")\n}\n\nfunc (s *SettingService) SetTgBotProxy(token string) error {\n\treturn s.setString(\"tgBotProxy\", token)\n}\n\nfunc (s *SettingService) GetTgBotChatId() (string, error) {\n\treturn s.getString(\"tgBotChatId\")\n}\n\nfunc (s *SettingService) SetTgBotChatId(chatIds string) error {\n\treturn s.setString(\"tgBotChatId\", chatIds)\n}\n\nfunc (s *SettingService) GetTgbotEnabled() (bool, error) {\n\treturn s.getBool(\"tgBotEnable\")\n}\n\nfunc (s *SettingService) SetTgbotEnabled(value bool) error {\n\treturn s.setBool(\"tgBotEnable\", value)\n}\n\nfunc (s *SettingService) GetTgbotRuntime() (string, error) {\n\treturn s.getString(\"tgRunTime\")\n}\n\nfunc (s *SettingService) SetTgbotRuntime(time string) error {\n\treturn s.setString(\"tgRunTime\", time)\n}\n\nfunc (s *SettingService) GetTgBotBackup() (bool, error) {\n\treturn s.getBool(\"tgBotBackup\")\n}\n\nfunc (s *SettingService) GetTgBotLoginNotify() (bool, error) {\n\treturn s.getBool(\"tgBotLoginNotify\")\n}\n\nfunc (s *SettingService) GetTgCpu() (int, error) {\n\treturn s.getInt(\"tgCpu\")\n}\n\nfunc (s *SettingService) GetTgLang() (string, error) {\n\treturn s.getString(\"tgLang\")\n}\n\nfunc (s *SettingService) GetPort() (int, error) {\n\treturn s.getInt(\"webPort\")\n}\n\nfunc (s *SettingService) SetPort(port int) error {\n\treturn s.setInt(\"webPort\", port)\n}\n\nfunc (s *SettingService) SetCertFile(webCertFile string) error {\n\treturn s.setString(\"webCertFile\", webCertFile)\n}\n\nfunc (s *SettingService) GetCertFile() (string, error) {\n\treturn s.getString(\"webCertFile\")\n}\n\nfunc (s *SettingService) SetKeyFile(webKeyFile string) error {\n\treturn s.setString(\"webKeyFile\", webKeyFile)\n}\n\nfunc (s *SettingService) GetKeyFile() (string, error) {\n\treturn s.getString(\"webKeyFile\")\n}\n\nfunc (s *SettingService) GetExpireDiff() (int, error) {\n\treturn s.getInt(\"expireDiff\")\n}\n\nfunc (s *SettingService) GetTrafficDiff() (int, error) {\n\treturn s.getInt(\"trafficDiff\")\n}\n\nfunc (s *SettingService) GetSessionMaxAge() (int, error) {\n\treturn s.getInt(\"sessionMaxAge\")\n}\n\nfunc (s *SettingService) GetRemarkModel() (string, error) {\n\treturn s.getString(\"remarkModel\")\n}\n\nfunc (s *SettingService) GetSecretStatus() (bool, error) {\n\treturn s.getBool(\"secretEnable\")\n}\n\nfunc (s *SettingService) SetSecretStatus(value bool) error {\n\treturn s.setBool(\"secretEnable\", value)\n}\n\nfunc (s *SettingService) GetSecret() ([]byte, error) {\n\tsecret, err := s.getString(\"secret\")\n\tif secret == defaultValueMap[\"secret\"] {\n\t\terr := s.saveSetting(\"secret\", secret)\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"save secret failed:\", err)\n\t\t}\n\t}\n\treturn []byte(secret), err\n}\n\nfunc (s *SettingService) SetBasePath(basePath string) error {\n\tif !strings.HasPrefix(basePath, \"/\") {\n\t\tbasePath = \"/\" + basePath\n\t}\n\tif !strings.HasSuffix(basePath, \"/\") {\n\t\tbasePath += \"/\"\n\t}\n\treturn s.setString(\"webBasePath\", basePath)\n}\n\nfunc (s *SettingService) GetBasePath() (string, error) {\n\tbasePath, err := s.getString(\"webBasePath\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif !strings.HasPrefix(basePath, \"/\") {\n\t\tbasePath = \"/\" + basePath\n\t}\n\tif !strings.HasSuffix(basePath, \"/\") {\n\t\tbasePath += \"/\"\n\t}\n\treturn basePath, nil\n}\n\nfunc (s *SettingService) GetTimeLocation() (*time.Location, error) {\n\tl, err := s.getString(\"timeLocation\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlocation, err := time.LoadLocation(l)\n\tif err != nil {\n\t\tdefaultLocation := defaultValueMap[\"timeLocation\"]\n\t\tlogger.Errorf(\"location <%v> not exist, using default location: %v\", l, defaultLocation)\n\t\treturn time.LoadLocation(defaultLocation)\n\t}\n\treturn location, nil\n}\n\nfunc (s *SettingService) GetSubEnable() (bool, error) {\n\treturn s.getBool(\"subEnable\")\n}\n\nfunc (s *SettingService) GetSubListen() (string, error) {\n\treturn s.getString(\"subListen\")\n}\n\nfunc (s *SettingService) GetSubPort() (int, error) {\n\treturn s.getInt(\"subPort\")\n}\n\nfunc (s *SettingService) GetSubPath() (string, error) {\n\treturn s.getString(\"subPath\")\n}\n\nfunc (s *SettingService) GetSubJsonPath() (string, error) {\n\treturn s.getString(\"subJsonPath\")\n}\n\nfunc (s *SettingService) GetSubDomain() (string, error) {\n\treturn s.getString(\"subDomain\")\n}\n\nfunc (s *SettingService) GetSubCertFile() (string, error) {\n\treturn s.getString(\"subCertFile\")\n}\n\nfunc (s *SettingService) GetSubKeyFile() (string, error) {\n\treturn s.getString(\"subKeyFile\")\n}\n\nfunc (s *SettingService) GetSubUpdates() (string, error) {\n\treturn s.getString(\"subUpdates\")\n}\n\nfunc (s *SettingService) GetSubEncrypt() (bool, error) {\n\treturn s.getBool(\"subEncrypt\")\n}\n\nfunc (s *SettingService) GetSubShowInfo() (bool, error) {\n\treturn s.getBool(\"subShowInfo\")\n}\n\nfunc (s *SettingService) GetPageSize() (int, error) {\n\treturn s.getInt(\"pageSize\")\n}\n\nfunc (s *SettingService) GetSubURI() (string, error) {\n\treturn s.getString(\"subURI\")\n}\n\nfunc (s *SettingService) GetSubJsonURI() (string, error) {\n\treturn s.getString(\"subJsonURI\")\n}\n\nfunc (s *SettingService) GetSubJsonFragment() (string, error) {\n\treturn s.getString(\"subJsonFragment\")\n}\n\nfunc (s *SettingService) GetSubJsonMux() (string, error) {\n\treturn s.getString(\"subJsonMux\")\n}\n\nfunc (s *SettingService) GetSubJsonRules() (string, error) {\n\treturn s.getString(\"subJsonRules\")\n}\n\nfunc (s *SettingService) GetDatepicker() (string, error) {\n\treturn s.getString(\"datepicker\")\n}\n\nfunc (s *SettingService) GetWarp() (string, error) {\n\treturn s.getString(\"warp\")\n}\n\nfunc (s *SettingService) SetWarp(data string) error {\n\treturn s.setString(\"warp\", data)\n}\n\nfunc (s *SettingService) GetIpLimitEnable() (bool, error) {\n\taccessLogPath, err := xray.GetAccessLogPath()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn (accessLogPath != \"none\" && accessLogPath != \"\"), nil\n}\n\nfunc (s *SettingService) UpdateAllSetting(allSetting *entity.AllSetting) error {\n\tif err := allSetting.CheckValid(); err != nil {\n\t\treturn err\n\t}\n\n\tv := reflect.ValueOf(allSetting).Elem()\n\tt := reflect.TypeOf(allSetting).Elem()\n\tfields := reflect_util.GetFields(t)\n\terrs := make([]error, 0)\n\tfor _, field := range fields {\n\t\tkey := field.Tag.Get(\"json\")\n\t\tfieldV := v.FieldByName(field.Name)\n\t\tvalue := fmt.Sprint(fieldV.Interface())\n\t\terr := s.saveSetting(key, value)\n\t\tif err != nil {\n\t\t\terrs = append(errs, err)\n\t\t}\n\t}\n\treturn common.Combine(errs...)\n}\n\nfunc (s *SettingService) GetDefaultXrayConfig() (interface{}, error) {\n\tvar jsonData interface{}\n\terr := json.Unmarshal([]byte(xrayTemplateConfig), &jsonData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn jsonData, nil\n}\n\nfunc (s *SettingService) GetDefaultSettings(host string) (interface{}, error) {\n\ttype settingFunc func() (interface{}, error)\n\tsettings := map[string]settingFunc{\n\t\t\"expireDiff\":    func() (interface{}, error) { return s.GetExpireDiff() },\n\t\t\"trafficDiff\":   func() (interface{}, error) { return s.GetTrafficDiff() },\n\t\t\"pageSize\":      func() (interface{}, error) { return s.GetPageSize() },\n\t\t\"defaultCert\":   func() (interface{}, error) { return s.GetCertFile() },\n\t\t\"defaultKey\":    func() (interface{}, error) { return s.GetKeyFile() },\n\t\t\"tgBotEnable\":   func() (interface{}, error) { return s.GetTgbotEnabled() },\n\t\t\"subEnable\":     func() (interface{}, error) { return s.GetSubEnable() },\n\t\t\"subURI\":        func() (interface{}, error) { return s.GetSubURI() },\n\t\t\"subJsonURI\":    func() (interface{}, error) { return s.GetSubJsonURI() },\n\t\t\"remarkModel\":   func() (interface{}, error) { return s.GetRemarkModel() },\n\t\t\"datepicker\":    func() (interface{}, error) { return s.GetDatepicker() },\n\t\t\"ipLimitEnable\": func() (interface{}, error) { return s.GetIpLimitEnable() },\n\t}\n\n\tresult := make(map[string]interface{})\n\n\tfor key, fn := range settings {\n\t\tvalue, err := fn()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tresult[key] = value\n\t}\n\n\tif result[\"subEnable\"].(bool) && (result[\"subURI\"].(string) == \"\" || result[\"subJsonURI\"].(string) == \"\") {\n\t\tsubURI := \"\"\n\t\tsubPort, _ := s.GetSubPort()\n\t\tsubPath, _ := s.GetSubPath()\n\t\tsubJsonPath, _ := s.GetSubJsonPath()\n\t\tsubDomain, _ := s.GetSubDomain()\n\t\tsubKeyFile, _ := s.GetSubKeyFile()\n\t\tsubCertFile, _ := s.GetSubCertFile()\n\t\tsubTLS := false\n\t\tif subKeyFile != \"\" && subCertFile != \"\" {\n\t\t\tsubTLS = true\n\t\t}\n\t\tif subDomain == \"\" {\n\t\t\tsubDomain = strings.Split(host, \":\")[0]\n\t\t}\n\t\tif subTLS {\n\t\t\tsubURI = \"https://\"\n\t\t} else {\n\t\t\tsubURI = \"http://\"\n\t\t}\n\t\tif (subPort == 443 && subTLS) || (subPort == 80 && !subTLS) {\n\t\t\tsubURI += subDomain\n\t\t} else {\n\t\t\tsubURI += fmt.Sprintf(\"%s:%d\", subDomain, subPort)\n\t\t}\n\t\tif result[\"subURI\"].(string) == \"\" {\n\t\t\tresult[\"subURI\"] = subURI + subPath\n\t\t}\n\t\tif result[\"subJsonURI\"].(string) == \"\" {\n\t\t\tresult[\"subJsonURI\"] = subURI + subJsonPath\n\t\t}\n\t}\n\n\treturn result, nil\n}\n"
  },
  {
    "path": "web/service/tgbot.go",
    "content": "package service\n\nimport (\n\t\"embed\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/url\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/config\"\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/web/global\"\n\t\"x-ui/web/locale\"\n\t\"x-ui/xray\"\n\n\t\"github.com/mymmrac/telego\"\n\tth \"github.com/mymmrac/telego/telegohandler\"\n\ttu \"github.com/mymmrac/telego/telegoutil\"\n\t\"github.com/valyala/fasthttp\"\n\t\"github.com/valyala/fasthttp/fasthttpproxy\"\n)\n\nvar (\n\tbot         *telego.Bot\n\tbotHandler  *th.BotHandler\n\tadminIds    []int64\n\tisRunning   bool\n\thostname    string\n\thashStorage *global.HashStorage\n)\n\ntype LoginStatus byte\n\nconst (\n\tLoginSuccess        LoginStatus = 1\n\tLoginFail           LoginStatus = 0\n\tEmptyTelegramUserID             = int64(0)\n)\n\ntype Tgbot struct {\n\tinboundService InboundService\n\tsettingService SettingService\n\tserverService  ServerService\n\txrayService    XrayService\n\tlastStatus     *Status\n}\n\nfunc (t *Tgbot) NewTgbot() *Tgbot {\n\treturn new(Tgbot)\n}\n\nfunc (t *Tgbot) I18nBot(name string, params ...string) string {\n\treturn locale.I18n(locale.Bot, name, params...)\n}\n\nfunc (t *Tgbot) GetHashStorage() *global.HashStorage {\n\treturn hashStorage\n}\n\nfunc (t *Tgbot) Start(i18nFS embed.FS) error {\n\t// Initialize localizer\n\terr := locale.InitLocalizer(i18nFS, &t.settingService)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Initialize hash storage to store callback queries\n\thashStorage = global.NewHashStorage(20 * time.Minute)\n\n\tt.SetHostname()\n\n\t// Get Telegram bot token\n\ttgBotToken, err := t.settingService.GetTgBotToken()\n\tif err != nil || tgBotToken == \"\" {\n\t\tlogger.Warning(\"Failed to get Telegram bot token:\", err)\n\t\treturn err\n\t}\n\n\t// Get Telegram bot chat ID(s)\n\ttgBotID, err := t.settingService.GetTgBotChatId()\n\tif err != nil {\n\t\tlogger.Warning(\"Failed to get Telegram bot chat ID:\", err)\n\t\treturn err\n\t}\n\n\t// Parse admin IDs from comma-separated string\n\tif tgBotID != \"\" {\n\t\tfor _, adminID := range strings.Split(tgBotID, \",\") {\n\t\t\tid, err := strconv.Atoi(adminID)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warning(\"Failed to parse admin ID from Telegram bot chat ID:\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tadminIds = append(adminIds, int64(id))\n\t\t}\n\t}\n\n\t// Get Telegram bot proxy URL\n\ttgBotProxy, err := t.settingService.GetTgBotProxy()\n\tif err != nil {\n\t\tlogger.Warning(\"Failed to get Telegram bot proxy URL:\", err)\n\t}\n\n\t// Create new Telegram bot instance\n\tbot, err = t.NewBot(tgBotToken, tgBotProxy)\n\tif err != nil {\n\t\tlogger.Error(\"Failed to initialize Telegram bot API:\", err)\n\t\treturn err\n\t}\n\n\t// Start receiving Telegram bot messages\n\tif !isRunning {\n\t\tlogger.Info(\"Telegram bot receiver started\")\n\t\tgo t.OnReceive()\n\t\tisRunning = true\n\t}\n\n\treturn nil\n}\n\nfunc (t *Tgbot) NewBot(token string, proxyUrl string) (*telego.Bot, error) {\n\tif proxyUrl == \"\" {\n\t\t// No proxy URL provided, use default instance\n\t\treturn telego.NewBot(token)\n\t}\n\n\tif !strings.HasPrefix(proxyUrl, \"socks5://\") {\n\t\tlogger.Warning(\"Invalid socks5 URL, starting with default\")\n\t\treturn telego.NewBot(token)\n\t}\n\n\t_, err := url.Parse(proxyUrl)\n\tif err != nil {\n\t\tlogger.Warning(\"Can't parse proxy URL, using default instance for tgbot:\", err)\n\t\treturn telego.NewBot(token)\n\t}\n\n\treturn telego.NewBot(token, telego.WithFastHTTPClient(&fasthttp.Client{\n\t\tDial: fasthttpproxy.FasthttpSocksDialer(proxyUrl),\n\t}))\n}\n\nfunc (t *Tgbot) IsRunning() bool {\n\treturn isRunning\n}\n\nfunc (t *Tgbot) SetHostname() {\n\thost, err := os.Hostname()\n\tif err != nil {\n\t\tlogger.Error(\"get hostname error:\", err)\n\t\thostname = \"\"\n\t\treturn\n\t}\n\thostname = host\n}\n\nfunc (t *Tgbot) Stop() {\n\tbotHandler.Stop()\n\tbot.StopLongPolling()\n\tlogger.Info(\"Stop Telegram receiver ...\")\n\tisRunning = false\n\tadminIds = nil\n}\n\nfunc (t *Tgbot) encodeQuery(query string) string {\n\t// NOTE: we only need to hash for more than 64 chars\n\tif len(query) <= 64 {\n\t\treturn query\n\t}\n\n\treturn hashStorage.SaveHash(query)\n}\n\nfunc (t *Tgbot) decodeQuery(query string) (string, error) {\n\tif !hashStorage.IsMD5(query) {\n\t\treturn query, nil\n\t}\n\n\tdecoded, exists := hashStorage.GetValue(query)\n\tif !exists {\n\t\treturn \"\", common.NewError(\"hash not found in storage!\")\n\t}\n\n\treturn decoded, nil\n}\n\nfunc (t *Tgbot) OnReceive() {\n\tparams := telego.GetUpdatesParams{\n\t\tTimeout: 10,\n\t}\n\n\tupdates, _ := bot.UpdatesViaLongPolling(&params)\n\n\tbotHandler, _ = th.NewBotHandler(bot, updates)\n\n\tbotHandler.HandleMessage(func(_ *telego.Bot, message telego.Message) {\n\t\tt.SendMsgToTgbot(message.Chat.ID, t.I18nBot(\"tgbot.keyboardClosed\"), tu.ReplyKeyboardRemove())\n\t}, th.TextEqual(t.I18nBot(\"tgbot.buttons.closeKeyboard\")))\n\n\tbotHandler.HandleMessage(func(_ *telego.Bot, message telego.Message) {\n\t\tt.answerCommand(&message, message.Chat.ID, checkAdmin(message.From.ID))\n\t}, th.AnyCommand())\n\n\tbotHandler.HandleCallbackQuery(func(_ *telego.Bot, query telego.CallbackQuery) {\n\t\tt.answerCallback(&query, checkAdmin(query.From.ID))\n\t}, th.AnyCallbackQueryWithMessage())\n\n\tbotHandler.HandleMessage(func(_ *telego.Bot, message telego.Message) {\n\t\tif message.UsersShared != nil {\n\t\t\tif checkAdmin(message.From.ID) {\n\t\t\t\tfor _, sharedUser := range message.UsersShared.Users {\n\t\t\t\t\tuserID := sharedUser.UserID\n\t\t\t\t\tneedRestart, err := t.inboundService.SetClientTelegramUserID(message.UsersShared.RequestID, userID)\n\t\t\t\t\tif needRestart {\n\t\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t\t}\n\t\t\t\t\toutput := \"\"\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\toutput += t.I18nBot(\"tgbot.messages.selectUserFailed\")\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput += t.I18nBot(\"tgbot.messages.userSaved\")\n\t\t\t\t\t}\n\t\t\t\t\tt.SendMsgToTgbot(message.Chat.ID, output, tu.ReplyKeyboardRemove())\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tt.SendMsgToTgbot(message.Chat.ID, t.I18nBot(\"tgbot.noResult\"), tu.ReplyKeyboardRemove())\n\t\t\t}\n\t\t}\n\t}, th.AnyMessage())\n\n\tbotHandler.Start()\n}\n\nfunc (t *Tgbot) answerCommand(message *telego.Message, chatId int64, isAdmin bool) {\n\tmsg, onlyMessage := \"\", false\n\n\tcommand, _, commandArgs := tu.ParseCommand(message.Text)\n\n\t// Extract the command from the Message.\n\tswitch command {\n\tcase \"help\":\n\t\tmsg += t.I18nBot(\"tgbot.commands.help\")\n\t\tmsg += t.I18nBot(\"tgbot.commands.pleaseChoose\")\n\tcase \"start\":\n\t\tmsg += t.I18nBot(\"tgbot.commands.start\", \"Firstname==\"+message.From.FirstName)\n\t\tif isAdmin {\n\t\t\tmsg += t.I18nBot(\"tgbot.commands.welcome\", \"Hostname==\"+hostname)\n\t\t}\n\t\tmsg += \"\\n\\n\" + t.I18nBot(\"tgbot.commands.pleaseChoose\")\n\tcase \"status\":\n\t\tonlyMessage = true\n\t\tmsg += t.I18nBot(\"tgbot.commands.status\")\n\tcase \"id\":\n\t\tonlyMessage = true\n\t\tmsg += t.I18nBot(\"tgbot.commands.getID\", \"ID==\"+strconv.FormatInt(message.From.ID, 10))\n\tcase \"usage\":\n\t\tonlyMessage = true\n\t\tif len(commandArgs) > 0 {\n\t\t\tif isAdmin {\n\t\t\t\tt.searchClient(chatId, commandArgs[0])\n\t\t\t} else {\n\t\t\t\t// Convert message.From.ID to int64\n\t\t\t\tfromID := int64(message.From.ID)\n\t\t\t\tt.getClientUsage(chatId, fromID, commandArgs[0])\n\t\t\t}\n\t\t} else {\n\t\t\tmsg += t.I18nBot(\"tgbot.commands.usage\")\n\t\t}\n\tcase \"inbound\":\n\t\tonlyMessage = true\n\t\tif isAdmin && len(commandArgs) > 0 {\n\t\t\tt.searchInbound(chatId, commandArgs[0])\n\t\t} else {\n\t\t\tmsg += t.I18nBot(\"tgbot.commands.unknown\")\n\t\t}\n\tdefault:\n\t\tmsg += t.I18nBot(\"tgbot.commands.unknown\")\n\t}\n\n\tif msg != \"\" {\n\t\tif onlyMessage {\n\t\t\tt.SendMsgToTgbot(chatId, msg)\n\t\t\treturn\n\t\t} else {\n\t\t\tt.SendAnswer(chatId, msg, isAdmin)\n\t\t}\n\t}\n}\n\nfunc (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool) {\n\tchatId := callbackQuery.Message.GetChat().ID\n\n\tif isAdmin {\n\t\t// get query from hash storage\n\t\tdecodedQuery, err := t.decodeQuery(callbackQuery.Data)\n\t\tif err != nil {\n\t\t\tt.SendMsgToTgbot(chatId, t.I18nBot(\"tgbot.noQuery\"))\n\t\t\treturn\n\t\t}\n\t\tdataArray := strings.Split(decodedQuery, \" \")\n\n\t\tif len(dataArray) >= 2 && len(dataArray[1]) > 0 {\n\t\t\temail := dataArray[1]\n\t\t\tswitch dataArray[0] {\n\t\t\tcase \"client_get_usage\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.messages.email\", \"Email==\"+email))\n\t\t\t\tt.searchClient(chatId, email)\n\t\t\tcase \"client_refresh\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.clientRefreshSuccess\", \"Email==\"+email))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"client_cancel\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.canceled\", \"Email==\"+email))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"ips_refresh\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.IpRefreshSuccess\", \"Email==\"+email))\n\t\t\t\tt.searchClientIps(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"ips_cancel\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.canceled\", \"Email==\"+email))\n\t\t\t\tt.searchClientIps(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"tgid_refresh\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.TGIdRefreshSuccess\", \"Email==\"+email))\n\t\t\t\tt.clientTelegramUserInfo(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"tgid_cancel\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.canceled\", \"Email==\"+email))\n\t\t\t\tt.clientTelegramUserInfo(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"reset_traffic\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancelReset\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmResetTraffic\")).WithCallbackData(t.encodeQuery(\"reset_traffic_c \"+email)),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"reset_traffic_c\":\n\t\t\t\terr := t.inboundService.ResetClientTrafficByEmail(email)\n\t\t\t\tif err == nil {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.resetTrafficSuccess\", \"Email==\"+email))\n\t\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t} else {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t}\n\t\t\tcase \"limit_traffic\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.unlimited\")).WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 0\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.custom\")).WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" 0\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"1 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 1\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"5 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 5\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"10 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 10\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"20 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 20\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"30 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 30\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"40 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 40\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"50 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 50\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"60 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 60\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"80 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 80\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"100 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 100\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"150 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 150\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"200 GB\").WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" 200\")),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"limit_traffic_c\":\n\t\t\t\tif len(dataArray) == 3 {\n\t\t\t\t\tlimitTraffic, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tneedRestart, err := t.inboundService.ResetClientTrafficLimitByEmail(email, limitTraffic)\n\t\t\t\t\t\tif needRestart {\n\t\t\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.setTrafficLimitSuccess\", \"Email==\"+email))\n\t\t\t\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"limit_traffic_in\":\n\t\t\t\tif len(dataArray) >= 3 {\n\t\t\t\t\toldInputNumber, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tinputNumber := oldInputNumber\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tif len(dataArray) == 4 {\n\t\t\t\t\t\t\tnum, err := strconv.Atoi(dataArray[3])\n\t\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\t\tif num == -2 {\n\t\t\t\t\t\t\t\t\tinputNumber = 0\n\t\t\t\t\t\t\t\t} else if num == -1 {\n\t\t\t\t\t\t\t\t\tif inputNumber > 0 {\n\t\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber / 10)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber * 10) + num\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber == oldInputNumber {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.successfulOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber >= 999999 {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmNumberAdd\", \"Num==\"+strconv.Itoa(inputNumber))).WithCallbackData(t.encodeQuery(\"limit_traffic_c \"+email+\" \"+strconv.Itoa(inputNumber))),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"1\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 1\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"2\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"3\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 3\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"4\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 4\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"5\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 5\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"6\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 6\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"7\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 7\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"8\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 8\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"9\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 9\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"🔄\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"0\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 0\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"⬅️\").WithCallbackData(t.encodeQuery(\"limit_traffic_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -1\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"reset_exp\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancelReset\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.unlimited\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 0\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.custom\")).WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" 0\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 7 \"+t.I18nBot(\"tgbot.days\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 7\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 10 \"+t.I18nBot(\"tgbot.days\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 10\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 14 \"+t.I18nBot(\"tgbot.days\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 14\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 20 \"+t.I18nBot(\"tgbot.days\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 20\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 1 \"+t.I18nBot(\"tgbot.month\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 30\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 3 \"+t.I18nBot(\"tgbot.months\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 90\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 6 \"+t.I18nBot(\"tgbot.months\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 180\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.add\")+\" 12 \"+t.I18nBot(\"tgbot.months\")).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" 365\")),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"reset_exp_c\":\n\t\t\t\tif len(dataArray) == 3 {\n\t\t\t\t\tdays, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tvar date int64 = 0\n\t\t\t\t\t\tif days > 0 {\n\t\t\t\t\t\t\ttraffic, err := t.inboundService.GetClientTrafficByEmail(email)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tlogger.Warning(err)\n\t\t\t\t\t\t\t\tmsg := t.I18nBot(\"tgbot.wentWrong\")\n\t\t\t\t\t\t\t\tt.SendMsgToTgbot(chatId, msg)\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif traffic == nil {\n\t\t\t\t\t\t\t\tmsg := t.I18nBot(\"tgbot.noResult\")\n\t\t\t\t\t\t\t\tt.SendMsgToTgbot(chatId, msg)\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif traffic.ExpiryTime > 0 {\n\t\t\t\t\t\t\t\tif traffic.ExpiryTime-time.Now().Unix()*1000 < 0 {\n\t\t\t\t\t\t\t\t\tdate = -int64(days * 24 * 60 * 60000)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdate = traffic.ExpiryTime + int64(days*24*60*60000)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdate = traffic.ExpiryTime - int64(days*24*60*60000)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tneedRestart, err := t.inboundService.ResetClientExpiryTimeByEmail(email, date)\n\t\t\t\t\t\tif needRestart {\n\t\t\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.expireResetSuccess\", \"Email==\"+email))\n\t\t\t\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"reset_exp_in\":\n\t\t\t\tif len(dataArray) >= 3 {\n\t\t\t\t\toldInputNumber, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tinputNumber := oldInputNumber\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tif len(dataArray) == 4 {\n\t\t\t\t\t\t\tnum, err := strconv.Atoi(dataArray[3])\n\t\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\t\tif num == -2 {\n\t\t\t\t\t\t\t\t\tinputNumber = 0\n\t\t\t\t\t\t\t\t} else if num == -1 {\n\t\t\t\t\t\t\t\t\tif inputNumber > 0 {\n\t\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber / 10)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber * 10) + num\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber == oldInputNumber {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.successfulOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber >= 999999 {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmNumber\", \"Num==\"+strconv.Itoa(inputNumber))).WithCallbackData(t.encodeQuery(\"reset_exp_c \"+email+\" \"+strconv.Itoa(inputNumber))),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"1\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 1\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"2\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"3\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 3\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"4\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 4\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"5\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 5\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"6\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 6\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"7\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 7\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"8\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 8\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"9\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 9\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"🔄\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"0\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 0\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"⬅️\").WithCallbackData(t.encodeQuery(\"reset_exp_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -1\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"ip_limit\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancelIpLimit\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.unlimited\")).WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 0\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.custom\")).WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" 0\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"1\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 1\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"2\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 2\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"3\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 3\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"4\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 4\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"5\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 5\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"6\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 6\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"7\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 7\")),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"8\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 8\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"9\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 9\")),\n\t\t\t\t\t\ttu.InlineKeyboardButton(\"10\").WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" 10\")),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"ip_limit_c\":\n\t\t\t\tif len(dataArray) == 3 {\n\t\t\t\t\tcount, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tneedRestart, err := t.inboundService.ResetClientIpLimitByEmail(email, count)\n\t\t\t\t\t\tif needRestart {\n\t\t\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.resetIpSuccess\", \"Email==\"+email, \"Count==\"+strconv.Itoa(count)))\n\t\t\t\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"ip_limit_in\":\n\t\t\t\tif len(dataArray) >= 3 {\n\t\t\t\t\toldInputNumber, err := strconv.Atoi(dataArray[2])\n\t\t\t\t\tinputNumber := oldInputNumber\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tif len(dataArray) == 4 {\n\t\t\t\t\t\t\tnum, err := strconv.Atoi(dataArray[3])\n\t\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\t\tif num == -2 {\n\t\t\t\t\t\t\t\t\tinputNumber = 0\n\t\t\t\t\t\t\t\t} else if num == -1 {\n\t\t\t\t\t\t\t\t\tif inputNumber > 0 {\n\t\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber / 10)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tinputNumber = (inputNumber * 10) + num\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber == oldInputNumber {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.successfulOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif inputNumber >= 999999 {\n\t\t\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmNumber\", \"Num==\"+strconv.Itoa(inputNumber))).WithCallbackData(t.encodeQuery(\"ip_limit_c \"+email+\" \"+strconv.Itoa(inputNumber))),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"1\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 1\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"2\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"3\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 3\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"4\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 4\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"5\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 5\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"6\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 6\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"7\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 7\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"8\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 8\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"9\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 9\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"🔄\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -2\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"0\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" 0\")),\n\t\t\t\t\t\t\t\ttu.InlineKeyboardButton(\"⬅️\").WithCallbackData(t.encodeQuery(\"ip_limit_in \"+email+\" \"+strconv.Itoa(inputNumber)+\" -1\")),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\tcase \"clear_ips\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"ips_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmClearIps\")).WithCallbackData(t.encodeQuery(\"clear_ips_c \"+email)),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"clear_ips_c\":\n\t\t\t\terr := t.inboundService.ClearClientIps(email)\n\t\t\t\tif err == nil {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.clearIpSuccess\", \"Email==\"+email))\n\t\t\t\t\tt.searchClientIps(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t} else {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t}\n\t\t\tcase \"ip_log\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.getIpLog\", \"Email==\"+email))\n\t\t\t\tt.searchClientIps(chatId, email)\n\t\t\tcase \"tg_user\":\n\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.getUserInfo\", \"Email==\"+email))\n\t\t\t\tt.clientTelegramUserInfo(chatId, email)\n\t\t\tcase \"tgid_remove\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"tgid_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmRemoveTGUser\")).WithCallbackData(t.encodeQuery(\"tgid_remove_c \"+email)),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"tgid_remove_c\":\n\t\t\t\ttraffic, err := t.inboundService.GetClientTrafficByEmail(email)\n\t\t\t\tif err != nil || traffic == nil {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tneedRestart, err := t.inboundService.SetClientTelegramUserID(traffic.Id, EmptyTelegramUserID)\n\t\t\t\tif needRestart {\n\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t}\n\t\t\t\tif err == nil {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.removedTGUserSuccess\", \"Email==\"+email))\n\t\t\t\t\tt.clientTelegramUserInfo(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t} else {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t}\n\t\t\tcase \"toggle_enable\":\n\t\t\t\tinlineKeyboard := tu.InlineKeyboard(\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.cancel\")).WithCallbackData(t.encodeQuery(\"client_cancel \"+email)),\n\t\t\t\t\t),\n\t\t\t\t\ttu.InlineKeyboardRow(\n\t\t\t\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.confirmToggle\")).WithCallbackData(t.encodeQuery(\"toggle_enable_c \"+email)),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tt.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)\n\t\t\tcase \"toggle_enable_c\":\n\t\t\t\tenabled, needRestart, err := t.inboundService.ToggleClientEnableByEmail(email)\n\t\t\t\tif needRestart {\n\t\t\t\t\tt.xrayService.SetToNeedRestart()\n\t\t\t\t}\n\t\t\t\tif err == nil {\n\t\t\t\t\tif enabled {\n\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.enableSuccess\", \"Email==\"+email))\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.disableSuccess\", \"Email==\"+email))\n\t\t\t\t\t}\n\t\t\t\t\tt.searchClient(chatId, email, callbackQuery.Message.GetMessageID())\n\t\t\t\t} else {\n\t\t\t\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.errorOperation\"))\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\n\tswitch callbackQuery.Data {\n\tcase \"get_usage\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.serverUsage\"))\n\t\tt.getServerUsage(chatId)\n\tcase \"usage_refresh\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.successfulOperation\"))\n\t\tt.getServerUsage(chatId, callbackQuery.Message.GetMessageID())\n\tcase \"inbounds\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.getInbounds\"))\n\t\tt.SendMsgToTgbot(chatId, t.getInboundUsages())\n\tcase \"deplete_soon\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.depleteSoon\"))\n\t\tt.getExhausted(chatId)\n\tcase \"get_backup\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.dbBackup\"))\n\t\tt.sendBackup(chatId)\n\tcase \"get_banlogs\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.getBanLogs\"))\n\t\tt.sendBanLogs(chatId, true)\n\tcase \"client_traffic\":\n\t\ttgUserID := callbackQuery.From.ID\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.clientUsage\"))\n\t\tt.getClientUsage(chatId, tgUserID)\n\tcase \"client_commands\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.commands\"))\n\t\tt.SendMsgToTgbot(chatId, t.I18nBot(\"tgbot.commands.helpClientCommands\"))\n\tcase \"onlines\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.onlines\"))\n\t\tt.onlineClients(chatId)\n\tcase \"onlines_refresh\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.answers.successfulOperation\"))\n\t\tt.onlineClients(chatId, callbackQuery.Message.GetMessageID())\n\tcase \"commands\":\n\t\tt.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot(\"tgbot.buttons.commands\"))\n\t\tt.SendMsgToTgbot(chatId, t.I18nBot(\"tgbot.commands.helpAdminCommands\"))\n\t}\n}\n\nfunc checkAdmin(tgId int64) bool {\n\tfor _, adminId := range adminIds {\n\t\tif adminId == tgId {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (t *Tgbot) SendAnswer(chatId int64, msg string, isAdmin bool) {\n\tnumericKeyboard := tu.InlineKeyboard(\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.serverUsage\")).WithCallbackData(t.encodeQuery(\"get_usage\")),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.commands\")).WithCallbackData(t.encodeQuery(\"commands\")),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.onlines\")).WithCallbackData(t.encodeQuery(\"onlines\")),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.depleteSoon\")).WithCallbackData(t.encodeQuery(\"deplete_soon\")),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.getInbounds\")).WithCallbackData(t.encodeQuery(\"inbounds\")),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.getBanLogs\")).WithCallbackData(t.encodeQuery(\"get_banlogs\")),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.dbBackup\")).WithCallbackData(t.encodeQuery(\"get_backup\")),\n\t\t),\n\t)\n\tnumericKeyboardClient := tu.InlineKeyboard(\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.clientUsage\")).WithCallbackData(t.encodeQuery(\"client_traffic\")),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.commands\")).WithCallbackData(t.encodeQuery(\"client_commands\")),\n\t\t),\n\t)\n\n\tvar ReplyMarkup telego.ReplyMarkup\n\tif isAdmin {\n\t\tReplyMarkup = numericKeyboard\n\t} else {\n\t\tReplyMarkup = numericKeyboardClient\n\t}\n\tt.SendMsgToTgbot(chatId, msg, ReplyMarkup)\n}\n\nfunc (t *Tgbot) SendMsgToTgbot(chatId int64, msg string, replyMarkup ...telego.ReplyMarkup) {\n\tif !isRunning {\n\t\treturn\n\t}\n\n\tif msg == \"\" {\n\t\tlogger.Info(\"[tgbot] message is empty!\")\n\t\treturn\n\t}\n\n\tvar allMessages []string\n\tlimit := 2000\n\n\t// paging message if it is big\n\tif len(msg) > limit {\n\t\tmessages := strings.Split(msg, \"\\r\\n\\r\\n\")\n\t\tlastIndex := -1\n\n\t\tfor _, message := range messages {\n\t\t\tif (len(allMessages) == 0) || (len(allMessages[lastIndex])+len(message) > limit) {\n\t\t\t\tallMessages = append(allMessages, message)\n\t\t\t\tlastIndex++\n\t\t\t} else {\n\t\t\t\tallMessages[lastIndex] += \"\\r\\n\\r\\n\" + message\n\t\t\t}\n\t\t}\n\t\tif strings.TrimSpace(allMessages[len(allMessages)-1]) == \"\" {\n\t\t\tallMessages = allMessages[:len(allMessages)-1]\n\t\t}\n\t} else {\n\t\tallMessages = append(allMessages, msg)\n\t}\n\tfor n, message := range allMessages {\n\t\tparams := telego.SendMessageParams{\n\t\t\tChatID:    tu.ID(chatId),\n\t\t\tText:      message,\n\t\t\tParseMode: \"HTML\",\n\t\t}\n\t\t// only add replyMarkup to last message\n\t\tif len(replyMarkup) > 0 && n == (len(allMessages)-1) {\n\t\t\tparams.ReplyMarkup = replyMarkup[0]\n\t\t}\n\t\t_, err := bot.SendMessage(&params)\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"Error sending telegram message :\", err)\n\t\t}\n\t\ttime.Sleep(500 * time.Millisecond)\n\t}\n}\n\nfunc (t *Tgbot) SendMsgToTgbotAdmins(msg string, replyMarkup ...telego.ReplyMarkup) {\n\tif len(replyMarkup) > 0 {\n\t\tfor _, adminId := range adminIds {\n\t\t\tt.SendMsgToTgbot(adminId, msg, replyMarkup[0])\n\t\t}\n\t} else {\n\t\tfor _, adminId := range adminIds {\n\t\t\tt.SendMsgToTgbot(adminId, msg)\n\t\t}\n\t}\n}\n\nfunc (t *Tgbot) SendReport() {\n\trunTime, err := t.settingService.GetTgbotRuntime()\n\tif err == nil && len(runTime) > 0 {\n\t\tmsg := \"\"\n\t\tmsg += t.I18nBot(\"tgbot.messages.report\", \"RunTime==\"+runTime)\n\t\tmsg += t.I18nBot(\"tgbot.messages.datetime\", \"DateTime==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\t\tt.SendMsgToTgbotAdmins(msg)\n\t}\n\n\tinfo := t.sendServerUsage()\n\tt.SendMsgToTgbotAdmins(info)\n\n\tt.sendExhaustedToAdmins()\n\tt.notifyExhausted()\n\n\tbackupEnable, err := t.settingService.GetTgBotBackup()\n\tif err == nil && backupEnable {\n\t\tt.SendBackupToAdmins()\n\t}\n}\n\nfunc (t *Tgbot) SendBackupToAdmins() {\n\tif !t.IsRunning() {\n\t\treturn\n\t}\n\tfor _, adminId := range adminIds {\n\t\tt.sendBackup(int64(adminId))\n\t}\n}\n\nfunc (t *Tgbot) sendExhaustedToAdmins() {\n\tif !t.IsRunning() {\n\t\treturn\n\t}\n\tfor _, adminId := range adminIds {\n\t\tt.getExhausted(int64(adminId))\n\t}\n}\n\nfunc (t *Tgbot) getServerUsage(chatId int64, messageID ...int) string {\n\tinfo := t.prepareServerUsageInfo()\n\n\tkeyboard := tu.InlineKeyboard(tu.InlineKeyboardRow(\n\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.refresh\")).WithCallbackData(t.encodeQuery(\"usage_refresh\"))))\n\n\tif len(messageID) > 0 {\n\t\tt.editMessageTgBot(chatId, messageID[0], info, keyboard)\n\t} else {\n\t\tt.SendMsgToTgbot(chatId, info, keyboard)\n\t}\n\n\treturn info\n}\n\n// Send server usage without an inline keyboard\nfunc (t *Tgbot) sendServerUsage() string {\n\tinfo := t.prepareServerUsageInfo()\n\treturn info\n}\n\nfunc (t *Tgbot) prepareServerUsageInfo() string {\n\tinfo, ipv4, ipv6 := \"\", \"\", \"\"\n\n\t// get latest status of server\n\tt.lastStatus = t.serverService.GetStatus(t.lastStatus)\n\tonlines := p.GetOnlineClients()\n\n\tinfo += t.I18nBot(\"tgbot.messages.hostname\", \"Hostname==\"+hostname)\n\tinfo += t.I18nBot(\"tgbot.messages.version\", \"Version==\"+config.GetVersion())\n\tinfo += t.I18nBot(\"tgbot.messages.xrayVersion\", \"XrayVersion==\"+fmt.Sprint(t.lastStatus.Xray.Version))\n\n\t// get ip address\n\tnetInterfaces, err := net.Interfaces()\n\tif err != nil {\n\t\tlogger.Error(\"net.Interfaces failed, err: \", err.Error())\n\t\tinfo += t.I18nBot(\"tgbot.messages.ip\", \"IP==\"+t.I18nBot(\"tgbot.unknown\"))\n\t\tinfo += \"\\r\\n\"\n\t} else {\n\t\tfor i := 0; i < len(netInterfaces); i++ {\n\t\t\tif (netInterfaces[i].Flags & net.FlagUp) != 0 {\n\t\t\t\taddrs, _ := netInterfaces[i].Addrs()\n\n\t\t\t\tfor _, address := range addrs {\n\t\t\t\t\tif ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {\n\t\t\t\t\t\tif ipnet.IP.To4() != nil {\n\t\t\t\t\t\t\tipv4 += ipnet.IP.String() + \" \"\n\t\t\t\t\t\t} else if ipnet.IP.To16() != nil && !ipnet.IP.IsLinkLocalUnicast() {\n\t\t\t\t\t\t\tipv6 += ipnet.IP.String() + \" \"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinfo += t.I18nBot(\"tgbot.messages.ipv4\", \"IPv4==\"+ipv4)\n\t\tinfo += t.I18nBot(\"tgbot.messages.ipv6\", \"IPv6==\"+ipv6)\n\t}\n\n\tinfo += t.I18nBot(\"tgbot.messages.serverUpTime\", \"UpTime==\"+strconv.FormatUint(t.lastStatus.Uptime/86400, 10), \"Unit==\"+t.I18nBot(\"tgbot.days\"))\n\tinfo += t.I18nBot(\"tgbot.messages.serverLoad\", \"Load1==\"+strconv.FormatFloat(t.lastStatus.Loads[0], 'f', 2, 64), \"Load2==\"+strconv.FormatFloat(t.lastStatus.Loads[1], 'f', 2, 64), \"Load3==\"+strconv.FormatFloat(t.lastStatus.Loads[2], 'f', 2, 64))\n\tinfo += t.I18nBot(\"tgbot.messages.serverMemory\", \"Current==\"+common.FormatTraffic(int64(t.lastStatus.Mem.Current)), \"Total==\"+common.FormatTraffic(int64(t.lastStatus.Mem.Total)))\n\tinfo += t.I18nBot(\"tgbot.messages.onlinesCount\", \"Count==\"+fmt.Sprint(len(onlines)))\n\tinfo += t.I18nBot(\"tgbot.messages.tcpCount\", \"Count==\"+strconv.Itoa(t.lastStatus.TcpCount))\n\tinfo += t.I18nBot(\"tgbot.messages.udpCount\", \"Count==\"+strconv.Itoa(t.lastStatus.UdpCount))\n\tinfo += t.I18nBot(\"tgbot.messages.traffic\", \"Total==\"+common.FormatTraffic(int64(t.lastStatus.NetTraffic.Sent+t.lastStatus.NetTraffic.Recv)), \"Upload==\"+common.FormatTraffic(int64(t.lastStatus.NetTraffic.Sent)), \"Download==\"+common.FormatTraffic(int64(t.lastStatus.NetTraffic.Recv)))\n\tinfo += t.I18nBot(\"tgbot.messages.xrayStatus\", \"State==\"+fmt.Sprint(t.lastStatus.Xray.State))\n\treturn info\n}\n\nfunc (t *Tgbot) UserLoginNotify(username string, password string, ip string, time string, status LoginStatus) {\n\tif !t.IsRunning() {\n\t\treturn\n\t}\n\n\tif username == \"\" || ip == \"\" || time == \"\" {\n\t\tlogger.Warning(\"UserLoginNotify failed, invalid info!\")\n\t\treturn\n\t}\n\n\tloginNotifyEnabled, err := t.settingService.GetTgBotLoginNotify()\n\tif err != nil || !loginNotifyEnabled {\n\t\treturn\n\t}\n\n\tmsg := \"\"\n\tif status == LoginSuccess {\n\t\tmsg += t.I18nBot(\"tgbot.messages.loginSuccess\")\n\t\tmsg += t.I18nBot(\"tgbot.messages.hostname\", \"Hostname==\"+hostname)\n\t} else if status == LoginFail {\n\t\tmsg += t.I18nBot(\"tgbot.messages.loginFailed\")\n\t\tmsg += t.I18nBot(\"tgbot.messages.hostname\", \"Hostname==\"+hostname)\n\t\tmsg += t.I18nBot(\"tgbot.messages.password\", \"Password==\"+password)\n\t}\n\tmsg += t.I18nBot(\"tgbot.messages.username\", \"Username==\"+username)\n\tmsg += t.I18nBot(\"tgbot.messages.ip\", \"IP==\"+ip)\n\tmsg += t.I18nBot(\"tgbot.messages.time\", \"Time==\"+time)\n\tt.SendMsgToTgbotAdmins(msg)\n}\n\nfunc (t *Tgbot) getInboundUsages() string {\n\tinfo := \"\"\n\t// get traffic\n\tinbounds, err := t.inboundService.GetAllInbounds()\n\tif err != nil {\n\t\tlogger.Warning(\"GetAllInbounds run failed:\", err)\n\t\tinfo += t.I18nBot(\"tgbot.answers.getInboundsFailed\")\n\t} else {\n\t\t// NOTE:If there no any sessions here,need to notify here\n\t\t// TODO:Sub-node push, automatic conversion format\n\t\tfor _, inbound := range inbounds {\n\t\t\tinfo += t.I18nBot(\"tgbot.messages.inbound\", \"Remark==\"+inbound.Remark)\n\t\t\tinfo += t.I18nBot(\"tgbot.messages.port\", \"Port==\"+strconv.Itoa(inbound.Port))\n\t\t\tinfo += t.I18nBot(\"tgbot.messages.traffic\", \"Total==\"+common.FormatTraffic((inbound.Up+inbound.Down)), \"Upload==\"+common.FormatTraffic(inbound.Up), \"Download==\"+common.FormatTraffic(inbound.Down))\n\n\t\t\tif inbound.ExpiryTime == 0 {\n\t\t\t\tinfo += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+t.I18nBot(\"tgbot.unlimited\"))\n\t\t\t} else {\n\t\t\t\tinfo += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+time.Unix((inbound.ExpiryTime/1000), 0).Format(\"2006-01-02 15:04:05\"))\n\t\t\t}\n\t\t\tinfo += \"\\r\\n\"\n\t\t}\n\t}\n\treturn info\n}\n\nfunc (t *Tgbot) clientInfoMsg(\n\ttraffic *xray.ClientTraffic,\n\tprintEnabled bool,\n\tprintOnline bool,\n\tprintActive bool,\n\tprintDate bool,\n\tprintTraffic bool,\n\tprintRefreshed bool,\n) string {\n\tnow := time.Now().Unix()\n\texpiryTime := \"\"\n\tflag := false\n\tdiff := traffic.ExpiryTime/1000 - now\n\tif traffic.ExpiryTime == 0 {\n\t\texpiryTime = t.I18nBot(\"tgbot.unlimited\")\n\t} else if diff > 172800 || !traffic.Enable {\n\t\texpiryTime = time.Unix((traffic.ExpiryTime / 1000), 0).Format(\"2006-01-02 15:04:05\")\n\t} else if traffic.ExpiryTime < 0 {\n\t\texpiryTime = fmt.Sprintf(\"%d %s\", traffic.ExpiryTime/-86400000, t.I18nBot(\"tgbot.days\"))\n\t\tflag = true\n\t} else {\n\t\texpiryTime = fmt.Sprintf(\"%d %s\", diff/3600, t.I18nBot(\"tgbot.hours\"))\n\t\tflag = true\n\t}\n\n\ttotal := \"\"\n\tif traffic.Total == 0 {\n\t\ttotal = t.I18nBot(\"tgbot.unlimited\")\n\t} else {\n\t\ttotal = common.FormatTraffic((traffic.Total))\n\t}\n\n\tenabled := \"\"\n\tisEnabled, err := t.inboundService.checkIsEnabledByEmail(traffic.Email)\n\tif err != nil {\n\t\tlogger.Warning(err)\n\t\tenabled = t.I18nBot(\"tgbot.wentWrong\")\n\t} else if isEnabled {\n\t\tenabled = t.I18nBot(\"tgbot.messages.yes\")\n\t} else {\n\t\tenabled = t.I18nBot(\"tgbot.messages.no\")\n\t}\n\n\tactive := \"\"\n\tif traffic.Enable {\n\t\tactive = t.I18nBot(\"tgbot.messages.yes\")\n\t} else {\n\t\tactive = t.I18nBot(\"tgbot.messages.no\")\n\t}\n\n\tstatus := t.I18nBot(\"tgbot.offline\")\n\tif p.IsRunning() {\n\t\tfor _, online := range p.GetOnlineClients() {\n\t\t\tif online == traffic.Email {\n\t\t\t\tstatus = t.I18nBot(\"tgbot.online\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\toutput := \"\"\n\toutput += t.I18nBot(\"tgbot.messages.email\", \"Email==\"+traffic.Email)\n\tif printEnabled {\n\t\toutput += t.I18nBot(\"tgbot.messages.enabled\", \"Enable==\"+enabled)\n\t}\n\tif printOnline {\n\t\toutput += t.I18nBot(\"tgbot.messages.online\", \"Status==\"+status)\n\t}\n\tif printActive {\n\t\toutput += t.I18nBot(\"tgbot.messages.active\", \"Enable==\"+active)\n\t}\n\tif printDate {\n\t\tif flag {\n\t\t\toutput += t.I18nBot(\"tgbot.messages.expireIn\", \"Time==\"+expiryTime)\n\t\t} else {\n\t\t\toutput += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+expiryTime)\n\t\t}\n\t}\n\tif printTraffic {\n\t\toutput += t.I18nBot(\"tgbot.messages.upload\", \"Upload==\"+common.FormatTraffic(traffic.Up))\n\t\toutput += t.I18nBot(\"tgbot.messages.download\", \"Download==\"+common.FormatTraffic(traffic.Down))\n\t\toutput += t.I18nBot(\"tgbot.messages.total\", \"UpDown==\"+common.FormatTraffic((traffic.Up+traffic.Down)), \"Total==\"+total)\n\t}\n\tif printRefreshed {\n\t\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\t}\n\n\treturn output\n}\n\nfunc (t *Tgbot) getClientUsage(chatId int64, tgUserID int64, email ...string) {\n\ttraffics, err := t.inboundService.GetClientTrafficTgBot(tgUserID)\n\tif err != nil {\n\t\tlogger.Warning(err)\n\t\tmsg := t.I18nBot(\"tgbot.wentWrong\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\n\tif len(traffics) == 0 {\n\t\tt.SendMsgToTgbot(chatId, t.I18nBot(\"tgbot.answers.askToAddUserId\", \"TgUserID==\"+strconv.FormatInt(tgUserID, 10)))\n\t\treturn\n\t}\n\n\toutput := \"\"\n\n\tif len(traffics) > 0 {\n\t\tif len(email) > 0 {\n\t\t\tfor _, traffic := range traffics {\n\t\t\t\tif traffic.Email == email[0] {\n\t\t\t\t\toutput := t.clientInfoMsg(traffic, true, true, true, true, true, true)\n\t\t\t\t\tt.SendMsgToTgbot(chatId, output)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tmsg := t.I18nBot(\"tgbot.noResult\")\n\t\t\tt.SendMsgToTgbot(chatId, msg)\n\t\t\treturn\n\t\t} else {\n\t\t\tfor _, traffic := range traffics {\n\t\t\t\toutput += t.clientInfoMsg(traffic, true, true, true, true, true, false)\n\t\t\t\toutput += \"\\r\\n\"\n\t\t\t}\n\t\t}\n\t}\n\n\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\tt.SendMsgToTgbot(chatId, output)\n\toutput = t.I18nBot(\"tgbot.commands.pleaseChoose\")\n\tt.SendAnswer(chatId, output, false)\n}\n\nfunc (t *Tgbot) searchClientIps(chatId int64, email string, messageID ...int) {\n\tips, err := t.inboundService.GetInboundClientIps(email)\n\tif err != nil || len(ips) == 0 {\n\t\tips = t.I18nBot(\"tgbot.noIpRecord\")\n\t}\n\n\toutput := \"\"\n\toutput += t.I18nBot(\"tgbot.messages.email\", \"Email==\"+email)\n\toutput += t.I18nBot(\"tgbot.messages.ips\", \"IPs==\"+ips)\n\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\n\tinlineKeyboard := tu.InlineKeyboard(\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.refresh\")).WithCallbackData(t.encodeQuery(\"ips_refresh \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.clearIPs\")).WithCallbackData(t.encodeQuery(\"clear_ips \"+email)),\n\t\t),\n\t)\n\n\tif len(messageID) > 0 {\n\t\tt.editMessageTgBot(chatId, messageID[0], output, inlineKeyboard)\n\t} else {\n\t\tt.SendMsgToTgbot(chatId, output, inlineKeyboard)\n\t}\n}\n\nfunc (t *Tgbot) clientTelegramUserInfo(chatId int64, email string, messageID ...int) {\n\ttraffic, client, err := t.inboundService.GetClientByEmail(email)\n\tif err != nil {\n\t\tlogger.Warning(err)\n\t\tmsg := t.I18nBot(\"tgbot.wentWrong\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\tif client == nil {\n\t\tmsg := t.I18nBot(\"tgbot.noResult\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\ttgId := \"None\"\n\tif client.TgID != 0 {\n\t\ttgId = strconv.FormatInt(client.TgID, 10)\n\t}\n\n\toutput := \"\"\n\toutput += t.I18nBot(\"tgbot.messages.email\", \"Email==\"+email)\n\toutput += t.I18nBot(\"tgbot.messages.TGUser\", \"TelegramID==\"+tgId)\n\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\n\tinlineKeyboard := tu.InlineKeyboard(\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.refresh\")).WithCallbackData(t.encodeQuery(\"tgid_refresh \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.removeTGUser\")).WithCallbackData(t.encodeQuery(\"tgid_remove \"+email)),\n\t\t),\n\t)\n\n\tif len(messageID) > 0 {\n\t\tt.editMessageTgBot(chatId, messageID[0], output, inlineKeyboard)\n\t} else {\n\t\tt.SendMsgToTgbot(chatId, output, inlineKeyboard)\n\t\trequestUser := telego.KeyboardButtonRequestUsers{\n\t\t\tRequestID: int32(traffic.Id),\n\t\t\tUserIsBot: new(bool),\n\t\t}\n\t\tkeyboard := tu.Keyboard(\n\t\t\ttu.KeyboardRow(\n\t\t\t\ttu.KeyboardButton(t.I18nBot(\"tgbot.buttons.selectTGUser\")).WithRequestUsers(&requestUser),\n\t\t\t),\n\t\t\ttu.KeyboardRow(\n\t\t\t\ttu.KeyboardButton(t.I18nBot(\"tgbot.buttons.closeKeyboard\")),\n\t\t\t),\n\t\t).WithIsPersistent().WithResizeKeyboard()\n\t\tt.SendMsgToTgbot(chatId, t.I18nBot(\"tgbot.buttons.selectOneTGUser\"), keyboard)\n\t}\n}\n\nfunc (t *Tgbot) searchClient(chatId int64, email string, messageID ...int) {\n\ttraffic, err := t.inboundService.GetClientTrafficByEmail(email)\n\tif err != nil {\n\t\tlogger.Warning(err)\n\t\tmsg := t.I18nBot(\"tgbot.wentWrong\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\tif traffic == nil {\n\t\tmsg := t.I18nBot(\"tgbot.noResult\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\n\toutput := t.clientInfoMsg(traffic, true, true, true, true, true, true)\n\n\tinlineKeyboard := tu.InlineKeyboard(\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.refresh\")).WithCallbackData(t.encodeQuery(\"client_refresh \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.resetTraffic\")).WithCallbackData(t.encodeQuery(\"reset_traffic \"+email)),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.limitTraffic\")).WithCallbackData(t.encodeQuery(\"limit_traffic \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.resetExpire\")).WithCallbackData(t.encodeQuery(\"reset_exp \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.ipLog\")).WithCallbackData(t.encodeQuery(\"ip_log \"+email)),\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.ipLimit\")).WithCallbackData(t.encodeQuery(\"ip_limit \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.setTGUser\")).WithCallbackData(t.encodeQuery(\"tg_user \"+email)),\n\t\t),\n\t\ttu.InlineKeyboardRow(\n\t\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.toggle\")).WithCallbackData(t.encodeQuery(\"toggle_enable \"+email)),\n\t\t),\n\t)\n\tif len(messageID) > 0 {\n\t\tt.editMessageTgBot(chatId, messageID[0], output, inlineKeyboard)\n\t} else {\n\t\tt.SendMsgToTgbot(chatId, output, inlineKeyboard)\n\t}\n}\n\nfunc (t *Tgbot) searchInbound(chatId int64, remark string) {\n\tinbounds, err := t.inboundService.SearchInbounds(remark)\n\tif err != nil {\n\t\tlogger.Warning(err)\n\t\tmsg := t.I18nBot(\"tgbot.wentWrong\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\tif len(inbounds) == 0 {\n\t\tmsg := t.I18nBot(\"tgbot.noInbounds\")\n\t\tt.SendMsgToTgbot(chatId, msg)\n\t\treturn\n\t}\n\n\tfor _, inbound := range inbounds {\n\t\tinfo := \"\"\n\t\tinfo += t.I18nBot(\"tgbot.messages.inbound\", \"Remark==\"+inbound.Remark)\n\t\tinfo += t.I18nBot(\"tgbot.messages.port\", \"Port==\"+strconv.Itoa(inbound.Port))\n\t\tinfo += t.I18nBot(\"tgbot.messages.traffic\", \"Total==\"+common.FormatTraffic((inbound.Up+inbound.Down)), \"Upload==\"+common.FormatTraffic(inbound.Up), \"Download==\"+common.FormatTraffic(inbound.Down))\n\n\t\tif inbound.ExpiryTime == 0 {\n\t\t\tinfo += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+t.I18nBot(\"tgbot.unlimited\"))\n\t\t} else {\n\t\t\tinfo += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+time.Unix((inbound.ExpiryTime/1000), 0).Format(\"2006-01-02 15:04:05\"))\n\t\t}\n\t\tt.SendMsgToTgbot(chatId, info)\n\n\t\tif len(inbound.ClientStats) > 0 {\n\t\t\toutput := \"\"\n\t\t\tfor _, traffic := range inbound.ClientStats {\n\t\t\t\toutput += t.clientInfoMsg(&traffic, true, true, true, true, true, true)\n\t\t\t}\n\t\t\tt.SendMsgToTgbot(chatId, output)\n\t\t}\n\t}\n}\n\nfunc (t *Tgbot) getExhausted(chatId int64) {\n\ttrDiff := int64(0)\n\texDiff := int64(0)\n\tnow := time.Now().Unix() * 1000\n\tvar exhaustedInbounds []model.Inbound\n\tvar exhaustedClients []xray.ClientTraffic\n\tvar disabledInbounds []model.Inbound\n\tvar disabledClients []xray.ClientTraffic\n\n\tTrafficThreshold, err := t.settingService.GetTrafficDiff()\n\tif err == nil && TrafficThreshold > 0 {\n\t\ttrDiff = int64(TrafficThreshold) * 1073741824\n\t}\n\tExpireThreshold, err := t.settingService.GetExpireDiff()\n\tif err == nil && ExpireThreshold > 0 {\n\t\texDiff = int64(ExpireThreshold) * 86400000\n\t}\n\tinbounds, err := t.inboundService.GetAllInbounds()\n\tif err != nil {\n\t\tlogger.Warning(\"Unable to load Inbounds\", err)\n\t}\n\n\tfor _, inbound := range inbounds {\n\t\tif inbound.Enable {\n\t\t\tif (inbound.ExpiryTime > 0 && (inbound.ExpiryTime-now < exDiff)) ||\n\t\t\t\t(inbound.Total > 0 && (inbound.Total-(inbound.Up+inbound.Down) < trDiff)) {\n\t\t\t\texhaustedInbounds = append(exhaustedInbounds, *inbound)\n\t\t\t}\n\t\t\tif len(inbound.ClientStats) > 0 {\n\t\t\t\tfor _, client := range inbound.ClientStats {\n\t\t\t\t\tif client.Enable {\n\t\t\t\t\t\tif (client.ExpiryTime > 0 && (client.ExpiryTime-now < exDiff)) ||\n\t\t\t\t\t\t\t(client.Total > 0 && (client.Total-(client.Up+client.Down) < trDiff)) {\n\t\t\t\t\t\t\texhaustedClients = append(exhaustedClients, client)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledClients = append(disabledClients, client)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdisabledInbounds = append(disabledInbounds, *inbound)\n\t\t}\n\t}\n\n\t// Inbounds\n\toutput := \"\"\n\toutput += t.I18nBot(\"tgbot.messages.exhaustedCount\", \"Type==\"+t.I18nBot(\"tgbot.inbounds\"))\n\toutput += t.I18nBot(\"tgbot.messages.disabled\", \"Disabled==\"+strconv.Itoa(len(disabledInbounds)))\n\toutput += t.I18nBot(\"tgbot.messages.depleteSoon\", \"Deplete==\"+strconv.Itoa(len(exhaustedInbounds)))\n\n\tif len(exhaustedInbounds) > 0 {\n\t\toutput += t.I18nBot(\"tgbot.messages.depleteSoon\", \"Deplete==\"+t.I18nBot(\"tgbot.inbounds\"))\n\n\t\tfor _, inbound := range exhaustedInbounds {\n\t\t\toutput += t.I18nBot(\"tgbot.messages.inbound\", \"Remark==\"+inbound.Remark)\n\t\t\toutput += t.I18nBot(\"tgbot.messages.port\", \"Port==\"+strconv.Itoa(inbound.Port))\n\t\t\toutput += t.I18nBot(\"tgbot.messages.traffic\", \"Total==\"+common.FormatTraffic((inbound.Up+inbound.Down)), \"Upload==\"+common.FormatTraffic(inbound.Up), \"Download==\"+common.FormatTraffic(inbound.Down))\n\t\t\tif inbound.ExpiryTime == 0 {\n\t\t\t\toutput += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+t.I18nBot(\"tgbot.unlimited\"))\n\t\t\t} else {\n\t\t\t\toutput += t.I18nBot(\"tgbot.messages.expire\", \"Time==\"+time.Unix((inbound.ExpiryTime/1000), 0).Format(\"2006-01-02 15:04:05\"))\n\t\t\t}\n\t\t\toutput += \"\\r\\n\"\n\t\t}\n\t}\n\n\t// Clients\n\texhaustedCC := len(exhaustedClients)\n\toutput += t.I18nBot(\"tgbot.messages.exhaustedCount\", \"Type==\"+t.I18nBot(\"tgbot.clients\"))\n\toutput += t.I18nBot(\"tgbot.messages.disabled\", \"Disabled==\"+strconv.Itoa(len(disabledClients)))\n\toutput += t.I18nBot(\"tgbot.messages.depleteSoon\", \"Deplete==\"+strconv.Itoa(exhaustedCC))\n\n\tif exhaustedCC > 0 {\n\t\toutput += t.I18nBot(\"tgbot.messages.depleteSoon\", \"Deplete==\"+t.I18nBot(\"tgbot.clients\"))\n\t\tvar buttons []telego.InlineKeyboardButton\n\t\tfor _, traffic := range exhaustedClients {\n\t\t\toutput += t.clientInfoMsg(&traffic, true, false, false, true, true, false)\n\t\t\toutput += \"\\r\\n\"\n\t\t\tbuttons = append(buttons, tu.InlineKeyboardButton(traffic.Email).WithCallbackData(t.encodeQuery(\"client_get_usage \"+traffic.Email)))\n\t\t}\n\t\tcols := 0\n\t\tif exhaustedCC < 11 {\n\t\t\tcols = 1\n\t\t} else {\n\t\t\tcols = 2\n\t\t}\n\t\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\t\tkeyboard := tu.InlineKeyboardGrid(tu.InlineKeyboardCols(cols, buttons...))\n\t\tt.SendMsgToTgbot(chatId, output, keyboard)\n\t} else {\n\t\toutput += t.I18nBot(\"tgbot.messages.refreshedOn\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\t\tt.SendMsgToTgbot(chatId, output)\n\t}\n}\n\nfunc (t *Tgbot) notifyExhausted() {\n\ttrDiff := int64(0)\n\texDiff := int64(0)\n\tnow := time.Now().Unix() * 1000\n\n\tTrafficThreshold, err := t.settingService.GetTrafficDiff()\n\tif err == nil && TrafficThreshold > 0 {\n\t\ttrDiff = int64(TrafficThreshold) * 1073741824\n\t}\n\tExpireThreshold, err := t.settingService.GetExpireDiff()\n\tif err == nil && ExpireThreshold > 0 {\n\t\texDiff = int64(ExpireThreshold) * 86400000\n\t}\n\tinbounds, err := t.inboundService.GetAllInbounds()\n\tif err != nil {\n\t\tlogger.Warning(\"Unable to load Inbounds\", err)\n\t}\n\n\tvar chatIDsDone []int64\n\tfor _, inbound := range inbounds {\n\t\tif inbound.Enable {\n\t\t\tif len(inbound.ClientStats) > 0 {\n\t\t\t\tclients, err := t.inboundService.GetClients(inbound)\n\t\t\t\tif err == nil {\n\t\t\t\t\tfor _, client := range clients {\n\t\t\t\t\t\tif client.TgID != 0 {\n\t\t\t\t\t\t\tchatID := client.TgID\n\t\t\t\t\t\t\tif !int64Contains(chatIDsDone, chatID) && !checkAdmin(chatID) {\n\t\t\t\t\t\t\t\tvar disabledClients []xray.ClientTraffic\n\t\t\t\t\t\t\t\tvar exhaustedClients []xray.ClientTraffic\n\t\t\t\t\t\t\t\ttraffics, err := t.inboundService.GetClientTrafficTgBot(client.TgID)\n\t\t\t\t\t\t\t\tif err == nil && len(traffics) > 0 {\n\t\t\t\t\t\t\t\t\toutput := t.I18nBot(\"tgbot.messages.exhaustedCount\", \"Type==\"+t.I18nBot(\"tgbot.clients\"))\n\t\t\t\t\t\t\t\t\tfor _, traffic := range traffics {\n\t\t\t\t\t\t\t\t\t\tif traffic.Enable {\n\t\t\t\t\t\t\t\t\t\t\tif (traffic.ExpiryTime > 0 && (traffic.ExpiryTime-now < exDiff)) ||\n\t\t\t\t\t\t\t\t\t\t\t\t(traffic.Total > 0 && (traffic.Total-(traffic.Up+traffic.Down) < trDiff)) {\n\t\t\t\t\t\t\t\t\t\t\t\texhaustedClients = append(exhaustedClients, *traffic)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tdisabledClients = append(disabledClients, *traffic)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif len(exhaustedClients) > 0 {\n\t\t\t\t\t\t\t\t\t\toutput += t.I18nBot(\"tgbot.messages.disabled\", \"Disabled==\"+strconv.Itoa(len(disabledClients)))\n\t\t\t\t\t\t\t\t\t\tif len(disabledClients) > 0 {\n\t\t\t\t\t\t\t\t\t\t\toutput += t.I18nBot(\"tgbot.clients\") + \":\\r\\n\"\n\t\t\t\t\t\t\t\t\t\t\tfor _, traffic := range disabledClients {\n\t\t\t\t\t\t\t\t\t\t\t\toutput += \" \" + traffic.Email\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\toutput += \"\\r\\n\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\toutput += \"\\r\\n\"\n\t\t\t\t\t\t\t\t\t\toutput += t.I18nBot(\"tgbot.messages.depleteSoon\", \"Deplete==\"+strconv.Itoa(len(exhaustedClients)))\n\t\t\t\t\t\t\t\t\t\tfor _, traffic := range exhaustedClients {\n\t\t\t\t\t\t\t\t\t\t\toutput += t.clientInfoMsg(&traffic, true, false, false, true, true, false)\n\t\t\t\t\t\t\t\t\t\t\toutput += \"\\r\\n\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tt.SendMsgToTgbot(chatID, output)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tchatIDsDone = append(chatIDsDone, chatID)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc int64Contains(slice []int64, item int64) bool {\n\tfor _, s := range slice {\n\t\tif s == item {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (t *Tgbot) onlineClients(chatId int64, messageID ...int) {\n\tif !p.IsRunning() {\n\t\treturn\n\t}\n\n\tonlines := p.GetOnlineClients()\n\tonlinesCount := len(onlines)\n\toutput := t.I18nBot(\"tgbot.messages.onlinesCount\", \"Count==\"+fmt.Sprint(onlinesCount))\n\tkeyboard := tu.InlineKeyboard(tu.InlineKeyboardRow(\n\t\ttu.InlineKeyboardButton(t.I18nBot(\"tgbot.buttons.refresh\")).WithCallbackData(t.encodeQuery(\"onlines_refresh\"))))\n\n\tif onlinesCount > 0 {\n\t\tvar buttons []telego.InlineKeyboardButton\n\t\tfor _, online := range onlines {\n\t\t\tbuttons = append(buttons, tu.InlineKeyboardButton(online).WithCallbackData(t.encodeQuery(\"client_get_usage \"+online)))\n\t\t}\n\t\tcols := 0\n\t\tif onlinesCount < 21 {\n\t\t\tcols = 2\n\t\t} else if onlinesCount < 61 {\n\t\t\tcols = 3\n\t\t} else {\n\t\t\tcols = 4\n\t\t}\n\t\tkeyboard.InlineKeyboard = append(keyboard.InlineKeyboard, tu.InlineKeyboardCols(cols, buttons...)...)\n\t}\n\n\tif len(messageID) > 0 {\n\t\tt.editMessageTgBot(chatId, messageID[0], output, keyboard)\n\t} else {\n\t\tt.SendMsgToTgbot(chatId, output, keyboard)\n\t}\n}\n\nfunc (t *Tgbot) sendBackup(chatId int64) {\n\toutput := t.I18nBot(\"tgbot.messages.backupTime\", \"Time==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\tt.SendMsgToTgbot(chatId, output)\n\n\t// Update by manually trigger a checkpoint operation\n\terr := database.Checkpoint()\n\tif err != nil {\n\t\tlogger.Error(\"Error in trigger a checkpoint operation: \", err)\n\t}\n\n\tfile, err := os.Open(config.GetDBPath())\n\tif err == nil {\n\t\tdocument := tu.Document(\n\t\t\ttu.ID(chatId),\n\t\t\ttu.File(file),\n\t\t)\n\t\t_, err = bot.SendDocument(document)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Error in uploading backup: \", err)\n\t\t}\n\t} else {\n\t\tlogger.Error(\"Error in opening db file for backup: \", err)\n\t}\n\n\tfile, err = os.Open(xray.GetConfigPath())\n\tif err == nil {\n\t\tdocument := tu.Document(\n\t\t\ttu.ID(chatId),\n\t\t\ttu.File(file),\n\t\t)\n\t\t_, err = bot.SendDocument(document)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Error in uploading config.json: \", err)\n\t\t}\n\t} else {\n\t\tlogger.Error(\"Error in opening config.json file for backup: \", err)\n\t}\n}\n\nfunc (t *Tgbot) sendBanLogs(chatId int64, dt bool) {\n\tif dt {\n\t\toutput := t.I18nBot(\"tgbot.messages.datetime\", \"DateTime==\"+time.Now().Format(\"2006-01-02 15:04:05\"))\n\t\tt.SendMsgToTgbot(chatId, output)\n\t}\n\n\tfile, err := os.Open(xray.GetIPLimitBannedPrevLogPath())\n\tif err == nil {\n\t\t// Check if the file is non-empty before attempting to upload\n\t\tfileInfo, _ := file.Stat()\n\t\tif fileInfo.Size() > 0 {\n\t\t\tdocument := tu.Document(\n\t\t\t\ttu.ID(chatId),\n\t\t\t\ttu.File(file),\n\t\t\t)\n\t\t\t_, err = bot.SendDocument(document)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"Error in uploading IPLimitBannedPrevLog: \", err)\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Warning(\"IPLimitBannedPrevLog file is empty, not uploading.\")\n\t\t}\n\t\tfile.Close()\n\t} else {\n\t\tlogger.Error(\"Error in opening IPLimitBannedPrevLog file for backup: \", err)\n\t}\n\n\tfile, err = os.Open(xray.GetIPLimitBannedLogPath())\n\tif err == nil {\n\t\t// Check if the file is non-empty before attempting to upload\n\t\tfileInfo, _ := file.Stat()\n\t\tif fileInfo.Size() > 0 {\n\t\t\tdocument := tu.Document(\n\t\t\t\ttu.ID(chatId),\n\t\t\t\ttu.File(file),\n\t\t\t)\n\t\t\t_, err = bot.SendDocument(document)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"Error in uploading IPLimitBannedLog: \", err)\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Warning(\"IPLimitBannedLog file is empty, not uploading.\")\n\t\t}\n\t\tfile.Close()\n\t} else {\n\t\tlogger.Error(\"Error in opening IPLimitBannedLog file for backup: \", err)\n\t}\n}\n\nfunc (t *Tgbot) sendCallbackAnswerTgBot(id string, message string) {\n\tparams := telego.AnswerCallbackQueryParams{\n\t\tCallbackQueryID: id,\n\t\tText:            message,\n\t}\n\tif err := bot.AnswerCallbackQuery(&params); err != nil {\n\t\tlogger.Warning(err)\n\t}\n}\n\nfunc (t *Tgbot) editMessageCallbackTgBot(chatId int64, messageID int, inlineKeyboard *telego.InlineKeyboardMarkup) {\n\tparams := telego.EditMessageReplyMarkupParams{\n\t\tChatID:      tu.ID(chatId),\n\t\tMessageID:   messageID,\n\t\tReplyMarkup: inlineKeyboard,\n\t}\n\tif _, err := bot.EditMessageReplyMarkup(&params); err != nil {\n\t\tlogger.Warning(err)\n\t}\n}\n\nfunc (t *Tgbot) editMessageTgBot(chatId int64, messageID int, text string, inlineKeyboard ...*telego.InlineKeyboardMarkup) {\n\tparams := telego.EditMessageTextParams{\n\t\tChatID:    tu.ID(chatId),\n\t\tMessageID: messageID,\n\t\tText:      text,\n\t\tParseMode: \"HTML\",\n\t}\n\tif len(inlineKeyboard) > 0 {\n\t\tparams.ReplyMarkup = inlineKeyboard[0]\n\t}\n\tif _, err := bot.EditMessageText(&params); err != nil {\n\t\tlogger.Warning(err)\n\t}\n}\n"
  },
  {
    "path": "web/service/user.go",
    "content": "package service\n\nimport (\n\t\"errors\"\n\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\n\t\"gorm.io/gorm\"\n)\n\ntype UserService struct{}\n\nfunc (s *UserService) GetFirstUser() (*model.User, error) {\n\tdb := database.GetDB()\n\n\tuser := &model.User{}\n\terr := db.Model(model.User{}).\n\t\tFirst(user).\n\t\tError\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn user, nil\n}\n\nfunc (s *UserService) CheckUser(username string, password string, secret string) *model.User {\n\tdb := database.GetDB()\n\n\tuser := &model.User{}\n\terr := db.Model(model.User{}).\n\t\tWhere(\"username = ? and password = ? and login_secret = ?\", username, password, secret).\n\t\tFirst(user).\n\t\tError\n\tif err == gorm.ErrRecordNotFound {\n\t\treturn nil\n\t} else if err != nil {\n\t\tlogger.Warning(\"check user err:\", err)\n\t\treturn nil\n\t}\n\treturn user\n}\n\nfunc (s *UserService) UpdateUser(id int, username string, password string) error {\n\tdb := database.GetDB()\n\treturn db.Model(model.User{}).\n\t\tWhere(\"id = ?\", id).\n\t\tUpdates(map[string]interface{}{\"username\": username, \"password\": password}).\n\t\tError\n}\n\nfunc (s *UserService) UpdateUserSecret(id int, secret string) error {\n\tdb := database.GetDB()\n\treturn db.Model(model.User{}).\n\t\tWhere(\"id = ?\", id).\n\t\tUpdate(\"login_secret\", secret).\n\t\tError\n}\n\nfunc (s *UserService) RemoveUserSecret() error {\n\tdb := database.GetDB()\n\treturn db.Model(model.User{}).\n\t\tWhere(\"1 = 1\").\n\t\tUpdate(\"login_secret\", \"\").\n\t\tError\n}\n\nfunc (s *UserService) GetUserSecret(id int) *model.User {\n\tdb := database.GetDB()\n\tuser := &model.User{}\n\terr := db.Model(model.User{}).\n\t\tWhere(\"id = ?\", id).\n\t\tFirst(user).\n\t\tError\n\tif err == gorm.ErrRecordNotFound {\n\t\treturn nil\n\t}\n\treturn user\n}\n\nfunc (s *UserService) CheckSecretExistence() (bool, error) {\n\tdb := database.GetDB()\n\n\tvar count int64\n\terr := db.Model(model.User{}).\n\t\tWhere(\"login_secret IS NOT NULL\").\n\t\tCount(&count).\n\t\tError\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\treturn count > 0, nil\n}\n\nfunc (s *UserService) UpdateFirstUser(username string, password string) error {\n\tif username == \"\" {\n\t\treturn errors.New(\"username can not be empty\")\n\t} else if password == \"\" {\n\t\treturn errors.New(\"password can not be empty\")\n\t}\n\tdb := database.GetDB()\n\tuser := &model.User{}\n\terr := db.Model(model.User{}).First(user).Error\n\tif database.IsNotFound(err) {\n\t\tuser.Username = username\n\t\tuser.Password = password\n\t\treturn db.Model(model.User{}).Create(user).Error\n\t} else if err != nil {\n\t\treturn err\n\t}\n\tuser.Username = username\n\tuser.Password = password\n\treturn db.Save(user).Error\n}\n"
  },
  {
    "path": "web/service/xray.go",
    "content": "package service\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"sync\"\n\n\t\"x-ui/logger\"\n\t\"x-ui/xray\"\n\n\t\"go.uber.org/atomic\"\n)\n\nvar (\n\tp                 *xray.Process\n\tlock              sync.Mutex\n\tisNeedXrayRestart atomic.Bool\n\tresult            string\n)\n\ntype XrayService struct {\n\tinboundService InboundService\n\tsettingService SettingService\n\txrayAPI        xray.XrayAPI\n}\n\nfunc (s *XrayService) IsXrayRunning() bool {\n\treturn p != nil && p.IsRunning()\n}\n\nfunc (s *XrayService) GetXrayErr() error {\n\tif p == nil {\n\t\treturn nil\n\t}\n\treturn p.GetErr()\n}\n\nfunc (s *XrayService) GetXrayResult() string {\n\tif result != \"\" {\n\t\treturn result\n\t}\n\tif s.IsXrayRunning() {\n\t\treturn \"\"\n\t}\n\tif p == nil {\n\t\treturn \"\"\n\t}\n\tresult = p.GetResult()\n\treturn result\n}\n\nfunc (s *XrayService) GetXrayVersion() string {\n\tif p == nil {\n\t\treturn \"Unknown\"\n\t}\n\treturn p.GetVersion()\n}\n\nfunc RemoveIndex(s []interface{}, index int) []interface{} {\n\treturn append(s[:index], s[index+1:]...)\n}\n\nfunc (s *XrayService) GetXrayConfig() (*xray.Config, error) {\n\ttemplateConfig, err := s.settingService.GetXrayConfigTemplate()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\txrayConfig := &xray.Config{}\n\terr = json.Unmarshal([]byte(templateConfig), xrayConfig)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ts.inboundService.AddTraffic(nil, nil)\n\n\tinbounds, err := s.inboundService.GetAllInbounds()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, inbound := range inbounds {\n\t\tif !inbound.Enable {\n\t\t\tcontinue\n\t\t}\n\t\t// get settings clients\n\t\tsettings := map[string]interface{}{}\n\t\tjson.Unmarshal([]byte(inbound.Settings), &settings)\n\t\tclients, ok := settings[\"clients\"].([]interface{})\n\t\tif ok {\n\t\t\t// check users active or not\n\t\t\tclientStats := inbound.ClientStats\n\t\t\tfor _, clientTraffic := range clientStats {\n\t\t\t\tindexDecrease := 0\n\t\t\t\tfor index, client := range clients {\n\t\t\t\t\tc := client.(map[string]interface{})\n\t\t\t\t\tif c[\"email\"] == clientTraffic.Email {\n\t\t\t\t\t\tif !clientTraffic.Enable {\n\t\t\t\t\t\t\tclients = RemoveIndex(clients, index-indexDecrease)\n\t\t\t\t\t\t\tindexDecrease++\n\t\t\t\t\t\t\tlogger.Infof(\"Remove Inbound User %s due to expiration or traffic limit\", c[\"email\"])\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clear client config for additional parameters\n\t\t\tvar final_clients []interface{}\n\t\t\tfor _, client := range clients {\n\t\t\t\tc := client.(map[string]interface{})\n\t\t\t\tif c[\"enable\"] != nil {\n\t\t\t\t\tif enable, ok := c[\"enable\"].(bool); ok && !enable {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor key := range c {\n\t\t\t\t\tif key != \"email\" && key != \"id\" && key != \"password\" && key != \"flow\" && key != \"method\" {\n\t\t\t\t\t\tdelete(c, key)\n\t\t\t\t\t}\n\t\t\t\t\tif c[\"flow\"] == \"xtls-rprx-vision-udp443\" {\n\t\t\t\t\t\tc[\"flow\"] = \"xtls-rprx-vision\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinal_clients = append(final_clients, interface{}(c))\n\t\t\t}\n\n\t\t\tsettings[\"clients\"] = final_clients\n\t\t\tmodifiedSettings, err := json.MarshalIndent(settings, \"\", \"  \")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tinbound.Settings = string(modifiedSettings)\n\t\t}\n\n\t\tif len(inbound.StreamSettings) > 0 {\n\t\t\t// Unmarshal stream JSON\n\t\t\tvar stream map[string]interface{}\n\t\t\tjson.Unmarshal([]byte(inbound.StreamSettings), &stream)\n\n\t\t\t// Remove the \"settings\" field under \"tlsSettings\" and \"realitySettings\"\n\t\t\ttlsSettings, ok1 := stream[\"tlsSettings\"].(map[string]interface{})\n\t\t\trealitySettings, ok2 := stream[\"realitySettings\"].(map[string]interface{})\n\t\t\tif ok1 || ok2 {\n\t\t\t\tif ok1 {\n\t\t\t\t\tdelete(tlsSettings, \"settings\")\n\t\t\t\t} else if ok2 {\n\t\t\t\t\tdelete(realitySettings, \"settings\")\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdelete(stream, \"externalProxy\")\n\n\t\t\tnewStream, err := json.MarshalIndent(stream, \"\", \"  \")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tinbound.StreamSettings = string(newStream)\n\t\t}\n\n\t\tinboundConfig := inbound.GenXrayInboundConfig()\n\t\txrayConfig.InboundConfigs = append(xrayConfig.InboundConfigs, *inboundConfig)\n\t}\n\treturn xrayConfig, nil\n}\n\nfunc (s *XrayService) GetXrayTraffic() ([]*xray.Traffic, []*xray.ClientTraffic, error) {\n\tif !s.IsXrayRunning() {\n\t\terr := errors.New(\"xray is not running\")\n\t\tlogger.Debug(\"Attempted to fetch Xray traffic, but Xray is not running:\", err)\n\t\treturn nil, nil, err\n\t}\n\tapiPort := p.GetAPIPort()\n\ts.xrayAPI.Init(apiPort)\n\tdefer s.xrayAPI.Close()\n\n\ttraffic, clientTraffic, err := s.xrayAPI.GetTraffic(true)\n\tif err != nil {\n\t\tlogger.Debug(\"Failed to fetch Xray traffic:\", err)\n\t\treturn nil, nil, err\n\t}\n\treturn traffic, clientTraffic, nil\n}\n\nfunc (s *XrayService) RestartXray(isForce bool) error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tlogger.Debug(\"restart xray, force:\", isForce)\n\n\txrayConfig, err := s.GetXrayConfig()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif s.IsXrayRunning() {\n\t\tif !isForce && p.GetConfig().Equals(xrayConfig) {\n\t\t\tlogger.Debug(\"It does not need to restart xray\")\n\t\t\treturn nil\n\t\t}\n\t\tp.Stop()\n\t}\n\n\tp = xray.NewProcess(xrayConfig)\n\tresult = \"\"\n\terr = p.Start()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (s *XrayService) StopXray() error {\n\tlock.Lock()\n\tdefer lock.Unlock()\n\tlogger.Debug(\"Attempting to stop Xray...\")\n\tif s.IsXrayRunning() {\n\t\treturn p.Stop()\n\t}\n\treturn errors.New(\"xray is not running\")\n}\n\nfunc (s *XrayService) SetToNeedRestart() {\n\tisNeedXrayRestart.Store(true)\n}\n\nfunc (s *XrayService) IsNeedRestartAndSetFalse() bool {\n\treturn isNeedXrayRestart.CompareAndSwap(true, false)\n}\n"
  },
  {
    "path": "web/service/xray_setting.go",
    "content": "package service\n\nimport (\n\t\"bytes\"\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"time\"\n\n\t\"x-ui/util/common\"\n\t\"x-ui/xray\"\n)\n\ntype XraySettingService struct {\n\tSettingService\n}\n\nfunc (s *XraySettingService) SaveXraySetting(newXraySettings string) error {\n\tif err := s.CheckXrayConfig(newXraySettings); err != nil {\n\t\treturn err\n\t}\n\treturn s.SettingService.saveSetting(\"xrayTemplateConfig\", newXraySettings)\n}\n\nfunc (s *XraySettingService) CheckXrayConfig(XrayTemplateConfig string) error {\n\txrayConfig := &xray.Config{}\n\terr := json.Unmarshal([]byte(XrayTemplateConfig), xrayConfig)\n\tif err != nil {\n\t\treturn common.NewError(\"xray template config invalid:\", err)\n\t}\n\treturn nil\n}\n\nfunc (s *XraySettingService) GetWarpData() (string, error) {\n\twarp, err := s.SettingService.GetWarp()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn warp, nil\n}\n\nfunc (s *XraySettingService) GetWarpConfig() (string, error) {\n\tvar warpData map[string]string\n\twarp, err := s.SettingService.GetWarp()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\terr = json.Unmarshal([]byte(warp), &warpData)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\turl := fmt.Sprintf(\"https://api.cloudflareclient.com/v0a2158/reg/%s\", warpData[\"device_id\"])\n\n\treq, err := http.NewRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+warpData[\"access_token\"])\n\n\tclient := &http.Client{}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\tbuffer := bytes.NewBuffer(make([]byte, 8192))\n\tbuffer.Reset()\n\t_, err = buffer.ReadFrom(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn buffer.String(), nil\n}\n\nfunc (s *XraySettingService) RegWarp(secretKey string, publicKey string) (string, error) {\n\ttos := time.Now().UTC().Format(\"2006-01-02T15:04:05.000Z\")\n\thostName, _ := os.Hostname()\n\tdata := fmt.Sprintf(`{\"key\":\"%s\",\"tos\":\"%s\",\"type\": \"PC\",\"model\": \"x-ui\", \"name\": \"%s\"}`, publicKey, tos, hostName)\n\n\turl := \"https://api.cloudflareclient.com/v0a2158/reg\"\n\n\treq, err := http.NewRequest(\"POST\", url, bytes.NewBuffer([]byte(data)))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treq.Header.Add(\"CF-Client-Version\", \"a-7.21-0721\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tclient := &http.Client{}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\tbuffer := bytes.NewBuffer(make([]byte, 8192))\n\tbuffer.Reset()\n\t_, err = buffer.ReadFrom(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tvar rspData map[string]interface{}\n\terr = json.Unmarshal(buffer.Bytes(), &rspData)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tdeviceId := rspData[\"id\"].(string)\n\ttoken := rspData[\"token\"].(string)\n\tlicense, ok := rspData[\"account\"].(map[string]interface{})[\"license\"].(string)\n\tif !ok {\n\t\tfmt.Println(\"Error accessing license value.\")\n\t\treturn \"\", err\n\t}\n\n\twarpData := fmt.Sprintf(\"{\\n  \\\"access_token\\\": \\\"%s\\\",\\n  \\\"device_id\\\": \\\"%s\\\",\", token, deviceId)\n\twarpData += fmt.Sprintf(\"\\n  \\\"license_key\\\": \\\"%s\\\",\\n  \\\"private_key\\\": \\\"%s\\\"\\n}\", license, secretKey)\n\n\ts.SettingService.SetWarp(warpData)\n\n\tresult := fmt.Sprintf(\"{\\n  \\\"data\\\": %s,\\n  \\\"config\\\": %s\\n}\", warpData, buffer.String())\n\n\treturn result, nil\n}\n\nfunc (s *XraySettingService) SetWarpLicense(license string) (string, error) {\n\tvar warpData map[string]string\n\twarp, err := s.SettingService.GetWarp()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\terr = json.Unmarshal([]byte(warp), &warpData)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\turl := fmt.Sprintf(\"https://api.cloudflareclient.com/v0a2158/reg/%s/account\", warpData[\"device_id\"])\n\tdata := fmt.Sprintf(`{\"license\": \"%s\"}`, license)\n\n\treq, err := http.NewRequest(\"PUT\", url, bytes.NewBuffer([]byte(data)))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+warpData[\"access_token\"])\n\n\tclient := &http.Client{}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\tbuffer := bytes.NewBuffer(make([]byte, 8192))\n\tbuffer.Reset()\n\t_, err = buffer.ReadFrom(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\twarpData[\"license_key\"] = license\n\tnewWarpData, err := json.MarshalIndent(warpData, \"\", \"  \")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ts.SettingService.SetWarp(string(newWarpData))\n\tprintln(string(newWarpData))\n\n\treturn string(newWarpData), nil\n}\n"
  },
  {
    "path": "web/session/session.go",
    "content": "package session\n\nimport (\n\t\"encoding/gob\"\n\n\t\"x-ui/database/model\"\n\n\t\"github.com/gin-contrib/sessions\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nconst loginUser = \"LOGIN_USER\"\n\nfunc init() {\n\tgob.Register(model.User{})\n}\n\nfunc SetLoginUser(c *gin.Context, user *model.User) error {\n\ts := sessions.Default(c)\n\ts.Set(loginUser, user)\n\treturn s.Save()\n}\n\nfunc SetMaxAge(c *gin.Context, maxAge int) error {\n\ts := sessions.Default(c)\n\ts.Options(sessions.Options{\n\t\tPath:   \"/\",\n\t\tMaxAge: maxAge,\n\t})\n\treturn s.Save()\n}\n\nfunc GetLoginUser(c *gin.Context) *model.User {\n\ts := sessions.Default(c)\n\tif obj := s.Get(loginUser); obj != nil {\n\t\tif user, ok := obj.(model.User); ok {\n\t\t\treturn &user\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc IsLogin(c *gin.Context) bool {\n\treturn GetLoginUser(c) != nil\n}\n\nfunc ClearSession(c *gin.Context) error {\n\ts := sessions.Default(c)\n\ts.Clear()\n\ts.Options(sessions.Options{\n\t\tPath:   \"/\",\n\t\tMaxAge: -1,\n\t})\n\tif err := s.Save(); err != nil {\n\t\treturn err\n\t}\n\tc.SetCookie(\"3x-ui\", \"\", -1, \"/\", \"\", false, true)\n\treturn nil\n}\n"
  },
  {
    "path": "web/translation/translate.en_US.toml",
    "content": "\"username\" = \"Username\"\n\"password\" = \"Password\"\n\"login\" = \"Log In\"\n\"confirm\" = \"Confirm\"\n\"cancel\" = \"Cancel\"\n\"close\" = \"Close\"\n\"copy\" = \"Copy\"\n\"copied\" = \"Copied\"\n\"download\" = \"Download\"\n\"remark\" = \"Remark\"\n\"enable\" = \"Enabled\"\n\"protocol\" = \"Protocol\"\n\"search\" = \"Search\"\n\"filter\" = \"Filter\"\n\"loading\" = \"Loading...\"\n\"second\" = \"Second\"\n\"minute\" = \"Minute\"\n\"hour\" = \"Hour\"\n\"day\" = \"Day\"\n\"check\" = \"Check\"\n\"indefinite\" = \"Indefinite\"\n\"unlimited\" = \"Unlimited\"\n\"none\" = \"None\"\n\"qrCode\" = \"QR Code\"\n\"info\" = \"More Information\"\n\"edit\" = \"Edit\"\n\"delete\" = \"Delete\"\n\"reset\" = \"Reset\"\n\"copySuccess\" = \"Copied Successful\"\n\"sure\" = \"Sure\"\n\"encryption\" = \"Encryption\"\n\"transmission\" = \"Transmission\"\n\"host\" = \"Host\"\n\"path\" = \"Path\"\n\"camouflage\" = \"Obfuscation\"\n\"status\" = \"Status\"\n\"enabled\" = \"Enabled\"\n\"disabled\" = \"Disabled\"\n\"depleted\" = \"Depleted\"\n\"depletingSoon\" = \"Depleting\"\n\"offline\" = \"Offline\"\n\"online\" = \"Online\"\n\"domainName\" = \"Domain Name\"\n\"monitor\" = \"Listen IP\"\n\"certificate\" = \"Digital Certificate\"\n\"fail\" = \" Failed\"\n\"success\" = \" Successfully\"\n\"getVersion\" = \"Get Version\"\n\"install\" = \"Install\"\n\"clients\" = \"Clients\"\n\"usage\" = \"Usage\"\n\"secretToken\" = \"Secret Token\"\n\"remained\" = \"Remained\"\n\"security\" = \"Security\"\n\"secAlertTitle\" = \"Security Alert\"\n\"secAlertSsl\" = \"This connection is not secure. Please avoid entering sensitive information until TLS is activated for data protection.\"\n\"secAlertConf\" = \"Certain settings are vulnerable to attacks. It is recommended to reinforce security protocols to prevent potential breaches.\"\n\"secAlertSSL\" = \"Panel lacks secure connection. Please install TLS certificate for data protection.\"\n\"secAlertPanelPort\" = \"Panel default port is vulnerable. Please configure a random or specific port.\"\n\"secAlertPanelURI\" = \"Panel default URI path is insecure. Please configure a complex URI path.\"\n\"secAlertSubURI\" = \"Subscription default URI path is insecure. Please configure a complex URI path.\"\n\"secAlertSubJsonURI\" = \"Subscription JSON default URI path is insecure. Please configure a complex URI path.\"\n\n[menu]\n\"dashboard\" = \"Overview\"\n\"inbounds\" = \"Inbounds\"\n\"settings\" = \"Panel Settings\"\n\"xray\" = \"Xray Configs\"\n\"logout\" = \"Log Out\"\n\"link\" = \"Manage\"\n\"navigation\" = \"navigation\"\n\n[pages.login]\n\"hello\" = \"Hello\"\n\"title\" = \"Welcome\"\n\"loginAgain\" = \"Your session has expired, please log in again\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"The Input data format is invalid.\"\n\"emptyUsername\" = \"Username is required\"\n\"emptyPassword\" = \"Password is required\"\n\"wrongUsernameOrPassword\" = \"Invalid username or password or secret.\"\n\"successLogin\" = \"Login\"\n\n[pages.index]\n\"title\" = \"Overview\"\n\"memory\" = \"RAM\"\n\"hard\" = \"Disk\"\n\"xrayStatus\" = \"Xray\"\n\"stopXray\" = \"Stop\"\n\"restartXray\" = \"Restart\"\n\"xraySwitch\" = \"Version\"\n\"xraySwitchClick\" = \"Choose the version you want to switch to.\"\n\"xraySwitchClickDesk\" = \"Choose carefully, as older versions may not be compatible with current configurations.\"\n\"operationHours\" = \"Uptime\"\n\"systemLoad\" = \"System Load\"\n\"systemLoadDesc\" = \"System load average for the past 1, 5, and 15 minutes\"\n\"connectionTcpCountDesc\" = \"Total TCP connections across the system\"\n\"connectionUdpCountDesc\" = \"Total UDP connections across the system\"\n\"connectionCount\" = \"Connection Stats\"\n\"upSpeed\" = \"Overall upload speed across the system\"\n\"downSpeed\" = \"Overall download speed across the system\"\n\"totalSent\" = \"Total data sent across the system since OS startup\"\n\"totalReceive\" = \"Total data received across the system since OS startup\"\n\"xraySwitchVersionDialog\" = \"Change Xray Version\"\n\"xraySwitchVersionDialogDesc\" = \"Are you sure you want to change the Xray version to\"\n\"dontRefresh\" = \"Installation is in progress, please do not refresh this page\"\n\"logs\" = \"Logs\"\n\"config\" = \"Config\"\n\"backup\" = \"Backup & Restore\"\n\"backupTitle\" = \"Database Backup & Restore\"\n\"backupDescription\" = \"It is recommended to make a backup before restoring a database.\"\n\"exportDatabase\" = \"Back Up\"\n\"importDatabase\" = \"Restore\"\n\n[pages.inbounds]\n\"title\" = \"Inbounds\"\n\"totalDownUp\" = \"Total Sent/Received\"\n\"totalUsage\" = \"Total Usage\"\n\"inboundCount\" = \"Total Inbounds\"\n\"operate\" = \"Menu\"\n\"enable\" = \"Enabled\"\n\"remark\" = \"Remark\"\n\"protocol\" = \"Protocol\"\n\"port\" = \"Port\"\n\"traffic\" = \"Traffic\"\n\"details\" = \"Details\"\n\"transportConfig\" = \"Transport\"\n\"expireDate\" = \"Duration\"\n\"resetTraffic\" = \"Reset Traffic\"\n\"addInbound\" = \"Add Inbound\"\n\"generalActions\" = \"General Actions\"\n\"create\" = \"Create\"\n\"update\" = \"Update\"\n\"modifyInbound\" = \"Modify Inbound\"\n\"deleteInbound\" = \"Delete Inbound\"\n\"deleteInboundContent\" = \"Are you sure you want to delete inbound?\"\n\"deleteClient\" = \"Delete Client\"\n\"deleteClientContent\" = \"Are you sure you want to delete client?\"\n\"resetTrafficContent\" = \"Are you sure you want to reset traffic?\"\n\"copyLink\" = \"Copy URL\"\n\"address\" = \"Address\"\n\"network\" = \"Network\"\n\"destinationPort\" = \"Destination Port\"\n\"targetAddress\" = \"Target Address\"\n\"monitorDesc\" = \"Leave blank to listen on all IPs\"\n\"meansNoLimit\" = \" = Unlimited. (unit: GB)\"\n\"totalFlow\" = \"Total Flow\"\n\"leaveBlankToNeverExpire\" = \"Leave blank to never expire\"\n\"noRecommendKeepDefault\" = \"It is recommended to keep the default\"\n\"certificatePath\" = \"File Path\"\n\"certificateContent\" = \"File Content\"\n\"publicKey\" = \"Public Key\"\n\"privatekey\" = \"Private Key\"\n\"clickOnQRcode\" = \"Click on QR Code to Copy\"\n\"client\" = \"Client\"\n\"export\" = \"Export All URLs\"\n\"clone\" = \"Clone\"\n\"cloneInbound\" = \"Clone\"\n\"cloneInboundContent\" = \"All settings of this inbound, except Port, Listening IP, and Clients, will be applied to the clone.\"\n\"cloneInboundOk\" = \"Clone\"\n\"resetAllTraffic\" = \"Reset All Inbounds Traffic\"\n\"resetAllTrafficTitle\" = \"Reset All Inbounds Traffic\"\n\"resetAllTrafficContent\" = \"Are you sure you want to reset the traffic of all inbounds?\"\n\"resetInboundClientTraffics\" = \"Reset Clients Traffic\"\n\"resetInboundClientTrafficTitle\" = \"Reset Clients Traffic\"\n\"resetInboundClientTrafficContent\" = \"Are you sure you want to reset the traffic of this inbound's clients?\"\n\"resetAllClientTraffics\" = \"Reset All Clients Traffic\"\n\"resetAllClientTrafficTitle\" = \"Reset All Clients Traffic\"\n\"resetAllClientTrafficContent\" = \"Are you sure you want to reset the traffic of all clients?\"\n\"delDepletedClients\" = \"Delete Depleted Clients\"\n\"delDepletedClientsTitle\" = \"Delete Depleted Clients\"\n\"delDepletedClientsContent\" = \"Are you sure you want to delete all the depleted clients?\"\n\"email\" = \"Email\"\n\"emailDesc\" = \"Please provide a unique email address.\"\n\"IPLimit\" = \"IP Limit\"\n\"IPLimitDesc\" = \"Disables inbound if the count exceeds the set value. (0 = disable)\"\n\"IPLimitlog\" = \"IP Log\"\n\"IPLimitlogDesc\" = \"The IPs history log. (to enable inbound after disabling, clear the log)\"\n\"IPLimitlogclear\" = \"Clear The Log\"\n\"setDefaultCert\" = \"Set Cert from Panel\"\n\"xtlsDesc\" = \"Xray must be v1.7.5\"\n\"realityDesc\" = \"Xray must be v1.8.0+\"\n\"telegramDesc\" = \"Please provide Telegram Chat ID. (use '/id' command in the bot) or (@userinfobot)\"\n\"subscriptionDesc\" = \"To find your subscription URL, navigate to the 'Details'. Additionally, you can use the same name for several clients.\"\n\"info\" = \"Info\"\n\"same\" = \"Same\"\n\"inboundData\" = \"Inbound's Data\"\n\"exportInbound\" = \"Export Inbound\"\n\"import\" = \"Import\"\n\"importInbound\" = \"Import an Inbound\"\n\n[pages.client]\n\"add\" = \"Add Client\"\n\"edit\" = \"Edit Client\"\n\"submitAdd\" = \"Add Client\"\n\"submitEdit\" = \"Save Changes\"\n\"clientCount\" = \"Number of Clients\"\n\"bulk\" = \"Add Bulk\"\n\"method\" = \"Method\"\n\"first\" = \"First\"\n\"last\" = \"Last\"\n\"prefix\" = \"Prefix\"\n\"postfix\" = \"Postfix\"\n\"delayedStart\" = \"Start After First Use\"\n\"expireDays\" = \"Duration\"\n\"days\" = \"Day(s)\"\n\"renew\" = \"Auto Renew\"\n\"renewDesc\" = \"Auto-renewal after expiration. (0 = disable)(unit: day)\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"Obtain\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"Request\"\n\"response\" = \"Response\"\n\"name\" = \"Name\"\n\"value\" = \"Value\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"Version\"\n\"method\" = \"Method\"\n\"path\" = \"Path\"\n\"status\" = \"Status\"\n\"statusDescription\" = \"Status Desc\"\n\"requestHeader\" = \"Request Header\"\n\"responseHeader\" = \"Response Header\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"Encryption\"\n\n[pages.settings]\n\"title\" = \"Panel Settings\"\n\"save\" = \"Save\"\n\"infoDesc\" = \"Every change made here needs to be saved. Please restart the panel to apply changes.\"\n\"restartPanel\" = \"Restart Panel\"\n\"restartPanelDesc\" = \"Are you sure you want to restart the panel? If you cannot access the panel after restarting, please view the panel log info on the server.\"\n\"actions\" = \"Actions\"\n\"resetDefaultConfig\" = \"Reset to Default\"\n\"panelSettings\" = \"General\"\n\"securitySettings\" = \"Authentication\"\n\"TGBotSettings\" = \"Telegram Bot\"\n\"panelListeningIP\" = \"Listen IP\"\n\"panelListeningIPDesc\" = \"The IP address for the web panel. (leave blank to listen on all IPs)\"\n\"panelListeningDomain\" = \"Listen Domain\"\n\"panelListeningDomainDesc\" = \"The domain name for the web panel. (leave blank to listen on all domains and IPs)\"\n\"panelPort\" = \"Listen Port\"\n\"panelPortDesc\" = \"The port number for the web panel. (must be an unused port)\"\n\"publicKeyPath\" = \"Public Key Path\"\n\"publicKeyPathDesc\" = \"The public key file path for the web panel. (begins with ‘/‘)\"\n\"privateKeyPath\" = \"Private Key Path\"\n\"privateKeyPathDesc\" = \"The private key file path for the web panel. (begins with ‘/‘)\"\n\"panelUrlPath\" = \"URI Path\"\n\"panelUrlPathDesc\" = \"The URI path for the web panel. (begins with ‘/‘ and concludes with ‘/‘)\"\n\"pageSize\" = \"Pagination Size\"\n\"pageSizeDesc\" = \"Define page size for inbounds table. (0 = disable)\"\n\"remarkModel\" = \"Remark Model & Separation Character\"\n\"datepicker\" = \"Calendar Type\"\n\"datepickerPlaceholder\" = \"Select date\"\n\"datepickerDescription\" = \"Scheduled tasks will run based on this calendar.\"\n\"sampleRemark\" = \"Sample Remark\"\n\"oldUsername\" = \"Current Username\"\n\"currentPassword\" = \"Current Password\"\n\"newUsername\" = \"New Username\"\n\"newPassword\" = \"New Password\"\n\"telegramBotEnable\" = \"Enable Telegram Bot\"\n\"telegramBotEnableDesc\" = \"Enables the Telegram bot.\"\n\"telegramToken\" = \"Telegram Token\"\n\"telegramTokenDesc\" = \"The Telegram bot token obtained from '@BotFather'.\"\n\"telegramProxy\" = \"SOCKS Proxy\"\n\"telegramProxyDesc\" = \"Enables SOCKS5 proxy for connecting to Telegram. (adjust settings as per guide)\"\n\"telegramChatId\" = \"Admin Chat ID\"\n\"telegramChatIdDesc\" = \"The Telegram Admin Chat ID(s). (comma-separated)(get it here @userinfobot) or (use '/id' command in the bot)\"\n\"telegramNotifyTime\" = \"Notification Time\"\n\"telegramNotifyTimeDesc\" = \"The Telegram bot notification time set for periodic reports. (use the crontab time format)\"\n\"tgNotifyBackup\" = \"Database Backup\"\n\"tgNotifyBackupDesc\" = \"Send a database backup file with a report.\"\n\"tgNotifyLogin\" = \"Login Notification\"\n\"tgNotifyLoginDesc\" = \"Get notified about the username, IP address, and time whenever someone attempts to log into your web panel.\"\n\"sessionMaxAge\" = \"Session Duration\"\n\"sessionMaxAgeDesc\" = \"The duration for which you can stay logged in. (unit: minute)\"\n\"expireTimeDiff\" = \"Expiration Date Notification\"\n\"expireTimeDiffDesc\" = \"Get notified about expiration date when reaching this threshold. (unit: day)\"\n\"trafficDiff\" = \"Traffic Cap Notification\"\n\"trafficDiffDesc\" = \"Get notified about traffic cap when reaching this threshold. (unit: GB)\"\n\"tgNotifyCpu\" = \"CPU Load Notification\"\n\"tgNotifyCpuDesc\" = \"Get notified if CPU load exceeds this threshold. (unit: %)\"\n\"timeZone\" = \"Time Zone\"\n\"timeZoneDesc\" = \"Scheduled tasks will run based on this time zone.\"\n\"subSettings\" = \"Subscription\"\n\"subEnable\" = \"Enable Subscription Service\"\n\"subEnableDesc\" = \"Enables the subscription service.\"\n\"subListen\" = \"Listen IP\"\n\"subListenDesc\" = \"The IP address for the subscription service. (leave blank to listen on all IPs)\"\n\"subPort\" = \"Listen Port\"\n\"subPortDesc\" = \"The port number for the subscription service. (must be an unused port)\"\n\"subCertPath\" = \"Public Key Path\"\n\"subCertPathDesc\" = \"The public key file path for the subscription service. (begins with ‘/‘)\"\n\"subKeyPath\" = \"Private Key Path\"\n\"subKeyPathDesc\" = \"The private key file path for the subscription service. (begins with ‘/‘)\"\n\"subPath\" = \"URI Path\"\n\"subPathDesc\" = \"The URI path for the subscription service. (begins with ‘/‘ and concludes with ‘/‘)\"\n\"subDomain\" = \"Listen Domain\"\n\"subDomainDesc\" = \"The domain name for the subscription service. (leave blank to listen on all domains and IPs)\"\n\"subUpdates\" = \"Update Intervals\"\n\"subUpdatesDesc\" = \"The update intervals of the subscription URL in the client apps. (unit: hour)\"\n\"subEncrypt\" = \"Encode\"\n\"subEncryptDesc\" = \"The returned content of subscription service will be Base64 encoded.\"\n\"subShowInfo\" = \"Show Usage Info\"\n\"subShowInfoDesc\" = \"The remaining traffic and date will be displayed in the client apps.\"\n\"subURI\" = \"Reverse Proxy URI\"\n\"subURIDesc\" = \"The URI path of the subscription URL for use behind proxies.\"\n\"fragment\" = \"Fragmentation\"\n\"fragmentDesc\" = \"Enable fragmentation for TLS hello packet.\"\n\"fragmentSett\" = \"Fragmentation Settings\"\n\"mux\" = \"Mux\"\n\"muxDesc\" = \"Transmit multiple independent data streams within an established data stream.\"\n\"muxSett\" = \"Mux Settings\"\n\"direct\" = \"Direct Connection\"\n\"directDesc\" = \"Directly establishes connections with domains or IP ranges of a specific country.\"\n\"directSett\" = \"Direct Connection Options\"\n\n[pages.xray]\n\"title\" = \"Xray Configs\"\n\"save\" = \"Save\"\n\"restart\" = \"Restart Xray\"\n\"basicTemplate\" = \"Basics\"\n\"advancedTemplate\" = \"Advanced\"\n\"generalConfigs\" = \"General\"\n\"generalConfigsDesc\" = \"These options will determine general adjustments.\"\n\"logConfigs\" = \"Log\"\n\"logConfigsDesc\" = \"Logs may affect your server's efficiency. It is recommended to enable it wisely only in case of your needs\"\n\"blockConfigs\" = \"Protection Shield\"\n\"blockConfigsDesc\" = \"These options will block traffic based on specific requested protocols and websites.\"\n\"blockCountryConfigs\" = \"Block Country\"\n\"blockCountryConfigsDesc\" = \"These options will block traffic based on the specific requested country.\"\n\"directCountryConfigs\" = \"Direct Country\"\n\"directCountryConfigsDesc\" = \"A direct connection ensures that specific traffic is not routed through another server.\"\n\"ipv4Configs\" = \"IPv4 Routing\"\n\"ipv4ConfigsDesc\" = \"These options will route traffic based on a specific destination via IPv4.\"\n\"warpConfigs\" = \"WARP Routing\"\n\"warpConfigsDesc\" = \"These options will route traffic based on a specific destination via WARP.\"\n\"Template\" = \"Advanced Xray Configuration Template\"\n\"TemplateDesc\" = \"The final Xray config file will be generated based on this template.\"\n\"FreedomStrategy\" = \"Freedom Protocol Strategy\"\n\"FreedomStrategyDesc\" = \"Set the output strategy for the network in the Freedom Protocol.\"\n\"RoutingStrategy\" = \"Overall Routing Strategy\"\n\"RoutingStrategyDesc\" = \"Set the overall traffic routing strategy for resolving all requests.\"\n\"Torrent\" = \"Block BitTorrent Protocol\"\n\"TorrentDesc\" = \"Blocks BitTorrent protocol.\"\n\"PrivateIp\" = \"Block Connection to Private IPs\"\n\"PrivateIpDesc\" = \"Blocks establishing connections to private IP ranges.\"\n\"Ads\" = \"Block Ads\"\n\"AdsDesc\" = \"Blocks advertising websites.\"\n\"Family\" = \"Family Protection\"\n\"FamilyDesc\" = \"Blocks adult content, and malware websites.\"\n\"Security\" = \"Security Shield\"\n\"SecurityDesc\" = \"Blocks malware, phishing, and cryptominers websites.\"\n\"Speedtest\" = \"Block Speedtest\"\n\"SpeedtestDesc\" = \"Blocks establishing connectins to speedtest websites.\"\n\"IRIp\" = \"Block Connection to Iran IPs\"\n\"IRIpDesc\" = \"Blocks establishing connections to Iran IP ranges.\"\n\"IRDomain\" = \"Block Connection to Iran Domains\"\n\"IRDomainDesc\" = \"Blocks establishing connections to Iran domains.\"\n\"ChinaIp\" = \"Block Connection to China IPs\"\n\"ChinaIpDesc\" = \"Blocks establishing connections to China IP ranges.\"\n\"ChinaDomain\" = \"Block Connection to China Domains\"\n\"ChinaDomainDesc\" = \"Blocks establishing connections to China domains.\"\n\"RussiaIp\" = \"Block Connection to Russia IPs\"\n\"RussiaIpDesc\" = \"Blocks establishing connections to Russia IP ranges.\"\n\"RussiaDomain\" = \"Block Connection to Russia Domains\"\n\"RussiaDomainDesc\" = \"Blocks establishing connections to Russia domains.\"\n\"VNIp\" = \"Block Connection to Vietnam IPs\"\n\"VNIpDesc\" = \"Blocks establishing connections to Vietnam IP ranges.\"\n\"VNDomain\" = \"Block Connection to Vietnam Domains\"\n\"VNDomainDesc\" = \"Blocks establishing connections to Vietnam domains.\"\n\"DirectIRIp\" = \"Direct Connection to Iran IPs\"\n\"DirectIRIpDesc\" = \"Directly establishes connections to Iran IP ranges.\"\n\"DirectIRDomain\" = \"Direct Connection to Iran Domains\"\n\"DirectIRDomainDesc\" = \"Directly establishes connections to Iran domains.\"\n\"DirectChinaIp\" = \"Direct Connection to China IPs\"\n\"DirectChinaIpDesc\" = \"Directly establishes connections to China IP ranges.\"\n\"DirectChinaDomain\" = \"Direct Connection to China Domains\"\n\"DirectChinaDomainDesc\" = \"Directly establishes connections to China domains.\"\n\"DirectRussiaIp\" = \"Direct Connection to Russia IPs\"\n\"DirectRussiaIpDesc\" = \"Directly establishes connections to Russia IP ranges.\"\n\"DirectRussiaDomain\" = \"Direct Connection to Russia Domains\"\n\"DirectRussiaDomainDesc\" = \"Directly establishes connections to Russia domains.\"\n\"DirectVNIp\" = \"Direct Connection to Vietnam IPs\"\n\"DirectVNIpDesc\" = \"Directly establishes connections to Vietnam IP ranges.\"\n\"DirectVNDomain\" = \"Direct Connection to Vietnam Domains\"\n\"DirectVNDomainDesc\" = \"Directly establishes connections to Vietnam domains.\"\n\"GoogleIPv4\" = \"Google\"\n\"GoogleIPv4Desc\" = \"Routes traffic to Google via IPv4.\"\n\"NetflixIPv4\" = \"Netflix\"\n\"NetflixIPv4Desc\" = \"Routes traffic to Netflix via IPv4.\"\n\"GoogleWARP\" = \"Google\"\n\"GoogleWARPDesc\" = \"Add routing for Google via WARP.\"\n\"OpenAIWARP\" = \"ChatGPT\"\n\"OpenAIWARPDesc\" = \"Routes traffic to ChatGPT via WARP.\"\n\"NetflixWARP\" = \"Netflix\"\n\"NetflixWARPDesc\" = \"Routes traffic to Netflix via WARP.\"\n\"MetaWARP\" = \"Meta\"\n\"MetaWARPDesc\" = \"Routes traffic to Meta (Instagram, Facebook, WhatsApp, Threads,...) via WARP.\"\n\"AppleWARP\" = \"Apple\"\n\"AppleWARPDesc\" = \"Routes traffic to Apple via WARP.\"\n\"RedditWARP\" = \"Reddit\"\n\"RedditWARPDesc\" = \"Routes traffic to Reddit via WARP.\"\n\"SpotifyWARP\" = \"Spotify\"\n\"SpotifyWARPDesc\" = \"Routes traffic to Spotify via WARP.\"\n\"IRWARP\" = \"Iran domains\"\n\"IRWARPDesc\" = \"Routes traffic to Iran domains via WARP.\"\n\"Inbounds\" = \"Inbounds\"\n\"InboundsDesc\" = \"Accepting the specific clients.\"\n\"Outbounds\" = \"Outbounds\"\n\"Balancers\" = \"Balancers\"\n\"OutboundsDesc\" = \"Set the outgoing traffic pathway.\"\n\"Routings\" = \"Routing Rules\"\n\"RoutingsDesc\" = \"The priority of each rule is important!\"\n\"completeTemplate\" = \"All\"\n\"logLevel\" = \"Log Level\"\n\"logLevelDesc\" = \"The log level for error logs, indicating the information that needs to be recorded.\"\n\"accessLog\" = \"Access Log\"\n\"accessLogDesc\" = \"The file path for the access log. The special value 'none' disabled access logs\"\n\"errorLog\" = \"Error Log\"\n\"errorLogDesc\" = \"The file path for the error log. The special value 'none' disabled error logs\"\n\n[pages.navigation]\n\"title\" = \"navigation\"\n\n[pages.xray.rules]\n\"first\" = \"First\"\n\"last\" = \"Last\"\n\"up\" = \"Up\"\n\"down\" = \"Down\"\n\"source\" = \"Source\"\n\"dest\" = \"Destination\"\n\"inbound\" = \"Inbound\"\n\"outbound\" = \"Outbound\"\n\"balancer\" = \"Balancer\"\n\"info\" = \"Info\"\n\"add\" = \"Add Rule\"\n\"edit\" = \"Edit Rule\"\n\"useComma\" = \"Comma-separated items\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"Add Outbound\"\n\"addReverse\" = \"Add Reverse\"\n\"editOutbound\" = \"Edit Outbound\"\n\"editReverse\" = \"Edit Reverse\"\n\"tag\" = \"Tag\"\n\"tagDesc\" = \"Unique Tag\"\n\"address\" = \"Address\"\n\"reverse\" = \"Reverse\"\n\"domain\" = \"Domain\"\n\"type\" = \"Type\"\n\"bridge\" = \"Bridge\"\n\"portal\" = \"Portal\"\n\"intercon\" = \"Interconnection\"\n\"settings\" = \"Settings\"\n\"accountInfo\" = \"Account Information\"\n\"outboundStatus\" = \"Outbound Status\"\n\"sendThrough\" = \"Send Through\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"Add Balancer\"\n\"editBalancer\" = \"Edit Balancer\"\n\"balancerStrategy\" = \"Strategy\"\n\"balancerSelectors\" = \"Selectors\"\n\"tag\" = \"Tag\"\n\"tagDesc\" = \"Unique Tag\"\n\"balancerDesc\" = \"It is not possible to use balancerTag and outboundTag at the same time. If used at the same time, only outboundTag will work.\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"Secret Key\"\n\"publicKey\" = \"Public Key\"\n\"allowedIPs\" = \"Allowed IPs\"\n\"endpoint\" = \"Endpoint\"\n\"psk\" = \"PreShared Key\"\n\"domainStrategy\" = \"Domain Strategy\"\n\n[pages.xray.dns]\n\"enable\" = \"Enable DNS\"\n\"enableDesc\" = \"Enable built-in DNS server\"\n\"tag\" = \"DNS Inbound Tag\"\n\"tagDesc\" = \"This tag will be available as an Inbound tag in routing rules.\"\n\"strategy\" = \"Query Strategy\"\n\"strategyDesc\" = \"Overall strategy to resolve domain names\"\n\"add\" = \"Add Server\"\n\"edit\" = \"Edit Server\"\n\"domains\" = \"Domains\"\n\n[pages.xray.fakedns]\n\"add\" = \"Add Fake DNS\"\n\"edit\" = \"Edit Fake DNS\"\n\"ipPool\" = \"IP Pool Subnet\"\n\"poolSize\" = \"Pool Size\"\n\n[pages.settings.security]\n\"admin\" = \"Admin\"\n\"secret\" = \"Secret Token\"\n\"loginSecurity\" = \"Secure Login\"\n\"loginSecurityDesc\" = \"Adds an additional layer of authentication to provide more security.\"\n\"secretToken\" = \"Secret Token\"\n\"secretTokenDesc\" = \"Please securely store this token in a safe place. This token is required for login and cannot be recovered.\"\n\n[pages.settings.toasts]\n\"modifySettings\" = \"Modify Settings\"\n\"getSettings\" = \"Get Settings\"\n\"modifyUser\" = \"Modify Admin\"\n\"originalUserPassIncorrect\" = \"The Current username or password is invalid\"\n\"userPassMustBeNotEmpty\" = \"The new username and password is empty\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ Custom keyboard closed!\"\n\"noResult\" = \"❗ No result!\"\n\"noQuery\" = \"❌ Query not found! Please use the command again!\"\n\"wentWrong\" = \"❌ Something went wrong!\"\n\"noIpRecord\" = \"❗ No IP Record!\"\n\"noInbounds\" = \"❗ No inbound found!\"\n\"unlimited\" = \"♾ Unlimited(Reset)\"\n\"add\" = \"Add\"\n\"month\" = \"Month\"\n\"months\" = \"Months\"\n\"day\" = \"Day\"\n\"days\" = \"Days\"\n\"hours\" = \"Hours\"\n\"unknown\" = \"Unknown\"\n\"inbounds\" = \"Inbounds\"\n\"clients\" = \"Clients\"\n\"offline\" = \"🔴 Offline\"\n\"online\" = \"🟢 Online\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ Unknown command.\"\n\"pleaseChoose\" = \"👇 Please choose:\\r\\n\"\n\"help\" = \"🤖 Welcome to this bot! It's designed to offer specific data from the web panel and allows you to make modifications as needed.\\r\\n\\r\\n\"\n\"start\" = \"👋 Hello <i>{{ .Firstname }}</i>.\\r\\n\"\n\"welcome\" = \"🤖 Welcome to <b>{{ .Hostname }}</b> management bot.\\r\\n\"\n\"status\" = \"✅ Bot is OK!\"\n\"usage\" = \"❗ Please provide a text to search!\"\n\"getID\" = \"🆔 Your ID: <code>{{ .ID }}</code>\"\n\"helpAdminCommands\" = \"To search for a client email:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nTo search for inbounds (with client stats):\\r\\n<code>/inbound [Remark]</code>\\r\\n\\r\\nTelegram Chat ID:\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"To search for statistics, use the following command:\\r\\n\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nTelegram Chat ID:\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 CPU Load {{ .Percent }}% exceeds the threshold of {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ Error in user selection!\"\n\"userSaved\" = \"✅ Telegram User saved.\"\n\"loginSuccess\" = \"✅ Logged in to the panel successfully.\\r\\n\"\n\"loginFailed\" = \"❗️Login attempt to the panel failed.\\r\\n\"\n\"report\" = \"🕰 Scheduled Reports: {{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ Date&Time: {{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 Host: {{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 3X-UI Version: {{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 Xray Version: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 IPs:\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ Uptime: {{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 System Load: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 RAM: {{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 TCP: {{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 UDP: {{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 Traffic: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ Status: {{ .State }}\\r\\n\"\n\"username\" = \"👤 Username: {{ .Username }}\\r\\n\"\n\"password\" = \"👤 Password: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ Time: {{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 Inbound: {{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 Port: {{ .Port }}\\r\\n\"\n\"expire\" = \"📅 Expire Date: {{ .Time }}\\r\\n\"\n\"expireIn\" = \"📅 Expire In: {{ .Time }}\\r\\n\"\n\"active\" = \"💡 Active: {{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 Enabled: {{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 Connection status: {{ .Status }}\\r\\n\"\n\"email\" = \"📧 Email: {{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 Upload: ↑{{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 Download: ↓{{ .Download }}\\r\\n\"\n\"total\" = \"📊 Total: ↑↓{{ .UpDown }} / {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 Telegram User: {{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 Exhausted {{ .Type }}:\\r\\n\"\n\"exhaustedCount\" = \"🚨 Exhausted {{ .Type }} count:\\r\\n\"\n\"onlinesCount\" = \"🌐 Online Clients: {{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 Disabled: {{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 Deplete Soon: {{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 Backup Time: {{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 Refreshed On: {{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ Yes\"\n\"no\" = \"❌ No\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ Close Keyboard\"\n\"cancel\" = \"❌ Cancel\"\n\"cancelReset\" = \"❌ Cancel Reset\"\n\"cancelIpLimit\" = \"❌ Cancel IP Limit\"\n\"confirmResetTraffic\" = \"✅ Confirm Reset Traffic?\"\n\"confirmClearIps\" = \"✅ Confirm Clear IPs?\"\n\"confirmRemoveTGUser\" = \"✅ Confirm Remove Telegram User?\"\n\"confirmToggle\" = \"✅ Confirm Enable/Disable User?\"\n\"dbBackup\" = \"Get DB Backup\"\n\"serverUsage\" = \"Server Usage\"\n\"getInbounds\" = \"Get Inbounds\"\n\"depleteSoon\" = \"Deplete Soon\"\n\"clientUsage\" = \"Get Usage\"\n\"onlines\" = \"Online Clients\"\n\"commands\" = \"Commands\"\n\"refresh\" = \"🔄 Refresh\"\n\"clearIPs\" = \"❌ Clear IPs\"\n\"removeTGUser\" = \"❌ Remove Telegram User\"\n\"selectTGUser\" = \"👤 Select Telegram User\"\n\"selectOneTGUser\" = \"👤 Select a Telegram User:\"\n\"resetTraffic\" = \"📈 Reset Traffic\"\n\"resetExpire\" = \"📅 Change Expiry Date\"\n\"ipLog\" = \"🔢 IP Log\"\n\"ipLimit\" = \"🔢 IP Limit\"\n\"setTGUser\" = \"👤 Set Telegram User\"\n\"toggle\" = \"🔘 Enable / Disable\"\n\"custom\" = \"🔢 Custom\"\n\"confirmNumber\" = \"✅ Confirm: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ Confirm adding: {{ .Num }}\"\n\"limitTraffic\" = \"🚧 Traffic Limit\"\n\"getBanLogs\" = \"Get Ban Logs\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ Operation successful!\"\n\"errorOperation\" = \"❗ Error in operation.\"\n\"getInboundsFailed\" = \"❌ Failed to get inbounds.\"\n\"canceled\" = \"❌ {{ .Email }}: Operation canceled.\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }}: Client refreshed successfully.\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }}: IPs refreshed successfully.\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }}: Client's Telegram User refreshed successfully.\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }}: Traffic reset successfully.\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }}: Traffic limit saved successfully.\"\n\"expireResetSuccess\" = \"✅ {{ .Email }}: Expire days reset successfully.\"\n\"resetIpSuccess\" = \"✅ {{ .Email }}: IP limit {{ .Count }} saved successfully.\"\n\"clearIpSuccess\" = \"✅ {{ .Email }}: IPs cleared successfully.\"\n\"getIpLog\" = \"✅ {{ .Email }}: Get IP Log.\"\n\"getUserInfo\" = \"✅ {{ .Email }}: Get Telegram User Info.\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }}: Telegram User removed successfully.\"\n\"enableSuccess\" = \"✅ {{ .Email }}: Enabled successfully.\"\n\"disableSuccess\" = \"✅ {{ .Email }}: Disabled successfully.\"\n\"askToAddUserId\" = \"Your configuration is not found!\\r\\nPlease ask your admin to use your Telegram ID in your configuration(s).\\r\\n\\r\\nYour User ID: <code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/translation/translate.es_ES.toml",
    "content": "\"username\" = \"Nombre de Usuario\"\r\n\"password\" = \"Contraseña\"\r\n\"login\" = \"Acceder\"\r\n\"confirm\" = \"Confirmar\"\r\n\"cancel\" = \"Cancelar\"\r\n\"close\" = \"Cerrar\"\r\n\"copy\" = \"Copiar\"\r\n\"copied\" = \"Copiado\"\r\n\"download\" = \"Descargar\"\r\n\"remark\" = \"Nota\"\r\n\"enable\" = \"Habilitar\"\r\n\"protocol\" = \"Protocolo\"\r\n\"search\" = \"Buscar\"\r\n\"filter\" = \"Filtrar\"\r\n\"loading\" = \"Cargando...\"\r\n\"second\" = \"Segundo\"\r\n\"minute\" = \"Minuto\"\r\n\"hour\" = \"Hora\"\r\n\"day\" = \"Día\"\r\n\"check\" = \"Verificar\"\r\n\"indefinite\" = \"Indefinido\"\r\n\"unlimited\" = \"Ilimitado\"\r\n\"none\" = \"None\"\r\n\"qrCode\" = \"Código QR\"\r\n\"info\" = \"Más Información\"\r\n\"edit\" = \"Editar\"\r\n\"delete\" = \"Eliminar\"\r\n\"reset\" = \"Restablecer\"\r\n\"copySuccess\" = \"Copiado exitosamente\"\r\n\"sure\" = \"Seguro\"\r\n\"encryption\" = \"Encriptación\"\r\n\"transmission\" = \"Transmisión\"\r\n\"host\" = \"Anfitrión\"\r\n\"path\" = \"Ruta\"\r\n\"camouflage\" = \"Camuflaje\"\r\n\"status\" = \"Estado\"\r\n\"enabled\" = \"Habilitado\"\r\n\"disabled\" = \"Deshabilitado\"\r\n\"depleted\" = \"Agotado\"\r\n\"depletingSoon\" = \"Agotándose\"\r\n\"offline\" = \"fuera de línea\"\r\n\"online\" = \"en línea\"\r\n\"domainName\" = \"Nombre de dominio\"\r\n\"monitor\" = \"Listening IP\"\r\n\"certificate\" = \"Certificado Digital\"\r\n\"fail\" = \"Falló\"\r\n\"success\" = \"Éxito\"\r\n\"getVersion\" = \"Obtener versión\"\r\n\"install\" = \"Instalar\"\r\n\"clients\" = \"Clientes\"\r\n\"usage\" = \"Uso\"\r\n\"secretToken\" = \"Token Secreto\"\r\n\"remained\" = \"Restante\"\r\n\"security\" = \"Seguridad\"\r\n\"secAlertTitle\" = \"Alerta de Seguridad\"\r\n\"secAlertSsl\" = \"Esta conexión no es segura. Por favor, evite ingresar información sensible hasta que se active TLS para la protección de datos.\"\r\n\"secAlertConf\" = \"Ciertas configuraciones son vulnerables a ataques. Se recomienda reforzar los protocolos de seguridad para prevenir posibles violaciones.\"\r\n\"secAlertSSL\" = \"El panel carece de una conexión segura. Por favor, instale un certificado TLS para la protección de datos.\"\r\n\"secAlertPanelPort\" = \"El puerto predeterminado del panel es vulnerable. Por favor, configure un puerto aleatorio o específico.\"\r\n\"secAlertPanelURI\" = \"La ruta URI predeterminada del panel no es segura. Por favor, configure una ruta URI compleja.\"\r\n\"secAlertSubURI\" = \"La ruta URI predeterminada de la suscripción no es segura. Por favor, configure una ruta URI compleja.\"\r\n\"secAlertSubJsonURI\" = \"La ruta URI JSON predeterminada de la suscripción no es segura. Por favor, configure una ruta URI compleja.\"\r\n\r\n[menu]\r\n\"dashboard\" = \"Estado del Sistema\"\r\n\"inbounds\" = \"Entradas\"\r\n\"settings\" = \"Configuraciones\"\r\n\"xray\" = \"Ajustes Xray\"\r\n\"logout\" = \"Cerrar Sesión\"\r\n\"link\" = \"Gestionar\"\r\n\r\n[pages.login]\r\n\"hello\" = \"Hola\"\r\n\"title\" = \"Bienvenido\"\r\n\"loginAgain\" = \"El límite de tiempo de inicio de sesión ha expirado. Por favor, inicia sesión nuevamente.\"\r\n\r\n[pages.login.toasts]\r\n\"invalidFormData\" = \"El formato de los datos de entrada es inválido.\"\r\n\"emptyUsername\" = \"Por favor ingresa el nombre de usuario.\"\r\n\"emptyPassword\" = \"Por favor ingresa la contraseña.\"\r\n\"wrongUsernameOrPassword\" = \"Nombre de usuario o contraseña inválidos.\"\r\n\"successLogin\" = \"Inicio de Sesión Exitoso\"\r\n\r\n[pages.index]\r\n\"title\" = \"Estado del Sistema\"\r\n\"memory\" = \"Memoria\"\r\n\"hard\" = \"Disco Duro\"\r\n\"xrayStatus\" = \"Xray\"\r\n\"stopXray\" = \"Detener\"\r\n\"restartXray\" = \"Reiniciar\"\r\n\"xraySwitch\" = \"Versión\"\r\n\"xraySwitchClick\" = \"Elige la versión a la que deseas cambiar.\"\r\n\"xraySwitchClickDesk\" = \"Elige sabiamente, ya que las versiones anteriores pueden no ser compatibles con las configuraciones actuales.\"\r\n\"operationHours\" = \"Tiempo de Funcionamiento\"\r\n\"systemLoad\" = \"Carga del Sistema\"\r\n\"systemLoadDesc\" = \"promedio de carga del sistema en los últimos 1, 5 y 15 minutos\"\r\n\"connectionTcpCountDesc\" = \"Conexiones TCP totales en todas las tarjetas de red.\"\r\n\"connectionUdpCountDesc\" = \"Conexiones UDP totales en todas las tarjetas de red.\"\r\n\"connectionCount\" = \"Número de Conexiones\"\r\n\"upSpeed\" = \"Velocidad de Subida Total para Todas las Tarjetas de Red.\"\r\n\"downSpeed\" = \"Velocidad de Bajada Total para Todas las Tarjetas de Red.\"\r\n\"totalSent\" = \"Tráfico Total de Subida de Todas las Tarjetas de Red desde el inicio del sistema.\"\r\n\"totalReceive\" = \"Datos Descargados Totales en Todas las Tarjetas de Red desde el inicio del sistema.\"\r\n\"xraySwitchVersionDialog\" = \"Cambiar Versión de Xray\"\r\n\"xraySwitchVersionDialogDesc\" = \"¿Estás seguro de que deseas cambiar la versión de Xray a\"\r\n\"dontRefresh\" = \"La instalación está en progreso, por favor no actualices esta página.\"\r\n\"logs\" = \"Registros\"\r\n\"config\" = \"Configuración\"\r\n\"backup\" = \"Copia de Seguridad y Restauración\"\r\n\"backupTitle\" = \"Copia de Seguridad y Restauración de la Base de Datos\"\r\n\"backupDescription\" = \"Recuerda hacer una copia de seguridad antes de importar una nueva base de datos.\"\r\n\"exportDatabase\" = \"Descargar Base de Datos\"\r\n\"importDatabase\" = \"Cargar Base de Datos\"\r\n\r\n[pages.inbounds]\r\n\"title\" = \"Entradas\"\r\n\"totalDownUp\" = \"Subidas/Descargas Totales\"\r\n\"totalUsage\" = \"Uso Total\"\r\n\"inboundCount\" = \"Número de Entradas\"\r\n\"operate\" = \"Menú\"\r\n\"enable\" = \"Habilitar\"\r\n\"remark\" = \"Notas\"\r\n\"protocol\" = \"Protocolo\"\r\n\"port\" = \"Puerto\"\r\n\"traffic\" = \"Tráfico\"\r\n\"details\" = \"Detalles\"\r\n\"transportConfig\" = \"Transporte\"\r\n\"expireDate\" = \"Fecha de Expiración\"\r\n\"resetTraffic\" = \"Restablecer Tráfico\"\r\n\"addInbound\" = \"Agregar Entrada\"\r\n\"generalActions\" = \"Acciones Generales\"\r\n\"create\" = \"Crear\"\r\n\"update\" = \"Actualizar\"\r\n\"modifyInbound\" = \"Modificar Entrada\"\r\n\"deleteInbound\" = \"Eliminar Entrada\"\r\n\"deleteInboundContent\" = \"¿Confirmar eliminación de entrada?\"\r\n\"deleteClient\" = \"Eliminar cliente\"\r\n\"deleteClientContent\" = \"¿Está seguro de que desea eliminar el cliente?\"\r\n\"resetTrafficContent\" = \"¿Confirmar restablecimiento de tráfico?\"\r\n\"copyLink\" = \"Copiar Enlace\"\r\n\"address\" = \"Dirección\"\r\n\"network\" = \"Red\"\r\n\"destinationPort\" = \"Puerto de Destino\"\r\n\"targetAddress\" = \"Dirección de Destino\"\r\n\"monitorDesc\" = \"Dejar en blanco por defecto\"\r\n\"meansNoLimit\" = \" = illimitata. (unidad: GB)\"\r\n\"totalFlow\" = \"Flujo Total\"\r\n\"leaveBlankToNeverExpire\" = \"Dejar en Blanco para Nunca Expirar\"\r\n\"noRecommendKeepDefault\" = \"No hay requisitos especiales para mantener la configuración predeterminada\"\r\n\"certificatePath\" = \"Ruta Cert\"\r\n\"certificateContent\" = \"Datos Cert\"\r\n\"publicKey\" = \"Clave Pública\"\r\n\"privatekey\" = \"Clave Privada\"\r\n\"clickOnQRcode\" = \"Haz clic en el Código QR para Copiar\"\r\n\"client\" = \"Cliente\"\r\n\"export\" = \"Exportar Enlaces\"\r\n\"clone\" = \"Clonar\"\r\n\"cloneInbound\" = \"Clonar Entradas\"\r\n\"cloneInboundContent\" = \"Se aplicarán todas las configuraciones de esta entrada, excepto el Puerto, la IP de Escucha y los Clientes, al clon.\"\r\n\"cloneInboundOk\" = \"Clonar\"\r\n\"resetAllTraffic\" = \"Restablecer Tráfico de Todas las Entradas\"\r\n\"resetAllTrafficTitle\" = \"Restablecer tráfico de todas las entradas\"\r\n\"resetAllTrafficContent\" = \"¿Estás seguro de que deseas restablecer el tráfico de todas las entradas?\"\r\n\"resetInboundClientTraffics\" = \"Restablecer Tráfico de Clientes\"\r\n\"resetInboundClientTrafficTitle\" = \"Restablecer todo el tráfico de clientes\"\r\n\"resetInboundClientTrafficContent\" = \"¿Estás seguro de que deseas restablecer todo el tráfico para los clientes de esta entrada?\"\r\n\"resetAllClientTraffics\" = \"Restablecer Tráfico de Todos los Clientes\"\r\n\"resetAllClientTrafficTitle\" = \"Restablecer todo el tráfico de clientes\"\r\n\"resetAllClientTrafficContent\" = \"¿Estás seguro de que deseas restablecer todo el tráfico para todos los clientes?\"\r\n\"delDepletedClients\" = \"Eliminar Clientes Agotados\"\r\n\"delDepletedClientsTitle\" = \"Eliminar clientes agotados\"\r\n\"delDepletedClientsContent\" = \"¿Estás seguro de que deseas eliminar todos los clientes agotados?\"\r\n\"email\" = \"Email\"\r\n\"emailDesc\" = \"Por favor proporciona una dirección de correo electrónico única.\"\r\n\"IPLimit\" = \"Límite de IP\"\r\n\"IPLimitDesc\" = \"Desactiva la entrada si la cantidad supera el valor ingresado (ingresa 0 para desactivar el límite de IP).\"\r\n\"IPLimitlog\" = \"Registro de IP\"\r\n\"IPLimitlogDesc\" = \"Registro de historial de IPs (antes de habilitar la entrada después de que haya sido desactivada por el límite de IP, debes borrar el registro).\"\r\n\"IPLimitlogclear\" = \"Limpiar el Registro\"\r\n\"setDefaultCert\" = \"Establecer certificado desde el panel\"\r\n\"xtlsDesc\" = \"La versión del núcleo de Xray debe ser 1.7.5\"\r\n\"realityDesc\" = \"La versión del núcleo de Xray debe ser 1.8.0 o superior.\"\r\n\"telegramDesc\" = \"Por favor, proporciona el ID de Chat de Telegram. (usa el comando '/id' en el bot) o (@userinfobot)\"\r\n\"subscriptionDesc\" = \"Puedes encontrar tu enlace de suscripción en Detalles, también puedes usar el mismo nombre para varias configuraciones.\"\r\n\"info\" = \"Info\"\r\n\"same\" = \"misma\"\r\n\"inboundData\" = \"Datos de entrada\"\r\n\"exportInbound\" = \"Exportación entrante\"\r\n\"import\" = \"Importar\"\r\n\"importInbound\" = \"Importar un entrante\"\r\n\r\n[pages.client]\r\n\"add\" = \"Agregar Cliente\"\r\n\"edit\" = \"Editar Cliente\"\r\n\"submitAdd\" = \"Agregar Cliente\"\r\n\"submitEdit\" = \"Guardar Cambios\"\r\n\"clientCount\" = \"Número de Clientes\"\r\n\"bulk\" = \"Agregar en Lote\"\r\n\"method\" = \"Método\"\r\n\"first\" = \"Primero\"\r\n\"last\" = \"Último\"\r\n\"prefix\" = \"Prefijo\"\r\n\"postfix\" = \"Sufijo\"\r\n\"delayedStart\" = \"Iniciar después del primer uso\"\r\n\"expireDays\" = \"Duración\"\r\n\"days\" = \"Día(s)\"\r\n\"renew\" = \"Renovación automática\"\r\n\"renewDesc\" = \"Renovación automática después de la expiración. (0 = desactivar) (unidad: día)\"\r\n\r\n[pages.inbounds.toasts]\r\n\"obtain\" = \"Recibir\"\r\n\r\n[pages.inbounds.stream.general]\r\n\"request\" = \"Pedido\"\r\n\"response\" = \"Respuesta\"\r\n\"name\" = \"Nombre\"\r\n\"value\" = \"Valor\"\r\n\r\n[pages.inbounds.stream.tcp]\r\n\"version\" = \"Versión\"\r\n\"method\" = \"Método\"\r\n\"path\" = \"Camino\"\r\n\"status\" = \"Estado\"\r\n\"statusDescription\" = \"Descripción de la Situación\"\r\n\"requestHeader\" = \"Encabezado de solicitud\"\r\n\"responseHeader\" = \"Encabezado de respuesta\"\r\n\r\n[pages.inbounds.stream.quic]\r\n\"encryption\" = \"Cifrado\"\r\n\r\n[pages.settings]\r\n\"title\" = \"Configuraciones\"\r\n\"save\" = \"Guardar\"\r\n\"infoDesc\" = \"Cada cambio realizado aquí debe ser guardado. Por favor, reinicie el panel para aplicar los cambios.\"\r\n\"restartPanel\" = \"Reiniciar Panel\"\r\n\"restartPanelDesc\" = \"¿Está seguro de que desea reiniciar el panel? Haga clic en Aceptar para reiniciar después de 3 segundos. Si no puede acceder al panel después de reiniciar, por favor, consulte la información de registro del panel en el servidor.\"\r\n\"actions\" = \"Acciones\"\r\n\"resetDefaultConfig\" = \"Restablecer a Configuración Predeterminada\"\r\n\"panelSettings\" = \"Configuraciones del Panel\"\r\n\"securitySettings\" = \"Configuraciones de Seguridad\"\r\n\"TGBotSettings\" = \"Configuraciones de Bot de Telegram\"\r\n\"panelListeningIP\" = \"IP de Escucha del Panel\"\r\n\"panelListeningIPDesc\" = \"Dejar en blanco por defecto para monitorear todas las IPs.\"\r\n\"panelListeningDomain\" = \"Dominio de Escucha del Panel\"\r\n\"panelListeningDomainDesc\" = \"Dejar en blanco por defecto para monitorear todos los dominios e IPs.\"\r\n\"panelPort\" = \"Puerto del Panel\"\r\n\"panelPortDesc\" = \"El puerto utilizado para mostrar este panel.\"\r\n\"publicKeyPath\" = \"Ruta del Archivo de Clave Pública del Certificado del Panel\"\r\n\"publicKeyPathDesc\" = \"Complete con una ruta absoluta que comience con.\"\r\n\"privateKeyPath\" = \"Ruta del Archivo de Clave Privada del Certificado del Panel\"\r\n\"privateKeyPathDesc\" = \"Complete con una ruta absoluta que comience con.\"\r\n\"panelUrlPath\" = \"Ruta Raíz de la URL del Panel\"\r\n\"panelUrlPathDesc\" = \"Debe empezar con '/' y terminar con.\"\r\n\"pageSize\" = \"Tamaño de paginación\"\r\n\"pageSizeDesc\" = \"Defina el tamaño de página para la tabla de entradas. Establezca 0 para desactivar\"\r\n\"remarkModel\" = \"Modelo de observación y carácter de separación\"\r\n\"datepicker\" = \"selector de fechas\"\r\n\"datepickerPlaceholder\" = \"Seleccionar fecha\"\r\n\"datepickerDescription\" = \"El tipo de calendario selector especifica la fecha de vencimiento\"\r\n\"sampleRemark\" = \"Observación de muestra\"\r\n\"oldUsername\" = \"Nombre de Usuario Actual\"\r\n\"currentPassword\" = \"Contraseña Actual\"\r\n\"newUsername\" = \"Nuevo Nombre de Usuario\"\r\n\"newPassword\" = \"Nueva Contraseña\"\r\n\"telegramBotEnable\" = \"Habilitar bot de Telegram\"\r\n\"telegramBotEnableDesc\" = \"Conéctese a las funciones de este panel a través del bot de Telegram.\"\r\n\"telegramToken\" = \"Token de Telegram\"\r\n\"telegramTokenDesc\" = \"Debe obtener el token del administrador de bots de Telegram @botfather.\"\r\n\"telegramProxy\" = \"Socks5 Proxy\"\r\n\"telegramProxyDesc\" = \"Si necesita el proxy Socks5 para conectarse a Telegram. Ajuste su configuración según la guía.\"\r\n\"telegramChatId\" = \"IDs de Chat de Telegram para Administradores\"\r\n\"telegramChatIdDesc\" = \"IDs de Chat múltiples separados por comas. Use @userinfobot o use el comando '/id' en el bot para obtener sus IDs de Chat.\"\r\n\"telegramNotifyTime\" = \"Hora de Notificación del Bot de Telegram\"\r\n\"telegramNotifyTimeDesc\" = \"Usar el formato de tiempo de Crontab.\"\r\n\"tgNotifyBackup\" = \"Respaldo de Base de Datos\"\r\n\"tgNotifyBackupDesc\" = \"Incluir archivo de respaldo de base de datos con notificación de informe.\"\r\n\"tgNotifyLogin\" = \"Notificación de Inicio de Sesión\"\r\n\"tgNotifyLoginDesc\" = \"Muestra el nombre de usuario, dirección IP y hora cuando alguien intenta iniciar sesión en su panel.\"\r\n\"sessionMaxAge\" = \"Edad Máxima de Sesión\"\r\n\"sessionMaxAgeDesc\" = \"La duración de una sesión de inicio de sesión (unidad: minutos).\"\r\n\"expireTimeDiff\" = \"Umbral de Expiración para Notificación\"\r\n\"expireTimeDiffDesc\" = \"Reciba notificaciones sobre la expiración de la cuenta antes del umbral (unidad: días).\"\r\n\"trafficDiff\" = \"Umbral de Tráfico para Notificación\"\r\n\"trafficDiffDesc\" = \"Reciba notificaciones sobre el agotamiento del tráfico antes de alcanzar el umbral (unidad: GB).\"\r\n\"tgNotifyCpu\" = \"Umbral de Alerta de Porcentaje de CPU\"\r\n\"tgNotifyCpuDesc\" = \"Reciba notificaciones si el uso de la CPU supera este umbral (unidad: %).\"\r\n\"timeZone\" = \"Zona Horaria\"\r\n\"timeZoneDesc\" = \"Las tareas programadas se ejecutan de acuerdo con la hora en esta zona horaria.\"\r\n\"subSettings\" = \"Suscripción\"\r\n\"subEnable\" = \"Habilitar Servicio\"\r\n\"subEnableDesc\" = \"Función de suscripción con configuración separada.\"\r\n\"subListen\" = \"Listening IP\"\r\n\"subListenDesc\" = \"Dejar en blanco por defecto para monitorear todas las IPs.\"\r\n\"subPort\" = \"Puerto de Suscripción\"\r\n\"subPortDesc\" = \"El número de puerto para el servicio de suscripción debe estar sin usar en el servidor.\"\r\n\"subCertPath\" = \"Ruta del Archivo de Clave Pública del Certificado de Suscripción\"\r\n\"subCertPathDesc\" = \"Complete con una ruta absoluta que comience con '/'\"\r\n\"subKeyPath\" = \"Ruta del Archivo de Clave Privada del Certificado de Suscripción\"\r\n\"subKeyPathDesc\" = \"Complete con una ruta absoluta que comience con '/'\"\r\n\"subPath\" = \"Ruta Raíz de la URL de Suscripción\"\r\n\"subPathDesc\" = \"Debe empezar con '/' y terminar con '/'\"\r\n\"subDomain\" = \"Dominio de Escucha\"\r\n\"subDomainDesc\" = \"Dejar en blanco por defecto para monitorear todos los dominios e IPs.\"\r\n\"subUpdates\" = \"Intervalos de Actualización de Suscripción\"\r\n\"subUpdatesDesc\" = \"Horas de intervalo entre actualizaciones en la aplicación del cliente.\"\r\n\"subEncrypt\" = \"Encriptar configuraciones\"\r\n\"subEncryptDesc\" = \"Encriptar las configuraciones devueltas en la suscripción.\"\r\n\"subShowInfo\" = \"Mostrar información de uso\"\r\n\"subShowInfoDesc\" = \"Mostrar tráfico restante y fecha después del nombre de configuración.\"\r\n\"subURI\" = \"URI de proxy inverso\"\r\n\"subURIDesc\" = \"Cambiar el URI base de la URL de suscripción para usar detrás de los servidores proxy\"\r\n\"fragment\" = \"Fragmentación\"\r\n\"fragmentDesc\" = \"Habilitar la fragmentación para el paquete de saludo de TLS\"\r\n\"fragmentSett\" = \"Configuración de Fragmentación\"\r\n\"mux\" = \"Mux\"\r\n\"muxDesc\" = \"Transmite múltiples flujos de datos independientes dentro de un flujo de datos establecido.\"\r\n\"muxSett\" = \"Configuración Mux\"\r\n\"direct\" = \"Conexión Directa\"\r\n\"directDesc\" = \"Establece conexiones directas con dominios o rangos de IP de un país específico.\"\r\n\"directSett\" = \"Opciones de Conexión Directa\"\r\n\r\n[pages.xray]\r\n\"title\" = \"Xray Configuración\"\r\n\"save\" = \"Guardar configuración\"\r\n\"restart\" = \"Reiniciar Xray\"\r\n\"basicTemplate\" = \"Plantilla Básica\"\r\n\"advancedTemplate\" = \"Plantilla Avanzada\"\r\n\"generalConfigs\" = \"Configuraciones Generales\"\r\n\"generalConfigsDesc\" = \"Estas opciones proporcionarán ajustes generales.\"\r\n\"logConfigs\" = \"Registro\"\r\n\"logConfigsDesc\" = \"Los registros pueden afectar la eficiencia de su servidor. Se recomienda habilitarlos sabiamente solo en caso de sus necesidades.\"\r\n\"blockConfigs\" = \"Configuraciones de Bloqueo\"\r\n\"blockConfigsDesc\" = \"Estas opciones evitarán que los usuarios se conecten a protocolos y sitios web específicos.\"\r\n\"blockCountryConfigs\" = \"Configuraciones de Bloqueo por País\"\r\n\"blockCountryConfigsDesc\" = \"Estas opciones evitarán que los usuarios se conecten a dominios de países específicos.\"\r\n\"directCountryConfigs\" = \"Configuraciones de Conexión Directa por País\"\r\n\"directCountryConfigsDesc\" = \"Una conexión directa asegura que el tráfico específico no se enrutará a través de otro servidor.\"\r\n\"ipv4Configs\" = \"Configuraciones IPv4\"\r\n\"ipv4ConfigsDesc\" = \"Estas opciones solo enrutarán a los dominios objetivo a través de IPv4.\"\r\n\"warpConfigs\" = \"Configuraciones de WARP\"\r\n\"warpConfigsDesc\" = \"Precaución: Antes de usar estas opciones, instale WARP en modo de proxy socks5 en su servidor siguiendo los pasos en el GitHub del panel. WARP enrutará el tráfico a los sitios web a través de los servidores de Cloudflare.\"\r\n\"Template\" = \"Plantilla de Configuración de Xray\"\r\n\"TemplateDesc\" = \"Genera el archivo de configuración final de Xray basado en esta plantilla.\"\r\n\"FreedomStrategy\" = \"Configurar Estrategia para el Protocolo Freedom\"\r\n\"FreedomStrategyDesc\" = \"Establece la estrategia de salida de la red en el Protocolo Freedom.\"\r\n\"RoutingStrategy\" = \"Configurar Estrategia de Enrutamiento de Dominios\"\r\n\"RoutingStrategyDesc\" = \"Establece la estrategia general de enrutamiento para la resolución de DNS.\"\r\n\"Torrent\" = \"Prohibir Uso de BitTorrent\"\r\n\"TorrentDesc\" = \"Cambia la plantilla de configuración para evitar el uso de BitTorrent por parte de los usuarios.\"\r\n\"PrivateIp\" = \"Prohibir Conexiones a Rangos de IP Privadas\"\r\n\"PrivateIpDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a rangos de IP privadas.\"\r\n\"Ads\" = \"Bloquear Anuncios\"\r\n\"AdsDesc\" = \"Cambia la plantilla de configuración para bloquear anuncios.\"\r\n\"Family\" = \"Bloquee malware y contenido para adultos\"\r\n\"FamilyDesc\" = \"Resolutores de DNS de Cloudflare para bloquear malware y contenido para adultos para protección familiar.\"\r\n\"Security\" = \"Escudo de Seguridad\"\r\n\"SecurityDesc\" = \"Cambiar la plantilla de configuración para la protección de seguridad.\"\r\n\"Speedtest\" = \"Bloquear Sitios Web de Pruebas de Velocidad\"\r\n\"SpeedtestDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a sitios web de pruebas de velocidad.\"\r\n\"IRIp\" = \"Desactivar Conexión a Rangos de IP de Irán\"\r\n\"IRIpDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a rangos de IP de Irán.\"\r\n\"IRDomain\" = \"Desactivar Conexión a Dominios de Irán\"\r\n\"IRDomainDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a dominios de Irán.\"\r\n\"ChinaIp\" = \"Desactivar Conexión a Rangos de IP de China\"\r\n\"ChinaIpDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a rangos de IP de China.\"\r\n\"ChinaDomain\" = \"Desactivar Conexión a Dominios de China\"\r\n\"ChinaDomainDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a dominios de China.\"\r\n\"RussiaIp\" = \"Desactivar Conexión a Rangos de IP de Rusia\"\r\n\"RussiaIpDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a rangos de IP de Rusia.\"\r\n\"RussiaDomain\" = \"Desactivar Conexión a Dominios de Rusia\"\r\n\"RussiaDomainDesc\" = \"Cambia la plantilla de configuración para evitar la conexión a dominios de Rusia.\"\r\n\"VNIp\" = \"Deshabilitar la conexión a las IP de Vietnam\"\r\n\"VNIpDesc\" = \"Cambie la plantilla de configuración para evitar conectarse a rangos de IP de Vietnam.\"\r\n\"VNDomain\" = \"Deshabilitar la conexión a dominios de Vietnam\"\r\n\"VNDomainDesc\" = \"Cambie la plantilla de configuración para evitar conectarse a dominios de Vietnam.\"\r\n\"DirectIRIp\" = \"Conexión Directa a Rangos de IP de Irán\"\r\n\"DirectIRIpDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a rangos de IP de Irán.\"\r\n\"DirectIRDomain\" = \"Conexión Directa a Dominios de Irán\"\r\n\"DirectIRDomainDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a dominios de Irán.\"\r\n\"DirectChinaIp\" = \"Conexión Directa a Rangos de IP de China\"\r\n\"DirectChinaIpDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a rangos de IP de China.\"\r\n\"DirectChinaDomain\" = \"Conexión Directa a Dominios de China\"\r\n\"DirectChinaDomainDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a dominios de China.\"\r\n\"DirectRussiaIp\" = \"Conexión Directa a Rangos de IP de Rusia\"\r\n\"DirectRussiaIpDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a rangos de IP de Rusia.\"\r\n\"DirectRussiaDomain\" = \"Conexión Directa a Dominios de Rusia\"\r\n\"DirectRussiaDomainDesc\" = \"Cambia la plantilla de configuración para conectarse directamente a dominios de Rusia.\"\r\n\"DirectVNIp\" = \"Conexión directa a IP de Vietnam\"\r\n\"DirectVNIpDesc\" = \"Cambie la plantilla de configuración para la conexión directa a rangos de IP de Vietnam.\"\r\n\"DirectVNDomain\" = \"Conexión directa a dominios de Vietnam\"\r\n\"DirectVNDomainDesc\" = \"Cambie la plantilla de configuración para la conexión directa a dominios de Vietnam.\"\r\n\"GoogleIPv4\" = \"Usar IPv4 para Google\"\r\n\"GoogleIPv4Desc\" = \"Agregar enrutamiento para que Google se conecte con IPv4.\"\r\n\"NetflixIPv4\" = \"Usar IPv4 para Netflix\"\r\n\"NetflixIPv4Desc\" = \"Agregar enrutamiento para que Netflix se conecte con IPv4.\"\r\n\"GoogleWARP\" = \"Google\"\r\n\"GoogleWARPDesc\" = \"Agrega enrutamiento para Google a través de WARP.\"\r\n\"OpenAIWARP\" = \"ChatGPT\"\r\n\"OpenAIWARPDesc\" = \"Enruta el tráfico a ChatGPT a través de WARP.\"\r\n\"NetflixWARP\" = \"Netflix\"\r\n\"NetflixWARPDesc\" = \"Enruta el tráfico a Netflix a través de WARP.\"\r\n\"MetaWARP\" = \"Meta\"\r\n\"MetaWARPDesc\" = \"Enruta el tráfico a Meta (Instagram, Facebook, WhatsApp, Threads, etc.) a través de WARP.\"\r\n\"AppleWARP\" = \"Apple\"\r\n\"AppleWARPDesc\" = \"Enruta el tráfico a Apple a través de WARP.\"\r\n\"RedditWARP\" = \"Reddit\"\r\n\"RedditWARPDesc\" = \"Enruta el tráfico a Reddit a través de WARP.\"\r\n\"SpotifyWARP\" = \"Spotify\"\r\n\"SpotifyWARPDesc\" = \"Enruta el tráfico a Spotify a través de WARP.\"\r\n\"IRWARP\" = \"Rutear dominios de Irán a través de WARP.\"\r\n\"IRWARPDesc\" = \"Agregar enrutamiento para dominios de Irán a través de WARP.\"\r\n\"Inbounds\" = \"Entrante\"\r\n\"InboundsDesc\" = \"Cambia la plantilla de configuración para aceptar clientes específicos.\"\r\n\"Outbounds\" = \"Salidas\"\r\n\"Balancers\" = \"Equilibradores\"\r\n\"OutboundsDesc\" = \"Cambia la plantilla de configuración para definir formas de salida para este servidor.\"\r\n\"Routings\" = \"Reglas de enrutamiento\"\r\n\"RoutingsDesc\" = \"¡La prioridad de cada regla es importante!\"\r\n\"completeTemplate\" = \"Todos\"\r\n\"logLevel\" = \"Nivel de registro\"\r\n\"logLevelDesc\" = \"El nivel de registro para registros de errores, que indica la información que debe registrarse.\"\r\n\"accessLog\" = \"Registro de acceso\"\r\n\"accessLogDesc\" = \"La ruta del archivo para el registro de acceso. El valor especial 'ninguno' deshabilita los registros de acceso\"\r\n\"errorLog\" = \"Registro de Errores\"\r\n\"errorLogDesc\" = \"La ruta del archivo para el registro de errores. El valor especial 'none' desactiva los registros de errores.\"\r\n\r\n[pages.xray.rules]\r\n\"first\" = \"Primero\"\r\n\"last\" = \"Último\"\r\n\"up\" = \"Arriba\"\r\n\"down\" = \"Abajo\"\r\n\"source\" = \"Fuente\"\r\n\"dest\" = \"Destino\"\r\n\"inbound\" = \"Entrante\"\r\n\"outbound\" = \"Saliente\"\r\n\"balancer\" = \"Equilibrador\"\r\n\"info\" = \"Información\"\r\n\"add\" = \"Agregar Regla\"\r\n\"edit\" = \"Editar Regla\"\r\n\"useComma\" = \"Elementos separados por comas\"\r\n\r\n[pages.xray.outbound]\r\n\"addOutbound\" = \"Agregar salida\"\r\n\"addReverse\" = \"Agregar reverso\"\r\n\"editOutbound\" = \"Editar salida\"\r\n\"editReverse\" = \"Editar reverso\"\r\n\"tag\" = \"Etiqueta\"\r\n\"tagDesc\" = \"etiqueta única\"\r\n\"address\" = \"Dirección\"\r\n\"reverse\" = \"Reverso\"\r\n\"domain\" = \"Dominio\"\r\n\"type\" = \"Tipo\"\r\n\"bridge\" = \"puente\"\r\n\"portal\" = \"portal\"\r\n\"intercon\" = \"Interconexión\"\r\n\"settings\" = \"Configuración\"\r\n\"accountInfo\" = \"Información de la Cuenta\"\r\n\"outboundStatus\" = \"Estado de Salida\"\r\n\"sendThrough\" = \"Enviar a través de\"\r\n\r\n[pages.xray.balancer]\r\n\"addBalancer\" = \"Agregar equilibrador\"\r\n\"editBalancer\" = \"Editar balanceador\"\r\n\"balancerStrategy\" = \"Estrategia\"\r\n\"balancerSelectors\" = \"Selectores\"\r\n\"tag\" = \"Etiqueta\"\r\n\"tagDesc\" = \"etiqueta única\"\r\n\"balancerDesc\" = \"No es posible utilizar balancerTag y outboundTag al mismo tiempo. Si se utilizan al mismo tiempo, sólo funcionará outboundTag.\"\r\n\r\n[pages.xray.wireguard]\r\n\"secretKey\" = \"Llave secreta\"\r\n\"publicKey\" = \"Llave pública\"\r\n\"allowedIPs\" = \"IP permitidas\"\r\n\"endpoint\" = \"Punto final\"\r\n\"psk\" = \"Clave precompartida\"\r\n\"domainStrategy\" = \"Estrategia de dominio\"\r\n\r\n[pages.xray.dns]\r\n\"enable\" = \"Habilitar DNS\"\r\n\"enableDesc\" = \"Habilitar servidor DNS incorporado\"\r\n\"strategy\" = \"Estrategia de Consulta\"\r\n\"strategyDesc\" = \"Estrategia general para resolver nombres de dominio\"\r\n\"add\" = \"Agregar Servidor\"\r\n\"edit\" = \"Editar Servidor\"\r\n\"domains\" = \"Dominios\"\r\n\r\n[pages.xray.fakedns]\r\n\"add\" = \"Agregar DNS Falso\"\r\n\"edit\" = \"Editar DNS Falso\"\r\n\"ipPool\" = \"Subred del grupo de IP\"\r\n\"poolSize\" = \"Tamaño del grupo\"\r\n\r\n[pages.settings.security]\r\n\"admin\" = \"Administrador\"\r\n\"secret\" = \"Token Secreto\"\r\n\"loginSecurity\" = \"Seguridad de Inicio de Sesión\"\r\n\"loginSecurityDesc\" = \"Habilitar un paso adicional de seguridad para el inicio de sesión de usuarios.\"\r\n\"secretToken\" = \"Token Secreto\"\r\n\"secretTokenDesc\" = \"Por favor, copia y guarda este token de forma segura en un lugar seguro. Este token es necesario para iniciar sesión y no se puede recuperar con la herramienta de comando x-ui.\"\r\n\r\n[pages.settings.toasts]\r\n\"modifySettings\" = \"Modificar Configuraciones \"\r\n\"getSettings\" = \"Obtener Configuraciones \"\r\n\"modifyUser\" = \"Modificar Usuario \"\r\n\"originalUserPassIncorrect\" = \"Nombre de usuario o contraseña original incorrectos\"\r\n\"userPassMustBeNotEmpty\" = \"El nuevo nombre de usuario y la nueva contraseña no pueden estar vacíos\"\r\n\r\n[tgbot]\r\n\"keyboardClosed\" = \"❌ ¡Teclado personalizado cerrado!\"\r\n\"noResult\" = \"❗ ¡Sin resultados!\"\r\n\"noQuery\" = \"❌ ¡Consulta no encontrada! ¡Por favor utiliza el comando nuevamente!\"\r\n\"wentWrong\" = \"❌ ¡Algo salió mal!\"\r\n\"noIpRecord\" = \"❗ ¡Sin Registro de IP!\"\r\n\"noInbounds\" = \"❗ ¡No se encontraron entradas!\"\r\n\"unlimited\" = \"♾ Ilimitado\"\r\n\"add\" = \"Agregar\"\r\n\"month\" = \"Mes\"\r\n\"months\" = \"Meses\"\r\n\"day\" = \"Día\"\r\n\"days\" = \"Días\"\r\n\"hours\" = \"Horas\"\r\n\"unknown\" = \"Desconocido\"\r\n\"inbounds\" = \"Entradas\"\r\n\"clients\" = \"Clientes\"\r\n\"offline\" = \"🔴 Sin conexión\"\r\n\"online\" = \"🟢 En línea\"\r\n\r\n[tgbot.commands]\r\n\"unknown\" = \"❗ Comando desconocido\"\r\n\"pleaseChoose\" = \"👇 Por favor elige:\\r\\n\"\r\n\"help\" = \"🤖 ¡Bienvenido a este bot! Está diseñado para ofrecerte datos específicos del servidor y te permite hacer modificaciones según sea necesario.\\r\\n\\r\\n\"\r\n\"start\" = \"👋 Hola <i>{{ .Firstname }}</i>.\\r\\n\"\r\n\"welcome\" = \"🤖 Bienvenido al bot de gestión de <b>{{ .Hostname }}</b>.\\r\\n\"\r\n\"status\" = \"✅ ¡El bot está bien!\"\r\n\"usage\" = \"❗ ¡Por favor proporciona un texto para buscar!\"\r\n\"getID\" = \"🆔 Tu ID: <code>{{ .ID }}</code>\"\r\n\"helpAdminCommands\" = \"Para buscar un correo electrónico de cliente:\\r\\n<code>/usage [Correo electrónico]</code>\\r\\n\\r\\nPara buscar entradas (con estadísticas de cliente):\\r\\n<code>/inbound [Observación]</code>\\r\\n\\r\\nID de Chat de Telegram:\\r\\n<code>/id</code>\"\r\n\"helpClientCommands\" = \"Para buscar estadísticas, utiliza el siguiente comando:\\r\\n<code>/usage [Correo electrónico]</code>\\r\\n\\r\\nID de Chat de Telegram:\\r\\n<code>/id</code>\"\r\n\r\n[tgbot.messages]\r\n\"cpuThreshold\" = \"🔴 El uso de CPU {{ .Percent }}% es mayor que el umbral {{ .Threshold }}%\"\r\n\"selectUserFailed\" = \"❌ ¡Error al seleccionar usuario!\"\r\n\"userSaved\" = \"✅ Usuario de Telegram guardado.\"\r\n\"loginSuccess\" = \"✅ Has iniciado sesión en el panel con éxito.\\r\\n\"\r\n\"loginFailed\" = \"❗️ Falló el inicio de sesión en el panel.\\r\\n\"\r\n\"report\" = \"🕰 Informes programados: {{ .RunTime }}\\r\\n\"\r\n\"datetime\" = \"⏰ Fecha y Hora: {{ .DateTime }}\\r\\n\"\r\n\"hostname\" = \"💻 Nombre del Host: {{ .Hostname }}\\r\\n\"\r\n\"version\" = \"🚀 Versión de X-UI: {{ .Version }}\\r\\n\"\r\n\"xrayVersion\" = \"📡 Versión de Xray: {{ .XrayVersion }}\\r\\n\"\r\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\r\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\r\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\r\n\"ips\" = \"🔢 IPs:\\r\\n{{ .IPs }}\\r\\n\"\r\n\"serverUpTime\" = \"⏳ Tiempo de actividad del servidor: {{ .UpTime }} {{ .Unit }}\\r\\n\"\r\n\"serverLoad\" = \"📈 Carga del servidor: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\r\n\"serverMemory\" = \"📋 Memoria del servidor: {{ .Current }}/{{ .Total }}\\r\\n\"\r\n\"tcpCount\" = \"🔹 Conteo de TCP: {{ .Count }}\\r\\n\"\r\n\"udpCount\" = \"🔸 Conteo de UDP: {{ .Count }}\\r\\n\"\r\n\"traffic\" = \"🚦 Tráfico: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\r\n\"xrayStatus\" = \"ℹ️ Estado de Xray: {{ .State }}\\r\\n\"\r\n\"username\" = \"👤 Nombre de usuario: {{ .Username }}\\r\\n\"\r\n\"password\" = \"👤 Contraseña: {{ .Password }}\\r\\n\"\r\n\"time\" = \"⏰ Hora: {{ .Time }}\\r\\n\"\r\n\"inbound\" = \"📍 Inbound: {{ .Remark }}\\r\\n\"\r\n\"port\" = \"🔌 Puerto: {{ .Port }}\\r\\n\"\r\n\"expire\" = \"📅 Fecha de Vencimiento: {{ .Time }}\\r\\n\"\r\n\"expireIn\" = \"📅 Vence en: {{ .Time }}\\r\\n\"\r\n\"active\" = \"💡 Activo: {{ .Enable }}\\r\\n\"\r\n\"enabled\" = \"🚨 Habilitado: {{ .Enable }}\\r\\n\"\r\n\"online\" = \"🌐 Estado de conexión: {{ .Status }}\\r\\n\"\r\n\"email\" = \"📧 Email: {{ .Email }}\\r\\n\"\r\n\"upload\" = \"🔼 Subida: ↑{{ .Upload }}\\r\\n\"\r\n\"download\" = \"🔽 Bajada: ↓{{ .Download }}\\r\\n\"\r\n\"total\" = \"📊 Total: ↑↓{{ .UpDown }} / {{ .Total }}\\r\\n\"\r\n\"TGUser\" = \"👤 Usuario de Telegram: {{ .TelegramID }}\\r\\n\"\r\n\"exhaustedMsg\" = \"🚨 Agotado {{ .Type }}:\\r\\n\"\r\n\"exhaustedCount\" = \"🚨 Cantidad de Agotados {{ .Type }}:\\r\\n\"\r\n\"onlinesCount\" = \"🌐 Clientes en línea: {{ .Count }}\\r\\n\"\r\n\"disabled\" = \"🛑 Desactivado: {{ .Disabled }}\\r\\n\"\r\n\"depleteSoon\" = \"🔜 Se agotará pronto: {{ .Deplete }}\\r\\n\\r\\n\"\r\n\"backupTime\" = \"🗄 Hora de la Copia de Seguridad: {{ .Time }}\\r\\n\"\r\n\"refreshedOn\" = \"\\r\\n📋🔄 Actualizado en: {{ .Time }}\\r\\n\\r\\n\"\r\n\"yes\" = \"✅ Sí\"\r\n\"no\" = \"❌ No\"\r\n\r\n[tgbot.buttons]\r\n\"closeKeyboard\" = \"❌ Cerrar Teclado\"\r\n\"cancel\" = \"❌ Cancelar\"\r\n\"cancelReset\" = \"❌ Cancelar Reinicio\"\r\n\"cancelIpLimit\" = \"❌ Cancelar Límite de IP\"\r\n\"confirmResetTraffic\" = \"✅ ¿Confirmar Reinicio de Tráfico?\"\r\n\"confirmClearIps\" = \"✅ ¿Confirmar Limpiar IPs?\"\r\n\"confirmRemoveTGUser\" = \"✅ ¿Confirmar Eliminar Usuario de Telegram?\"\r\n\"confirmToggle\" = \" ✅ ¿Confirmar habilitar/deshabilitar usuario?\"\r\n\"dbBackup\" = \"Obtener Copia de Seguridad de BD\"\r\n\"serverUsage\" = \"Uso del Servidor\"\r\n\"getInbounds\" = \"Obtener Entradas\"\r\n\"depleteSoon\" = \"Pronto se Agotará\"\r\n\"clientUsage\" = \"Obtener Uso\"\r\n\"onlines\" = \"Clientes en línea\"\r\n\"commands\" = \"Comandos\"\r\n\"refresh\" = \"🔄 Actualizar\"\r\n\"clearIPs\" = \"❌ Limpiar IPs\"\r\n\"removeTGUser\" = \"❌ Eliminar Usuario de Telegram\"\r\n\"selectTGUser\" = \"👤 Seleccionar Usuario de Telegram\"\r\n\"selectOneTGUser\" = \"👤 Selecciona un usuario de telegram:\"\r\n\"resetTraffic\" = \"📈 Reiniciar Tráfico\"\r\n\"resetExpire\" = \"📅 Cambiar fecha de Vencimiento\"\r\n\"ipLog\" = \"🔢 Registro de IP\"\r\n\"ipLimit\" = \"🔢 Límite de IP\"\r\n\"setTGUser\" = \"👤 Establecer Usuario de Telegram\"\r\n\"toggle\" = \"🔘 Habilitar / Deshabilitar\"\r\n\"custom\" = \"🔢 Costumbre\"\r\n\"confirmNumber\" = \"✅ Confirmar: {{ .Num }}\"\r\n\"confirmNumberAdd\" = \"✅ Confirmar agregando: {{ .Num }}\"\r\n\"limitTraffic\" = \"🚧 Límite de tráfico\"\r\n\"getBanLogs\" = \"Registros de prohibición\"\r\n\r\n[tgbot.answers]\r\n\"successfulOperation\" = \"✅ ¡Exitosa!\"\r\n\"errorOperation\" = \"❗ Error en la Operación.\"\r\n\"getInboundsFailed\" = \"❌ Error al obtener las entradas\"\r\n\"canceled\" = \"❌ {{ .Email }} : Operación cancelada.\"\r\n\"clientRefreshSuccess\" = \"✅ {{ .Email }} : Cliente actualizado exitosamente.\"\r\n\"IpRefreshSuccess\" = \"✅ {{ .Email }} : IPs actualizadas exitosamente.\"\r\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }} : Usuario de Telegram del cliente actualizado exitosamente.\"\r\n\"resetTrafficSuccess\" = \"✅ {{ .Email }} : Tráfico reiniciado exitosamente.\"\r\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }} : Límite de Tráfico guardado exitosamente.\"\r\n\"expireResetSuccess\" = \"✅ {{ .Email }} : Días de vencimiento reiniciados exitosamente.\"\r\n\"resetIpSuccess\" = \"✅ {{ .Email }} : Límite de IP {{ .Count }} guardado exitosamente.\"\r\n\"clearIpSuccess\" = \"✅ {{ .Email }} : IPs limpiadas exitosamente.\"\r\n\"getIpLog\" = \"✅ {{ .Email }} : Obtener Registro de IP.\"\r\n\"getUserInfo\" = \"✅ {{ .Email }} : Obtener Información de Usuario de Telegram.\"\r\n\"removedTGUserSuccess\" = \"✅ {{ .Email }} : Usuario de Telegram eliminado exitosamente.\"\r\n\"enableSuccess\" = \"✅ {{ .Email }} : Habilitado exitosamente.\"\r\n\"disableSuccess\" = \"✅ {{ .Email }} : Deshabilitado exitosamente.\"\r\n\"askToAddUserId\" = \"¡No se encuentra su configuración!\\r\\nPor favor, pídale a su administrador que use su ID de usuario de Telegram en su(s) configuración(es).\\r\\n\\r\\nSu ID de usuario: <code>{{ .TgUserID }}</code>\"\r\n"
  },
  {
    "path": "web/translation/translate.fa_IR.toml",
    "content": "\"username\" = \"نام‌کاربری\"\n\"password\" = \"رمزعبور\"\n\"login\" = \"ورود\"\n\"confirm\" = \"تایید\"\n\"cancel\" = \"انصراف\"\n\"close\" = \"بستن\"\n\"copy\" = \"کپی\"\n\"copied\" = \"کپی شد\"\n\"download\" = \"دانلود\"\n\"remark\" = \"نام\"\n\"enable\" = \"فعال\"\n\"protocol\" = \"پروتکل\"\n\"search\" = \"جستجو\"\n\"filter\" = \"فیلتر\"\n\"loading\" = \"...در حال بارگذاری\"\n\"second\" = \"ثانیه\"\n\"minute\" = \"دقیقه\"\n\"hour\" = \"ساعت\"\n\"day\" = \"روز\"\n\"check\" = \"چک کردن\"\n\"indefinite\" = \"نامحدود\"\n\"unlimited\" = \"نامحدود\"\n\"none\" = \"هیچ\"\n\"qrCode\" = \"QRکد\"\n\"info\" = \"اطلاعات بیشتر\"\n\"edit\" = \"ویرایش\"\n\"delete\" = \"حذف\"\n\"reset\" = \"ریست\"\n\"copySuccess\" = \"باموفقیت کپی‌شد\"\n\"sure\" = \"مطمئن\"\n\"encryption\" = \"رمزگذاری\"\n\"transmission\" = \"راه‌اتصال\"\n\"host\" = \"آدرس\"\n\"path\" = \"مسیر\"\n\"camouflage\" = \"مبهم‌سازی\"\n\"status\" = \"وضعیت\"\n\"enabled\" = \"فعال\"\n\"disabled\" = \"غیرفعال\"\n\"depleted\" = \"منقضی\"\n\"depletingSoon\" = \"در‌حال‌انقضا\"\n\"offline\" = \"آفلاین\"\n\"online\" = \"آنلاین\"\n\"domainName\" = \"آدرس دامنه\"\n\"monitor\" = \"آی‌پی اتصال\"\n\"certificate\" = \"گواهی دیجیتال\"\n\"fail\" = \"ناموفق\"\n\"success\" = \" موفق\"\n\"getVersion\" = \"دریافت نسخه\"\n\"install\" = \"نصب\"\n\"clients\" = \"کاربران\"\n\"usage\" = \"استفاده\"\n\"secretToken\" = \"توکن امنیتی\"\n\"remained\" = \"باقی‌مانده\"\n\"security\" = \"امنیت\"\n\"secAlertTitle\" = \"هشدار‌امنیتی\"\n\"secAlertSsl\" = \"این‌اتصال‌امن نیست. لطفا‌ تازمانی‌که تی‌ال‌اس برای محافظت از‌ داده‌ها فعال نشده‌است، از وارد کردن اطلاعات حساس خودداری کنید\"\n\"secAlertConf\" = \"تنظیمات خاصی در برابر حملات آسیب پذیر هستند. توصیه می‌شود پروتکل‌های امنیتی را برای جلوگیری از نفوذ احتمالی تقویت کنید\"\n\"secAlertSSL\" = \"پنل فاقد ارتباط امن است. لطفاً یک گواهینامه تی‌ال‌اس برای محافظت از داده‌ها نصب کنید\"\n\"secAlertPanelPort\" = \"استفاده از پورت پیش‌فرض پنل ناامن است. لطفاً یک پورت تصادفی یا خاص تنظیم کنید\"\n\"secAlertPanelURI\" = \"مسیر پیش‌فرض لینک پنل ناامن است. لطفاً یک مسیر پیچیده تنظیم کنید\"\n\"secAlertSubURI\" = \"مسیر پیش‌فرض لینک سابسکریپشن ناامن است. لطفاً یک مسیر پیچیده تنظیم کنید\"\n\"secAlertSubJsonURI\" = \"مسیر پیش‌فرض لینک سابسکریپشن جیسون ناامن است. لطفاً یک مسیر پیچیده تنظیم کنید\"\n\n[menu]\n\"dashboard\" = \"نمای کلی\"\n\"inbounds\" = \"ورودی‌ها\"\n\"settings\" = \"تنظیمات پنل\"\n\"xray\" = \"پیکربندی ایکس‌ری\"\n\"logout\" = \"خروج\"\n\"link\" = \"مدیریت\"\n\n[pages.login]\n\"hello\" = \"سلام\"\n\"title\" = \"خوش‌آمدید\"\n\"loginAgain\" = \"مدت زمان استفاده به‌اتمام‌رسیده، لطفا دوباره وارد شوید\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"اطلاعات به‌درستی وارد نشده‌است\"\n\"emptyUsername\" = \"لطفا یک نام‌کاربری وارد کنید‌\"\n\"emptyPassword\" = \"لطفا یک رمزعبور وارد کنید\"\n\"wrongUsernameOrPassword\" = \"نام‌کاربری یا رمزعبور‌اشتباه‌است\"\n\"successLogin\" = \"ورود\"\n\n[pages.index]\n\"title\" = \"نمای کلی\"\n\"memory\" = \"RAM\"\n\"hard\" = \"Disk\"\n\"xrayStatus\" = \"ایکس‌ری\"\n\"stopXray\" = \"توقف\"\n\"restartXray\" = \"شروع‌مجدد\"\n\"xraySwitch\" = \"‌نسخه\"\n\"xraySwitchClick\" = \"نسخه مورد نظر را انتخاب کنید\"\n\"xraySwitchClickDesk\" = \"لطفا بادقت انتخاب کنید. درصورت انتخاب نسخه قدیمی‌تر، امکان ناهماهنگی با پیکربندی فعلی وجود دارد\"\n\"operationHours\" = \"مدت‌کارکرد\"\n\"systemLoad\" = \"بارسیستم\"\n\"systemLoadDesc\" = \"میانگین بار سیستم برای 1، 5 و 15 دقیقه گذشته\"\n\"connectionTcpCountDesc\" = \"در تمام‌شبکه‌ها TCP مجموع‌اتصالات\"\n\"connectionUdpCountDesc\" = \"در تمام‌شبکه‌ها UDP مجموع‌اتصالات\"\n\"connectionCount\" = \"تعداد کانکشن ها\"\n\"upSpeed\" = \"سرعت کلی آپلود در تمام‌شبکه‌ها\"\n\"downSpeed\" = \"‌سرعت کلی دانلود در تمام‌شبکه‌ها\"\n\"totalSent\" = \"مجموع ترافیک ارسال‌‌شده پس‌از شروع‌به‌کار سیستم‌عامل\"\n\"totalReceive\" = \"مجموع ترافیک دریافت‌شده پس‌از شروع‌به‌کار سیستم‌عامل\"\n\"xraySwitchVersionDialog\" = \"تغییر نسخه ایکس‌ری\"\n\"xraySwitchVersionDialogDesc\" = \"آیا از تغییر نسخه‌ مطمئن هستید؟\"\n\"dontRefresh\" = \"در حال نصب، لطفا صفحه را رفرش نکنید\"\n\"logs\" = \"گزارش‌ها\"\n\"config\" = \"پیکربندی\"\n\"backup\" = \"پشتیبان‌گیری\"\n\"backupTitle\" = \"پشتیبان‌گیری دیتابیس\"\n\"backupDescription\" = \"توصیه‌می‌شود قبل‌از واردکردن یک دیتابیس جدید، نسخه پشتیبان تهیه ‌کنید\"\n\"exportDatabase\" = \" پشتیبان‌گیری\"\n\"importDatabase\" = \"بازگرداندن\"\n\n[pages.inbounds]\n\"title\" = \"کاربران\"\n\"totalDownUp\" = \"دریافت/ارسال کل\"\n\"totalUsage\" = \"‌‌‌مصرف کل\"\n\"inboundCount\" = \"کل ورودی‌ها\"\n\"operate\" = \"عملیات\"\n\"enable\" = \"فعال\"\n\"remark\" = \"نام\"\n\"protocol\" = \"پروتکل\"\n\"port\" = \"پورت\"\n\"traffic\" = \"ترافیک\"\n\"details\" = \"توضیحات\"\n\"transportConfig\" = \"نحوه اتصال\"\n\"expireDate\" = \"مدت زمان\"\n\"resetTraffic\" = \"ریست ترافیک\"\n\"addInbound\" = \"افزودن ورودی\"\n\"generalActions\" = \"عملیات کلی\"\n\"create\" = \"افزودن\"\n\"update\" = \"ویرایش\"\n\"modifyInbound\" = \"ویرایش ورودی\"\n\"deleteInbound\" = \"حذف ورودی\"\n\"deleteInboundContent\" = \"آیا مطمئن به حذف ورودی هستید؟\"\n\"deleteClient\" = \"حذف کاربر\"\n\"deleteClientContent\" = \"آیا مطمئن به حذف کاربر هستید؟\"\n\"resetTrafficContent\" = \"آیا مطمئن به ریست ترافیک هستید؟\"\n\"copyLink\" = \"کپی لینک\"\n\"address\" = \"آدرس\"\n\"network\" = \"شبکه\"\n\"destinationPort\" = \"پورت مقصد\"\n\"targetAddress\" = \"آدرس مقصد\"\n\"monitorDesc\" = \"به‌طور پیش‌فرض خالی‌بگذارید\"\n\"meansNoLimit\" = \"0 = واحد: گیگابایت) نامحدود)\"\n\"totalFlow\" = \"ترافیک کل\"\n\"leaveBlankToNeverExpire\" = \"برای منقضی‌نشدن خالی‌بگذارید\"\n\"noRecommendKeepDefault\" = \"توصیه‌می‌شود به‌طور پیش‌فرض حفظ‌شود\"\n\"certificatePath\" = \"مسیر فایل\"\n\"certificateContent\" = \"محتوای فایل\"\n\"publicKey\" = \"کلید عمومی\"\n\"privatekey\" = \"کلید خصوصی\"\n\"clickOnQRcode\" = \"برای کپی بر روی کدتصویری کلیک کنید\"\n\"client\" = \"کاربر\"\n\"export\" = \"استخراج لینک‌ها\"\n\"clone\" = \"شبیه‌سازی\"\n\"cloneInbound\" = \"شبیه‌سازی ورودی\"\n\"cloneInboundContent\" = \"همه موارد این ورودی بجز پورت، آی‌پی و کاربر‌ها شبیه‌سازی خواهند شد\"\n\"cloneInboundOk\" = \"ساختن شبیه ساز\"\n\"resetAllTraffic\" = \"ریست ترافیک کل ورودی‌ها\"\n\"resetAllTrafficTitle\" = \"ریست ترافیک کل ورودی‌ها\"\n\"resetAllTrafficContent\" = \"آیا مطمئن به ریست ترافیک تمام ورودی‌ها هستید؟\"\n\"resetInboundClientTraffics\" = \"ریست ترافیک کاربران\"\n\"resetInboundClientTrafficTitle\" = \"ریست ترافیک کاربران\"\n\"resetInboundClientTrafficContent\" = \"آیا مطمئن به ریست ترافیک تمام کاربران این‌ ورودی هستید؟\"\n\"resetAllClientTraffics\" = \"ریست ترافیک کل کاربران\"\n\"resetAllClientTrafficTitle\" = \"ریست ترافیک کل کاربران\"\n\"resetAllClientTrafficContent\" = \"آیا مطمئن به ریست ترافیک تمام کاربران هستید؟\"\n\"delDepletedClients\" = \"حذف کاربران منقضی\"\n\"delDepletedClientsTitle\" = \"حذف کاربران منقضی\"\n\"delDepletedClientsContent\" = \"آیا مطمئن به حذف تمام کاربران منقضی‌شده ‌هستید؟\"\n\"email\" = \"ایمیل\"\n\"emailDesc\" = \"باید یک ایمیل یکتا باشد\"\n\"IPLimit\" = \"محدودیت آی‌پی\"\n\"IPLimitDesc\" = \"(اگر تعداد از مقدار تنظیم شده بیشتر شود، ورودی را غیرفعال می کند. (0 = غیرفعال\"\n\"IPLimitlog\" = \"گزارش‌ها\"\n\"IPLimitlogDesc\" = \"گزارش تاریخچه آی‌پی. برای فعال کردن ورودی پس از غیرفعال شدن، گزارش را پاک کنید\"\n\"IPLimitlogclear\" = \"پاک کردن گزارش‌ها\"\n\"setDefaultCert\" = \"استفاده از گواهی پنل\"\n\"xtlsDesc\" = \"ایکس‌ری باید 1.7.5 باشد\"\n\"realityDesc\" = \"ایکس‌ری باید +1.8.0 باشد\"\n\"telegramDesc\" = \"لطفا شناسه گفتگوی تلگرام را وارد کنید. (از دستور '/id' در ربات استفاده کنید) یا (@userinfobot)\"\n\"subscriptionDesc\" = \"شما می‌توانید لینک سابسکربپشن خودرا در 'جزئیات' پیدا کنید، همچنین می‌توانید از همین نام برای چندین کاربر استفاده‌کنید\"\n\"info\" = \"اطلاعات\"\n\"same\" = \"همسان\"\n\"inboundData\" = \"داده‌های ورودی\"\n\"exportInbound\" = \"استخراج ورودی\"\n\"import\" = \"افزودن\"\n\"importInbound\" = \"افزودن یک ورودی\"\n\n[pages.client]\n\"add\" = \"کاربر جدید\"\n\"edit\" = \"ویرایش کاربر\"\n\"submitAdd\" = \"اضافه کردن\"\n\"submitEdit\" = \"ذخیره تغییرات\"\n\"clientCount\" = \"تعداد کاربران\"\n\"bulk\" = \"انبوه‌سازی\"\n\"method\" = \"روش\"\n\"first\" = \"از\"\n\"last\" = \"تا\"\n\"prefix\" = \"پیشوند\"\n\"postfix\" = \"پسوند\"\n\"delayedStart\" = \"شروع‌پس‌از‌اولین‌استفاده\"\n\"expireDays\" = \"مدت زمان\"\n\"days\" = \"(روز)\"\n\"renew\" = \"تمدید خودکار\"\n\"renewDesc\" = \"(تمدید خودکار پس‌از ‌انقضا. (0 = غیرفعال)(واحد: روز\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"فراهم‌سازی\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"درخواست\"\n\"response\" = \"پاسخ\"\n\"name\" = \"نام\"\n\"value\" = \"مقدار\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"نسخه\"\n\"method\" = \"متد\"\n\"path\" = \"مسیر\"\n\"status\" = \"وضعیت\"\n\"statusDescription\" = \"توضیحات وضعیت\"\n\"requestHeader\" = \"سربرگ درخواست\"\n\"responseHeader\" = \"سربرگ پاسخ\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"رمزنگاری\"\n\n[pages.settings]\n\"title\" = \"تنظیمات پنل\"\n\"save\" = \"ذخیره\"\n\"infoDesc\" = \"برای اعمال تغییرات در این بخش باید پس از ذخیره کردن، پنل را ریستارت کنید\"\n\"restartPanel\" = \"ریستارت پنل\"\n\"restartPanelDesc\" = \"آیا مطمئن به ریستارت پنل هستید؟ اگر پس‌از ریستارت نمی‌توانید به پنل دسترسی پیدا کنید، لطفاً گزارش‌های موجود در اسکریپت پنل را بررسی کنید\"\n\"actions\" = \"عملیات ها\"\n\"resetDefaultConfig\" = \"برگشت به پیش‌فرض\"\n\"panelSettings\" = \"پیکربندی\"\n\"securitySettings\" = \"احرازهویت\"\n\"TGBotSettings\" = \"ربات تلگرام\"\n\"panelListeningIP\" = \"آدرس آی‌پی\"\n\"panelListeningIPDesc\" = \"آدرس آی‌پی برای وب پنل. برای گوش‌دادن به‌تمام آی‌پی‌ها خالی‌بگذارید\"\n\"panelListeningDomain\" = \"نام دامنه\"\n\"panelListeningDomainDesc\" = \"آدرس دامنه برای وب پنل. برای گوش دادن به‌تمام دامنه‌ها و آی‌پی‌ها خالی‌بگذارید\"\n\"panelPort\" = \"پورت\"\n\"panelPortDesc\" = \"شماره پورت برای وب پنل. باید پورت استفاده نشده‌باشد\"\n\"publicKeyPath\" = \"مسیر کلید عمومی\"\n\"publicKeyPathDesc\" = \"مسیر فایل کلیدعمومی برای وب پنل. با '/' شروع‌می‌شود\"\n\"privateKeyPath\" = \"مسیر کلید خصوصی\"\n\"privateKeyPathDesc\" = \"مسیر فایل کلیدخصوصی برای وب پنل. با '/' شروع‌می‌شود\"\n\"panelUrlPath\" = \"URI مسیر\"\n\"panelUrlPathDesc\" = \"برای وب پنل. با '/' شروع‌ و با '/' خاتمه‌ می‌یابد URI مسیر\"\n\"pageSize\" = \"اندازه صفحه بندی جدول\"\n\"pageSizeDesc\" = \"(اندازه صفحه برای جدول ورودی‌ها.(0 = غیرفعال\"\n\"remarkModel\" = \"نام‌کانفیگ و جداکننده\"\n\"datepicker\" = \"نوع تقویم\"\n\"datepickerPlaceholder\" = \"انتخاب تاریخ\"\n\"datepickerDescription\" = \"وظایف برنامه ریزی شده بر اساس این تقویم اجرا می‌شود\"\n\"sampleRemark\" = \"نمونه‌نام\"\n\"oldUsername\" = \"نام‌کاربری فعلی\"\n\"currentPassword\" = \"رمز‌عبور فعلی\"\n\"newUsername\" = \"نام‌کاربری جدید\"\n\"newPassword\" = \"رمزعبور جدید\"\n\"telegramBotEnable\" = \"فعال‌سازی ربات تلگرام\"\n\"telegramBotEnableDesc\" = \"ربات تلگرام را فعال می‌کند\"\n\"telegramToken\" = \"توکن تلگرام\"\n\"telegramTokenDesc\" = \"دریافت کنید @botfather توکن را می‌توانید از\"\n\"telegramProxy\" = \"SOCKS پراکسی\"\n\"telegramProxyDesc\" = \"را برای اتصال به تلگرام فعال می کند SOCKS5 پراکسی\"\n\"telegramChatId\" = \"آی‌دی چت مدیر\"\n\"telegramChatIdDesc\" = \"دریافت ‌کنید ('/id'یا (دستور (@userinfobot) آی‌دی(های) چت تلگرام مدیر، از\"\n\"telegramNotifyTime\" = \"زمان نوتیفیکیشن\"\n\"telegramNotifyTimeDesc\" = \"زمان‌اطلاع‌رسانی ربات تلگرام برای گزارش های دوره‌ای. از فرمت زمانبندی لینوکس استفاده‌کنید‌\"\n\"tgNotifyBackup\" = \"پشتیبان‌گیری از دیتابیس\"\n\"tgNotifyBackupDesc\" = \"فایل پشتیبان‌دیتابیس را به‌همراه گزارش ارسال می‌کند\"\n\"tgNotifyLogin\" = \"اعلان ورود\"\n\"tgNotifyLoginDesc\" = \"نام‌کاربری، آدرس آی‌پی، و زمان ورود، فردی که سعی می‌کند وارد پنل شود را نمایش می‌دهد\"\n\"sessionMaxAge\" = \"بیشینه زمان جلسه وب\"\n\"sessionMaxAgeDesc\" = \"(بیشینه زمانی که می‌توانید لاگین بمانید. (واحد: دقیقه\"\n\"expireTimeDiff\" = \"آستانه زمان باقی مانده\"\n\"expireTimeDiffDesc\" = \"(فاصله زمانی هشدار تا رسیدن به زمان انقضا. (واحد: روز\"\n\"trafficDiff\" = \"آستانه ترافیک باقی مانده\"\n\"trafficDiffDesc\" = \"(فاصله زمانی هشدار تا رسیدن به اتمام ترافیک. (واحد: گیگابایت\"\n\"tgNotifyCpu\" = \"آستانه هشدار بار پردازنده\"\n\"tgNotifyCpuDesc\" = \"(اگر بار روی پردازنده ازاین آستانه فراتر رفت، برای شما پیام ارسال می‌شود. (واحد: درصد\"\n\"timeZone\" = \"منطقه زمانی\"\n\"timeZoneDesc\" = \"وظایف برنامه ریزی شده بر اساس این منطقه‌زمانی اجرا می‌شود\"\n\"subSettings\" = \"سابسکریپشن\"\n\"subEnable\" = \"فعال‌سازی سرویس سابسکریپشن\"\n\"subEnableDesc\" = \" سرویس سابسکریپشن‌ را فعال‌می‌کند\"\n\"subListen\" = \"آدرس آی‌پی\"\n\"subListenDesc\" = \"آدرس آی‌پی برای سرویس سابسکریپشن. برای گوش دادن به‌تمام آی‌پی‌ها خالی‌بگذارید\"\n\"subPort\" = \"پورت\"\n\"subPortDesc\" = \"شماره پورت برای سرویس سابسکریپشن. باید پورت استفاده نشده‌باشد\"\n\"subCertPath\" = \"مسیر کلید عمومی\"\n\"subCertPathDesc\" = \"مسیر فایل کلیدعمومی برای سرویس سابیکریپشن. با '/' شروع‌می‌شود\"\n\"subKeyPath\" = \"مسیر کلید خصوصی\"\n\"subKeyPathDesc\" = \"مسیر فایل کلیدخصوصی برای سرویس سابسکریپشن. با '/' شروع‌می‌شود\"\n\"subPath\" = \"URI مسیر\"\n\"subPathDesc\" = \"برای سرویس سابسکریپشن. با '/' شروع‌ و با '/' خاتمه‌ می‌یابد URI مسیر\"\n\"subDomain\" = \"نام دامنه\"\n\"subDomainDesc\" = \"آدرس دامنه برای سرویس سابسکریپشن. برای گوش دادن به تمام دامنه‌ها و آی‌پی‌ها خالی‌بگذارید‌\"\n\"subUpdates\" = \"فاصله بروزرسانی‌ سابسکریپشن\"\n\"subUpdatesDesc\" = \"(فاصله مابین بروزرسانی در برنامه‌های کاربری. (واحد: ساعت\"\n\"subEncrypt\" = \"کدگذاری\"\n\"subEncryptDesc\" = \"کدگذاری خواهدشد Base64 محتوای برگشتی سرویس سابسکریپشن برپایه\"\n\"subShowInfo\" = \"نمایش اطلاعات مصرف\"\n\"subShowInfoDesc\" = \"ترافیک و زمان باقی‌مانده را در برنامه‌های کاربری نمایش می‌دهد\"\n\"subURI\" = \"پروکسی معکوس URI مسیر\"\n\"subURIDesc\" = \"سابسکریپشن را برای استفاده در پشت پراکسی‌ها تغییر می‌دهد URI مسیر\"\n\"fragment\" = \"فرگمنت\"\n\"fragmentDesc\" = \"فعال کردن فرگمنت برای بسته‌ی نخست تی‌ال‌اس\"\n\"fragmentSett\" = \"تنظیمات فرگمنت\"\n\"mux\" = \"ماکس\"\n\"muxDesc\" = \"چندین جریان داده مستقل را در یک جریان داده ثابت منتقل می کند\"\n\"muxSett\" = \"تنظیمات ماکس\"\n\"direct\" = \"اتصال مستقیم\"\n\"directDesc\" = \"به طور مستقیم با دامنه ها یا محدوده آی‌پی یک کشور خاص ارتباط برقرار می کند\"\n\"directSett\" = \"گزینه های اتصال مستقیم\"\n\n[pages.xray]\n\"title\" = \"پیکربندی ایکس‌ری\"\n\"save\" = \"ذخیره\"\n\"restart\" = \"ریستارت ایکس‌ری\"\n\"basicTemplate\" = \"پایه\"\n\"advancedTemplate\" = \"پیشرفته\"\n\"generalConfigs\" = \"استراتژی‌ کلی\"\n\"generalConfigsDesc\" = \"این گزینه‌ها استراتژی کلی ترافیک را تعیین می‌کنند\"\n\"logConfigs\" = \"گزارش\"\n\"logConfigsDesc\" = \"گزارش‌ها ممکن است بر کارایی سرور شما تأثیر بگذارد. توصیه می شود فقط در صورت نیاز آن را عاقلانه فعال کنید\"\n\"blockConfigs\" = \"سپر محافظ\"\n\"blockConfigsDesc\" = \"این گزینه‌ها ترافیک را بر اساس پروتکل‌های درخواستی خاص، و وب سایت‌ها مسدود می‌کند\"\n\"blockCountryConfigs\" = \"مسدودسازی کشور\"\n\"blockCountryConfigsDesc\" = \"این گزینه‌ها ترافیک را بر اساس کشور درخواستی خاص مسدود می‌کند\"\n\"directCountryConfigs\" = \"اتصال مستقیم کشور\"\n\"directCountryConfigsDesc\" = \"اتصال مستقیم اطمینان حاصل می‌کند که ترافیک خاص از طریق یک سرور دیگر هدایت نمی‌شود.\"\n\"ipv4Configs\" = \"IPv4 مسیریابی\"\n\"ipv4ConfigsDesc\" = \"این گزینه‌ها ترافیک‌ را از طریق آی‌پی‌نسخه4 به مقصد هدایت می‌کند\"\n\"warpConfigs\" = \"WARP مسیریابی\"\n\"warpConfigsDesc\" = \"طبق راهنما نصب کنید SOCKS5 این گزینه‌ها ترافیک‌ را از طریق وارپ کلادفلر به مقصد هدایت می‌کند. ابتدا، وارپ را در حالت پراکسی\"\n\"Template\" = \"‌پیکربندی پیشرفته الگو ایکس‌ری\"\n\"TemplateDesc\" = \"فایل پیکربندی نهایی ایکس‌ری بر اساس این الگو ایجاد می‌شود\"\n\"FreedomStrategy\" = \"Freedom استراتژی پروتکل\"\n\"FreedomStrategyDesc\" = \"تعیین می‌کند Freedom استراتژی خروجی شبکه را برای پروتکل\"\n\"RoutingStrategy\" = \"استراتژی کلی مسیریابی\"\n\"RoutingStrategyDesc\" = \"استراتژی کلی مسیریابی برای حل تمام درخواست‌ها را تعیین می‌کند\"\n\"Torrent\" = \"مسدودسازی پروتکل بیت‌تورنت\"\n\"TorrentDesc\" = \"پروتکل بیت تورنت را مسدود می‌کند\"\n\"PrivateIp\" = \"مسدودسازی اتصال آی‌پی‌های خصوصی\"\n\"PrivateIpDesc\" = \"اتصال به آی‌پی‌های رنج خصوصی را مسدود می‌کند\"\n\"Ads\" = \"مسدودسازی تبلیغات\"\n\"AdsDesc\" = \"وب‌سایت‌های تبلیغاتی را مسدود می‌کند\"\n\"Family\" = \"محافظت خانواده\"\n\"FamilyDesc\" = \"محتوای مخصوص بزرگسالان، و وب‌سایت‌های ناامن را مسدود می‌کند\"\n\"Security\" = \"محافظت امنیتی\"\n\"SecurityDesc\" = \"وب‌سایت‌های ناامن، بدافزار، فیشینگ، و کریپتوماینرها را مسدود می‌کند\"\n\"Speedtest\" = \"مسدودسازی اسپیدتست\"\n\"SpeedtestDesc\" = \"اتصال به وب‌سایت‌های تست سرعت را مسدود می‌کند\"\n\"IRIp\" = \"مسدودسازی اتصال به آی‌پی‌های ایران\"\n\"IRIpDesc\" = \"اتصال به آی‌پی‌های کشور ایران را مسدود می‌کند\"\n\"IRDomain\" = \"مسدودسازی اتصال به دامنه‌های‌ ایران\"\n\"IRDomainDesc\" = \"اتصال به دامنه‌های کشور ایران را مسدود می‌کند\"\n\"ChinaIp\" = \"مسدودسازی اتصال به آی‌‌پی‌های چین\"\n\"ChinaIpDesc\" = \"اتصال به آی‌پی‌های کشور چین را مسدود می‌کند\"\n\"ChinaDomain\" = \"مسدودسازی اتصال به دامنه‌های چین\"\n\"ChinaDomainDesc\" = \"اتصال به دامنه‌های کشور چین را مسدود می‌کند\"\n\"RussiaIp\" = \"مسدودسازی اتصال به آی‌پی‌های روسیه\"\n\"RussiaIpDesc\" = \"اتصال به آی‌پی‌های کشور روسیه را مسدود می‌کند\"\n\"RussiaDomain\" = \"مسدودسازی اتصال به دامنه‌های روسیه\"\n\"RussiaDomainDesc\" = \"اتصال به دامنه‌های کشور روسیه را مسدود می‌کند\"\n\"VNIp\" = \"مسدودسازی اتصال به آی‌پی‌های ویتنام\"\n\"VNIpDesc\" = \"اتصال به آی‌پی‌های کشور ویتنام را مسدود می‌کند\"\n\"VNDomain\" = \"مسدودسازی اتصال به دامنه های ویتنام\"\n\"VNDomainDesc\" = \"اتصال به دامنه‌های کشور ویتنام را مسدود می‌کند\"\n\"DirectIRIp\" = \"اتصال مستقیم آی‌پی‌های ایران\"\n\"DirectIRIpDesc\" = \"اتصال مستقیم به آی‌پی‌های کشور ایران\"\n\"DirectIRDomain\" = \"اتصال مستقیم دامنه‌های ایران\"\n\"DirectIRDomainDesc\" = \"اتصال مستقیم به دامنه‌های کشور ایران\"\n\"DirectChinaIp\" = \"اتصال مستقیم آی‌پی‌های چین\"\n\"DirectChinaIpDesc\" = \"اتصال مستقیم به آی‌پی‌های کشور چین\"\n\"DirectChinaDomain\" = \"اتصال مستقیم دامنه‌های چین\"\n\"DirectChinaDomainDesc\" = \"اتصال مستقیم به دامنه‌های کشور چین\"\n\"DirectRussiaIp\" = \"اتصال مستقیم آی‌پی‌های روسیه\"\n\"DirectRussiaIpDesc\" = \"اتصال مستقیم به آی‌پی‌های کشور روسیه\"\n\"DirectRussiaDomain\" = \"اتصال مستقیم دامنه‌های روسیه\"\n\"DirectRussiaDomainDesc\" = \"اتصال مستقیم به دامنه‌های کشور روسیه\"\n\"DirectVNIp\" = \"اتصال مستقیم آی‌پی‌های ویتنام\"\n\"DirectVNIpDesc\" = \"اتصال مستقیم به آی‌پی‌های کشور ویتنام\"\n\"DirectVNDomain\" = \"اتصال مستقیم دامنه‌های ویتنام\"\n\"DirectVNDomainDesc\" = \"اتصال مستقیم به دامنه‌های کشور ویتنام\"\n\"GoogleIPv4\" = \"گوگل\"\n\"GoogleIPv4Desc\" = \"ترافیک را از طریق آی‌پی‌نسخه4 به گوگل هدایت می‌کند\"\n\"NetflixIPv4\" = \"نتفلیکس\"\n\"NetflixIPv4Desc\" = \"ترافیک را از طریق آی‌پی‌نسخه4 به نتفلیکس هدایت می‌کند\"\n\"GoogleWARP\" = \"گوگل\"\n\"GoogleWARPDesc\" = \"ترافیک را از طریق وارپ به گوگل هدایت می‌کند\"\n\"OpenAIWARP\" = \"چت جی‌پی‌تی\"\n\"OpenAIWARPDesc\" = \"ترافیک را از طریق وارپ به چت جی‌پی‌تی هدایت می‌کند\"\n\"NetflixWARP\" = \"نتفلیکس\"\n\"NetflixWARPDesc\" = \"ترافیک را از طریق وارپ به نتفلیکس هدایت می‌کند\"\n\"MetaWARP\" = \"متا\"\n\"MetaWARPDesc\" = \"ترافیک را از طریق وارپ به متا (اینستاگرام، فیس بوک، واتساپ، تردز و...) هدایت می کند.\"\n\"AppleWARP\" = \"اپل\"\n\"AppleWARPDesc\" = \" ترافیک را از طریق وارپ به اپل هدایت می‌کند\"\n\"RedditWARP\" = \"ردیت\"\n\"RedditWARPDesc\" = \" ترافیک را از طریق وارپ به ردیت هدایت می‌کند\"\n\"SpotifyWARP\" = \"اسپاتیفای\"\n\"SpotifyWARPDesc\" = \" ترافیک را از طریق وارپ به اسپاتیفای هدایت می‌کند\"\n\"IRWARP\" = \"دامنه‌های ایران\"\n\"IRWARPDesc\" = \"ترافیک را از طریق وارپ به دامنه‌های کشور ایران هدایت می‌کند\"\n\"Inbounds\" = \"ورودی‌ها\"\n\"InboundsDesc\" = \"پذیرش کلاینت خاص\"\n\"Outbounds\" = \"خروجی‌ها\"\n\"Balancers\" = \"بالانسرها\"\n\"OutboundsDesc\" = \"مسیر ترافیک خروجی را تنظیم کنید\"\n\"Routings\" = \"قوانین مسیریابی\"\n\"RoutingsDesc\" = \"اولویت هر قانون مهم است\"\n\"completeTemplate\" = \"کامل\"\n\"logLevel\" = \"سطح گزارش\"\n\"logLevelDesc\" = \"سطح گزارش برای گزارش های خطا، نشان دهنده اطلاعاتی است که باید ثبت شوند.\"\n\"accessLog\" = \"مسیر گزارش\"\n\"accessLogDesc\" = \"مسیر فایل برای گزارش دسترسی. مقدار ویژه «هیچ» گزارش‌های دسترسی را غیرفعال میکند.\"\n\"errorLog\" = \"گزارش خطا\"\n\"errorLogDesc\" = \"مسیر فایل برای ورود به سیستم خطا. مقدار ویژه «هیچ» گزارش های خطا را غیرفعال میکند\"\n\n[pages.xray.rules]\n\"first\" = \"اولین\"\n\"last\" = \"آخرین\"\n\"up\" = \"بالا\"\n\"down\" = \"پایین\"\n\"source\" = \"مبدا\"\n\"dest\" = \"مقصد\"\n\"inbound\" = \"ورودی\"\n\"outbound\" = \"خروجی\"\n\"balancer\" = \"بالانسر\"\n\"info\" = \"اطلاعات\"\n\"add\" = \"افزودن قانون\"\n\"edit\" = \"ویرایش قانون\"\n\"useComma\" = \"موارد جدا شده با کاما\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"افزودن خروجی\"\n\"addReverse\" = \"افزودن معکوس\"\n\"editOutbound\" = \"ویرایش خروجی\"\n\"editReverse\" = \"ویرایش معکوس\"\n\"tag\" = \"برچسب\"\n\"tagDesc\" = \"برچسب یگانه\"\n\"address\" = \"آدرس\"\n\"reverse\" = \"معکوس\"\n\"domain\" = \"دامنه\"\n\"type\" = \"نوع\"\n\"bridge\" = \"پل\"\n\"portal\" = \"پورتال\"\n\"intercon\" = \"اتصال میانی\"\n\"settings\" = \"تنظیمات\"\n\"accountInfo\" = \"اطلاعات حساب\"\n\"outboundStatus\" = \"وضعیت خروجی\"\n\"sendThrough\" = \"ارسال با\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"افزودن بالانسر\"\n\"editBalancer\" = \"ویرایش بالانسر\"\n\"balancerStrategy\" = \"استراتژی\"\n\"balancerSelectors\" = \"انتخاب‌گرها\"\n\"tag\" = \"برچسب\"\n\"tagDesc\" = \"برچسب یگانه\"\n\"balancerDesc\" = \"امکان استفاده همزمان balancerTag و outboundTag باهم وجود ندارد. درصورت استفاده همزمان فقط outboundTag عمل خواهد کرد.\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"کلید شخصی\"\n\"publicKey\" = \"کلید عمومی\"\n\"allowedIPs\" = \"آی‌پی‌های مجاز\"\n\"endpoint\" = \"نقطه پایانی\"\n\"psk\" = \"کلید مشترک\"\n\"domainStrategy\" = \"استراتژی حل دامنه\"\n\n[pages.xray.dns]\n\"enable\" = \"فعال کردن حل دامنه\"\n\"enableDesc\" = \"سرور حل دامنه داخلی را فعال کنید\"\n\"tag\" = \"برچسب\"\n\"tagDesc\" = \"این برچسب در قوانین مسیریابی به عنوان یک برچسب ورودی قابل استفاده خواهد بود\"\n\"strategy\" = \"استراتژی پرس‌وجو\"\n\"strategyDesc\" = \"استراتژی کلی برای حل نام دامنه\"\n\"add\" = \"افزودن سرور\"\n\"edit\" = \"ویرایش سرور\"\n\"domains\" = \"دامنه‌ها\"\n\n[pages.xray.fakedns]\n\"add\" = \"افزودن دی‌ان‌اس جعلی\"\n\"edit\" = \"ویرایش دی‌ان‌اس جعلی\"\n\"ipPool\" = \"زیرشبکه استخر آی‌پی\"\n\"poolSize\" = \"اندازه استخر\"\n\n[pages.settings.security]\n\"admin\" = \"مدیر\"\n\"secret\" = \"توکن مخفی\"\n\"loginSecurity\" = \"ورود ایمن\"\n\"loginSecurityDesc\" = \"یک لایه اضافی از احراز هویت برای ایجاد امنیت بیشتر اضافه می کند\"\n\"secretToken\" = \"توکن مخفی\"\n\"secretTokenDesc\" = \"لطفاً این توکن را در مکانی امن ذخیره کنید. این توکن برای ورود به سیستم مورد نیاز است و قابل بازیابی نیست\"\n\n[pages.settings.toasts]\n\"modifySettings\" = \"ویرایش تنظیمات\"\n\"getSettings\" = \"دریافت تنظیمات\"\n\"modifyUser\" = \"ویرایش مدیر\"\n\"originalUserPassIncorrect\" = \"نام‌کاربری یا رمزعبور فعلی اشتباه‌است\"\n\"userPassMustBeNotEmpty\" = \"نام‌کاربری یا رمزعبور جدید خالی‌است\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ کیبورد سفارشی بسته شد!\"\n\"noResult\" = \"❗ نتیجه‌ای یافت نشد!\"\n\"noQuery\" = \"❌ کوئری یافت نشد! لطفاً دستور را مجدداً استفاده کنید!\"\n\"wentWrong\" = \"❌ مشکلی رخ داده است!\"\n\"noIpRecord\" = \"❗ رکورد IP یافت نشد!\"\n\"noInbounds\" = \"❗ هیچ ورودی یافت نشد!\"\n\"unlimited\" = \"♾ - نامحدود(ریست)\"\n\"add\" = \"اضافه کردن\"\n\"month\" = \"ماه\"\n\"months\" = \"ماه‌ها\"\n\"day\" = \"روز\"\n\"days\" = \"روزها\"\n\"hours\" = \"ساعت‌ها\"\n\"unknown\" = \"نامشخص\"\n\"inbounds\" = \"ورودی‌ها\"\n\"clients\" = \"کلاینت‌ها\"\n\"offline\" = \"🔴 آفلاین\"\n\"online\" = \"🟢 آنلاین\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ دستور ناشناخته\"\n\"pleaseChoose\" = \"👇 لطفاً انتخاب کنید:\\r\\n\"\n\"help\" = \"🤖 به این ربات خوش آمدید! این ربات برای ارائه داده‌های خاص از سرور طراحی شده است و به شما امکان تغییرات لازم را می‌دهد.\\r\\n\\r\\n\"\n\"start\" = \"👋 سلام <i>{{ .Firstname }}</i>.\\r\\n\"\n\"welcome\" = \"🤖 به ربات مدیریت <b>{{ .Hostname }}</b> خوش آمدید.\\r\\n\"\n\"status\" = \"✅ ربات در حالت عادی است!\"\n\"usage\" = \"❗ لطفاً یک متن برای جستجو وارد کنید!\"\n\"getID\" = \"🆔 شناسه شما: <code>{{ .ID }}</code>\"\n\"helpAdminCommands\" = \"برای جستجوی ایمیل مشتری:\\r\\n<code>/usage [ایمیل]</code>\\r\\n\\r\\nبرای جستجوی ورودی‌ها (با آمار مشتری):\\r\\n<code>/inbound [توضیحات]</code>\\r\\n\\r\\nشناسه گفتگوی تلگرام:\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"برای جستجوی آمار، از دستور زیر استفاده کنید:\\r\\n<code>/usage [ایمیل]</code>\\r\\n\\r\\nشناسه گفتگوی تلگرام:\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 بار ‌پردازنده {{ .Percent }}% بیشتر از آستانه است {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ خطا در انتخاب کاربر!\"\n\"userSaved\" = \"✅ کاربر تلگرام ذخیره شد.\"\n\"loginSuccess\" = \"✅ با موفقیت به پنل وارد شدید.\\r\\n\"\n\"loginFailed\" = \"❗️ ورود به پنل ناموفق‌بود \\r\\n\"\n\"report\" = \"🕰 گزارشات‌زمان‌بندی‌شده: {{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ تاریخ‌وزمان: {{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 نام‌میزبان: {{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 نسخه‌پنل: {{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 نسخه‌هسته: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 آدرس‌آی‌پی: {{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 آدرس‌های آی‌پی:\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ مدت‌کارکردسیستم: {{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 بارسیستم: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 RAM: {{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 TCP: {{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 UDP: {{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 ترافیک: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ وضعیت‌ایکس‌ری: {{ .State }}\\r\\n\"\n\"username\" = \"👤 نام‌کاربری: {{ .Username }}\\r\\n\"\n\"password\" = \"👤 رمز عبور: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ زمان: {{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 نام‌ورودی: {{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 پورت: {{ .Port }}\\r\\n\"\n\"expire\" = \"📅 تاریخ‌انقضا: {{ .Time }}\\r\\n\\r\\n\"\n\"expireIn\" = \"📅 باقی‌مانده‌تاانقضا: {{ .Time }}\\r\\n\\r\\n\"\n\"active\" = \"💡 فعال: {{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 وضعیت: {{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 وضعیت اتصال: {{ .Status }}\\r\\n\"\n\"email\" = \"📧 ایمیل: {{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 آپلود↑: {{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 دانلود↓: {{ .Download }}\\r\\n\"\n\"total\" = \"🔄 کل: {{ .UpDown }} / {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 کاربر تلگرام: {{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 {{ .Type }} به‌اتمام‌رسیده‌است:\\r\\n\"\n\"exhaustedCount\" = \"🚨 تعداد {{ .Type }} به‌اتمام‌رسیده‌است:\\r\\n\"\n\"onlinesCount\" = \"🌐 کاربران‌آنلاین: {{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 غیرفعال: {{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 به‌زودی‌به‌پایان‌خواهدرسید: {{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 زمان‌پشتیبان‌گیری: {{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 تازه‌سازی شده در: {{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ بله\"\n\"no\" = \"❌ خیر\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ بستن کیبورد\"\n\"cancel\" = \"❌ لغو\"\n\"cancelReset\" = \"❌ لغو تنظیم مجدد\"\n\"cancelIpLimit\" = \"❌ لغو محدودیت آی‌پی\"\n\"confirmResetTraffic\" = \"✅ تأیید تنظیم مجدد ترافیک؟\"\n\"confirmClearIps\" = \"✅ تأیید پاک‌سازی آدرس‌های آی‌پی؟\"\n\"confirmRemoveTGUser\" = \"✅ تأیید حذف کاربر تلگرام؟\"\n\"confirmToggle\" = \"✅ تایید فعال/غیرفعال کردن کاربر؟\"\n\"dbBackup\" = \"دریافت پشتیبان\"\n\"serverUsage\" = \"استفاده از سیستم\"\n\"getInbounds\" = \"دریافت ورودی‌ها\"\n\"depleteSoon\" = \"به‌زودی به پایان خواهد رسید\"\n\"clientUsage\" = \"دریافت آمار کاربر\"\n\"onlines\" = \"کاربران آنلاین\"\n\"commands\" = \"دستورات\"\n\"refresh\" = \"🔄 تازه‌سازی\"\n\"clearIPs\" = \"❌ پاک‌سازی آدرس‌ها\"\n\"removeTGUser\" = \"❌ حذف کاربر تلگرام\"\n\"selectTGUser\" = \"👤 انتخاب کاربر تلگرام\"\n\"selectOneTGUser\" = \"👤 یک کاربر تلگرام را انتخاب کنید:\"\n\"resetTraffic\" = \"📈 تنظیم مجدد ترافیک\"\n\"resetExpire\" = \"📅 تنظیم مجدد تاریخ انقضا\"\n\"ipLog\" = \"🔢 لاگ آدرس‌های IP\"\n\"ipLimit\" = \"🔢 محدودیت IP\"\n\"setTGUser\" = \"👤 تنظیم کاربر تلگرام\"\n\"toggle\" = \"🔘 فعال / غیرفعال\"\n\"custom\" = \"🔢 سفارشی\"\n\"confirmNumber\" = \"✅ تایید: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ تایید اضافه کردن: {{ .Num }}\"\n\"limitTraffic\" = \"🚧 محدودیت ترافیک\"\n\"getBanLogs\" = \"گزارش های بلوک را دریافت کنید\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ انجام شد!\"\n\"errorOperation\" = \"❗ خطا در عملیات.\"\n\"getInboundsFailed\" = \"❌ دریافت ورودی‌ها با خطا مواجه شد.\"\n\"canceled\" = \"❌ {{ .Email }} : عملیات لغو شد.\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }} : کلاینت با موفقیت تازه‌سازی شد.\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }} : آدرس‌ها با موفقیت تازه‌سازی شدند.\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }} : کاربر تلگرام کلاینت با موفقیت تازه‌سازی شد.\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }} : ترافیک با موفقیت تنظیم مجدد شد.\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }} : محدودیت ترافیک با موفقیت ذخیره شد.\"\n\"expireResetSuccess\" = \"✅ {{ .Email }} : تاریخ انقضا با موفقیت تنظیم مجدد شد.\"\n\"resetIpSuccess\" = \"✅ {{ .Email }} : محدودیت آدرس IP {{ .Count }} با موفقیت ذخیره شد.\"\n\"clearIpSuccess\" = \"✅ {{ .Email }} : آدرس‌ها با موفقیت پاک‌سازی شدند.\"\n\"getIpLog\" = \"✅ {{ .Email }} : دریافت لاگ آدرس‌های IP.\"\n\"getUserInfo\" = \"✅ {{ .Email }} : دریافت اطلاعات کاربر تلگرام.\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }} : کاربر تلگرام با موفقیت حذف شد.\"\n\"enableSuccess\" = \"✅ {{ .Email }} : با موفقیت فعال شد.\"\n\"disableSuccess\" = \"✅ {{ .Email }} : با موفقیت غیرفعال شد.\"\n\"askToAddUserId\" = \"پیکربندی شما یافت نشد!\\r\\nلطفاً از مدیر خود بخواهید که شناسه کاربر تلگرام خود را در پیکربندی (های) خود استفاده کند.\\r\\n\\r\\nشناسه کاربری شما: <code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/translation/translate.id_ID.toml",
    "content": "\"username\" = \"Nama Pengguna\"\n\"password\" = \"Kata Sandi\"\n\"login\" = \"Masuk\"\n\"confirm\" = \"Konfirmasi\"\n\"cancel\" = \"Batal\"\n\"close\" = \"Tutup\"\n\"copy\" = \"Salin\"\n\"copied\" = \"Tersalin\"\n\"download\" = \"Unduh\"\n\"remark\" = \"Catatan\"\n\"enable\" = \"Aktifkan\"\n\"protocol\" = \"Protokol\"\n\"search\" = \"Cari\"\n\"filter\" = \"Filter\"\n\"loading\" = \"Memuat...\"\n\"second\" = \"Detik\"\n\"minute\" = \"Menit\"\n\"hour\" = \"Jam\"\n\"day\" = \"Hari\"\n\"check\" = \"Centang\"\n\"indefinite\" = \"Tak Terbatas\"\n\"unlimited\" = \"Tanpa Batas\"\n\"none\" = \"None\"\n\"qrCode\" = \"Kode QR\"\n\"info\" = \"Informasi Lebih Lanjut\"\n\"edit\" = \"Edit\"\n\"delete\" = \"Hapus\"\n\"reset\" = \"Reset\"\n\"copySuccess\" = \"Berhasil Disalin\"\n\"sure\" = \"Yakin\"\n\"encryption\" = \"Enkripsi\"\n\"transmission\" = \"Transmisi\"\n\"host\" = \"Host\"\n\"path\" = \"Jalur\"\n\"camouflage\" = \"Obfuscation\"\n\"status\" = \"Status\"\n\"enabled\" = \"Aktif\"\n\"disabled\" = \"Nonaktif\"\n\"depleted\" = \"Habis\"\n\"depletingSoon\" = \"Akan Habis\"\n\"offline\" = \"Offline\"\n\"online\" = \"Online\"\n\"domainName\" = \"Nama Domain\"\n\"monitor\" = \"IP Pemantauan\"\n\"certificate\" = \"Sertifikat Digital\"\n\"fail\" = \"Gagal\"\n\"success\" = \"Berhasil\"\n\"getVersion\" = \"Dapatkan Versi\"\n\"install\" = \"Instal\"\n\"clients\" = \"Klien\"\n\"usage\" = \"Penggunaan\"\n\"secretToken\" = \"Token Rahasia\"\n\"remained\" = \"Tersisa\"\n\"security\" = \"Keamanan\"\n\"secAlertTitle\" = \"Peringatan keamanan\"\n\"secAlertSsl\" = \"Koneksi ini tidak aman. Harap hindari memasukkan informasi sensitif sampai TLS diaktifkan untuk perlindungan data.\"\n\"secAlertConf\" = \"Beberapa pengaturan rentan terhadap serangan. Disarankan untuk memperkuat protokol keamanan guna mencegah pelanggaran potensial.\"\n\"secAlertSSL\" = \"Panel kekurangan koneksi yang aman. Harap instal sertifikat TLS untuk perlindungan data.\"\n\"secAlertPanelPort\" = \"Port default panel rentan. Harap konfigurasi port acak atau tertentu.\"\n\"secAlertPanelURI\" = \"Jalur URI default panel tidak aman. Harap konfigurasi jalur URI kompleks.\"\n\"secAlertSubURI\" = \"Jalur URI default langganan tidak aman. Harap konfigurasi jalur URI kompleks.\"\n\"secAlertSubJsonURI\" = \"Jalur URI default JSON langganan tidak aman. Harap konfigurasikan jalur URI kompleks.\"\n\n[menu]\n\"dashboard\" = \"Ikhtisar\"\n\"inbounds\" = \"Masuk\"\n\"settings\" = \"Pengaturan Panel\"\n\"xray\" = \"Konfigurasi Xray\"\n\"logout\" = \"Keluar\"\n\"link\" = \"Kelola\"\n\n[pages.login]\n\"hello\" = \"Halo\"\n\"title\" = \"Selamat Datang\"\n\"loginAgain\" = \"Sesi Anda telah berakhir, harap masuk kembali\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"Format data input tidak valid.\"\n\"emptyUsername\" = \"Nama Pengguna diperlukan\"\n\"emptyPassword\" = \"Kata Sandi diperlukan\"\n\"wrongUsernameOrPassword\" = \"Nama pengguna atau kata sandi tidak valid.\"\n\"successLogin\" = \"Login berhasil\"\n\n[pages.index]\n\"title\" = \"Ikhtisar\"\n\"memory\" = \"RAM\"\n\"hard\" = \"Disk\"\n\"xrayStatus\" = \"Xray\"\n\"stopXray\" = \"Stop\"\n\"restartXray\" = \"Restart\"\n\"xraySwitch\" = \"Versi\"\n\"xraySwitchClick\" = \"Pilih versi yang ingin Anda pindah.\"\n\"xraySwitchClickDesk\" = \"Pilih dengan hati-hati, karena versi yang lebih lama mungkin tidak kompatibel dengan konfigurasi saat ini.\"\n\"operationHours\" = \"Waktu Aktif\"\n\"systemLoad\" = \"Beban Sistem\"\n\"systemLoadDesc\" = \"Rata-rata beban sistem selama 1, 5, dan 15 menit terakhir\"\n\"connectionTcpCountDesc\" = \"Total koneksi TCP di seluruh sistem\"\n\"connectionUdpCountDesc\" = \"Total koneksi UDP di seluruh sistem\"\n\"connectionCount\" = \"Statistik Koneksi\"\n\"upSpeed\" = \"Kecepatan unggah keseluruhan di seluruh sistem\"\n\"downSpeed\" = \"Kecepatan unduh keseluruhan di seluruh sistem\"\n\"totalSent\" = \"Total data terkirim di seluruh sistem sejak startup OS\"\n\"totalReceive\" = \"Total data diterima di seluruh sistem sejak startup OS\"\n\"xraySwitchVersionDialog\" = \"Ganti Versi Xray\"\n\"xraySwitchVersionDialogDesc\" = \"Apakah Anda yakin ingin mengubah versi Xray menjadi\"\n\"dontRefresh\" = \"Instalasi sedang berlangsung, harap jangan menyegarkan halaman ini\"\n\"logs\" = \"Log\"\n\"config\" = \"Konfigurasi\"\n\"backup\" = \"Cadangan & Pulihkan\"\n\"backupTitle\" = \"Cadangan & Pulihkan Database\"\n\"backupDescription\" = \"Disarankan untuk membuat cadangan sebelum memulihkan database.\"\n\"exportDatabase\" = \"Cadangkan\"\n\"importDatabase\" = \"Pulihkan\"\n\n[pages.inbounds]\n\"title\" = \"Masuk\"\n\"totalDownUp\" = \"Total Terkirim/Diterima\"\n\"totalUsage\" = \"Penggunaan Total\"\n\"inboundCount\" = \"Total Masuk\"\n\"operate\" = \"Menu\"\n\"enable\" = \"Aktifkan\"\n\"remark\" = \"Catatan\"\n\"protocol\" = \"Protokol\"\n\"port\" = \"Port\"\n\"traffic\" = \"Traffic\"\n\"details\" = \"Rincian\"\n\"transportConfig\" = \"Transport\"\n\"expireDate\" = \"Durasi\"\n\"resetTraffic\" = \"Reset Traffic\"\n\"addInbound\" = \"Tambahkan Masuk\"\n\"generalActions\" = \"Tindakan Umum\"\n\"create\" = \"Buat\"\n\"update\" = \"Perbarui\"\n\"modifyInbound\" = \"Ubah Masuk\"\n\"deleteInbound\" = \"Hapus Masuk\"\n\"deleteInboundContent\" = \"Apakah Anda yakin ingin menghapus masuk?\"\n\"deleteClient\" = \"Hapus Klien\"\n\"deleteClientContent\" = \"Apakah Anda yakin ingin menghapus klien?\"\n\"resetTrafficContent\" = \"Apakah Anda yakin ingin mereset traffic?\"\n\"copyLink\" = \"Salin URL\"\n\"address\" = \"Alamat\"\n\"network\" = \"Jaringan\"\n\"destinationPort\" = \"Port Tujuan\"\n\"targetAddress\" = \"Alamat Target\"\n\"monitorDesc\" = \"Biarkan kosong untuk mendengarkan semua IP\"\n\"meansNoLimit\" = \" = Unlimited. (unit: GB)\"\n\"totalFlow\" = \"Total Aliran\"\n\"leaveBlankToNeverExpire\" = \"Biarkan kosong untuk tidak pernah kedaluwarsa\"\n\"noRecommendKeepDefault\" = \"Disarankan untuk tetap menggunakan pengaturan default\"\n\"certificatePath\" = \"Path Berkas\"\n\"certificateContent\" = \"Konten Berkas\"\n\"publicKey\" = \"Kunci Publik\"\n\"privatekey\" = \"Kunci Pribadi\"\n\"clickOnQRcode\" = \"Klik pada Kode QR untuk Menyalin\"\n\"client\" = \"Klien\"\n\"export\" = \"Ekspor Semua URL\"\n\"clone\" = \"Duplikat\"\n\"cloneInbound\" = \"Duplikat\"\n\"cloneInboundContent\" = \"Semua pengaturan masuk ini, kecuali Port, Listening IP, dan Klien, akan diterapkan pada duplikat.\"\n\"cloneInboundOk\" = \"Duplikat\"\n\"resetAllTraffic\" = \"Reset Semua Traffic Masuk\"\n\"resetAllTrafficTitle\" = \"Reset Semua Traffic Masuk\"\n\"resetAllTrafficContent\" = \"Apakah Anda yakin ingin mereset traffic semua masuk?\"\n\"resetInboundClientTraffics\" = \"Reset Traffic Klien Masuk\"\n\"resetInboundClientTrafficTitle\" = \"Reset Traffic Klien Masuk\"\n\"resetInboundClientTrafficContent\" = \"Apakah Anda yakin ingin mereset traffic klien masuk ini?\"\n\"resetAllClientTraffics\" = \"Reset Traffic Semua Klien\"\n\"resetAllClientTrafficTitle\" = \"Reset Traffic Semua Klien\"\n\"resetAllClientTrafficContent\" = \"Apakah Anda yakin ingin mereset traffic semua klien?\"\n\"delDepletedClients\" = \"Hapus Klien Habis\"\n\"delDepletedClientsTitle\" = \"Hapus Klien Habis\"\n\"delDepletedClientsContent\" = \"Apakah Anda yakin ingin menghapus semua klien yang habis?\"\n\"email\" = \"Email\"\n\"emailDesc\" = \"Harap berikan alamat email yang unik.\"\n\"IPLimit\" = \"Batas IP\"\n\"IPLimitDesc\" = \"Menonaktifkan masuk jika jumlah melebihi nilai yang ditetapkan. (0 = nonaktif)\"\n\"IPLimitlog\" = \"Log IP\"\n\"IPLimitlogDesc\" = \"Log histori IP. (untuk mengaktifkan masuk setelah menonaktifkan, hapus log)\"\n\"IPLimitlogclear\" = \"Hapus Log\"\n\"setDefaultCert\" = \"Atur Sertifikat dari Panel\"\n\"xtlsDesc\" = \"Xray harus versi 1.7.5\"\n\"realityDesc\" = \"Xray harus versi 1.8.0+\"\n\"telegramDesc\" = \"Harap berikan ID Obrolan Telegram. (gunakan perintah '/id' di bot) atau (@userinfobot)\"\n\"subscriptionDesc\" = \"Untuk menemukan URL langganan Anda, buka 'Rincian'. Selain itu, Anda dapat menggunakan nama yang sama untuk beberapa klien.\"\n\"info\" = \"Info\"\n\"same\" = \"Sama\"\n\"inboundData\" = \"Data Masuk\"\n\"exportInbound\" = \"Ekspor Masuk\"\n\"import\" = \"Impor\"\n\"importInbound\" = \"Impor Masuk\"\n\n[pages.client]\n\"add\" = \"Tambah Klien\"\n\"edit\" = \"Edit Klien\"\n\"submitAdd\" = \"Tambah Klien\"\n\"submitEdit\" = \"Simpan Perubahan\"\n\"clientCount\" = \"Jumlah Klien\"\n\"bulk\" = \"Tambahkan Massal\"\n\"method\" = \"Metode\"\n\"first\" = \"Pertama\"\n\"last\" = \"Terakhir\"\n\"prefix\" = \"Awalan\"\n\"postfix\" = \"Akhiran\"\n\"delayedStart\" = \"Mulai Awal\"\n\"expireDays\" = \"Durasi\"\n\"days\" = \"Hari\"\n\"renew\" = \"Perpanjang Otomatis\"\n\"renewDesc\" = \"Perpanjangan otomatis setelah kedaluwarsa. (0 = nonaktif)(unit: hari)\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"Dapatkan\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"Permintaan\"\n\"response\" = \"Respons\"\n\"name\" = \"Nama\"\n\"value\" = \"Nilai\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"Versi\"\n\"method\" = \"Metode\"\n\"path\" = \"Path\"\n\"status\" = \"Status\"\n\"statusDescription\" = \"Deskripsi Status\"\n\"requestHeader\" = \"Header Permintaan\"\n\"responseHeader\" = \"Header Respons\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"Enkripsi\"\n\n[pages.settings]\n\"title\" = \"Pengaturan Panel\"\n\"save\" = \"Simpan\"\n\"infoDesc\" = \"Setiap perubahan yang dibuat di sini perlu disimpan. Harap restart panel untuk menerapkan perubahan.\"\n\"restartPanel\" = \"Restart Panel\"\n\"restartPanelDesc\" = \"Apakah Anda yakin ingin merestart panel? Jika Anda tidak dapat mengakses panel setelah merestart, lihat info log panel di server.\"\n\"actions\" = \"Tindakan\"\n\"resetDefaultConfig\" = \"Reset ke Default\"\n\"panelSettings\" = \"Umum\"\n\"securitySettings\" = \"Otentikasi\"\n\"TGBotSettings\" = \"Bot Telegram\"\n\"panelListeningIP\" = \"IP Pendengar\"\n\"panelListeningIPDesc\" = \"Alamat IP untuk panel web. (biarkan kosong untuk mendengarkan semua IP)\"\n\"panelListeningDomain\" = \"Domain Pendengar\"\n\"panelListeningDomainDesc\" = \"Nama domain untuk panel web. (biarkan kosong untuk mendengarkan semua domain dan IP)\"\n\"panelPort\" = \"Port Pendengar\"\n\"panelPortDesc\" = \"Nomor port untuk panel web. (harus menjadi port yang tidak digunakan)\"\n\"publicKeyPath\" = \"Path Kunci Publik\"\n\"publicKeyPathDesc\" = \"Path berkas kunci publik untuk panel web. (dimulai dengan ‘/‘)\"\n\"privateKeyPath\" = \"Path Kunci Privat\"\n\"privateKeyPathDesc\" = \"Path berkas kunci privat untuk panel web. (dimulai dengan ‘/‘)\"\n\"panelUrlPath\" = \"URI Path\"\n\"panelUrlPathDesc\" = \"URI path untuk panel web. (dimulai dengan ‘/‘ dan diakhiri dengan ‘/‘)\"\n\"pageSize\" = \"Ukuran Halaman\"\n\"pageSizeDesc\" = \"Tentukan ukuran halaman untuk tabel masuk. (0 = nonaktif)\"\n\"remarkModel\" = \"Model Catatan & Karakter Pemisah\"\n\"datepicker\" = \"Jenis Kalender\"\n\"datepickerPlaceholder\" = \"Pilih tanggal\"\n\"datepickerDescription\" = \"Tugas terjadwal akan berjalan berdasarkan kalender ini.\"\n\"sampleRemark\" = \"Contoh Catatan\"\n\"oldUsername\" = \"Username Saat Ini\"\n\"currentPassword\" = \"Kata Sandi Saat Ini\"\n\"newUsername\" = \"Username Baru\"\n\"newPassword\" = \"Kata Sandi Baru\"\n\"telegramBotEnable\" = \"Aktifkan Bot Telegram\"\n\"telegramBotEnableDesc\" = \"Mengaktifkan bot Telegram.\"\n\"telegramToken\" = \"Token Telegram\"\n\"telegramTokenDesc\" = \"Token bot Telegram yang diperoleh dari '@BotFather'.\"\n\"telegramProxy\" = \"Proxy SOCKS\"\n\"telegramProxyDesc\" = \"Mengaktifkan proxy SOCKS5 untuk terhubung ke Telegram. (sesuaikan pengaturan sesuai panduan)\"\n\"telegramChatId\" = \"ID Obrolan Admin\"\n\"telegramChatIdDesc\" = \"ID Obrolan Admin Telegram. (dipisahkan koma)(dapatkan di sini @userinfobot) atau (gunakan perintah '/id' di bot)\"\n\"telegramNotifyTime\" = \"Waktu Notifikasi\"\n\"telegramNotifyTimeDesc\" = \"Waktu notifikasi bot Telegram yang diatur untuk laporan berkala. (gunakan format waktu crontab)\"\n\"tgNotifyBackup\" = \"Cadangan Database\"\n\"tgNotifyBackupDesc\" = \"Kirim berkas cadangan database dengan laporan.\"\n\"tgNotifyLogin\" = \"Notifikasi Login\"\n\"tgNotifyLoginDesc\" = \"Dapatkan notifikasi tentang username, alamat IP, dan waktu setiap kali seseorang mencoba masuk ke panel web Anda.\"\n\"sessionMaxAge\" = \"Durasi Sesi\"\n\"sessionMaxAgeDesc\" = \"Durasi di mana Anda dapat tetap masuk. (unit: menit)\"\n\"expireTimeDiff\" = \"Notifikasi Tanggal Kedaluwarsa\"\n\"expireTimeDiffDesc\" = \"Dapatkan notifikasi tentang tanggal kedaluwarsa saat mencapai ambang batas ini. (unit: hari)\"\n\"trafficDiff\" = \"Notifikasi Batas Traffic\"\n\"trafficDiffDesc\" = \"Dapatkan notifikasi tentang batas traffic saat mencapai ambang batas ini. (unit: GB)\"\n\"tgNotifyCpu\" = \"Notifikasi Beban CPU\"\n\"tgNotifyCpuDesc\" = \"Dapatkan notifikasi jika beban CPU melebihi ambang batas ini. (unit: %)\"\n\"timeZone\" = \"Zone Waktu\"\n\"timeZoneDesc\" = \"Tugas terjadwal akan berjalan berdasarkan zona waktu ini.\"\n\"subSettings\" = \"Langganan\"\n\"subEnable\" = \"Aktifkan Layanan Langganan\"\n\"subEnableDesc\" = \"Mengaktifkan layanan langganan.\"\n\"subListen\" = \"IP Pendengar\"\n\"subListenDesc\" = \"Alamat IP untuk layanan langganan. (biarkan kosong untuk mendengarkan semua IP)\"\n\"subPort\" = \"Port Pendengar\"\n\"subPortDesc\" = \"Nomor port untuk layanan langganan. (harus menjadi port yang tidak digunakan)\"\n\"subCertPath\" = \"Path Kunci Publik\"\n\"subCertPathDesc\" = \"Path berkas kunci publik untuk layanan langganan. (dimulai dengan ‘/‘)\"\n\"subKeyPath\" = \"Path Kunci Privat\"\n\"subKeyPathDesc\" = \"Path berkas kunci privat untuk layanan langganan. (dimulai dengan ‘/‘)\"\n\"subPath\" = \"URI Path\"\n\"subPathDesc\" = \"URI path untuk layanan langganan. (dimulai dengan ‘/‘ dan diakhiri dengan ‘/‘)\"\n\"subDomain\" = \"Domain Pendengar\"\n\"subDomainDesc\" = \"Nama domain untuk layanan langganan. (biarkan kosong untuk mendengarkan semua domain dan IP)\"\n\"subUpdates\" = \"Interval Pembaruan\"\n\"subUpdatesDesc\" = \"Interval pembaruan URL langganan dalam aplikasi klien. (unit: jam)\"\n\"subEncrypt\" = \"Encode\"\n\"subEncryptDesc\" = \"Konten yang dikembalikan dari layanan langganan akan dienkripsi Base64.\"\n\"subShowInfo\" = \"Tampilkan Info Penggunaan\"\n\"subShowInfoDesc\" = \"Sisa traffic dan tanggal akan ditampilkan di aplikasi klien.\"\n\"subURI\" = \"URI Proxy Terbalik\"\n\"subURIDesc\" = \"URI path URL langganan untuk penggunaan di belakang proxy.\"\n\"fragment\" = \"Fragmentasi\"\n\"fragmentDesc\" = \"Aktifkan fragmentasi untuk paket hello TLS\"\n\"fragmentSett\" = \"Pengaturan Fragmentasi\"\n\"mux\" = \"Mux\"\n\"muxDesc\" = \"Mengirimkan beberapa aliran data independen dalam aliran data yang sudah ada.\"\n\"muxSett\" = \"Pengaturan Mux\"\n\"direct\" = \"Koneksi langsung\"\n\"directDesc\" = \"Secara langsung membuat koneksi dengan domain atau rentang IP negara tertentu.\"\n\"directSett\" = \"Opsi Koneksi Langsung\"\n\n[pages.xray]\n\"title\" = \"Konfigurasi Xray\"\n\"save\" = \"Simpan\"\n\"restart\" = \"Restart Xray\"\n\"basicTemplate\" = \"Dasar\"\n\"advancedTemplate\" = \"Lanjutan\"\n\"generalConfigs\" = \"Strategi Umum\"\n\"generalConfigsDesc\" = \"Opsi ini akan menentukan penyesuaian strategi umum.\"\n\"logConfigs\" = \"Catatan\"\n\"logConfigsDesc\" = \"Log dapat mempengaruhi efisiensi server Anda. Disarankan untuk mengaktifkannya dengan bijak hanya jika diperlukan\"\n\"blockConfigs\" = \"Pelindung\"\n\"blockConfigsDesc\" = \"Opsi ini akan memblokir lalu lintas berdasarkan protokol dan situs web yang diminta.\"\n\"blockCountryConfigs\" = \"Blokir Negara\"\n\"blockCountryConfigsDesc\" = \"Opsi ini akan memblokir lalu lintas berdasarkan negara yang diminta.\"\n\"directCountryConfigs\" = \"Langsung ke Negara\"\n\"directCountryConfigsDesc\" = \"Koneksi langsung memastikan bahwa lalu lintas tertentu tidak diarahkan melalui server lain.\"\n\"ipv4Configs\" = \"Pengalihan IPv4\"\n\"ipv4ConfigsDesc\" = \"Opsi ini akan mengalihkan lalu lintas berdasarkan tujuan tertentu melalui IPv4.\"\n\"warpConfigs\" = \"Pengalihan WARP\"\n\"warpConfigsDesc\" = \"Opsi ini akan mengalihkan lalu lintas berdasarkan tujuan tertentu melalui WARP.\"\n\"Template\" = \"Template Konfigurasi Xray Lanjutan\"\n\"TemplateDesc\" = \"File konfigurasi Xray akhir akan dibuat berdasarkan template ini.\"\n\"FreedomStrategy\" = \"Strategi Protokol Freedom\"\n\"FreedomStrategyDesc\" = \"Atur strategi output untuk jaringan dalam Protokol Freedom.\"\n\"RoutingStrategy\" = \"Strategi Pengalihan Keseluruhan\"\n\"RoutingStrategyDesc\" = \"Atur strategi pengalihan lalu lintas keseluruhan untuk menyelesaikan semua permintaan.\"\n\"Torrent\" = \"Blokir Protokol BitTorrent\"\n\"TorrentDesc\" = \"Memblokir protokol BitTorrent.\"\n\"PrivateIp\" = \"Blokir Koneksi ke IP Pribadi\"\n\"PrivateIpDesc\" = \"Memblokir pembentukan koneksi ke rentang IP pribadi.\"\n\"Ads\" = \"Blokir Iklan\"\n\"AdsDesc\" = \"Memblokir situs web periklanan.\"\n\"Family\" = \"Proteksi Keluarga\"\n\"FamilyDesc\" = \"Memblokir konten dewasa dan situs web berbahaya.\"\n\"Security\" = \"Pelindung Keamanan\"\n\"SecurityDesc\" = \"Memblokir situs web malware, phishing, dan penambang kripto.\"\n\"Speedtest\" = \"Blokir Speedtest\"\n\"SpeedtestDesc\" = \"Memblokir pembentukan koneksi ke situs web speedtest.\"\n\"IRIp\" = \"Blokir Koneksi ke IP Iran\"\n\"IRIpDesc\" = \"Memblokir pembentukan koneksi ke rentang IP Iran.\"\n\"IRDomain\" = \"Blokir Koneksi ke Domain Iran\"\n\"IRDomainDesc\" = \"Memblokir pembentukan koneksi ke domain Iran.\"\n\"ChinaIp\" = \"Blokir Koneksi ke IP China\"\n\"ChinaIpDesc\" = \"Memblokir pembentukan koneksi ke rentang IP China.\"\n\"ChinaDomain\" = \"Blokir Koneksi ke Domain China\"\n\"ChinaDomainDesc\" = \"Memblokir pembentukan koneksi ke domain China.\"\n\"RussiaIp\" = \"Blokir Koneksi ke IP Rusia\"\n\"RussiaIpDesc\" = \"Memblokir pembentukan koneksi ke rentang IP Rusia.\"\n\"RussiaDomain\" = \"Blokir Koneksi ke Domain Rusia\"\n\"RussiaDomainDesc\" = \"Memblokir pembentukan koneksi ke domain Rusia.\"\n\"VNIp\" = \"Blokir Koneksi ke IP Vietnam\"\n\"VNIpDesc\" = \"Memblokir pembentukan koneksi ke rentang IP Vietnam.\"\n\"VNDomain\" = \"Blokir Koneksi ke Domain Vietnam\"\n\"VNDomainDesc\" = \"Memblokir pembentukan koneksi ke domain Vietnam.\"\n\"DirectIRIp\" = \"Koneksi Langsung ke IP Iran\"\n\"DirectIRIpDesc\" = \"Membentuk koneksi langsung ke rentang IP Iran.\"\n\"DirectIRDomain\" = \"Koneksi Langsung ke Domain Iran\"\n\"DirectIRDomainDesc\" = \"Membentuk koneksi langsung ke domain Iran.\"\n\"DirectChinaIp\" = \"Koneksi Langsung ke IP China\"\n\"DirectChinaIpDesc\" = \"Membentuk koneksi langsung ke rentang IP China.\"\n\"DirectChinaDomain\" = \"Koneksi Langsung ke Domain China\"\n\"DirectChinaDomainDesc\" = \"Membentuk koneksi langsung ke domain China.\"\n\"DirectRussiaIp\" = \"Koneksi Langsung ke IP Rusia\"\n\"DirectRussiaIpDesc\" = \"Membentuk koneksi langsung ke rentang IP Rusia.\"\n\"DirectRussiaDomain\" = \"Koneksi Langsung ke Domain Rusia\"\n\"DirectRussiaDomainDesc\" = \"Membentuk koneksi langsung ke domain Rusia.\"\n\"DirectVNIp\" = \"Koneksi Langsung ke IP Vietnam\"\n\"DirectVNIpDesc\" = \"Membentuk koneksi langsung ke rentang IP Vietnam.\"\n\"DirectVNDomain\" = \"Koneksi Langsung ke Domain Vietnam\"\n\"DirectVNDomainDesc\" = \"Membentuk koneksi langsung ke domain Vietnam.\"\n\"GoogleIPv4\" = \"Google\"\n\"GoogleIPv4Desc\" = \"Rute lalu lintas ke Google melalui IPv4.\"\n\"NetflixIPv4\" = \"Netflix\"\n\"NetflixIPv4Desc\" = \"Rute lalu lintas ke Netflix melalui IPv4.\"\n\"GoogleWARP\" = \"Google\"\n\"GoogleWARPDesc\" = \"Tambahkan pengalihan untuk Google melalui WARP.\"\n\"OpenAIWARP\" = \"ChatGPT\"\n\"OpenAIWARPDesc\" = \"Rute lalu lintas ke ChatGPT melalui WARP.\"\n\"NetflixWARP\" = \"Netflix\"\n\"NetflixWARPDesc\" = \"Rute lalu lintas ke Netflix melalui WARP.\"\n\"MetaWARP\" = \"Meta\"\n\"MetaWARPDesc\" = \"Merutekan lalu lintas ke Meta (Instagram, Facebook, WhatsApp, Threads,...) melalui WARP.\"\n\"AppleWARP\" = \"Apple\"\n\"AppleWARPDesc\" = \"Merutekan lalu lintas ke Apple melalui WARP.\"\n\"RedditWARP\" = \"Reddit\"\n\"RedditWARPDesc\" = \"Merutekan lalu lintas ke Reddit melalui WARP.\"\n\"SpotifyWARP\" = \"Spotify\"\n\"SpotifyWARPDesc\" = \"Rute lalu lintas ke Spotify melalui WARP.\"\n\"IRWARP\" = \"Domain Iran\"\n\"IRWARPDesc\" = \"Rute lalu lintas ke domain Iran melalui WARP.\"\n\"Inbounds\" = \"Masuk\"\n\"InboundsDesc\" = \"Menerima klien tertentu.\"\n\"Outbounds\" = \"Keluar\"\n\"Balancers\" = \"Penyeimbang\"\n\"OutboundsDesc\" = \"Atur jalur lalu lintas keluar.\"\n\"Routings\" = \"Aturan Pengalihan\"\n\"RoutingsDesc\" = \"Prioritas setiap aturan penting!\"\n\"completeTemplate\" = \"Semua\"\n\"logLevel\" = \"Tingkat Log\"\n\"logLevelDesc\" = \"Tingkat log untuk log kesalahan, menunjukkan informasi yang perlu dicatat.\"\n\"accessLog\" = \"Log Akses\"\n\"accessLogDesc\" = \"Jalur file untuk log akses. Nilai khusus 'tidak ada' menonaktifkan log akses\"\n\"errorLog\" = \"Catatan eror\"\n\"errorLogDesc\" = \"Jalur file untuk log kesalahan. Nilai khusus 'tidak ada' menonaktifkan log kesalahan\"\n\n[pages.xray.rules]\n\"first\" = \"Pertama\"\n\"last\" = \"Terakhir\"\n\"up\" = \"Naik\"\n\"down\" = \"Turun\"\n\"source\" = \"Sumber\"\n\"dest\" = \"Tujuan\"\n\"inbound\" = \"Masuk\"\n\"outbound\" = \"Keluar\"\n\"balancer\" = \"Pengimbang\"\n\"info\" = \"Info\"\n\"add\" = \"Tambahkan Aturan\"\n\"edit\" = \"Edit Aturan\"\n\"useComma\" = \"Item yang dipisahkan koma\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"Tambahkan Keluar\"\n\"addReverse\" = \"Tambahkan Revers\"\n\"editOutbound\" = \"Edit Keluar\"\n\"editReverse\" = \"Edit Revers\"\n\"tag\" = \"Tag\"\n\"tagDesc\" = \"Tag Unik\"\n\"address\" = \"Alamat\"\n\"reverse\" = \"Revers\"\n\"domain\" = \"Domain\"\n\"type\" = \"Tipe\"\n\"bridge\" = \"Jembatan\"\n\"portal\" = \"Portal\"\n\"intercon\" = \"Interkoneksi\"\n\"settings\" = \"Pengaturan\"\n\"accountInfo\" = \"Informasi Akun\"\n\"outboundStatus\" = \"Status Keluar\"\n\"sendThrough\" = \"Kirim Melalui\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"Tambahkan Penyeimbang\"\n\"editBalancer\" = \"Sunting Penyeimbang\"\n\"balancerStrategy\" = \"Strategi\"\n\"balancerSelectors\" = \"Penyeleksi\"\n\"tag\" = \"Menandai\"\n\"tagDesc\" = \"Label Unik\"\n\"balancerDesc\" = \"BalancerTag dan outboundTag tidak dapat digunakan secara bersamaan. Jika digunakan secara bersamaan, hanya outboundTag yang akan berfungsi.\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"Kunci Rahasia\"\n\"publicKey\" = \"Kunci Publik\"\n\"allowedIPs\" = \"IP yang Diizinkan\"\n\"endpoint\" = \"Titik Akhir\"\n\"psk\" = \"Kunci Pra-Bagi\"\n\"domainStrategy\" = \"Strategi Domain\"\n\n[pages.xray.dns]\n\"enable\" = \"Aktifkan DNS\"\n\"enableDesc\" = \"Aktifkan server DNS bawaan\"\n\"tag\" = \"Tanda DNS Masuk\"\n\"tagDesc\" = \"Tanda ini akan tersedia sebagai tanda masuk dalam aturan penataan.\"\n\"strategy\" = \"Strategi Kueri\"\n\"strategyDesc\" = \"Strategi keseluruhan untuk menyelesaikan nama domain\"\n\"add\" = \"Tambahkan Server\"\n\"edit\" = \"Sunting Server\"\n\"domains\" = \"Domains\"\n\n[pages.xray.fakedns]\n\"add\" = \"Tambahkan DNS Palsu\"\n\"edit\" = \"Edit DNS Palsu\"\n\"ipPool\" = \"Subnet Kumpulan IP\"\n\"poolSize\" = \"Ukuran Kolam\"\n\n[pages.settings.security]\n\"admin\" = \"Admin\"\n\"secret\" = \"Token Rahasia\"\n\"loginSecurity\" = \"Login Aman\"\n\"loginSecurityDesc\" = \"Menambahkan lapisan otentikasi tambahan untuk memberikan keamanan lebih.\"\n\"secretToken\" = \"Token Rahasia\"\n\"secretTokenDesc\" = \"Simpan token ini dengan aman di tempat yang aman. Token ini diperlukan untuk login dan tidak dapat dipulihkan.\"\n\n[pages.settings.toasts]\n\"modifySettings\" = \"Ubah Pengaturan\"\n\"getSettings\" = \"Dapatkan Pengaturan\"\n\"modifyUser\" = \"Ubah Admin\"\n\"originalUserPassIncorrect\" = \"Username atau password saat ini tidak valid\"\n\"userPassMustBeNotEmpty\" = \"Username dan password baru tidak boleh kosong\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ Papan ketik kustom ditutup!\"\n\"noResult\" = \"❗ Tidak ada hasil!\"\n\"noQuery\" = \"❌ Permintaan tidak ditemukan! Harap gunakan perintah lagi!\"\n\"wentWrong\" = \"❌ Ada yang salah!\"\n\"noIpRecord\" = \"❗ Tidak ada Catatan IP!\"\n\"noInbounds\" = \"❗ Tidak ada masuk ditemukan!\"\n\"unlimited\" = \"♾ Tak terbatas\"\n\"add\" = \"Tambah\"\n\"month\" = \"Bulan\"\n\"months\" = \"Bulan\"\n\"day\" = \"Hari\"\n\"days\" = \"Hari\"\n\"hours\" = \"Jam\"\n\"unknown\" = \"Tidak diketahui\"\n\"inbounds\" = \"Masuk\"\n\"clients\" = \"Klien\"\n\"offline\" = \"🔴 Offline\"\n\"online\" = \"🟢 Online\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ Perintah tidak dikenal.\"\n\"pleaseChoose\" = \"👇 Harap pilih:\\r\\n\"\n\"help\" = \"🤖 Selamat datang di bot ini! Ini dirancang untuk menyediakan data tertentu dari panel web dan memungkinkan Anda melakukan modifikasi sesuai kebutuhan.\\r\\n\\r\\n\"\n\"start\" = \"👋 Halo <i>{{ .Firstname }}</i>.\\r\\n\"\n\"welcome\" = \"🤖 Selamat datang di <b>{{.Hostname }}</b> bot managemen.\\r\\n\"\n\"status\" = \"✅ Bot dalam keadaan baik!\"\n\"usage\" = \"❗ Harap berikan teks untuk mencari!\"\n\"getID\" = \"🆔 ID Anda:<code>{{.ID }}</code>\"\n\"helpAdminCommands\" = \"Untuk mencari email klien:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nUntuk mencari inbound (dengan statistik klien):\\r\\n<code>/inbound [Catatan]</code>\\r\\n\\r\\nID Obrolan Telegram:\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"Untuk mencari statistik, gunakan perintah berikut:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nID Obrolan Telegram:\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 Beban CPU {{ .Percent }}% melebihi batas {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ Kesalahan dalam pemilihan pengguna!\"\n\"userSaved\" = \"✅ Pengguna Telegram tersimpan.\"\n\"loginSuccess\" = \"✅ Berhasil masuk ke panel.\\r\\n\"\n\"loginFailed\" = \"❗️ Gagal masuk ke panel.\\r\\n\"\n\"report\" = \"🕰 Laporan Terjadwal: {{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ Tanggal & Waktu: {{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 Host: {{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 Versi 3X-UI: {{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 Versi Xray: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 IP:\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ Waktu Aktif: {{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 Beban Sistem: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 RAM: {{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 TCP: {{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 UDP: {{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 Lalu Lintas: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ Status: {{ .State }}\\r\\n\"\n\"username\" = \"👤 Nama Pengguna: {{ .Username }}\\r\\n\"\n\"password\" = \"👤 Kata Sandi: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ Waktu: {{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 Inbound: {{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 Port: {{ .Port }}\\r\\n\"\n\"expire\" = \"📅 Tanggal Kadaluarsa: {{ .Time }}\\r\\n\"\n\"expireIn\" = \"📅 Kadaluarsa Dalam: {{ .Time }}\\r\\n\"\n\"active\" = \"💡 Aktif: {{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 Diaktifkan: {{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 Status Koneksi: {{ .Status }}\\r\\n\"\n\"email\" = \"📧 Email: {{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 Unggah: ↑{{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 Unduh: ↓{{ .Download }}\\r\\n\"\n\"total\" = \"📊 Total: ↑↓{{ .UpDown }} / {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 Pengguna Telegram: {{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 Habis {{ .Type }}:\\r\\n\"\n\"exhaustedCount\" = \"🚨 Jumlah Habis {{ .Type }}:\\r\\n\"\n\"onlinesCount\" = \"🌐 Klien Online: {{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 Dinonaktifkan: {{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 Habis Sebentar: {{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 Waktu Backup: {{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 Diperbarui Pada: {{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ Ya\"\n\"no\" = \"❌ Tidak\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ Tutup Papan Ketik\"\n\"cancel\" = \"❌ Batal\"\n\"cancelReset\" = \"❌ Batal Reset\"\n\"cancelIpLimit\" = \"❌ Batal Batas IP\"\n\"confirmResetTraffic\" = \"✅ Konfirmasi Reset Lalu Lintas?\"\n\"confirmClearIps\" = \"✅ Konfirmasi Hapus IPs?\"\n\"confirmRemoveTGUser\" = \"✅ Konfirmasi Hapus Pengguna Telegram?\"\n\"confirmToggle\" = \"✅ Konfirmasi Aktifkan/Nonaktifkan Pengguna?\"\n\"dbBackup\" = \"Dapatkan Cadangan DB\"\n\"serverUsage\" = \"Penggunaan Server\"\n\"getInbounds\" = \"Dapatkan Inbounds\"\n\"depleteSoon\" = \"Habis Sebentar\"\n\"clientUsage\" = \"Dapatkan Penggunaan\"\n\"onlines\" = \"Klien Online\"\n\"commands\" = \"Perintah\"\n\"refresh\" = \"🔄 Perbarui\"\n\"clearIPs\" = \"❌ Hapus IPs\"\n\"removeTGUser\" = \"❌ Hapus Pengguna Telegram\"\n\"selectTGUser\" = \"👤 Pilih Pengguna Telegram\"\n\"selectOneTGUser\" = \"👤 Pilih Pengguna Telegram:\"\n\"resetTraffic\" = \"📈 Reset Lalu Lintas\"\n\"resetExpire\" = \"📅 Ubah Tanggal Kadaluarsa\"\n\"ipLog\" = \"🔢 Log IP\"\n\"ipLimit\" = \"🔢 Batas IP\"\n\"setTGUser\" = \"👤 Set Pengguna Telegram\"\n\"toggle\" = \"🔘 Aktifkan / Nonaktifkan\"\n\"custom\" = \"🔢 Kustom\"\n\"confirmNumber\" = \"✅ Konfirmasi: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ Konfirmasi menambahkan: {{ .Num }}\"\n\"limitTraffic\" = \"🚧 Batas Lalu Lintas\"\n\"getBanLogs\" = \"Dapatkan Log Pemblokiran\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ Operasi berhasil!\"\n\"errorOperation\" = \"❗ Kesalahan dalam operasi.\"\n\"getInboundsFailed\" = \"❌ Gagal mendapatkan inbounds.\"\n\"canceled\" = \"❌ {{ .Email }}: Operasi dibatalkan.\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }}: Klien diperbarui dengan berhasil.\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }}: IP diperbarui dengan berhasil.\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }}: Pengguna Telegram Klien diperbarui dengan berhasil.\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }}: Lalu lintas direset dengan berhasil.\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }}: Batas lalu lintas disimpan dengan berhasil.\"\n\"expireResetSuccess\" = \"✅ {{ .Email }}: Hari kadaluarsa direset dengan berhasil.\"\n\"resetIpSuccess\" = \"✅ {{ .Email }}: Batas IP {{ .Count }} disimpan dengan berhasil.\"\n\"clearIpSuccess\" = \"✅ {{ .Email }}: IP dihapus dengan berhasil.\"\n\"getIpLog\" = \"✅ {{ .Email }}: Dapatkan Log IP.\"\n\"getUserInfo\" = \"✅ {{ .Email }}: Dapatkan Info Pengguna Telegram.\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }}: Pengguna Telegram dihapus dengan berhasil.\"\n\"enableSuccess\" = \"✅ {{ .Email }}: Diaktifkan dengan berhasil.\"\n\"disableSuccess\" = \"✅ {{ .Email }}: Dinonaktifkan dengan berhasil.\"\n\"askToAddUserId\" = \"Konfigurasi Anda tidak ditemukan!\\r\\nSilakan minta admin Anda untuk menggunakan ID Telegram Anda dalam konfigurasi Anda.\\r\\n\\r\\nID Pengguna Anda: <code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/translation/translate.ru_RU.toml",
    "content": "\"username\" = \"Имя пользователя\"\n\"password\" = \"Пароль\"\n\"login\" = \"Логин\"\n\"confirm\" = \"Подтвердить\"\n\"cancel\" = \"Отмена\"\n\"close\" = \"Закрыть\"\n\"copy\" = \"Копировать\"\n\"copied\" = \"Скопировано\"\n\"download\" = \"Скачать\"\n\"remark\" = \"Примечание\"\n\"enable\" = \"Включить\"\n\"protocol\" = \"Протокол\"\n\"search\" = \"Поиск\"\n\"filter\" = \"Фильтр\"\n\"loading\" = \"Загрузка...\"\n\"second\" = \"Секунда\"\n\"minute\" = \"Минута\"\n\"hour\" = \"Час\"\n\"day\" = \"День\"\n\"check\" = \"Проверить\"\n\"indefinite\" = \"Бессрочно\"\n\"unlimited\" = \"Безлимитно\"\n\"none\" = \"Пусто\"\n\"qrCode\" = \"QR-код\"\n\"info\" = \"Информация\"\n\"edit\" = \"Изменить\"\n\"delete\" = \"Удалить\"\n\"reset\" = \"Сбросить\"\n\"copySuccess\" = \"Скопировано\"\n\"sure\" = \"Да\"\n\"encryption\" = \"Шифрование\"\n\"transmission\" = \"Протокол передачи\"\n\"host\" = \"Хост\"\n\"path\" = \"Путь\"\n\"camouflage\" = \"Маскировка\"\n\"status\" = \"Статус\"\n\"enabled\" = \"Включено\"\n\"disabled\" = \"Отключено\"\n\"depleted\" = \"Исчерпано\"\n\"depletingSoon\" = \"Почти исчерпано\"\n\"offline\" = \"Офлайн\"\n\"online\" = \"Онлайн\"\n\"domainName\" = \"Домен\"\n\"monitor\" = \"Порт IP\"\n\"certificate\" = \"Цифровой сертификат\"\n\"fail\" = \"Неудачно\"\n\"success\" = \"Успешно\"\n\"getVersion\" = \"Узнать версию\"\n\"install\" = \"Установка\"\n\"clients\" = \"Клиенты\"\n\"usage\" = \"Использование\"\n\"secretToken\" = \"Секретный токен\"\n\"remained\" = \"остались\"\n\"security\" = \"Безопасность\"\n\"secAlertTitle\" = \"Предупреждение системы безопасности\"\n\"secAlertSsl\" = \"Это соединение не защищено. Пожалуйста, воздержитесь от ввода конфиденциальной информации до тех пор, пока не будет активирован TLS для защиты данных\"\n\"secAlertConf\" = \"Некоторые настройки уязвимы для атак. Рекомендуется усилить протоколы безопасности, чтобы предотвратить потенциальные нарушения.\"\n\"secAlertSSL\" = \"В панели отсутствует безопасное соединение. Пожалуйста, установите сертификат TLS для защиты данных.\"\n\"secAlertPanelPort\" = \"Порт по умолчанию панели небезопасен. Пожалуйста, настройте случайный или определенный порт.\"\n\"secAlertPanelURI\" = \"URI-путь по умолчанию панели небезопасен. Пожалуйста, настройте сложный URI-путь.\"\n\"secAlertSubURI\" = \"URI-путь по умолчанию подписки небезопасен. Пожалуйста, настройте сложный URI-путь.\"\n\"secAlertSubJsonURI\" = \"URI-путь по умолчанию для JSON подписки небезопасен. Пожалуйста, настройте сложный URI-путь.\"\n\n[menu]\n\"dashboard\" = \"Статус системы\"\n\"inbounds\" = \"Подключения\"\n\"settings\" = \"Настройки панели\"\n\"xray\" = \"Настройки Xray\"\n\"logout\" = \"Выход\"\n\"link\" = \"менеджмент\"\n\n[pages.login]\n\"hello\" = \"Привет\"\n\"title\" = \"Добро пожаловать\"\n\"loginAgain\" = \"Время пребывания в сети вышло. Пожалуйста, войдите в систему снова\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"Недопустимый формат данных\"\n\"emptyUsername\" = \"Введите имя пользователя\"\n\"emptyPassword\" = \"Введите пароль\"\n\"wrongUsernameOrPassword\" = \"Неверное имя пользователя или пароль\"\n\"successLogin\" = \"Успешный вход\"\n\n[pages.index]\n\"title\" = \"Статус системы\"\n\"memory\" = \"Память\"\n\"hard\" = \"Жесткий диск\"\n\"xrayStatus\" = \"Xray\"\n\"stopXray\" = \"Остановить\"\n\"restartXray\" = \"Перезапустить\"\n\"xraySwitch\" = \"Версия\"\n\"xraySwitchClick\" = \"Выберите желаемую версию\"\n\"xraySwitchClickDesk\" = \"Выбирайте внимательно, так как старые версии могут быть несовместимы с текущими конфигурациями\"\n\"operationHours\" = \"Время работы системы\"\n\"systemLoad\" = \"Системная нагрузка\"\n\"systemLoadDesc\" = \"средняя загрузка системы за последние 1, 5 и 15 минут\"\n\"connectionTcpCountDesc\" = \"Всего подключений TCP по всем сетевым картам.\"\n\"connectionUdpCountDesc\" = \"Общее количество подключений UDP по всем сетевым картам.\"\n\"connectionCount\" = \"Количество соединений\"\n\"upSpeed\" = \"Общая скорость upload для всех сетей\"\n\"downSpeed\" = \"Общая скорость download для всех сетей\"\n\"totalSent\" = \"Общий объем загруженных данных для всех сетей с момента запуска системы\"\n\"totalReceive\" = \"Общий объем полученных данных для всех сетей с момента запуска системы.\"\n\"xraySwitchVersionDialog\" = \"Переключить версию Xray\"\n\"xraySwitchVersionDialogDesc\" = \"Вы точно хотите сменить версию Xray?\"\n\"dontRefresh\" = \"Идёт установка. Пожалуйста, не обновляйте эту страницу\"\n\"logs\" = \"Логи\"\n\"config\" = \"Конфигурация\"\n\"backup\" = \"Бэкап и восстановление\"\n\"backupTitle\" = \"База данных бэкапа и восстановления\"\n\"backupDescription\" = \"Не забудьте сделать резервную копию перед импортом новой базы данных\"\n\"exportDatabase\" = \"Экспорт базы данных\"\n\"importDatabase\" = \"Импорт базы данных\"\n\n[pages.inbounds]\n\"title\" = \"Подключения\"\n\"totalDownUp\" = \"Всего uploads/downloads\"\n\"totalUsage\" = \"Всего использовано\"\n\"inboundCount\" = \"Количество подключений\"\n\"operate\" = \"Меню\"\n\"enable\" = \"Включить\"\n\"remark\" = \"Примечание\"\n\"protocol\" = \"Протокол\"\n\"port\" = \"Порт\"\n\"traffic\" = \"Трафик\"\n\"details\" = \"Подробнее\"\n\"transportConfig\" = \"Транспорт\"\n\"expireDate\" = \"Дата окончания\"\n\"resetTraffic\" = \"Сбросить трафик\"\n\"addInbound\" = \"Добавить подключение\"\n\"generalActions\" = \"Общие действия\"\n\"create\" = \"Создать\"\n\"update\" = \"Обновить\"\n\"modifyInbound\" = \"Изменить подключение\"\n\"deleteInbound\" = \"Удалить подключение\"\n\"deleteInboundContent\" = \"Подтвердите удаление подключения?\"\n\"deleteClient\" = \"Удалить клиента\"\n\"deleteClientContent\" = \"Вы уверены, что хотите удалить клиента?\"\n\"resetTrafficContent\" = \"Подтвердите сброс трафика?\"\n\"copyLink\" = \"Копировать ключ\"\n\"address\" = \"Адрес\"\n\"network\" = \"Сеть\"\n\"destinationPort\" = \"Порт назначения\"\n\"targetAddress\" = \"Целевой адрес\"\n\"monitorDesc\" = \"Оставьте пустым по умолчанию\"\n\"meansNoLimit\" = \" = Без ограничений (значение: ГБ)\"\n\"totalFlow\" = \"Общий расход\"\n\"leaveBlankToNeverExpire\" = \"Оставьте пустым, чтобы не истекало\"\n\"noRecommendKeepDefault\" = \"Нет требований для сохранения настроек по умолчанию\"\n\"certificatePath\" = \"Путь файла\"\n\"certificateContent\" = \"Содержимое файла\"\n\"publicKey\" = \"Публичный ключ\"\n\"privatekey\" = \"Приватный ключ\"\n\"clickOnQRcode\" = \"Нажмите на QR-код, чтобы скопировать\"\n\"client\" = \"Клиент\"\n\"export\" = \"Экспорт ключей\"\n\"clone\" = \"Клонировать\"\n\"cloneInbound\" = \"Клонировать\"\n\"cloneInboundContent\" = \"Все настройки этого подключения, кроме порта, IP-адреса прослушки и клиентов, будут клонированы\"\n\"cloneInboundOk\" = \"Клонировано\"\n\"resetAllTraffic\" = \"Сбросить трафик всех подключений\"\n\"resetAllTrafficTitle\" = \"Сброс трафика всех подключений\"\n\"resetAllTrafficContent\" = \"Подтверждаете сброс трафика всех подключений?\"\n\"resetInboundClientTraffics\" = \"Сбросить трафик пользователей\"\n\"resetInboundClientTrafficTitle\" = \"Сброс трафика пользователей\"\n\"resetInboundClientTrafficContent\" = \"Вы уверены, что хотите сбросить весь трафик для этих пользователей?\"\n\"resetAllClientTraffics\" = \"Сбросить трафик всех пользователей\"\n\"resetAllClientTrafficTitle\" = \"Сброс трафика всех пользователей\"\n\"resetAllClientTrafficContent\" = \"Подтверждаете сброс трафика всех пользователей?\"\n\"delDepletedClients\" = \"Удалить отключенных пользователей\"\n\"delDepletedClientsTitle\" = \"Удаление отключенных пользователей\"\n\"delDepletedClientsContent\" = \"Подтверждаете удаление отключенных пользователей?\"\n\"email\" = \"Email\"\n\"emailDesc\" = \"Пожалуйста, укажите уникальный Email\"\n\"IPLimit\" = \"Ограничение по IP\"\n\"IPLimitDesc\" = \"Сбросить подключение, если подключено больше введенного значения (введите 0, чтобы отключить ограничение IP-адресов)\"\n\"IPLimitlog\" = \"IP лог\"\n\"IPLimitlogDesc\" = \"Лог IP-адресов (перед включением лога IP-адресов, вы должны очистить список)\"\n\"IPLimitlogclear\" = \"Очистить лог\"\n\"setDefaultCert\" = \"Установить сертификат с панели\"\n\"xtlsDesc\" = \"Версия Xray должна быть не ниже 1.7.5\"\n\"realityDesc\" = \"Версия Xray должна быть не ниже 1.8.0\"\n\"telegramDesc\" = \"Пожалуйста, укажите ID чата Telegram. (используйте команду '/id' в боте) или (@userinfobot)\"\n\"subscriptionDesc\" = \"Вы можете найти свою ссылку подписки в разделе 'Подробнее', также вы можете использовать одно и то же имя для нескольких конфигураций\"\n\"info\" = \"Информация\"\n\"same\" = \"Тот же\"\n\"inboundData\" = \"Входящие данные\"\n\"exportInbound\" = \"Экспорт входящих\"\n\"import\" = \"Импортировать\"\n\"importInbound\" = \"Импортировать входящее сообщение\"\n\n[pages.client]\n\"add\" = \"Добавить пользователя\"\n\"edit\" = \"Редактировать пользователя\"\n\"submitAdd\" = \"Добавить пользователя\"\n\"submitEdit\" = \"Сохранить изменения\"\n\"clientCount\" = \"Количество пользователей\"\n\"bulk\" = \"Добавить несколько\"\n\"method\" = \"Метод\"\n\"first\" = \"Первый\"\n\"last\" = \"Последний\"\n\"prefix\" = \"Префикс\"\n\"postfix\" = \"Постфикс\"\n\"delayedStart\" = \"Начало использования\"\n\"expireDays\" = \"Длительность\"\n\"days\" = \"дней\"\n\"renew\" = \"Автопродление\"\n\"renewDesc\" = \"Автопродление после истечения срока действия. (0 = отключить)(единица: день)\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"Получить\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"Запрос\"\n\"response\" = \"Ответ\"\n\"name\" = \"Имя\"\n\"value\" = \"Ценить\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"Версия\"\n\"method\" = \"Метод\"\n\"path\" = \"Путь\"\n\"status\" = \"Положение дел\"\n\"statusDescription\" = \"Описание статуса\"\n\"requestHeader\" = \"Заголовок запроса\"\n\"responseHeader\" = \"Заголовок ответа\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"Шифрование\"\n\n[pages.settings]\n\"title\" = \"Настройки\"\n\"save\" = \"Сохранить\"\n\"infoDesc\" = \"Каждое сделанное здесь изменение необходимо сохранить. Пожалуйста, перезапустите панель, чтобы изменения вступили в силу\"\n\"restartPanel\" = \"Перезапуск панели\"\n\"restartPanelDesc\" = \"Подтвердите перезапуск панели? ОК для перезапуска панели через 3 сек. Если вы не можете пользоваться панелью после перезапуска, пожалуйста, посмотрите лог панели на сервере\"\n\"actions\" = \"Действия\"\n\"resetDefaultConfig\" = \"Сбросить на конфигурацию по умолчанию\"\n\"panelSettings\" = \"Настройки панели\"\n\"securitySettings\" = \"Настройки безопасности\"\n\"TGBotSettings\" = \"Настройки Telegram бота\"\n\"panelListeningIP\" = \"IP-адрес панели\"\n\"panelListeningIPDesc\" = \"Оставьте пустым для подключения с любого IP\"\n\"panelListeningDomain\" = \"Домен прослушивания панели\"\n\"panelListeningDomainDesc\" = \"По умолчанию оставьте пустым, чтобы отслеживать все домены и IP-адреса\"\n\"panelPort\" = \"Порт панели\"\n\"panelPortDesc\" = \"Порт, используемый для отображения этой панели\"\n\"publicKeyPath\" = \"Путь к файлу публичного ключа сертификата панели\"\n\"publicKeyPathDesc\" = \"Введите полный путь, начинающийся с\"\n\"privateKeyPath\" = \"Путь к файлу приватного ключа сертификата панели\"\n\"privateKeyPathDesc\" = \"Введите полный путь, начинающийся с\"\n\"panelUrlPath\" = \"Корневой путь URL адреса панели\"\n\"panelUrlPathDesc\" = \"Должен начинаться с '/' и заканчиваться на\"\n\"pageSize\" = \"Размер нумерации страниц\"\n\"pageSizeDesc\" = \"Определить размер страницы для входящей таблицы. Установите 0, чтобы отключить\"\n\"remarkModel\" = \"Модель примечания и символ разделения\"\n\"datepicker\" = \"выбор даты\"\n\"datepickerPlaceholder\" = \"Выберите дату\"\n\"datepickerDescription\" = \"Тип календаря выбора указывает дату истечения срока действия.\"\n\"sampleRemark\" = \"Пример замечания\"\n\"oldUsername\" = \"Текущее имя пользователя\"\n\"currentPassword\" = \"Текущий пароль\"\n\"newUsername\" = \"Новое имя пользователя\"\n\"newPassword\" = \"Новый пароль\"\n\"telegramBotEnable\" = \"Включить Telegram бота\"\n\"telegramBotEnableDesc\" = \"Подключайтесь к функциям этой панели через Telegram бота\"\n\"telegramToken\" = \"Токен Telegram бота\"\n\"telegramTokenDesc\" = \"Необходимо получить токен у менеджера ботов Telegram @botfather\"\n\"telegramProxy\" = \"Прокси Socks5\"\n\"telegramProxyDesc\" = \"Если для подключения к Telegram вам нужен прокси Socks5. Настройте его параметры согласно руководству.\"\n\"telegramChatId\" = \"Telegram ID админа бота\"\n\"telegramChatIdDesc\" = \"Множественные идентификаторы чата, разделенные запятыми. Чтобы получить свои идентификаторы чатов, используйте @userinfobot или команду '/id' в боте.\"\n\"telegramNotifyTime\" = \"Частота уведомлений бота Telegram\"\n\"telegramNotifyTimeDesc\" = \"Используйте формат времени Crontab\"\n\"tgNotifyBackup\" = \"Резервное копирование базы данных\"\n\"tgNotifyBackupDesc\" = \"Включать файл резервной копии базы данных с уведомлением об отчете\"\n\"tgNotifyLogin\" = \"Уведомление о входе\"\n\"tgNotifyLoginDesc\" = \"Отображает имя пользователя, IP-адрес и время, когда кто-то пытается войти в вашу панель.\"\n\"sessionMaxAge\" = \"Продолжительность сессии\"\n\"sessionMaxAgeDesc\" = \"Продолжительность сессии в системе (значение: минута)\"\n\"expireTimeDiff\" = \"Порог истечения срока сессии для уведомления\"\n\"expireTimeDiffDesc\" = \"Получение уведомления об истечении срока действия сессии до достижения порогового значения (значение: день)\"\n\"trafficDiff\" = \"Порог трафика для уведомления\"\n\"trafficDiffDesc\" = \"Получение уведомления об исчерпании трафика до достижения порога (значение: ГБ)\"\n\"tgNotifyCpu\" = \"Порог нагрузки на ЦП для уведомления\"\n\"tgNotifyCpuDesc\" = \"Получение уведомления, если нагрузка на ЦП превышает этот порог (значение: %)\"\n\"timeZone\" = \"Часовой пояс\"\n\"timeZoneDesc\" = \"Запланированные задачи выполняются в соответствии со временем в этом часовом поясе\"\n\"subSettings\" = \"Подписка\"\n\"subEnable\" = \"Включить службу\"\n\"subEnableDesc\" = \"Функция подписки с отдельной конфигурацией\"\n\"subListen\" = \"Прослушивание IP\"\n\"subListenDesc\" = \"Оставьте пустым по умолчанию, чтобы отслеживать все IP-адреса\"\n\"subPort\" = \"Порт подписки\"\n\"subPortDesc\" = \"Номер порта для обслуживания службы подписки не должен использоваться на сервере\"\n\"subCertPath\" = \"Путь к файлу открытого ключа сертификата подписки\"\n\"subCertPathDesc\" = \"Введите абсолютный путь, начинающийся с '/'\"\n\"subKeyPath\" = \"Путь к файлу закрытого ключа сертификата подписки\"\n\"subKeyPathDesc\" = \"Введите абсолютный путь, начинающийся с '/'\"\n\"subPath\" = \"Корневой путь URL-адреса подписки\"\n\"subPathDesc\" = \"Должен начинаться с '/' и заканчиваться на '/'\"\n\"subDomain\" = \"Домен прослушивания\"\n\"subDomainDesc\" = \"Оставьте пустым по умолчанию, чтобы отслеживать все домены и IP-адреса\"\n\"subUpdates\" = \"Интервалы обновления подписки\"\n\"subUpdatesDesc\" = \"Часовой интервал между обновлениями в клиентском приложении\"\n\"subEncrypt\" = \"Шифровать конфиги\"\n\"subEncryptDesc\" = \"Шифровать возвращенные конфиги в подписке\"\n\"subShowInfo\" = \"Показать информацию об использовании\"\n\"subShowInfoDesc\" = \"Показывать восстановленный трафик и дату после имени конфигурации\"\n\"subURI\" = \"URI обратного прокси\"\n\"subURIDesc\" = \"Изменить базовый URI URL-адреса подписки для использования за прокси-серверами\"\n\"fragment\" = \"Фрагментация\"\n\"fragmentDesc\" = \"Включить фрагментацию для пакета приветствия TLS\"\n\"fragmentSett\" = \"Настройки фрагментации\"\n\"mux\" = \"Mux\"\n\"muxDesc\" = \"Передача нескольких независимых потоков данных в рамках установленного потока данных.\"\n\"muxSett\" = \"Mux Настройки\"\n\"direct\" = \"Прямая связь\"\n\"directDesc\" = \"Напрямую устанавливает соединения с доменами или диапазонами IP конкретной страны.\"\n\"directSett\" = \"Варианты прямого подключения\"\n\n[pages.xray]\n\"title\" = \"Настройки Xray\"\n\"save\" = \"Сохранить настройки\"\n\"restart\" = \"Перезапустить Xray\"\n\"basicTemplate\" = \"Базовый шаблон\"\n\"advancedTemplate\" = \"Расширенный шаблон\"\n\"generalConfigs\" = \"Основные настройки\"\n\"generalConfigsDesc\" = \"Эти параметры описывают общие настройки\"\n\"logConfigs\" = \"Журнал\"\n\"logConfigsDesc\" = \"Журналы могут повлиять на эффективность вашего сервера. Рекомендуется включать их с умом только в случае ваших нужд!\"\n\"blockConfigs\" = \"Блокировка конфигураций\"\n\"blockConfigsDesc\" = \"Эти параметры не позволят пользователям подключаться к определенным протоколам и веб-сайтам\"\n\"blockCountryConfigs\" = \"Конфигурации блокировки страны\"\n\"blockCountryConfigsDesc\" = \"Эти параметры не позволят пользователям подключаться к доменам определенной страны\"\n\"directCountryConfigs\" = \"Настройки прямого подключения для страны\"\n\"directCountryConfigsDesc\" = \"Прямое подключение обеспечивает, что конкретный трафик не направляется через другой сервер.\"\n\"ipv4Configs\" = \"Настройки IPv4\"\n\"ipv4ConfigsDesc\" = \"Эти параметры позволят пользователям маршрутизироваться к целевым доменам только через IPv4\"\n\"warpConfigs\" = \"Настройки WARP\"\n\"warpConfigsDesc\" = \"Внимание: перед использованием этих параметров установите WARP в режиме прокси-сервера socks5 на свой сервер, следуя инструкциям на GitHub панели. WARP будет направлять трафик на веб-сайты через серверы Cloudflare\"\n\"Template\" = \"Шаблон конфигурации Xray\"\n\"TemplateDesc\" = \"Создание файла конфигурации Xray на основе этого шаблона\"\n\"FreedomStrategy\" = \"Настройка стратегии протокола Freedom\"\n\"FreedomStrategyDesc\" = \"Установка стратегию вывода сети в протоколе Freedom\"\n\"RoutingStrategy\" = \"Настройка стратегии маршрутизации доменов\"\n\"RoutingStrategyDesc\" = \"Установка общей стратегии маршрутизации разрешения DNS\"\n\"Torrent\" = \"Запрет использования BitTorrent\"\n\"TorrentDesc\" = \"Изменение шаблона конфигурации для предупреждения использования BitTorrent пользователями\"\n\"PrivateIp\" = \"Запрет частных диапазонов IP-адресов для подключения\"\n\"PrivateIpDesc\" = \"Изменение шаблона конфигурации для предупреждения подключения к диапазонам частных IP-адресов\"\n\"Ads\" = \"Блокировка рекламы\"\n\"AdsDesc\" = \"Изменение конфигурации для блокировки рекламы\"\n\"Family\" = \"Блокируйте вредоносное ПО и контент для взрослых\"\n\"FamilyDesc\" = \"DNS-преобразователи Cloudflare для блокировки вредоносного ПО и контента для взрослых в целях защиты семьи.\"\n\"Security\" = \"Блокируйте вредоносное ПО, фишинговые сайты и сайты криптомайнеров\"\n\"SecurityDesc\" = \"Изменение шаблона конфигурации для защиты безопасности.\"\n\"Speedtest\" = \"Блокировать сайты для проверки скорости\"\n\"SpeedtestDesc\" = \"Изменение шаблона конфигурации для предупреждения подключения к веб-сайтам для тестирования скорости\"\n\"IRIp\" = \"Заблокировать подключения к диапазонам IP-адресов Ирана\"\n\"IRIpDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к диапазонам IP-адресов Ирана\"\n\"IRDomain\" = \"Заблокировать подключения к доменам Ирана\"\n\"IRDomainDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к доменам Ирана\"\n\"ChinaIp\" = \"Заблокировать подключения к диапазонам IP-адресов Китая\"\n\"ChinaIpDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к диапазонам IP-адресов Китая\"\n\"ChinaDomain\" = \"Заблокировать подключения к доменам Китая\"\n\"ChinaDomainDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к доменам Китая\"\n\"RussiaIp\" = \"Заблокировать подключения к диапазонам IP-адресов России\"\n\"RussiaIpDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к диапазонами IP-адресов России\"\n\"RussiaDomain\" = \"Заблокировать подключения к доменам России\"\n\"RussiaDomainDesc\" = \"Изменение конфигурации, чтобы заблокировать подключения к доменам России\"\n\"VNIp\" = \"Отключить подключение к IP-адресам Вьетнама\"\n\"VNIpDesc\" = \"Измените шаблон конфигурации, чтобы избежать подключения к диапазонам IP-адресов Вьетнама\"\n\"VNDomain\" = \"Отключить подключение к доменам Вьетнама\"\n\"VNDomainDesc\" = \"Измените шаблон конфигурации, чтобы избежать подключения к доменам Вьетнама.\"\n\"DirectIRIp\" = \"Прямое подключения к диапазонам IP-адресов Ирана\"\n\"DirectIRIpDesc\" = \"Изменение шаблона конфигурации для прямого подключения к диапазонам IP-адресов Ирана\"\n\"DirectIRDomain\" = \"Прямое подключение к доменам Ирана\"\n\"DirectIRDomainDesc\" = \"Изменение шаблон конфигурации для прямого подключения к доменам Ирана\"\n\"DirectChinaIp\" = \"Прямое подключение к диапазонам IP-адресов Китая\"\n\"DirectChinaIpDesc\" = \"Изменение шаблона конфигурации для прямого подключения к диапазонам IP-адресов Китая\"\n\"DirectChinaDomain\" = \"Прямое подключение к доменам Китая\"\n\"DirectChinaDomainDesc\" = \"Изменение шаблона конфигурации для прямого подключения к доменам Китая\"\n\"DirectRussiaIp\" = \"Прямое подключение к диапазонам IP-адресов России\"\n\"DirectRussiaIpDesc\" = \"Изменение шаблона конфигурации для прямого подключения к диапазонам IP-адресов России\"\n\"DirectRussiaDomain\" = \"Прямое подключение к доменам России\"\n\"DirectRussiaDomainDesc\" = \"Изменение шаблона конфигурации для прямого подключения к доменам России\"\n\"DirectVNIp\" = \"Прямое подключение к IP-адресам Вьетнама\"\n\"DirectVNIpDesc\" = \"Измените шаблон конфигурации для прямого подключения к диапазонам IP-адресов Вьетнама\"\n\"DirectVNDomain\" = \"Прямое подключение к доменам Вьетнама\"\n\"DirectVNDomainDesc\" = \"Измените шаблон конфигурации для прямого подключения к доменам Вьетнама\"\n\"GoogleIPv4\" = \"Использовать IPv4 для Google\"\n\"GoogleIPv4Desc\" = \"Добавить маршрутизацию для Google для подключения к IPv4\"\n\"NetflixIPv4\" = \"Использовать IPv4 для Netflix\"\n\"NetflixIPv4Desc\" = \"Добавить маршрутизацию для Netflix для подключения к IPv4\"\n\"GoogleWARP\" = \"Google\"\n\"GoogleWARPDesc\" = \"Направляет трафик в Google через WARP.\"\n\"OpenAIWARP\" = \"OpenAI (ChatGPT)\"\n\"OpenAIWARPDesc\" = \"Направляет трафик в OpenAI (ChatGPT) через WARP.\"\n\"NetflixWARP\" = \"Netflix\"\n\"NetflixWARPDesc\" = \"Направляет трафик в Apple через WARP.\"\n\"MetaWARP\" = \"Мета\"\n\"MetaWARPDesc\" = \"Направляет трафик в Meta (Instagram, Facebook, WhatsApp, Threads...) через WARP.\"\n\"AppleWARP\" = \"Apple\"\n\"AppleWARPDesc\" = \"Направляет трафик в Apple через WARP.\"\n\"RedditWARP\" = \"Reddit\"\n\"RedditWARPDesc\" = \"Направляет трафик в Reddit через WARP.\"\n\"SpotifyWARP\" = \"Spotify\"\n\"SpotifyWARPDesc\" = \"Направляет трафик в Spotify через WARP.\"\n\"IRWARP\" = \"Маршрутизация доменов Ирана через WARP\"\n\"IRWARPDesc\" = \"Добавить маршрутизацию для доменов Ирана через WARP\"\n\"Inbounds\" = \"Входящие\"\n\"InboundsDesc\" = \"Изменение шаблона конфигурации для подключения определенных пользователей\"\n\"Outbounds\" = \"Исходящие\"\n\"Balancers\" = \"Балансиры\"\n\"OutboundsDesc\" = \"Изменение шаблона конфигурации, чтобы определить исходящие пути для этого сервера\"\n\"Routings\" = \"Правила маршрутизации\"\n\"RoutingsDesc\" = \"Важен приоритет каждого правила!\"\n\"completeTemplate\" = \"Все\"\n\"logLevel\" = \"Уровень журнала\"\n\"logLevelDesc\" = \"Уровень журнала для журналов ошибок, указывающий информацию, которую необходимо записать.\"\n\"accessLog\" = \"Журнал доступа\"\n\"accessLogDesc\" = \"Путь к файлу журнала доступа. Специальное значение «none» отключило журналы доступа.\"\n\"errorLog\" = \"Журнал ошибок\"\n\"errorLogDesc\" = \"Путь к файлу журнала ошибок. Специальное значение «none» отключает журналы ошибок.\"\n\n[pages.xray.rules]\n\"first\" = \"Первый\"\n\"last\" = \"Последний\"\n\"up\" = \"Вверх\"\n\"down\" = \"Вниз\"\n\"source\" = \"Источник\"\n\"dest\" = \"Пункт назначения\"\n\"inbound\" = \"Входящий\"\n\"outbound\" = \"Исходящий\"\n\"balancer\" = \"балансир\"\n\"info\" = \"Информация\"\n\"add\" = \"Добавить правило\"\n\"edit\" = \"Редактировать правило\"\n\"useComma\" = \"Элементы, разделенные запятыми\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"Добавить исходящий\"\n\"addReverse\" = \"Добавить реверс\"\n\"editOutbound\" = \"Изменить исходящий\"\n\"editReverse\" = \"Редактировать реверс\"\n\"tag\" = \"Тег\"\n\"tagDesc\" = \"уникальный тег\"\n\"address\" = \"Адрес\"\n\"reverse\" = \"Обратный\"\n\"domain\" = \"Домен\"\n\"type\" = \"Тип\"\n\"bridge\" = \"Мост\"\n\"portal\" = \"Портал\"\n\"intercon\" = \"Соединение\"\n\"settings\" = \"Настройки\"\n\"accountInfo\" = \"Информация Об Учетной Записи\"\n\"outboundStatus\" = \"Исходящий статус\"\n\"sendThrough\" = \"Отправить через\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"Добавить балансир\"\n\"editBalancer\" = \"Редактировать балансир\"\n\"balancerStrategy\" = \"Стратегия\"\n\"balancerSelectors\" = \"Селекторы\"\n\"tag\" = \"Тег\"\n\"tagDesc\" = \"уникальный тег\"\n\"balancerDesc\" = \"Невозможно одновременно использовать balancerTag и outboundTag. При одновременном использовании будет работать только outboundTag.\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"Секретный ключ\"\n\"publicKey\" = \"Публичный ключ\"\n\"allowedIPs\" = \"Разрешенные IP-адреса\"\n\"endpoint\" = \"Конечная точка\"\n\"psk\" = \"Общий ключ\"\n\"domainStrategy\" = \"Стратегия домена\"\n\n[pages.xray.dns]\n\"enable\" = \"Включить DNS\"\n\"enableDesc\" = \"Включить встроенный DNS-сервер\"\n\"tag\" = \"Входящий тег DNS\"\n\"tagDesc\" = \"Этот тег будет доступен как входящий тег в правилах маршрутизации.\"\n\"strategy\" = \"Стратегия запроса\"\n\"strategyDesc\" = \"Общая стратегия разрешения доменных имен\"\n\"add\" = \"Добавить сервер\"\n\"edit\" = \"Редактировать сервер\"\n\"domains\" = \"Домены\"\n\n[pages.xray.fakedns]\n\"add\" = \"Добавить поддельный DNS\"\n\"edit\" = \"Редактировать поддельный DNS\"\n\"ipPool\" = \"Подсеть пула IP\"\n\"poolSize\" = \"Размер пула\"\n\n[pages.settings.security]\n\"admin\" = \"Админ\"\n\"secret\" = \"Секретный токен\"\n\"loginSecurity\" = \"Безопасность входа\"\n\"loginSecurityDesc\" = \"Включить дополнительные меры безопасности входа пользователя\"\n\"secretToken\" = \"Секретный токен\"\n\"secretTokenDesc\" = \"Пожалуйста, скопируйте и сохраните этот токен в безопасном месте. Этот токен необходим для входа в систему и не может быть восстановлен с помощью инструмента x-ui\"\n\n[pages.settings.toasts]\n\"modifySettings\" = \"Изменение настроек\"\n\"getSettings\" = \"Просмотр настроек\"\n\"modifyUser\" = \"Изменение пользователя\"\n\"originalUserPassIncorrect\" = \"Неверное имя пользователя или пароль\"\n\"userPassMustBeNotEmpty\" = \"Новое имя пользователя и новый пароль должны быть заполнены\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ Закрыта настраиваемая клавиатура!\"\n\"noResult\" = \"❗ Нет результатов!\"\n\"noQuery\" = \"❌ Запрос не найден! Пожалуйста, повторите команду!\"\n\"wentWrong\" = \"❌ Что-то пошло не так!\"\n\"noIpRecord\" = \"❗ Нет записей об IP-адресе!\"\n\"noInbounds\" = \"❗ Входящих соединений не найдено!\"\n\"unlimited\" = \"♾ Неограниченно\"\n\"add\" = \"Добавить\"\n\"month\" = \"Месяц\"\n\"months\" = \"Месяцев\"\n\"day\" = \"День\"\n\"days\" = \"Дней\"\n\"hours\" = \"Часов\"\n\"unknown\" = \"Неизвестно\"\n\"inbounds\" = \"Входящие\"\n\"clients\" = \"Клиенты\"\n\"offline\" = \"🔴 Офлайн\"\n\"online\" = \"🟢 Онлайн\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ Неизвестная команда\"\n\"pleaseChoose\" = \"👇 Пожалуйста, выберите:\\r\\n\"\n\"help\" = \"🤖 Добро пожаловать в этого бота! Он предназначен для предоставления вам конкретных данных с сервера и позволяет вносить необходимые изменения.\\r\\n\\r\\n\"\n\"start\" = \"👋 Привет, <i>{{ .Firstname }}</i>.\\r\\n\"\n\"welcome\" = \"🤖 Добро пожаловать в бота управления <b>{{ .Hostname }}</b>.\\r\\n\"\n\"status\" = \"✅ Бот работает нормально!\"\n\"usage\" = \"❗ Пожалуйста, укажите текст для поиска!\"\n\"getID\" = \"🆔 Ваш ID: <code>{{ .ID }}</code>\"\n\"helpAdminCommands\" = \"Для поиска электронной почты клиента:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nДля поиска входящих (со статистикой клиента):\\r\\n<code>/inbound [Примечание]</code>\\r\\n\\r\\nID чата Telegram:\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"Для поиска статистики используйте следующую команду:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nID чата Telegram:\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 Загрузка процессора составляет {{ .Percent }}%, что превышает пороговое значение {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ Ошибка при выборе пользователя!\"\n\"userSaved\" = \"✅ Пользователь Telegram сохранен.\"\n\"loginSuccess\" = \"✅ Успешный вход в панель.\\r\\n\"\n\"loginFailed\" = \"❗️ Ошибка входа в панель.\\r\\n\"\n\"report\" = \"🕰 Запланированные отчеты: {{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ Дата и время: {{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 Имя хоста: {{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 Версия X-UI: {{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 Версия Xray: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 IP-адреса:\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ Время работы сервера: {{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 Загрузка сервера: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 Память сервера: {{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 Количество TCP-соединений: {{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 Количество UDP-соединений: {{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 Трафик: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ Состояние Xray: {{ .State }}\\r\\n\"\n\"username\" = \"👤 Имя пользователя: {{ .Username }}\\r\\n\"\n\"password\" = \"👤 Пароль: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ Время: {{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 Входящий поток: {{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 Порт: {{ .Port }}\\r\\n\"\n\"expire\" = \"📅 Дата окончания: {{ .Time }}\\r\\n\"\n\"expireIn\" = \"📅 Окончание через: {{ .Time }}\\r\\n\"\n\"active\" = \"💡 Активен: {{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 Включен: {{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 Статус соединения: {{ .Status }}\\r\\n\"\n\"email\" = \"📧 Email: {{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 Исходящий трафик: ↑{{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 Входящий трафик: ↓{{ .Download }}\\r\\n\"\n\"total\" = \"📊 Всего: ↑↓{{ .UpDown }} из {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 Пользователь Telegram: {{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 Исчерпаны {{ .Type }}:\\r\\n\"\n\"exhaustedCount\" = \"🚨 Количество исчерпанных {{ .Type }}:\\r\\n\"\n\"onlinesCount\" = \"🌐 Клиентов онлайн: {{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 Отключено: {{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 Скоро исчерпание: {{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 Время резервного копирования: {{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 Обновлено: {{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ Да\"\n\"no\" = \"❌ Нет\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ Закрыть клавиатуру\"\n\"cancel\" = \"❌ Отмена\"\n\"cancelReset\" = \"❌ Отменить сброс\"\n\"cancelIpLimit\" = \"❌ Отменить лимит IP\"\n\"confirmResetTraffic\" = \"✅ Подтвердить сброс трафика?\"\n\"confirmClearIps\" = \"✅ Подтвердить очистку IP?\"\n\"confirmRemoveTGUser\" = \"✅ Подтвердить удаление пользователя Telegram?\"\n\"confirmToggle\" = \"✅ Подтвердить вкл/выкл пользователя?\"\n\"dbBackup\" = \"Получить резервную копию DB\"\n\"serverUsage\" = \"Использование сервера\"\n\"getInbounds\" = \"Получить входящие потоки\"\n\"depleteSoon\" = \"Скоро исчерпание\"\n\"clientUsage\" = \"Получить использование\"\n\"onlines\" = \"Онлайн-клиенты\"\n\"commands\" = \"Команды\"\n\"refresh\" = \"🔄 Обновить\"\n\"clearIPs\" = \"❌ Очистить IP\"\n\"removeTGUser\" = \"❌ Удалить пользователя Telegram\"\n\"selectTGUser\" = \"👤 Выбрать пользователя Telegram\"\n\"selectOneTGUser\" = \"👤 Выберите пользователя Telegram:\"\n\"resetTraffic\" = \"📈 Сбросить трафик\"\n\"resetExpire\" = \"📅 Изменить дату окончания\"\n\"ipLog\" = \"🔢 Лог IP\"\n\"ipLimit\" = \"🔢 Лимит IP\"\n\"setTGUser\" = \"👤 Установить пользователя Telegram\"\n\"toggle\" = \"🔘 Вкл./Выкл.\"\n\"custom\" = \"🔢 Свой\"\n\"confirmNumber\" = \"✅ Подтвердить: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ Подтвердить добавление: {{ .Num }}\"\n\"limitTraffic\" = \"🚧 Лимит трафика\"\n\"getBanLogs\" = \"Логи блокировок\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ Успешный!\"\n\"errorOperation\" = \"❗ Ошибка в операции.\"\n\"getInboundsFailed\" = \"❌ Не удалось получить входящие потоки.\"\n\"canceled\" = \"❌ {{ .Email }}: Операция отменена.\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }}: Клиент успешно обновлен.\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }}: IP-адреса успешно обновлены.\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }}: Пользователь Telegram клиента успешно обновлен.\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }}: Трафик успешно сброшен.\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }}: Лимит Трафик успешно сохранен.\"\n\"expireResetSuccess\" = \"✅ {{ .Email }}: Дни истечения успешно сброшены.\"\n\"resetIpSuccess\" = \"✅ {{ .Email }}: Лимит IP ({{ .Count }}) успешно сохранен.\"\n\"clearIpSuccess\" = \"✅ {{ .Email }}: IP-адреса успешно очищены.\"\n\"getIpLog\" = \"✅ {{ .Email }}: Получен лог IP.\"\n\"getUserInfo\" = \"✅ {{ .Email }}: Получена информация о пользователе Telegram.\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }}: Пользователь Telegram успешно удален.\"\n\"enableSuccess\" = \"✅ {{ .Email }}: Включено успешно.\"\n\"disableSuccess\" = \"✅ {{ .Email }}: Отключено успешно.\"\n\"askToAddUserId\" = \"Ваша конфигурация не найдена!\\r\\nПожалуйста, попросите администратора использовать ваш идентификатор пользователя Telegram в ваших конфигурациях.\\r\\n\\r\\nВаш идентификатор пользователя: <code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/translation/translate.uk_UA.toml",
    "content": "\"username\" = \"Ім'я користувача\"\n\"password\" = \"Пароль\"\n\"login\" = \"Увійти\"\n\"confirm\" = \"Підтвердити\"\n\"cancel\" = \"Скасувати\"\n\"close\" = \"Закрити\"\n\"copy\" = \"Копіювати\"\n\"copied\" = \"Скопійовано\"\n\"download\" = \"Завантажити\"\n\"remark\" = \"Примітка\"\n\"enable\" = \"Увімкнути\"\n\"protocol\" = \"Протокол\"\n\"search\" = \"Пошук\"\n\"filter\" = \"Фільтр\"\n\"loading\" = \"Завантаження...\"\n\"second\" = \"Секунда\"\n\"minute\" = \"Хвилина\"\n\"hour\" = \"Година\"\n\"day\" = \"День\"\n\"check\" = \"Перевірка\"\n\"indefinite\" = \"Безстроково\"\n\"unlimited\" = \"Безлімітний\"\n\"none\" = \"Немає\"\n\"qrCode\" = \"QR-Код\"\n\"info\" = \"Більше інформації\"\n\"edit\" = \"Редагувати\"\n\"delete\" = \"Видалити\"\n\"reset\" = \"Скидання\"\n\"copySuccess\" = \"Скопійовано успішно\"\n\"sure\" = \"Звичайно\"\n\"encryption\" = \"Шифрування\"\n\"transmission\" = \"Протокол передачи\"\n\"host\" = \"Хост\"\n\"path\" = \"Шлях\"\n\"camouflage\" = \"Маскування\"\n\"status\" = \"Статус\"\n\"enabled\" = \"Увімкнено\"\n\"disabled\" = \"Вимкнено\"\n\"depleted\" = \"Вичерпано\"\n\"depletingSoon\" = \"Вичерпується\"\n\"offline\" = \"Офлайн\"\n\"online\" = \"Онлайн\"\n\"domainName\" = \"Доменне ім`я\"\n\"monitor\" = \"Слухати IP\"\n\"certificate\" = \"Цифровий сертифікат\"\n\"fail\" = \" Помилка\"\n\"success\" = \" Успішно\"\n\"getVersion\" = \"Отримати версію\"\n\"install\" = \"Встановити\"\n\"clients\" = \"Клієнти\"\n\"usage\" = \"Використання\"\n\"secretToken\" = \"Секретний маркер\"\n\"remained\" = \"Залишилося\"\n\"security\" = \"Беспека\"\n\"secAlertTitle\" = \"Попередження системи безпеки\"\n\"secAlertSsl\" = \"Це з'єднання не є безпечним. Будь ласка, уникайте введення конфіденційної інформації, поки TLS не буде активовано для захисту даних.\"\n\"secAlertConf\" = \"Деякі налаштування вразливі до атак. Рекомендується посилити протоколи безпеки, щоб запобігти можливим порушенням.\"\n\"secAlertSSL\" = \"Панель не має безпечного з'єднання. Будь ласка, встановіть сертифікат TLS для захисту даних.\"\n\"secAlertPanelPort\" = \"Стандартний порт панелі вразливий. Будь ласка, сконфігуруйте випадковий або конкретний порт.\"\n\"secAlertPanelURI\" = \"Стандартний URI-шлях панелі небезпечний. Будь ласка, сконфігуруйте складний URI-шлях.\"\n\"secAlertSubURI\" = \"Стандартний URI-шлях підписки небезпечний. Будь ласка, сконфігуруйте складний URI-шлях.\"\n\"secAlertSubJsonURI\" = \"Стандартний URI-шлях JSON підписки небезпечний. Будь ласка, сконфігуруйте складний URI-шлях.\"\n\n[menu]\n\"dashboard\" = \"Огляд\"\n\"inbounds\" = \"Вхідні\"\n\"settings\" = \"Параметри панелі\"\n\"xray\" = \"Конфігурації Xray\"\n\"logout\" = \"Вийти\"\n\"link\" = \"Керувати\"\n\n[pages.login]\n\"hello\" = \"Привіт\"\n\"title\" = \"Ласкаво просимо\"\n\"loginAgain\" = \"Ваш сеанс закінчився, увійдіть знову\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"Формат вхідних даних недійсний.\"\n\"emptyUsername\" = \"Потрібне ім'я користувача\"\n\"emptyPassword\" = \"Потрібен пароль\"\n\"wrongUsernameOrPassword\" = \"Невірне ім'я користувача або пароль.\"\n\"successLogin\" = \"Вхід\"\n\n[pages.index]\n\"title\" = \"Огляд\"\n\"memory\" = \"Пам'ять\"\n\"hard\" = \"Диск\"\n\"xrayStatus\" = \"Xray\"\n\"stopXray\" = \"Зупинити\"\n\"restartXray\" = \"Перезапустити\"\n\"xraySwitch\" = \"Версія\"\n\"xraySwitchClick\" = \"Виберіть версію, на яку ви хочете перейти.\"\n\"xraySwitchClickDesk\" = \"Вибирайте уважно, оскільки старіші версії можуть бути несумісними з поточними конфігураціями.\"\n\"operationHours\" = \"Час роботи\"\n\"systemLoad\" = \"Завантаження системи\"\n\"systemLoadDesc\" = \"Середнє завантаження системи за останні 1, 5 і 15 хвилин\"\n\"connectionTcpCountDesc\" = \"Загальна кількість TCP-з'єднань у системі\"\n\"connectionUdpCountDesc\" = \"Загальна кількість UDP-з'єднань у системі\"\n\"connectionCount\" = \"Статистика з'єднання\"\n\"upSpeed\" = \"Загальна швидкість завантаження в системі\"\n\"downSpeed\" = \"Загальна швидкість завантаження в системі\"\n\"totalSent\" = \"Загальна кількість даних, надісланих через систему з моменту запуску ОС\"\n\"totalReceive\" = \"Загальна кількість даних, отриманих системою з моменту запуску ОС\"\n\"xraySwitchVersionDialog\" = \"Змінити версію Xray\"\n\"xraySwitchVersionDialogDesc\" = \"Ви впевнені, що бажаєте змінити версію Xray на\"\n\"dontRefresh\" = \"Інсталяція триває, будь ласка, не оновлюйте цю сторінку\"\n\"logs\" = \"Журнали\"\n\"config\" = \"Конфігурація\"\n\"backup\" = \"Резервне копіювання та відновлення\"\n\"backupTitle\" = \"Резервне копіювання та відновлення бази даних\"\n\"backupDescription\" = \"Рекомендується зробити резервну копію перед відновленням бази даних.\"\n\"exportDatabase\" = \"Резервне копіювання\"\n\"importDatabase\" = \"Відновити\"\n\n[pages.inbounds]\n\"title\" = \"Вхідні\"\n\"totalDownUp\" = \"Всього надісланих/отриманих\"\n\"totalUsage\" = \"Всього використанно\"\n\"inboundCount\" = \"Загальна кількість вхідних\"\n\"operate\" = \"Меню\"\n\"enable\" = \"Увімкнено\"\n\"remark\" = \"Примітка\"\n\"protocol\" = \"Протокол\"\n\"port\" = \"Порт\"\n\"traffic\" = \"Трафік\"\n\"details\" = \"Деталі\"\n\"transportConfig\" = \"Транспорт\"\n\"expireDate\" = \"Тривалість\"\n\"resetTraffic\" = \"Скинути трафік\"\n\"addInbound\" = \"Додати вхідний\"\n\"generalActions\" = \"Загальні дії\"\n\"create\" = \"Створити\"\n\"update\" = \"Оновити\"\n\"modifyInbound\" = \"Змінити вхідний\"\n\"deleteInbound\" = \"Видалити вхідні\"\n\"deleteInboundContent\" = \"Ви впевнені, що хочете видалити вхідні?\"\n\"deleteClient\" = \"Видалити клієнта\"\n\"deleteClientContent\" = \"Ви впевнені, що хочете видалити клієнт?\"\n\"resetTrafficContent\" = \"Ви впевнені, що хочете скинути трафік?\"\n\"copyLink\" = \"Копіювати URL\"\n\"address\" = \"Адреса\"\n\"network\" = \"Мережа\"\n\"destinationPort\" = \"Порт призначення\"\n\"targetAddress\" = \"Цільова адреса\"\n\"monitorDesc\" = \"Залиште порожнім, щоб слухати всі IP-адреси\"\n\"meansNoLimit\" = \" = Необмежено. (одиниця: ГБ)\"\n\"totalFlow\" = \"Загальна витрата\"\n\"leaveBlankToNeverExpire\" = \"Залиште порожнім, щоб ніколи не закінчувався\"\n\"noRecommendKeepDefault\" = \"Рекомендується зберегти значення за замовчуванням\"\n\"certificatePath\" = \"Шлях до файлу\"\n\"certificateContent\" = \"Вміст файлу\"\n\"publicKey\" = \"Публічний ключ\"\n\"privatekey\" = \"Закритий ключ\"\n\"clickOnQRcode\" = \"Натисніть QR-код, щоб скопіювати\"\n\"client\" = \"Клієнт\"\n\"export\" = \"Експортувати всі URL-адреси\"\n\"clone\" = \"Клон\"\n\"cloneInbound\" = \"Клонувати\"\n\"cloneInboundContent\" = \"Усі налаштування цього вхідного потоку, крім порту, IP-адреси прослуховування та клієнтів, будуть застосовані до клону.\"\n\"cloneInboundOk\" = \"Клонувати\"\n\"resetAllTraffic\" = \"Скинути весь вхідний трафік\"\n\"resetAllTrafficTitle\" = \"Скинути весь вхідний трафік\"\n\"resetAllTrafficContent\" = \"Ви впевнені, що бажаєте скинути трафік усіх вхідних?\"\n\"resetInboundClientTraffics\" = \"Скинути трафік клієнтів\"\n\"resetInboundClientTrafficTitle\" = \"Скинути трафік клієнтів\"\n\"resetInboundClientTrafficContent\" = \"Ви впевнені, що бажаєте скинути трафік клієнтів цього вхідного потоку?\"\n\"resetAllClientTraffics\" = \"Скинути весь трафік клієнтів\"\n\"resetAllClientTrafficTitle\" = \"Скинути весь трафік клієнтів\"\n\"resetAllClientTrafficContent\" = \"Ви впевнені, що бажаєте скинути трафік усіх клієнтів?\"\n\"delDepletedClients\" = \"Видалити вичерпані клієнти\"\n\"delDepletedClientsTitle\" = \"Видалити вичерпані клієнти\"\n\"delDepletedClientsContent\" = \"Ви впевнені, що хочете видалити всі вичерпані клієнти?\"\n\"email\" = \"Електронна пошта\"\n\"emailDesc\" = \"Будь ласка, надайте унікальну адресу електронної пошти.\"\n\"IPLimit\" = \"Обмеження IP\"\n\"IPLimitDesc\" = \"Вимикає вхідний, якщо кількість перевищує встановлене значення. (0 = вимкнено)\"\n\"IPLimitlog\" = \"Журнал IP\"\n\"IPLimitlogDesc\" = \"Журнал історії IP-адрес. (щоб увімкнути вхідну після вимкнення, очистіть журнал)\"\n\"IPLimitlogclear\" = \"Очистити журнал\"\n\"setDefaultCert\" = \"Установити сертифікат з панелі\"\n\"xtlsDesc\" = \"Xray має бути v1.7.5\"\n\"realityDesc\" = \"Xray має бути v1.8.0+\"\n\"telegramDesc\" = \"Будь ласка, вкажіть ID чату Telegram. (використовуйте команду '/id' у боті) або (@userinfobot)\"\n\"subscriptionDesc\" = \"Щоб знайти URL-адресу вашої підписки, перейдіть до «Деталі». Крім того, ви можете використовувати одне ім'я для кількох клієнтів.\"\n\"info\" = \"Інформація\"\n\"same\" = \"Те саме\"\n\"inboundData\" = \"Вхідні дані\"\n\"exportInbound\" = \"Експортувати вхідні\"\n\"import\" = \"Імпорт\"\n\"importInbound\" = \"Імпортувати вхідний\"\n\n[pages.client]\n\"add\" = \"Додати клієнта\"\n\"edit\" = \"Редагувати клієнта\"\n\"submitAdd\" = \"Додати клієнта\"\n\"submitEdit\" = \"Зберегти зміни\"\n\"clientCount\" = \"Кількість клієнтів\"\n\"bulk\" = \"Додати групу\"\n\"method\" = \"Метод\"\n\"first\" = \"Перший\"\n\"last\" = \"Останній\"\n\"prefix\" = \"Префікс\"\n\"postfix\" = \"Постфікс\"\n\"delayedStart\" = \"Початок використання\"\n\"expireDays\" = \"Тривалість\"\n\"days\" = \"Дні(в)\"\n\"renew\" = \"Автоматичне оновлення\"\n\"renewDesc\" = \"Автоматичне поновлення після закінчення терміну дії. (0 = вимкнено)(одиниця: день)\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"Отримати\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"Запит\"\n\"response\" = \"Відповідь\"\n\"name\" = \"Ім'я\"\n\"value\" = \"Значення\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"Версія\"\n\"method\" = \"Метод\"\n\"path\" = \"Шлях\"\n\"status\" = \"Статус\"\n\"statusDescription\" = \"Опис стану\"\n\"requestHeader\" = \"Заголовок запиту\"\n\"responseHeader\" = \"Заголовок відповіді\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"Шифрування\"\n\n[pages.settings]\n\"title\" = \"Параметри панелі\"\n\"save\" = \"Зберегти\"\n\"infoDesc\" = \"Кожна внесена тут зміна повинна бути збережена. Перезапустіть панель, щоб застосувати зміни.\"\n\"restartPanel\" = \"Перезапустити панель\"\n\"restartPanelDesc\" = \"Ви впевнені, що бажаєте перезапустити панель? Якщо ви не можете отримати доступ до панелі після перезапуску, будь ласка, перегляньте інформацію журналу панелі на сервері.\"\n\"actions\" = \"Дії\"\n\"resetDefaultConfig\" = \"Відновити значення за замовчуванням\"\n\"panelSettings\" = \"Загальні\"\n\"securitySettings\" = \"Автентифікація\"\n\"TGBotSettings\" = \"Telegram Бот\"\n\"panelListeningIP\" = \"Слухати IP\"\n\"panelListeningIPDesc\" = \"IP-адреса для веб-панелі. (залиште порожнім, щоб слухати всі IP-адреси)\"\n\"panelListeningDomain\" = \"Домен прослуховування\"\n\"panelListeningDomainDesc\" = \"Доменне ім'я для веб-панелі. (залиште порожнім, щоб слухати всі домени та IP-адреси)\"\n\"panelPort\" = \"Порт прослуховування\"\n\"panelPortDesc\" = \"Номер порту для веб-панелі. (має бути невикористаний порт)\"\n\"publicKeyPath\" = \"Шлях відкритого ключа\"\n\"publicKeyPathDesc\" = \"Шлях до файлу відкритого ключа для веб-панелі. (починається з ‘/‘)\"\n\"privateKeyPath\" = \"Шлях приватного ключа\"\n\"privateKeyPathDesc\" = \"Шлях до файлу приватного ключа для веб-панелі. (починається з ‘/‘)\"\n\"panelUrlPath\" = \"Шлях URL\"\n\"panelUrlPathDesc\" = \"Шлях URL для веб-панелі. (починається з ‘/‘ і закінчується ‘/‘)\"\n\"pageSize\" = \"Розмір сторінки\"\n\"pageSizeDesc\" = \"Визначити розмір сторінки для вхідної таблиці. (0 = вимкнено)\"\n\"remarkModel\" = \"Модель зауваження та роздільний символ\"\n\"datepicker\" = \"Тип календаря\"\n\"datepickerPlaceholder\" = \"Виберіть дату\"\n\"datepickerDescription\" = \"Заплановані завдання виконуватимуться на основі цього календаря.\"\n\"sampleRemark\" = \"Зразок зауваження\"\n\"oldUsername\" = \"Поточне ім'я користувача\"\n\"currentPassword\" = \"Поточний пароль\"\n\"newUsername\" = \"Нове ім'я користувача\"\n\"newPassword\" = \"Новий пароль\"\n\"telegramBotEnable\" = \"Увімкнути Telegram Bot\"\n\"telegramBotEnableDesc\" = \"Вмикає бота Telegram.\"\n\"telegramToken\" = \"Telegram Токен\"\n\"telegramTokenDesc\" = \"Токен бота Telegram, отриманий від '@BotFather'.\"\n\"telegramProxy\" = \"SOCKS Проксі\"\n\"telegramProxyDesc\" = \"Вмикає проксі-сервер SOCKS5 для підключення до Telegram. (відкоригуйте параметри відповідно до посібника)\"\n\"telegramChatId\" = \"Ідентифікатор чату адміністратора\"\n\"telegramChatIdDesc\" = \"Ідентифікатори чату адміністратора Telegram. (розділені комами) (отримайте тут @userinfobot) або (використовуйте команду '/id' у боті)\"\n\"telegramNotifyTime\" = \"Час сповіщення\"\n\"telegramNotifyTimeDesc\" = \"Час повідомлення бота Telegram, встановлений для періодичних звітів. (використовуйте формат часу crontab)\"\n\"tgNotifyBackup\" = \"Резервне копіювання бази даних\"\n\"tgNotifyBackupDesc\" = \"Надіслати файл резервної копії бази даних зі звітом.\"\n\"tgNotifyLogin\" = \"Сповіщення про вхід\"\n\"tgNotifyLoginDesc\" = \"Отримувати сповіщення про ім'я користувача, IP-адресу та час щоразу, коли хтось намагається увійти у вашу веб-панель.\"\n\"sessionMaxAge\" = \"Тривалість сеансу\"\n\"sessionMaxAgeDesc\" = \"Тривалість, протягом якої ви можете залишатися в системі. (одиниця: хвилина)\"\n\"expireTimeDiff\" = \"Повідомлення про дату закінчення\"\n\"expireTimeDiffDesc\" = \"Отримувати сповіщення про термін дії при досягненні цього порогу. (одиниця: день)\"\n\"trafficDiff\" = \"Повідомлення про обмеження трафіку\"\n\"trafficDiffDesc\" = \"Отримувати сповіщення про обмеження трафіку при досягненні цього порогу. (одиниця: ГБ)\"\n\"tgNotifyCpu\" = \"Сповіщення про завантаження ЦП\"\n\"tgNotifyCpuDesc\" = \"Отримувати сповіщення, якщо навантаження ЦП перевищує це порогове значення. (одиниця: %)\"\n\"timeZone\" = \"Часовий пояс\"\n\"timeZoneDesc\" = \"Заплановані завдання виконуватимуться на основі цього часового поясу.\"\n\"subSettings\" = \"Підписка\"\n\"subEnable\" = \"Увімкнути службу підписки\"\n\"subEnableDesc\" = \"Вмикає службу підписки.\"\n\"subListen\" = \"Слухати IP\"\n\"subListenDesc\" = \"IP-адреса для служби підписки. (залиште порожнім, щоб слухати всі IP-адреси)\"\n\"subPort\" = \"Слухати порт\"\n\"subPortDesc\" = \"Номер порту для служби підписки. (має бути невикористаний порт)\"\n\"subCertPath\" = \"Шлях відкритого ключа\"\n\"subCertPathDesc\" = \"Шлях до файлу відкритого ключа для служби підписки. (починається з ‘/‘)\"\n\"subKeyPath\" = \"Шлях приватного ключа\"\n\"subKeyPathDesc\" = \"Шлях до файлу приватного ключа для служби підписки. (починається з ‘/‘)\"\n\"subPath\" = \"Шлях URI\"\n\"subPathDesc\" = \"Шлях URI для служби підписки. (починається з ‘/‘ і закінчується ‘/‘)\"\n\"subDomain\" = \"Домен прослуховування\"\n\"subDomainDesc\" = \"Ім'я домену для служби підписки. (залиште порожнім, щоб слухати всі домени та IP-адреси)\"\n\"subUpdates\" = \"Інтервали оновлення\"\n\"subUpdatesDesc\" = \"Інтервали оновлення URL-адреси підписки в клієнтських програмах. (одиниця: година)\"\n\"subEncrypt\" = \"Закодувати\"\n\"subEncryptDesc\" = \"Повернений вміст послуги підписки матиме кодування Base64.\"\n\"subShowInfo\" = \"Показати інформацію про використання\"\n\"subShowInfoDesc\" = \"Залишок трафіку та дата відображатимуться в клієнтських програмах.\"\n\"subURI\" = \"URI зворотного проксі\"\n\"subURIDesc\" = \"URI до URL-адреси підписки для використання за проксі.\"\n\"fragment\" = \"Фрагментація\"\n\"fragmentDesc\" = \"Увімкнути фрагментацію для пакету привітання TLS\"\n\"fragmentSett\" = \"Параметри фрагментації\"\n\"mux\" = \"Mux\"\n\"muxDesc\" = \"Передавати кілька незалежних потоків даних у межах встановленого потоку даних.\"\n\"muxSett\" = \"Налаштування Mux\"\n\"direct\" = \"Пряме підключення\"\n\"directDesc\" = \"Безпосередньо встановлює з’єднання з доменами або діапазонами IP певної країни.\"\n\"directSett\" = \"Параметри прямого підключення\"\n\n[pages.xray]\n\"title\" = \"Xray конфігурації\"\n\"save\" = \"Зберегти\"\n\"restart\" = \"Перезапустити Xray\"\n\"basicTemplate\" = \"Базовий шаблон\"\n\"advancedTemplate\" = \"Додатково\"\n\"generalConfigs\" = \"Загальні конфігурації\"\n\"generalConfigsDesc\" = \"Ці параметри визначатимуть загальні налаштування.\"\n\"logConfigs\" = \"Журнал\"\n\"logConfigsDesc\" = \"Журнали можуть вплинути на ефективність вашого сервера. Рекомендується вмикати його з розумом лише у випадку ваших потреб\"\n\"blockConfigs\" = \"Захисний екран\"\n\"blockConfigsDesc\" = \"Ці параметри блокуватимуть трафік на основі конкретних запитуваних протоколів і веб-сайтів.\"\n\"blockCountryConfigs\" = \"Заблокувати країну\"\n\"blockCountryConfigsDesc\" = \"Ці параметри блокуватимуть трафік на основі конкретної запитуваної країни.\"\n\"directCountryConfigs\" = \"Пряма країна\"\n\"directCountryConfigsDesc\" = \"Пряме підключення забезпечує, що конкретний трафік не маршрутизується через інший сервер.\"\n\"ipv4Configs\" = \"Маршрутизація IPv4\"\n\"ipv4ConfigsDesc\" = \"Ці параметри спрямовуватимуть трафік на основі певного призначення через IPv4.\"\n\"warpConfigs\" = \"WARP маршрутизація\"\n\"warpConfigsDesc\" = \"Ці параметри маршрутизуватимуть трафік на основі певного пункту призначення через WARP.\"\n\"Template\" = \"Шаблон розширеної конфігурації Xray\"\n\"TemplateDesc\" = \"Остаточний конфігураційний файл Xray буде створено на основі цього шаблону.\"\n\"FreedomStrategy\" = \"Стратегія протоколу свободи\"\n\"FreedomStrategyDesc\" = \"Установити стратегію виведення для мережі в протоколі свободи.\"\n\"RoutingStrategy\" = \"Загальна стратегія маршрутизації\"\n\"RoutingStrategyDesc\" = \"Установити загальну стратегію маршрутизації трафіку для вирішення всіх запитів.\"\n\"Torrent\" = \"Блокувати протокол BitTorrent\"\n\"TorrentDesc\" = \"Блокує протокол BitTorrent.\"\n\"PrivateIp\" = \"Блокувати підключення до приватних IP-адрес\"\n\"PrivateIpDesc\" = \"Блокує встановлення підключень до приватних діапазонів IP.\"\n\"Ads\" = \"Блокувати рекламу\"\n\"AdsDesc\" = \"Блокує рекламні веб-сайти.\"\n\"Family\" = \"Захист сім'ї\"\n\"FamilyDesc\" = \"Блокує вміст для дорослих і веб-сайти з шкідливими програмами.\"\n\"Security\" = \"Щит безпеки\"\n\"SecurityDesc\" = \"Блокує веб-сайти шкідливого програмного забезпечення, фішингу та майнерів.\"\n\"Speedtest\" = \"Заблокувати Speedtest\"\n\"SpeedtestDesc\" = \"Блокує підключення до веб-сайтів для тестування швидкості.\"\n\"IRIp\" = \"Блокувати підключення до IP-адрес Ірану\"\n\"IRIpDesc\" = \"Блокує встановлення з'єднань з діапазонами IP Ірану.\"\n\"IRDomain\" = \"Блокувати підключення до доменів Ірану\"\n\"IRDomainDesc\" = \"Блокує встановлення з'єднань з доменами Ірану.\"\n\"ChinaIp\" = \"Блокувати підключення до IP-адрес Китаю\"\n\"ChinaIpDesc\" = \"Блокує встановлення з'єднань із діапазонами IP-адрес Китаю.\"\n\"ChinaDomain\" = \"Блокувати підключення до китайських доменів\"\n\"ChinaDomainDesc\" = \"Блокує встановлення підключень до доменів Китаю.\"\n\"RussiaIp\" = \"Блокувати підключення до російських IP-адрес\"\n\"RussiaIpDesc\" = \"Блокує встановлення з'єднань з діапазонами IP-адрес Росії.\"\n\"RussiaDomain\" = \"Блокувати підключення до російських доменів\"\n\"RussiaDomainDesc\" = \"Блокує встановлення з'єднань з російськими доменами.\"\n\"VNIp\" = \"Блокувати підключення до IP-адрес В'єтнаму\"\n\"VNIpDesc\" = \"Блокує встановлення з'єднань із діапазонами IP-адрес В'єтнаму.\"\n\"VNDomain\" = \"Блокувати підключення до доменів В'єтнаму\"\n\"VNDomainDesc\" = \"Блокує встановлення з'єднань із доменами В'єтнаму.\"\n\"DirectIRIp\" = \"Пряме підключення до IP-адрес Ірану\"\n\"DirectIRIpDesc\" = \"Безпосередньо встановлює з'єднання з діапазонами IP Ірану.\"\n\"DirectIRDomain\" = \"Пряме підключення до доменів Ірану\"\n\"DirectIRDomainDesc\" = \"Безпосередньо встановлює підключення до доменів Ірану.\"\n\"DirectChinaIp\" = \"Пряме підключення до китайських IP-адрес\"\n\"DirectChinaIpDesc\" = \"Безпосередньо встановлює підключення до IP-діапазонів Китаю.\"\n\"DirectChinaDomain\" = \"Пряме підключення до китайських доменів\"\n\"DirectChinaDomainDesc\" = \"Безпосередньо встановлює підключення до доменів Китаю.\"\n\"DirectRussiaIp\" = \"Пряме підключення до IP-адрес Росії\"\n\"DirectRussiaIpDesc\" = \"Безпосередньо встановлює з'єднання з діапазонами IP-адрес Росії.\"\n\"DirectRussiaDomain\" = \"Пряме підключення до російських доменів\"\n\"DirectRussiaDomainDesc\" = \"Безпосередньо встановлює підключення до російських доменів.\"\n\"DirectVNIp\" = \"Пряме підключення до IP-адрес В'єтнаму\"\n\"DirectVNIpDesc\" = \"Безпосередньо встановлює з'єднання з діапазонами IP-адрес В'єтнаму.\"\n\"DirectVNDomain\" = \"Пряме підключення до доменів В'єтнаму\"\n\"DirectVNDomainDesc\" = \"Безпосередньо встановлює з'єднання з доменами В'єтнаму.\"\n\"GoogleIPv4\" = \"Google\"\n\"GoogleIPv4Desc\" = \"Направляє трафік до Google через IPv4.\"\n\"NetflixIPv4\" = \"Netflix\"\n\"NetflixIPv4Desc\" = \"Направляє трафік до Netflix через IPv4.\"\n\"GoogleWARP\" = \"Google\"\n\"GoogleWARPDesc\" = \"Додати маршрутизацію для Google через WARP.\"\n\"OpenAIWARP\" = \"ChatGPT\"\n\"OpenAIWARPDesc\" = \"Направляє трафік до ChatGPT через WARP.\"\n\"NetflixWARP\" = \"Netflix\"\n\"NetflixWARPDesc\" = \"Направляє трафік до Netflix через WARP.\"\n\"MetaWARP\" = \"Meta\"\n\"MetaWARPDesc\" = \"Направляє трафік до Meta (Instagram, Facebook, WhatsApp, Threads,...) через WARP.\"\n\"AppleWARP\" = \"Apple\"\n\"AppleWARPDesc\" = \"Направляє трафік до Apple через WARP.\"\n\"RedditWARP\" = \"Reddit\"\n\"RedditWARPDesc\" = \"Направляє трафік до Reddit через WARP.\"\n\"SpotifyWARP\" = \"Spotify\"\n\"SpotifyWARPDesc\" = \"Направляє трафік до Spotify через WARP.\"\n\"IRWARP\" = \"Іранські домени\"\n\"IRWARPDesc\" = \"Направляє трафік до доменів Ірану через WARP\"\n\"Inbounds\" = \"Вхідні\"\n\"InboundsDesc\" = \"Прийняття певних клієнтів.\"\n\"Outbounds\" = \"Вихід\"\n\"Balancers\" = \"Балансери\"\n\"OutboundsDesc\" = \"Встановити шлях вихідного трафіку.\"\n\"Routings\" = \"Правила маршрутизації\"\n\"RoutingsDesc\" = \"Пріоритет кожного правила важливий!\"\n\"completeTemplate\" = \"Усі\"\n\"logLevel\" = \"Рівень журналу\"\n\"logLevelDesc\" = \"Рівень журналу для журналів помилок із зазначенням інформації, яку потрібно записати.\"\n\"accessLog\" = \"Журнал доступу\"\n\"accessLogDesc\" = \"Шлях до файлу журналу доступу. Спеціальне значення 'none' вимикає журнали доступу\"\n\"errorLog\" = \"Журнал помилок\"\n\"errorLogDesc\" = \"Шлях до файлу журналу помилок. Спеціальне значення 'none' вимикає журнали помилок\"\n\n[pages.xray.rules]\n\"first\" = \"Перший\"\n\"last\" = \"Останній\"\n\"up\" = \"Вгору\"\n\"down\" = \"Вниз\"\n\"source\" = \"Джерело\"\n\"dest\" = \"Пункт призначення\"\n\"inbound\" = \"Вхідний\"\n\"outbound\" = \"Вихідний\"\n\"balancer\" = \"Балансувальник\"\n\"info\" = \"Інформація\"\n\"add\" = \"Додати правило\"\n\"edit\" = \"Редагувати правило\"\n\"useComma\" = \"Елементи, розділені комами\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"Додати вихідний\"\n\"addReverse\" = \"Додати реверс\"\n\"editOutbound\" = \"Редагувати вихідні\"\n\"editReverse\" = \"Редагувати реверс\"\n\"tag\" = \"Тег\"\n\"tagDesc\" = \"Унікальний тег\"\n\"address\" = \"Адреса\"\n\"reverse\" = \"Зворотний\"\n\"domain\" = \"Домен\"\n\"type\" = \"Тип\"\n\"bridge\" = \"Міст\"\n\"portal\" = \"Портал\"\n\"intercon\" = \"Взаємозв'язок\"\n\"settings\" = \"Налаштування\"\n\"accountInfo\" = \"Інформація про обліковий запис\"\n\"outboundStatus\" = \"Статус виходу\"\n\"sendThrough\" = \"Надіслати через\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"Додати балансир\"\n\"editBalancer\" = \"Редагувати балансир\"\n\"balancerStrategy\" = \"Стратегія\"\n\"balancerSelectors\" = \"Селектори\"\n\"tag\" = \"Тег\"\n\"tagDesc\" = \"Унікальний тег\"\n\"balancerDesc\" = \"Неможливо використовувати balancerTag і outboundTag одночасно. Якщо використовувати одночасно, працюватиме лише outboundTag.\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"Приватний ключ\"\n\"publicKey\" = \"Публічний ключ\"\n\"allowedIPs\" = \"Дозволені IP-адреси\"\n\"endpoint\" = \"Кінцева точка\"\n\"psk\" = \"Спільний ключ\"\n\"domainStrategy\" = \"Стратегія домену\"\n\n[pages.xray.dns]\n\"enable\" = \"Увімкнути DNS\"\n\"enableDesc\" = \"Увімкнути вбудований DNS-сервер\"\n\"tag\" = \"Мітка вхідного DNS\"\n\"tagDesc\" = \"Ця мітка буде доступна як вхідна мітка в правилах маршрутизації.\"\n\"strategy\" = \"Стратегія запиту\"\n\"strategyDesc\" = \"Загальна стратегія вирішення доменних імен\"\n\"add\" = \"Додати сервер\"\n\"edit\" = \"Редагувати сервер\"\n\"domains\" = \"Домени\"\n\n[pages.xray.fakedns]\n\"add\" = \"Додати підроблений DNS\"\n\"edit\" = \"Редагувати підроблений DNS\"\n\"ipPool\" = \"Підмережа IP-пулу\"\n\"poolSize\" = \"Розмір пулу\"\n\n[pages.settings.security]\n\"admin\" = \"Адміністратор\"\n\"secret\" = \"Секретний маркер\"\n\"loginSecurity\" = \"Безпечний вхід\"\n\"loginSecurityDesc\" = \"Додає додатковий рівень автентифікації для забезпечення більшої безпеки.\"\n\"secretToken\" = \"Секретний маркер\"\n\"secretTokenDesc\" = \"Будь ласка, надійно зберігайте цей маркер у безпечному місці. Цей маркер потрібен для входу, і його неможливо відновити.\"\n\n[pages.settings.toasts]\n\"modifySettings\" = \"Змінити налаштування\"\n\"getSettings\" = \"Отримати налаштування\"\n\"modifyUser\" = \"Змінити адміністратора\"\n\"originalUserPassIncorrect\" = \"Поточне ім'я користувача або пароль недійсні\"\n\"userPassMustBeNotEmpty\" = \"Нове ім'я користувача та пароль порожні\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ Спеціальна клавіатура закрита!\"\n\"noResult\" = \"❗ Немає результату!\"\n\"noQuery\" = \"❌ Запит не знайдено! Скористайтеся командою ще раз!\"\n\"wentWrong\" = \"❌ Щось пішло не так!\"\n\"noIpRecord\" = \"❗ Немає IP-запису!\"\n\"noInbounds\" = \"❗ Вхідних не знайдено!\"\n\"unlimited\" = \"♾ Необмежений (скинути)\"\n\"add\" = \"Додати\"\n\"month\" = \"Місяць\"\n\"months\" = \"Місяці\"\n\"day\" = \"День\"\n\"days\" = \"Дні\"\n\"hours\" = \"Годинник\"\n\"unknown\" = \"Невідомо\"\n\"inbounds\" = \"Вхідні\"\n\"clients\" = \"Клієнти\"\n\"offline\" = \"🔴 Офлайн\"\n\"online\" = \"🟢 Онлайн\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ Невідома команда.\"\n\"pleaseChoose\" = \"👇 Будь ласка, виберіть:\\r\\n\"\n\"help\" = \"🤖 Ласкаво просимо до цього бота! Він розроблений, щоб надавати певні дані з веб-панелі та дозволяє вносити зміни за потреби.\\r\\n\\r\\n\"\n\"start\" = \"👋 Привіт <i>{{ .Firstname }}</i>.\\r\\n\"\n\"welcome\" = \"🤖 Ласкаво просимо до <b>{{ .Hostname }}</b> бота керування.\\r\\n\"\n\"status\" = \"✅ Бот в порядку!\"\n\"usage\" = \"❗ Введіть текст для пошуку!\"\n\"getID\" = \"🆔 Ваш ідентифікатор: <code>{{ .ID }}</code>\"\n\"helpAdminCommands\" = \"Для пошуку електронної пошти клієнта:\\r\\n<code>/usage [Електронна пошта]</code>\\r\\n\\r\\nДля пошуку вхідних (зі статистикою клієнта):\\r\\n<code>/inbound [Примітка]</code>\\r\\n\\r\\nID чату Telegram:\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"Для пошуку статистики використовуйте наступну команду:\\r\\n<code>/usage [Електронна пошта]</code>\\r\\n\\r\\nID чату Telegram:\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 Навантаження ЦП  {{ .Percent }}% перевищує порогове значення {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ Помилка під час вибору користувача!\"\n\"userSaved\" = \"✅ Користувача Telegram збережено.\"\n\"loginSuccess\" = \"✅ Успішно ввійшли в панель\\r\\n\"\n\"loginFailed\" = \"❗️ Помилка входу в панель.\\r\\n\"\n\"report\" = \"🕰 Заплановані звіти: {{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ Дата й час: {{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 Хост: {{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 3X-UI Версія: {{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 Xray Версія: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 IP-адреси:\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ Час роботи: {{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 Завантаження системи: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 RAM: {{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 TCP: {{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 UDP: {{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 Трафік: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ Статус: {{ .State }}\\r\\n\"\n\"username\" = \"👤 Ім'я користувача: {{ .Username }}\\r\\n\"\n\"password\" = \"👤 Пароль: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ Час: {{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 Inbound: {{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 Порт: {{ .Port }}\\r\\n\"\n\"expire\" = \"📅 Дата закінчення: {{ .Time }}\\r\\n\"\n\"expireIn\" = \"📅 Термін дії: {{ .Time }}\\r\\n\"\n\"active\" = \"💡 Активний: {{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 Увімкнено: {{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 Стан підключення: {{ .Status }}\\r\\n\"\n\"email\" = \"📧 Електронна пошта: {{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 Upload: ↑{{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 Download: ↓{{ .Download }}\\r\\n\"\n\"total\" = \"📊 Всього: ↑↓{{ .UpDown }} / {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 Користувач Telegram: {{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 Вичерпано {{ .Type }}:\\r\\n\"\n\"exhaustedCount\" = \"🚨 Вичерпано кількість {{ .Type }} count:\\r\\n\"\n\"onlinesCount\" = \"🌐 Онлайн-клієнти: {{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 Вимкнено: {{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 Скоро вичерпається: {{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 Час резервного копіювання: {{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 Оновлено: {{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ Так\"\n\"no\" = \"❌ Ні\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ Закрити клавіатуру\"\n\"cancel\" = \"❌ Скасувати\"\n\"cancelReset\" = \"❌ Скасувати скидання\"\n\"cancelIpLimit\" = \"❌ Скасувати обмеження IP\"\n\"confirmResetTraffic\" = \"✅ Підтвердити скидання трафіку?\"\n\"confirmClearIps\" = \"✅ Підтвердити очищення IP-адрес?\"\n\"confirmRemoveTGUser\" = \"✅ Підтвердити видалення користувача Telegram?\"\n\"confirmToggle\" = \"✅ Підтвердити ввімкнути/вимкнути користувача?\"\n\"dbBackup\" = \"Отримати резервну копію БД\"\n\"serverUsage\" = \"Використання сервера\"\n\"getInbounds\" = \"Отримати вхідні\"\n\"depleteSoon\" = \"Скоро вичерпати\"\n\"clientUsage\" = \"Отримати використання\"\n\"onlines\" = \"Онлайн-клієнти\"\n\"commands\" = \"Команди\"\n\"refresh\" = \"🔄 Оновити\"\n\"clearIPs\" = \"❌ Очистити IP-адреси\"\n\"removeTGUser\" = \"❌ Видалити користувача Telegram\"\n\"selectTGUser\" = \"👤 Виберіть користувача Telegram\"\n\"selectOneTGUser\" = \"👤 Виберіть користувача Telegram:\"\n\"resetTraffic\" = \"📈 Скинути трафік\"\n\"resetExpire\" = \"📅 Змінити термін дії\"\n\"ipLog\" = \"🔢 IP журнал\"\n\"ipLimit\" = \"🔢 IP Ліміт\"\n\"setTGUser\" = \"👤 Встановити користувача Telegram\"\n\"toggle\" = \"🔘 Увімкнути / Вимкнути\"\n\"custom\" = \"🔢 Custom\"\n\"confirmNumber\" = \"✅ Підтвердити: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ Підтвердити додавання: {{ .Num }}\"\n\"limitTraffic\" = \"🚧 Ліміт трафіку\"\n\"getBanLogs\" = \"Отримати журнали заборон\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ Операція успішна!\"\n\"errorOperation\" = \"❗ Помилка в роботі.\"\n\"getInboundsFailed\" = \"❌ Не вдалося отримати вхідні повідомлення.\"\n\"canceled\" = \"❌ {{ .Email }}: Операцію скасовано.\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }}: Клієнт успішно оновлено.\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }}: IP-адреси успішно оновлено.\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }}: Користувач Telegram клієнта успішно оновлено.\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }}: Трафік скинуто успішно.\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }}: Ліміт трафіку успішно збережено.\"\n\"expireResetSuccess\" = \"✅ {{ .Email }}: Успішно скинуто дні закінчення терміну дії.\"\n\"resetIpSuccess\" = \"✅ {{ .Email }}: IP обмеження {{ .Count }} успішно збережено.\"\n\"clearIpSuccess\" = \"✅ {{ .Email }}: IP успішно очищено.\"\n\"getIpLog\" = \"✅ {{ .Email }}: Отримати IP-журнал.\"\n\"getUserInfo\" = \"✅ {{ .Email }}: Отримати інформацію про користувача Telegram.\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }}: Користувача Telegram видалено успішно.\"\n\"enableSuccess\" = \"✅ {{ .Email }}: Увімкнути успішно.\"\n\"disableSuccess\" = \"✅ {{ .Email }}: Успішно вимкнено.\"\n\"askToAddUserId\" = \"Вашу конфігурацію не знайдено!\\r\\nБудь ласка, попросіть свого адміністратора використовувати ваш ідентифікатор Telegram у вашій конфігурації.\\r\\n\\r\\nВаш ідентифікатор користувача: <code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/translation/translate.vi_VN.toml",
    "content": "\"username\" = \"Tên người dùng\"\r\n\"password\" = \"Mật khẩu\"\r\n\"login\" = \"Đăng nhập\"\r\n\"confirm\" = \"Xác nhận\"\r\n\"cancel\" = \"Hủy bỏ\"\r\n\"close\" = \"Đóng\"\r\n\"copy\" = \"Sao chép\"\r\n\"copied\" = \"Đã sao chép\"\r\n\"download\" = \"Tải xuống\"\r\n\"remark\" = \"Ghi chú\"\r\n\"enable\" = \"Kích hoạt\"\r\n\"protocol\" = \"Giao thức\"\r\n\"search\" = \"Tìm kiếm\"\r\n\"filter\" = \"Bộ lọc\"\r\n\"loading\" = \"Đang tải\"\r\n\"second\" = \"Giây\"\r\n\"minute\" = \"Phút\"\r\n\"hour\" = \"Giờ\"\r\n\"day\" = \"Ngày\"\r\n\"check\" = \"Kiểm tra\"\r\n\"indefinite\" = \"Không xác định\"\r\n\"unlimited\" = \"Không giới hạn\"\r\n\"none\" = \"None\"\r\n\"qrCode\" = \"Mã QR\"\r\n\"info\" = \"Thông tin thêm\"\r\n\"edit\" = \"Chỉnh sửa\"\r\n\"delete\" = \"Xóa\"\r\n\"reset\" = \"Đặt lại\"\r\n\"copySuccess\" = \"Đã sao chép thành công\"\r\n\"sure\" = \"Chắc chắn\"\r\n\"encryption\" = \"Mã hóa\"\r\n\"transmission\" = \"Truyền tải\"\r\n\"host\" = \"Máy chủ\"\r\n\"path\" = \"Đường dẫn\"\r\n\"camouflage\" = \"Ngụy trang\"\r\n\"status\" = \"Trạng thái\"\r\n\"enabled\" = \"Đã kích hoạt\"\r\n\"disabled\" = \"Đã tắt\"\r\n\"depleted\" = \"Depleted\"\r\n\"depletingSoon\" = \"Depleting...\"\r\n\"offline\" = \"Ngoại tuyến\"\r\n\"online\" = \"Trực tuyến\"\r\n\"domainName\" = \"Tên miền\"\r\n\"monitor\" = \"Listening IP\"\r\n\"certificate\" = \"Chứng chỉ số\"\r\n\"fail\" = \"Thất bại\"\r\n\"success\" = \"Thành công\"\r\n\"getVersion\" = \"Lấy phiên bản\"\r\n\"install\" = \"Cài đặt\"\r\n\"clients\" = \"Các khách hàng\"\r\n\"usage\" = \"Sử dụng\"\r\n\"secretToken\" = \"Mã bí mật\"\r\n\"remained\" = \"Còn lại\"\r\n\"security\" = \"Bảo vệ\"\r\n\"secAlertTitle\" = \"Cảnh báo an ninh-Tiếng Việt by Ohoang7\"\r\n\"secAlertSsl\" = \"Kết nối này không an toàn; Vui lòng không nhập thông tin nhạy cảm cho đến khi TLS được kích hoạt để bảo vệ dữ liệu của Bạn\"\r\n\"secAlertConf\" = \"Một số cài đặt có thể dễ bị tấn công. Đề xuất tăng cường các giao thức bảo mật để ngăn chặn các vi phạm tiềm ẩn.\"\r\n\"secAlertSSL\" = \"Bảng điều khiển thiếu kết nối an toàn. Vui lòng cài đặt chứng chỉ TLS để bảo vệ dữ liệu.\"\r\n\"secAlertPanelPort\" = \"Cổng mặc định của bảng điều khiển có thể dễ bị tấn công. Vui lòng cấu hình một cổng ngẫu nhiên hoặc cụ thể.\"\r\n\"secAlertPanelURI\" = \"Đường dẫn URI mặc định của bảng điều khiển không an toàn. Vui lòng cấu hình một đường dẫn URI phức tạp.\"\r\n\"secAlertSubURI\" = \"Đường dẫn URI mặc định của đăng ký không an toàn. Vui lòng cấu hình một đường dẫn URI phức tạp.\"\r\n\"secAlertSubJsonURI\" = \"Đường dẫn URI JSON mặc định của đăng ký không an toàn. Vui lòng cấu hình một đường dẫn URI phức tạp.\"\r\n\r\n[menu]\r\n\"dashboard\" = \"Trạng thái hệ thống\"\r\n\"inbounds\" = \"Đầu vào khách hàng\"\r\n\"settings\" = \"Cài đặt bảng điều khiển\"\r\n\"logout\" = \"Đăng xuất\"\r\n\"xray\" = \"Cài đặt Xray\"\r\n\"link\" = \"Quản lý\"\r\n\r\n[pages.login]\r\n\"hello\" = \"Xin chào\"\r\n\"title\" = \"Chào mừng\"\r\n\"loginAgain\" = \"Thời hạn đăng nhập đã hết. Vui lòng đăng nhập lại.\"\r\n\r\n[pages.login.toasts]\r\n\"invalidFormData\" = \"Dạng dữ liệu nhập không hợp lệ.\"\r\n\"emptyUsername\" = \"Vui lòng nhập tên người dùng.\"\r\n\"emptyPassword\" = \"Vui lòng nhập mật khẩu.\"\r\n\"wrongUsernameOrPassword\" = \"Tên người dùng hoặc mật khẩu không đúng.\"\r\n\"successLogin\" = \"Đăng nhập thành công.\"\r\n\r\n[pages.index]\r\n\"title\" = \"Trạng thái hệ thống\"\r\n\"memory\" = \"Ram\"\r\n\"hard\" = \"Dung lượng\"\r\n\"xrayStatus\" = \"Xray\"\r\n\"stopXray\" = \"Dừng lại\"\r\n\"restartXray\" = \"Khởi động lại\"\r\n\"xraySwitch\" = \"Phiên bản\"\r\n\"xraySwitchClick\" = \"Chọn phiên bản mà bạn muốn chuyển đổi sang.\"\r\n\"xraySwitchClickDesk\" = \"Hãy lựa chọn thận trọng, vì các phiên bản cũ có thể không tương thích với các cấu hình hiện tại.\"\r\n\"operationHours\" = \"Thời gian hoạt động\"\r\n\"systemLoad\" = \"Tải hệ thống\"\r\n\"systemLoadDesc\" = \"trung bình tải hệ thống trong 1, 5 và 15 phút qua\"\r\n\"connectionTcpCountDesc\" = \"Tổng số kết nối TCP trên tất cả các thẻ mạng.\"\r\n\"connectionUdpCountDesc\" = \"Tổng số kết nối UDP trên tất cả các thẻ mạng.\"\r\n\"connectionCount\" = \"Số lượng kết nối\"\r\n\"upSpeed\" = \"Tổng tốc độ tải lên cho tất cả các thẻ mạng.\"\r\n\"downSpeed\" = \"Tổng tốc độ tải xuống cho tất cả các thẻ mạng.\"\r\n\"totalSent\" = \"Tổng lưu lượng tải lên của tất cả các thẻ mạng kể từ khi hệ thống khởi động.\"\r\n\"totalReceive\" = \"Tổng lưu lượng tải xuống trên tất cả các thẻ mạng kể từ khi hệ thống khởi động.\"\r\n\"xraySwitchVersionDialog\" = \"Chuyển đổi Phiên bản Xray\"\r\n\"xraySwitchVersionDialogDesc\" = \"Bạn có chắc chắn muốn chuyển đổi phiên bản Xray sang\"\r\n\"dontRefresh\" = \"Đang tiến hành cài đặt, vui lòng không làm mới trang này.\"\r\n\"logs\" = \"Nhật ký\"\r\n\"config\" = \"Cấu hình\"\r\n\"backup\" = \"Sao lưu & Khôi phục\"\r\n\"backupTitle\" = \"Sao lưu & Khôi phục Cơ sở dữ liệu\"\r\n\"backupDescription\" = \"Hãy nhớ sao lưu trước khi nhập cơ sở dữ liệu mới.\"\r\n\"exportDatabase\" = \"Tải về Cơ sở dữ liệu\"\r\n\"importDatabase\" = \"Tải lên Cơ sở dữ liệu\"\r\n\r\n[pages.inbounds]\r\n\"title\" = \"Điểm vào (Inbounds)\"\r\n\"totalDownUp\" = \"Tổng tải lên/tải xuống\"\r\n\"totalUsage\" = \"Tổng sử dụng\"\r\n\"inboundCount\" = \"Số lượng điểm vào\"\r\n\"operate\" = \"Thao tác\"\r\n\"enable\" = \"Kích hoạt\"\r\n\"remark\" = \"Chú thích\"\r\n\"protocol\" = \"Giao thức\"\r\n\"port\" = \"Cổng\"\r\n\"traffic\" = \"Lưu lượng\"\r\n\"details\" = \"Chi tiết\"\r\n\"transportConfig\" = \"Giao vận\"\r\n\"expireDate\" = \"Ngày hết hạn\"\r\n\"resetTraffic\" = \"Đặt lại lưu lượng\"\r\n\"addInbound\" = \"Thêm điểm vào\"\r\n\"generalActions\" = \"Hành động chung\"\r\n\"create\" = \"Tạo mới\"\r\n\"update\" = \"Cập nhật\"\r\n\"modifyInbound\" = \"Chỉnh sửa điểm vào (Inbound)\"\r\n\"deleteInbound\" = \"Xóa điểm vào (Inbound)\"\r\n\"deleteInboundContent\" = \"Xác nhận xóa điểm vào? (Inbound)\"\r\n\"deleteClient\" = \"Xóa người dùng\"\r\n\"deleteClientContent\" = \"Bạn có chắc chắn muốn xóa người dùng không?\"\r\n\"resetTrafficContent\" = \"Xác nhận đặt lại lưu lượng?\"\r\n\"copyLink\" = \"Sao chép liên kết\"\r\n\"address\" = \"Địa chỉ\"\r\n\"network\" = \"Mạng\"\r\n\"destinationPort\" = \"Cổng đích\"\r\n\"targetAddress\" = \"Địa chỉ mục tiêu\"\r\n\"monitorDesc\" = \"Mặc định để trống\"\r\n\"meansNoLimit\" = \" = Không giới hạn (đơn vị: GB)\"\r\n\"totalFlow\" = \"Tổng lưu lượng\"\r\n\"leaveBlankToNeverExpire\" = \"Để trống để không bao giờ hết hạn\"\r\n\"noRecommendKeepDefault\" = \"Không yêu cầu đặc biệt để giữ nguyên cài đặt mặc định\"\r\n\"certificatePath\" = \"Đường dẫn tập\"\r\n\"certificateContent\" = \"Nội dung tập\"\r\n\"publicKey\" = \"Khóa công khai\"\r\n\"privatekey\" = \"Khóa cá nhân\"\r\n\"clickOnQRcode\" = \"Nhấn vào Mã QR để sao chép\"\r\n\"client\" = \"Người dùng\"\r\n\"export\" = \"Xuất liên kết\"\r\n\"clone\" = \"Sao chép\"\r\n\"cloneInbound\" = \"Sao chép điểm vào (Inbound)\"\r\n\"cloneInboundContent\" = \"Tất cả cài đặt của điểm vào này, trừ Cổng, IP nghe và máy khách, sẽ được áp dụng cho bản sao.\"\r\n\"cloneInboundOk\" = \"Sao chép\"\r\n\"resetAllTraffic\" = \"Đặt lại lưu lượng cho tất cả điểm vào\"\r\n\"resetAllTrafficTitle\" = \"Đặt lại lưu lượng cho tất cả điểm vào\"\r\n\"resetAllTrafficContent\" = \"Bạn có chắc chắn muốn đặt lại lưu lượng cho tất cả điểm vào không?\"\r\n\"resetInboundClientTraffics\" = \"Đặt lại lưu lượng toàn bộ người dùng của điểm vào\"\r\n\"resetInboundClientTrafficTitle\" = \"Đặt lại lưu lượng cho toàn bộ người dùng của điểm vào\"\r\n\"resetInboundClientTrafficContent\" = \"Bạn có chắc chắn muốn đặt lại tất cả lưu lượng cho các người dùng của điểm vào này không?\"\r\n\"resetAllClientTraffics\" = \"Đặt lại lưu lượng cho toàn bộ người dùng\"\r\n\"resetAllClientTrafficTitle\" = \"Đặt lại lưu lượng cho toàn bộ người dùng\"\r\n\"resetAllClientTrafficContent\" = \"Bạn có chắc chắn muốn đặt lại tất cả lưu lượng cho toàn bộ người dùng không?\"\r\n\"delDepletedClients\" = \"Xóa các người dùng đã cạn kiệt\"\r\n\"delDepletedClientsTitle\" = \"Xóa các người dùng đã cạn kiệt\"\r\n\"delDepletedClientsContent\" = \"Bạn có chắc chắn muốn xóa toàn bộ người dùng đã cạn kiệt không?\"\r\n\"email\" = \"Email\"\r\n\"emailDesc\" = \"Vui lòng cung cấp một địa chỉ email duy nhất.\"\r\n\"IPLimit\" = \"Giới hạn IP\"\r\n\"IPLimitDesc\" = \"Vô hiệu hóa điểm vào nếu số lượng vượt quá giá trị đã nhập (nhập 0 để vô hiệu hóa giới hạn IP).\"\r\n\"IPLimitlog\" = \"Lịch sử IP\"\r\n\"IPLimitlogDesc\" = \"Lịch sử đăng nhập IP (trước khi kích hoạt điểm vào sau khi bị vô hiệu hóa bởi giới hạn IP, bạn nên xóa lịch sử).\"\r\n\"IPLimitlogclear\" = \"Xóa Lịch sử\"\r\n\"setDefaultCert\" = \"Đặt chứng chỉ từ bảng điều khiển\"\r\n\"xtlsDesc\" = \"Xray core cần phiên bản 1.7.5\"\r\n\"realityDesc\" = \"Xray core cần phiên bản 1.8.0 hoặc cao hơn.\"\r\n\"telegramDesc\" = \"Vui lòng cung cấp ID Trò chuyện Telegram. (sử dụng lệnh '/id' trong bot) hoặc (@userinfobot)\"\r\n\"subscriptionDesc\" = \"Bạn có thể tìm liên kết gói đăng ký của mình trong Chi tiết, cũng như bạn có thể sử dụng cùng tên cho nhiều cấu hình khác nhau\"\r\n\"info\" = \"Thông tin\"\r\n\"same\" = \"Giống nhau\"\r\n\"inboundData\" = \"Dữ liệu gửi đến\"\r\n\"exportInbound\" = \"Xuất nhập khẩu\"\r\n\"import\" = \"Nhập\"\r\n\"importInbound\" = \"Nhập inbound\"\r\n\r\n[pages.client]\r\n\"add\" = \"Thêm người dùng\"\r\n\"edit\" = \"Chỉnh sửa người dùng\"\r\n\"submitAdd\" = \"Thêm\"\r\n\"submitEdit\" = \"Lưu thay đổi\"\r\n\"clientCount\" = \"Số lượng người dùng\"\r\n\"bulk\" = \"Thêm hàng loạt\"\r\n\"method\" = \"Phương pháp\"\r\n\"first\" = \"Đầu tiên\"\r\n\"last\" = \"Cuối cùng\"\r\n\"prefix\" = \"Tiền tố\"\r\n\"postfix\" = \"Hậu tố\"\r\n\"delayedStart\" = \"Bắt đầu ở Lần Đầu\"\r\n\"expireDays\" = \"Khoảng thời gian\"\r\n\"days\" = \"ngày\"\r\n\"renew\" = \"Tự động gia hạn\"\r\n\"renewDesc\" = \"Tự động gia hạn sau khi hết hạn. (0 = tắt)(đơn vị: ngày)\"\r\n\r\n[pages.inbounds.toasts]\r\n\"obtain\" = \"Nhận\"\r\n\r\n[pages.inbounds.stream.general]\r\n\"request\" = \"Lời yêu cầu\"\r\n\"response\" = \"Phản ứng\"\r\n\"name\" = \"Tên\"\r\n\"value\" = \"Giá trị\"\r\n\r\n[pages.inbounds.stream.tcp]\r\n\"version\" = \"Phiên bản\"\r\n\"method\" = \"Phương pháp\"\r\n\"path\" = \"Đường dẫn\"\r\n\"status\" = \"Trạng thái\"\r\n\"statusDescription\" = \"Tình trạng Mô tả\"\r\n\"requestHeader\" = \"Header yêu cầu\"\r\n\"responseHeader\" = \"Header phản hồi\"\r\n\r\n[pages.inbounds.stream.quic]\r\n\"encryption\" = \"Mã hóa\"\r\n\r\n[pages.settings]\r\n\"title\" = \"Cài đặt\"\r\n\"save\" = \"Lưu\"\r\n\"infoDesc\" = \"Mọi thay đổi được thực hiện ở đây cần phải được lưu. Vui lòng khởi động lại bảng điều khiển để áp dụng các thay đổi.\"\r\n\"restartPanel\" = \"Khởi động lại bảng điều khiển\"\r\n\"restartPanelDesc\" = \"Bạn có chắc chắn muốn khởi động lại bảng điều khiển? Nhấn OK để khởi động lại sau 3 giây. Nếu bạn không thể truy cập bảng điều khiển sau khi khởi động lại, vui lòng xem thông tin nhật ký của bảng điều khiển trên máy chủ.\"\r\n\"actions\" = \"Hành động\"\r\n\"resetDefaultConfig\" = \"Đặt lại cấu hình mặc định\"\r\n\"panelSettings\" = \"Bảng điều khiển\"\r\n\"securitySettings\" = \"Bảo mật\"\r\n\"TGBotSettings\" = \"Bot Telegram\"\r\n\"panelListeningIP\" = \"IP Nghe của bảng điều khiển\"\r\n\"panelListeningIPDesc\" = \"Mặc định để trống để nghe tất cả các IP.\"\r\n\"panelListeningDomain\" = \"Tên miền của nghe bảng điều khiển\"\r\n\"panelListeningDomainDesc\" = \"Mặc định để trống để nghe tất cả các tên miền và IP\"\r\n\"panelPort\" = \"Cổng bảng điều khiển\"\r\n\"panelPortDesc\" = \"Cổng được sử dụng để kết nối với bảng điều khiển này\"\r\n\"publicKeyPath\" = \"Đường dẫn file chứng chỉ bảng điều khiển\"\r\n\"publicKeyPathDesc\" = \"Điền vào đường dẫn đầy đủ (bắt đầu từ '/')\"\r\n\"privateKeyPath\" = \"Đường dẫn file khóa của chứng chỉ bảng điều khiển\"\r\n\"privateKeyPathDesc\" = \"Điền vào đường dẫn đầy đủ (bắt đầu từ '/')\"\r\n\"panelUrlPath\" = \"Đường dẫn gốc URL bảng điều khiển\"\r\n\"panelUrlPathDesc\" = \"Phải bắt đầu và kết thúc bằng '/'\"\r\n\"pageSize\" = \"Kích thước phân trang\"\r\n\"pageSizeDesc\" = \"Xác định kích thước trang cho bảng gửi đến. Đặt 0 để tắt\"\r\n\"remarkModel\" = \"Ghi chú mô hình và ký tự phân tách\"\r\n\"datepicker\" = \"Kiểu lịch\"\r\n\"datepickerPlaceholder\" = \"Chọn ngày\"\r\n\"datepickerDescription\" = \"Tác vụ chạy theo lịch trình sẽ chạy theo kiểu lịch này.\"\r\n\"sampleRemark\" = \"Nhận xét mẫu\"\r\n\"oldUsername\" = \"Tên người dùng hiện tại\"\r\n\"currentPassword\" = \"Mật khẩu hiện tại\"\r\n\"newUsername\" = \"Tên người dùng mới\"\r\n\"newPassword\" = \"Mật khẩu mới\"\r\n\"telegramBotEnable\" = \"Bật Bot Telegram\"\r\n\"telegramBotEnableDesc\" = \"Kết nối với các tính năng của bảng điều khiển này thông qua bot Telegram\"\r\n\"telegramToken\" = \"Token Telegram\"\r\n\"telegramTokenDesc\" = \"Bạn phải nhận token từ quản lý bot Telegram @botfather\"\r\n\"telegramProxy\" = \"Socks5 Proxy\"\r\n\"telegramProxyDesc\" = \"Nếu bạn cần socks5 proxy để kết nối với Telegram. Điều chỉnh cài đặt của nó theo hướng dẫn.\"\r\n\"telegramChatId\" = \"Chat ID Telegram của quản trị viên\"\r\n\"telegramChatIdDesc\" = \"Nhiều Chat ID phân tách bằng dấu phẩy. Sử dụng @userinfobot hoặc sử dụng lệnh '/id' trong bot để lấy Chat ID của bạn.\"\r\n\"telegramNotifyTime\" = \"Thời gian thông báo của bot Telegram\"\r\n\"telegramNotifyTimeDesc\" = \"Sử dụng định dạng thời gian Crontab.\"\r\n\"tgNotifyBackup\" = \"Sao lưu Cơ sở dữ liệu\"\r\n\"tgNotifyBackupDesc\" = \"Bao gồm tệp sao lưu cơ sở dữ liệu với thông báo báo cáo.\"\r\n\"tgNotifyLogin\" = \"Thông báo Đăng nhập\"\r\n\"tgNotifyLoginDesc\" = \"Hiển thị tên người dùng, địa chỉ IP và thời gian khi ai đó cố gắng đăng nhập vào bảng điều khiển của bạn.\"\r\n\"sessionMaxAge\" = \"Thời gian tối đa của phiên\"\r\n\"sessionMaxAgeDesc\" = \"Thời gian của phiên đăng nhập (đơn vị: phút)\"\r\n\"expireTimeDiff\" = \"Ngưỡng hết hạn cho thông báo\"\r\n\"expireTimeDiffDesc\" = \"Nhận thông báo về việc hết hạn tài khoản trước ngưỡng này (đơn vị: ngày)\"\r\n\"trafficDiff\" = \"Ngưỡng lưu lượng cho thông báo\"\r\n\"trafficDiffDesc\" = \"Nhận thông báo về việc cạn kiệt lưu lượng trước khi đạt đến ngưỡng này (đơn vị: GB)\"\r\n\"tgNotifyCpu\" = \"Ngưỡng cảnh báo tỷ lệ CPU\"\r\n\"tgNotifyCpuDesc\" = \"Nhận thông báo nếu tỷ lệ sử dụng CPU vượt quá ngưỡng này (đơn vị: %)\"\r\n\"timeZone\" = \"Múi giờ\"\r\n\"timeZoneDesc\" = \"Các tác vụ được lên lịch chạy theo thời gian trong múi giờ này.\"\r\n\"subSettings\" = \"Gói đăng ký\"\r\n\"subEnable\" = \"Bật dịch vụ\"\r\n\"subEnableDesc\" = \"Tính năng gói đăng ký với cấu hình riêng\"\r\n\"subListen\" = \"Listening IP\"\r\n\"subListenDesc\" = \"Mặc định để trống để nghe tất cả các IP\"\r\n\"subPort\" = \"Cổng gói đăng ký\"\r\n\"subPortDesc\" = \"Số cổng dịch vụ đăng ký phải chưa được sử dụng trên máy chủ\"\r\n\"subCertPath\" = \"Đường dẫn file chứng chỉ gói đăng ký\"\r\n\"subCertPathDesc\" = \"Điền vào đường dẫn đầy đủ (bắt đầu với '/')\"\r\n\"subKeyPath\" = \"Đường dẫn file khóa của chứng chỉ gói đăng ký\"\r\n\"subKeyPathDesc\" = \"Điền vào đường dẫn đầy đủ (bắt đầu với '/')\"\r\n\"subPath\" = \"Đường dẫn gốc URL gói đăng ký\"\r\n\"subPathDesc\" = \"Phải bắt đầu và kết thúc bằng '/'\"\r\n\"subDomain\" = \"Tên miền con\"\r\n\"subDomainDesc\" = \"Mặc định để trống để nghe tất cả các tên miền và IP\"\r\n\"subUpdates\" = \"Khoảng thời gian cập nhật gói đăng ký\"\r\n\"subUpdatesDesc\" = \"Số giờ giữa các cập nhật trong ứng dụng khách\"\r\n\"subEncrypt\" = \"Mã hóa cấu hình\"\r\n\"subEncryptDesc\" = \"Mã hóa các cấu hình được trả về trong gói đăng ký\"\r\n\"subShowInfo\" = \"Hiển thị thông tin sử dụng\"\r\n\"subShowInfoDesc\" = \"Hiển thị lưu lượng truy cập còn lại và ngày sau tên cấu hình\"\r\n\"subURI\" = \"URI proxy trung gian\"\r\n\"subURIDesc\" = \"Thay đổi URI cơ sở của URL gói đăng ký để sử dụng cho proxy trung gian\"\r\n\"fragment\" = \"Sự phân mảnh\"\r\n\"fragmentDesc\" = \"Kích hoạt phân mảnh cho gói TLS hello\"\r\n\"fragmentSett\" = \"Cài đặt phân mảnh\"\r\n\"mux\" = \"Mux\"\r\n\"muxDesc\" = \"Truyền nhiều luồng dữ liệu độc lập trong luồng dữ liệu đã thiết lập.\"\r\n\"muxSett\" = \"Mux Cài đặt\"\r\n\"direct\" = \"Kết nối trực tiếp\"\r\n\"directDesc\" = \"Trực tiếp thiết lập kết nối với tên miền hoặc dải IP của một quốc gia cụ thể.\"\r\n\"directSett\" = \"Tùy chọn kết nối trực tiếp\"\r\n\r\n[pages.xray]\r\n\"title\" = \"Cài đặt Xray\"\r\n\"save\" = \"Lưu cài đặt\"\r\n\"restart\" = \"Khởi động lại Xray\"\r\n\"basicTemplate\" = \"Mẫu Cơ bản\"\r\n\"advancedTemplate\" = \"Mẫu Nâng cao\"\r\n\"generalConfigs\" = \"Cấu hình Chung\"\r\n\"generalConfigsDesc\" = \"Những tùy chọn này sẽ cung cấp điều chỉnh tổng quát.\"\r\n\"logConfigs\" = \"Nhật ký\"\r\n\"logConfigsDesc\" = \"Nhật ký có thể ảnh hưởng đến hiệu suất máy chủ của bạn. Bạn chỉ nên kích hoạt nó một cách khôn ngoan trong trường hợp bạn cần\"\r\n\"blockConfigs\" = \"Cấu hình Chặn\"\r\n\"blockConfigsDesc\" = \"Những tùy chọn này sẽ ngăn người dùng kết nối đến các giao thức và trang web cụ thể.\"\r\n\"blockCountryConfigs\" = \"Cấu hình Chặn Quốc gia\"\r\n\"blockCountryConfigsDesc\" = \"Những tùy chọn này sẽ ngăn người dùng kết nối đến các tên miền quốc gia cụ thể.\"\r\n\"directCountryConfigs\" = \"Cấu hình Kết nối Trực tiếp Quốc gia\"\r\n\"directCountryConfigsDesc\" = \"Một kết nối trực tiếp đảm bảo rằng lưu lượng cụ thể không được định tuyến qua một máy chủ khác.\"\r\n\"ipv4Configs\" = \"Cấu hình IPv4\"\r\n\"ipv4ConfigsDesc\" = \"Những tùy chọn này sẽ chỉ định kết nối đến các tên miền mục tiêu qua IPv4.\"\r\n\"warpConfigs\" = \"Cấu hình WARP\"\r\n\"warpConfigsDesc\" = \"Cảnh báo: Trước khi sử dụng những tùy chọn này, hãy cài đặt WARP ở chế độ proxy socks5 trên máy chủ của bạn bằng cách làm theo các bước trên GitHub của bảng điều khiển. WARP sẽ định tuyến lưu lượng đến các trang web qua máy chủ Cloudflare.\"\r\n\"Template\" = \"Mẫu Cấu hình Xray\"\r\n\"TemplateDesc\" = \"Tạo tệp cấu hình Xray cuối cùng dựa trên mẫu này.\"\r\n\"FreedomStrategy\" = \"Cấu hình Chiến lược cho Giao thức Freedom\"\r\n\"FreedomStrategyDesc\" = \"Đặt chiến lược đầu ra của mạng trong Giao thức Freedom.\"\r\n\"RoutingStrategy\" = \"Cấu hình Chiến lược Định tuyến Tên miền\"\r\n\"RoutingStrategyDesc\" = \"Đặt chiến lược định tuyến tổng thể cho việc giải quyết DNS.\"\r\n\"Torrent\" = \"Cấu hình sử dụng BitTorrent\"\r\n\"TorrentDesc\" = \"Thay đổi mẫu cấu hình để tránh việc người dùng sử dụng BitTorrent.\"\r\n\"PrivateIp\" = \"Cấm kết nối đến dải IP Riêng tư\"\r\n\"PrivateIpDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến dải IP riêng tư.\"\r\n\"Ads\" = \"Chặn Quảng cáo\"\r\n\"AdsDesc\" = \"Thay đổi mẫu cấu hình để chặn quảng cáo.\"\r\n\"Family\" = \"Chặn phần mềm độc hại và nội dung người lớn\"\r\n\"FamilyDesc\" = \"Trình phân giải DNS của Cloudflare để chặn phần mềm độc hại và nội dung người lớn để bảo vệ gia đình.\"\r\n\"Security\" = \"Chặn các trang web chứa phần mềm độc hại, lừa đảo và khai thác tiền điện tử\"\r\n\"SecurityDesc\" = \"Thay đổi mẫu cấu hình để bảo vệ Bảo mật.\"\r\n\"Speedtest\" = \"Chặn Trang web Speedtest\"\r\n\"SpeedtestDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến các trang web Speedtest.\"\r\n\"IRIp\" = \"Vô hiệu hóa kết nối đến dải IP của Iran\"\r\n\"IRIpDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến dải IP của Iran.\"\r\n\"IRDomain\" = \"Vô hiệu hóa kết nối đến tên miền của Iran\"\r\n\"IRDomainDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến các tên miền của Iran.\"\r\n\"ChinaIp\" = \"Vô hiệu hóa kết nối đến dải IP của Trung Quốc\"\r\n\"ChinaIpDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến dải IP của Trung Quốc.\"\r\n\"ChinaDomain\" = \"Vô hiệu hóa kết nối đến tên miền của Trung Quốc\"\r\n\"ChinaDomainDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến các tên miền của Trung Quốc.\"\r\n\"RussiaIp\" = \"Vô hiệu hóa kết nối đến dải IP của Nga\"\r\n\"RussiaIpDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến dải IP của Nga.\"\r\n\"RussiaDomain\" = \"Vô hiệu hóa kết nối đến tên miền của Nga\"\r\n\"RussiaDomainDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến các tên miền của Nga.\"\r\n\"VNIp\" = \"Vô hiệu hóa kết nối đến dải IP của Việt Nam\"\r\n\"VNIpDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến dải IP của Việt Nam.\"\r\n\"VNDomain\" = \"Vô hiệu hóa kết nối đến tên miền của Việt Nam\"\r\n\"VNDomainDesc\" = \"Thay đổi mẫu cấu hình để tránh kết nối đến các tên miền của Việt Nam.\"\r\n\"DirectIRIp\" = \"Kết nối trực tiếp đến dải IP của Iran\"\r\n\"DirectIRIpDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến dải IP của Iran.\"\r\n\"DirectIRDomain\" = \"Kết nối trực tiếp đến tên miền của Iran\"\r\n\"DirectIRDomainDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến các tên miền của Iran.\"\r\n\"DirectChinaIp\" = \"Kết nối trực tiếp đến dải IP của Trung Quốc\"\r\n\"DirectChinaIpDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến dải IP của Trung Quốc.\"\r\n\"DirectChinaDomain\" = \"Kết nối trực tiếp đến tên miền của Trung Quốc\"\r\n\"DirectChinaDomainDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến các tên miền của Trung Quốc.\"\r\n\"DirectRussiaIp\" = \"Kết nối trực tiếp đến dải IP của Nga\"\r\n\"DirectRussiaIpDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến dải IP của Nga.\"\r\n\"DirectRussiaDomain\" = \"Kết nối trực tiếp đến tên miền của Nga\"\r\n\"DirectRussiaDomainDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến các tên miền của Nga.\"\r\n\"DirectVNIp\" = \"Kết nối trực tiếp đến dải IP của Việt Nam\"\r\n\"DirectVNIpDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến dải IP của Việt Nam\"\r\n\"DirectVNDomain\" = \"Kết nối trực tiếp đến tên miền của Việt Nam\"\r\n\"DirectVNDomainDesc\" = \"Thay đổi mẫu cấu hình cho kết nối trực tiếp đến các tên miền của Việt Nam.\"\r\n\"GoogleIPv4\" = \"Sử dụng IPv4 cho Google\"\r\n\"GoogleIPv4Desc\" = \"Thêm định tuyến cho Google để kết nối qua IPv4.\"\r\n\"NetflixIPv4\" = \"Sử dụng IPv4 cho Netflix\"\r\n\"NetflixIPv4Desc\" = \"Thêm định tuyến cho Netflix để kết nối qua IPv4.\"\r\n\"GoogleWARP\" = \"Google\"\r\n\"GoogleWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Google thông qua WARP.\"\r\n\"OpenAIWARP\" = \"OpenAI (ChatGPT)\"\r\n\"OpenAIWARPDesc\" = \"Định tuyến lưu lượng truy cập tới OpenAI (ChatGPT) thông qua WARP.\"\r\n\"NetflixWARP\" = \"Netflix\"\r\n\"NetflixWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Netflix thông qua WARP.\"\r\n\"MetaWARP\" = \"Meta\"\r\n\"MetaWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Meta (Instagram, Facebook, WhatsApp, Threads,...) thông qua WARP.\"\r\n\"AppleWARP\" = \"Apple\"\r\n\"AppleWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Apple thông qua WARP.\"\r\n\"RedditWARP\" = \"Reddit\"\r\n\"RedditWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Reddit thông qua WARP.\"\r\n\"SpotifyWARP\" = \"Spotify\"\r\n\"SpotifyWARPDesc\" = \"Định tuyến lưu lượng truy cập tới Spotify thông qua WARP.\"\r\n\"IRWARP\" = \"Định tuyến tên miền của Iran qua WARP.\"\r\n\"IRWARPDesc\" = \"Thêm định tuyến cho các tên miền của Iran qua WARP.\"\r\n\"Inbounds\" = \"Đầu vào\"\r\n\"InboundsDesc\" = \"Thay đổi mẫu cấu hình để chấp nhận các máy khách cụ thể.\"\r\n\"Outbounds\" = \"Đầu ra\"\r\n\"Balancers\" = \"Cân bằng\"\r\n\"OutboundsDesc\" = \"Thay đổi mẫu cấu hình để xác định các cách ra đi cho máy chủ này.\"\r\n\"Routings\" = \"Quy tắc định tuyến\"\r\n\"RoutingsDesc\" = \"Mức độ ưu tiên của mỗi quy tắc đều quan trọng!\"\r\n\"completeTemplate\" = \"All\"\r\n\"logLevel\" = \"Mức đăng nhập\"\r\n\"logLevelDesc\" = \"Cấp độ nhật ký cho nhật ký lỗi, cho biết thông tin cần được ghi lại.\"\r\n\"accessLog\" = \"Nhật ký truy cập\"\r\n\"accessLogDesc\" = \"Đường dẫn tệp cho nhật ký truy cập. Nhật ký truy cập bị vô hiệu hóa có giá trị đặc biệt 'không'\"\r\n\"errorLog\" = \"Nhật ký lỗi\"\r\n\"errorLogDesc\" = \"Đường dẫn tệp cho nhật ký lỗi. Nhật ký lỗi bị vô hiệu hóa có giá trị đặc biệt 'không'\"\r\n\r\n[pages.xray.rules]\r\n\"first\" = \"Đầu tiên\"\r\n\"last\" = \"Cuối cùng\"\r\n\"up\" = \"Lên\"\r\n\"down\" = \"Xuống\"\r\n\"source\" = \"Nguồn\"\r\n\"dest\" = \"Đích\"\r\n\"inbound\" = \"Vào\"\r\n\"outbound\" = \"Ra\"\r\n\"balancer\" = \"Cân bằng\"\r\n\"info\" = \"Thông tin\"\r\n\"add\" = \"Thêm quy tắc\"\r\n\"edit\" = \"Chỉnh sửa quy tắc\"\r\n\"useComma\" = \"Các mục được phân tách bằng dấu phẩy\"\r\n\r\n[pages.xray.outbound]\r\n\"addOutbound\" = \"Thêm thư đi\"\r\n\"addReverse\" = \"Thêm đảo ngược\"\r\n\"editOutbound\" = \"Chỉnh sửa gửi đi\"\r\n\"editReverse\" = \"Chỉnh sửa ngược lại\"\r\n\"tag\" = \"Thẻ\"\r\n\"tagDesc\" = \"thẻ duy nhất\"\r\n\"address\" = \"Địa chỉ\"\r\n\"reverse\" = \"Đảo ngược\"\r\n\"domain\" = \"Miền\"\r\n\"type\" = \"Loại\"\r\n\"bridge\" = \"Cầu\"\r\n\"portal\" = \"Cổng thông tin\"\r\n\"intercon\" = \"Kết nối\"\r\n\"settings\" = \"cài đặt\"\r\n\"accountInfo\" = \"Thông tin tài khoản\"\r\n\"outboundStatus\" = \"Trạng thái đầu ra\"\r\n\"sendThrough\" = \"Gửi qua\"\r\n\r\n[pages.xray.balancer]\r\n\"addBalancer\" = \"Thêm cân bằng\"\r\n\"editBalancer\" = \"Chỉnh sửa cân bằng\"\r\n\"balancerStrategy\" = \"Chiến lược\"\r\n\"balancerSelectors\" = \"Bộ chọn\"\r\n\"tag\" = \"Thẻ\"\r\n\"tagDesc\" = \"thẻ duy nhất\"\r\n\"balancerDesc\" = \"Không thể sử dụng balancerTag và outboundTag cùng một lúc. Nếu sử dụng cùng lúc thì chỉ outboundTag mới hoạt động.\"\r\n\r\n[pages.xray.wireguard]\r\n\"secretKey\" = \"Khoá bí mật\"\r\n\"publicKey\" = \"Khóa công khai\"\r\n\"allowedIPs\" = \"IP được phép\"\r\n\"endpoint\" = \"Điểm cuối\"\r\n\"psk\" = \"Khóa chia sẻ\"\r\n\"domainStrategy\" = \"Chiến lược tên miền\"\r\n\r\n[pages.xray.dns]\r\n\"enable\" = \"Kích hoạt DNS\"\r\n\"enableDesc\" = \"Kích hoạt máy chủ DNS tích hợp\"\r\n\"tag\" = \"Thẻ gửi đến DNS\"\r\n\"tagDesc\" = \"Thẻ này sẽ có sẵn dưới dạng thẻ Gửi đến trong quy tắc định tuyến.\"\r\n\"strategy\" = \"Chiến lược truy vấn\"\r\n\"strategyDesc\" = \"Chiến lược tổng thể để phân giải tên miền\"\r\n\"add\" = \"Thêm máy chủ\"\r\n\"edit\" = \"Chỉnh sửa máy chủ\"\r\n\"domains\" = \"Tên miền\"\r\n\r\n[pages.xray.fakedns]\r\n\"add\" = \"Thêm DNS giả\"\r\n\"edit\" = \"Chỉnh sửa DNS giả\"\r\n\"ipPool\" = \"Mạng con nhóm IP\"\r\n\"poolSize\" = \"Kích thước bể bơi\"\r\n\r\n[pages.settings.security]\r\n\"admin\" = \"Quản trị viên\"\r\n\"secret\" = \"Mã thông báo bí mật\"\r\n\"loginSecurity\" = \"Bảo mật đăng nhập\"\r\n\"loginSecurityDesc\" = \"Bật bước bảo mật đăng nhập bổ sung cho người dùng\"\r\n\"secretToken\" = \"Mã bí mật\"\r\n\"secretTokenDesc\" = \"Vui lòng sao chép và lưu trữ mã này một cách an toàn ở nơi an toàn. Mã này cần thiết để đăng nhập và không thể phục hồi từ công cụ lệnh x-ui.\"\r\n\r\n[pages.settings.toasts]\r\n\"modifySettings\" = \"Chỉnh sửa cài đặt \"\r\n\"getSettings\" = \"Lấy cài đặt \"\r\n\"modifyUser\" = \"Chỉnh sửa người dùng \"\r\n\"originalUserPassIncorrect\" = \"Tên người dùng hoặc mật khẩu gốc không đúng\"\r\n\"userPassMustBeNotEmpty\" = \"Tên người dùng mới và mật khẩu mới không thể để trống\"\r\n\r\n[tgbot]\r\n\"keyboardClosed\" = \"❌ Bàn phím tùy chỉnh đã đóng!\"\r\n\"noResult\" = \"❗ Không có kết quả!\"\r\n\"noQuery\" = \"❌ Không tìm thấy truy vấn! Vui lòng sử dụng lệnh lại!\"\r\n\"wentWrong\" = \"❌ Đã xảy ra lỗi!\"\r\n\"noIpRecord\" = \"❗ Không có bản ghi IP!\"\r\n\"noInbounds\" = \"❗ Không tìm thấy inbound!\"\r\n\"unlimited\" = \"♾ Không giới hạn\"\r\n\"add\" = \"Thêm\"\r\n\"month\" = \"Tháng\"\r\n\"months\" = \"Tháng\"\r\n\"day\" = \"Ngày\"\r\n\"days\" = \"Ngày\"\r\n\"hours\" = \"Giờ\"\r\n\"unknown\" = \"Không rõ\"\r\n\"inbounds\" = \"Vào\"\r\n\"clients\" = \"Các người dùng\"\r\n\"offline\" = \"🔴 Ngoại tuyến\"\r\n\"online\" = \"🟢 Trực tuyến\"\r\n\r\n[tgbot.commands]\r\n\"unknown\" = \"❗ Lệnh không rõ\"\r\n\"pleaseChoose\" = \"👇 Vui lòng chọn:\\r\\n\"\r\n\"help\" = \"🤖 Chào mừng bạn đến với bot này! Bot được thiết kế để cung cấp cho bạn dữ liệu cụ thể từ máy chủ và cho phép bạn thực hiện các thay đổi cần thiết.\\r\\n\\r\\n\"\r\n\"start\" = \"👋 Xin chào <i>{{ .Firstname }}</i>.\\r\\n\"\r\n\"welcome\" = \"🤖 Chào mừng đến với bot quản lý của <b>{{ .Hostname }}</b>.\\r\\n\"\r\n\"status\" = \"✅ Bot hoạt động bình thường!\"\r\n\"usage\" = \"❗ Vui lòng cung cấp văn bản để tìm kiếm!\"\r\n\"getID\" = \"🆔 ID của bạn: <code>{{ .ID }}</code>\"\r\n\"helpAdminCommands\" = \"Để tìm kiếm email của khách hàng:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nĐể tìm kiếm các nhập (với số liệu thống kê của khách hàng):\\r\\n<code>/inbound [Ghi chú]</code>\\r\\n\\r\\nID Trò chuyện Telegram:\\r\\n<code>/id</code>\"\r\n\"helpClientCommands\" = \"Để tìm kiếm thống kê, sử dụng lệnh sau:\\r\\n<code>/usage [Email]</code>\\r\\n\\r\\nID Trò chuyện Telegram:\\r\\n<code>/id</code>\"\r\n\r\n[tgbot.messages]\r\n\"cpuThreshold\" = \"🔴 Sử dụng CPU {{ .Percent }}% vượt quá ngưỡng {{ .Threshold }}%\"\r\n\"selectUserFailed\" = \"❌ Lỗi khi chọn người dùng!\"\r\n\"userSaved\" = \"✅ Người dùng Telegram đã được lưu.\"\r\n\"loginSuccess\" = \"✅ Đăng nhập thành công vào bảng điều khiển.\\r\\n\"\r\n\"loginFailed\" = \"❗️ Đăng nhập vào bảng điều khiển thất bại.\\r\\n\"\r\n\"report\" = \"🕰 Báo cáo định kỳ: {{ .RunTime }}\\r\\n\"\r\n\"datetime\" = \"⏰ Ngày-Giờ: {{ .DateTime }}\\r\\n\"\r\n\"hostname\" = \"💻 Tên máy chủ: {{ .Hostname }}\\r\\n\"\r\n\"version\" = \"🚀 Phiên bản X-UI: {{ .Version }}\\r\\n\"\r\n\"xrayVersion\" = \"📡 Phiên bản Xray: {{ .XrayVersion }}\\r\\n\"\r\n\"ipv6\" = \"🌐 IPv6: {{ .IPv6 }}\\r\\n\"\r\n\"ipv4\" = \"🌐 IPv4: {{ .IPv4 }}\\r\\n\"\r\n\"ip\" = \"🌐 IP: {{ .IP }}\\r\\n\"\r\n\"ips\" = \"🔢 Các IP:\\r\\n{{ .IPs }}\\r\\n\"\r\n\"serverUpTime\" = \"⏳ Thời gian hoạt động của máy chủ: {{ .UpTime }} {{ .Unit }}\\r\\n\"\r\n\"serverLoad\" = \"📈 Tải máy chủ: {{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\r\n\"serverMemory\" = \"📋 Bộ nhớ máy chủ: {{ .Current }}/{{ .Total }}\\r\\n\"\r\n\"tcpCount\" = \"🔹 Số lượng kết nối TCP: {{ .Count }}\\r\\n\"\r\n\"udpCount\" = \"🔸 Số lượng kết nối UDP: {{ .Count }}\\r\\n\"\r\n\"traffic\" = \"🚦 Lưu lượng: {{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\r\n\"xrayStatus\" = \"ℹ️ Trạng thái Xray: {{ .State }}\\r\\n\"\r\n\"username\" = \"👤 Tên người dùng: {{ .Username }}\\r\\n\"\r\n\"password\" = \"👤 Mật khẩu: {{ .Password }}\\r\\n\"\r\n\"time\" = \"⏰ Thời gian: {{ .Time }}\\r\\n\"\r\n\"inbound\" = \"📍 Inbound: {{ .Remark }}\\r\\n\"\r\n\"port\" = \"🔌 Cổng: {{ .Port }}\\r\\n\"\r\n\"expire\" = \"📅 Ngày hết hạn: {{ .Time }}\\r\\n\"\r\n\"expireIn\" = \"📅 Hết hạn sau: {{ .Time }}\\r\\n\"\r\n\"active\" = \"💡 Đang hoạt động: {{ .Enable }}\\r\\n\"\r\n\"enabled\" = \"🚨 Đã bật: {{ .Enable }}\\r\\n\"\r\n\"online\" = \"🌐 Trạng thái kết nối: {{ .Status }}\\r\\n\"\r\n\"email\" = \"📧 Email: {{ .Email }}\\r\\n\"\r\n\"upload\" = \"🔼 Tải lên: ↑{{ .Upload }}\\r\\n\"\r\n\"download\" = \"🔽 Tải xuống: ↓{{ .Download }}\\r\\n\"\r\n\"total\" = \"📊 Tổng cộng: ↑↓{{ .UpDown }} / {{ .Total }}\\r\\n\"\r\n\"TGUser\" = \"👤 Người dùng Telegram: {{ .TelegramID }}\\r\\n\"\r\n\"exhaustedMsg\" = \"🚨 Sự cạn kiệt {{ .Type }}:\\r\\n\"\r\n\"exhaustedCount\" = \"🚨 Số lần cạn kiệt {{ .Type }}:\\r\\n\"\r\n\"onlinesCount\" = \"🌐 Khách hàng trực tuyến: {{ .Count }}\\r\\n\"\r\n\"disabled\" = \"🛑 Vô hiệu hóa: {{ .Disabled }}\\r\\n\"\r\n\"depleteSoon\" = \"🔜 Sắp cạn kiệt: {{ .Deplete }}\\r\\n\\r\\n\"\r\n\"backupTime\" = \"🗄 Thời gian sao lưu: {{ .Time }}\\r\\n\"\r\n\"refreshedOn\" = \"\\r\\n📋🔄 Đã cập nhật lần cuối vào: {{ .Time }}\\r\\n\\r\\n\"\r\n\"yes\" = \"✅ Có\"\r\n\"no\" = \"❌ Không\"\r\n\r\n[tgbot.buttons]\r\n\"closeKeyboard\" = \"❌ Đóng Bàn Phím\"\r\n\"cancel\" = \"❌ Hủy\"\r\n\"cancelReset\" = \"❌ Hủy Đặt Lại\"\r\n\"cancelIpLimit\" = \"❌ Hủy Giới Hạn IP\"\r\n\"confirmResetTraffic\" = \"✅ Xác Nhận Đặt Lại Lưu Lượng?\"\r\n\"confirmClearIps\" = \"✅ Xác Nhận Xóa Các IP?\"\r\n\"confirmRemoveTGUser\" = \"✅ Xác Nhận Xóa Người Dùng Telegram?\"\r\n\"confirmToggle\" = \"✅ Xác nhận Bật/Tắt người dùng?\"\r\n\"dbBackup\" = \"Tải bản sao lưu cơ sở dữ liệu\"\r\n\"serverUsage\" = \"Sử Dụng Máy Chủ\"\r\n\"getInbounds\" = \"Lấy cổng vào\"\r\n\"depleteSoon\" = \"Depleted Soon\"\r\n\"clientUsage\" = \"Lấy Sử Dụng\"\r\n\"onlines\" = \"Khách hàng trực tuyến\"\r\n\"commands\" = \"Lệnh\"\r\n\"refresh\" = \"🔄 Cập Nhật\"\r\n\"clearIPs\" = \"❌ Xóa IP\"\r\n\"removeTGUser\" = \"❌ Xóa Người Dùng Telegram\"\r\n\"selectTGUser\" = \"👤 Chọn Người Dùng Telegram\"\r\n\"selectOneTGUser\" = \"👤 Chọn một người dùng telegram:\"\r\n\"resetTraffic\" = \"📈 Đặt Lại Lưu Lượng\"\r\n\"resetExpire\" = \"📅 Thay đổi ngày hết hạn\"\r\n\"ipLog\" = \"🔢 Nhật ký địa chỉ IP\"\r\n\"ipLimit\" = \"🔢 Giới Hạn địa chỉ IP\"\r\n\"setTGUser\" = \"👤 Đặt Người Dùng Telegram\"\r\n\"toggle\" = \"🔘 Bật / Tắt\"\r\n\"custom\" = \"🔢 Tùy chỉnh\"\r\n\"confirmNumber\" = \"✅ Xác nhận: {{ .Num }}\"\r\n\"confirmNumberAdd\" = \"✅ Xác nhận thêm: {{ .Num }}\"\r\n\"limitTraffic\" = \"🚧 Giới hạn lưu lượng\"\r\n\"getBanLogs\" = \"Cấm nhật ký\"\r\n\r\n[tgbot.answers]\r\n\"successfulOperation\" = \"✅ Thành công!\"\r\n\"errorOperation\" = \"❗ Lỗi Trong Quá Trình Thực Hiện.\"\r\n\"getInboundsFailed\" = \"❌ Không Thể Lấy Được Inbounds\"\r\n\"canceled\" = \"❌ {{ .Email }} : Thao Tác Đã Bị Hủy.\"\r\n\"clientRefreshSuccess\" = \"✅ {{ .Email }} : Cập Nhật Thành Công Cho Khách Hàng.\"\r\n\"IpRefreshSuccess\" = \"✅ {{ .Email }} : Cập Nhật Thành Công Cho IPs.\"\r\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }} : Cập Nhật Thành Công Cho Người Dùng Telegram.\"\r\n\"resetTrafficSuccess\" = \"✅ {{ .Email }} : Đặt Lại Lưu Lượng Thành Công.\"\r\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }} : Đã lưu thành công giới hạn lưu lượng.\"\r\n\"expireResetSuccess\" = \"✅ {{ .Email }} : Đặt Lại Ngày Hết Hạn Thành Công.\"\r\n\"resetIpSuccess\" = \"✅ {{ .Email }} : Giới Hạn IP {{ .Count }} Đã Được Lưu Thành Công.\"\r\n\"clearIpSuccess\" = \"✅ {{ .Email }} : IP Đã Được Xóa Thành Công.\"\r\n\"getIpLog\" = \"✅ {{ .Email }} : Lấy nhật ký IP Thành Công.\"\r\n\"getUserInfo\" = \"✅ {{ .Email }} : Lấy Thông Tin Người Dùng Telegram Thành Công.\"\r\n\"removedTGUserSuccess\" = \"✅ {{ .Email }} : Người Dùng Telegram Đã Được Xóa Thành Công.\"\r\n\"enableSuccess\" = \"✅ {{ .Email }} : Đã Bật Thành Công.\"\r\n\"disableSuccess\" = \"✅ {{ .Email }} : Đã Tắt Thành Công.\"\r\n\"askToAddUserId\" = \"Cấu hình của bạn không được tìm thấy!\\r\\nVui lòng yêu cầu Quản trị viên sử dụng ID người dùng telegram của bạn trong cấu hình của bạn.\\r\\n\\r\\nID người dùng của bạn: <code>{{ .TgUserID }}</code>\"\r\n"
  },
  {
    "path": "web/translation/translate.zh_Hans.toml",
    "content": "\"username\" = \"用户名\"\n\"password\" = \"密码\"\n\"login\" = \"登录\"\n\"confirm\" = \"确定\"\n\"cancel\" = \"取消\"\n\"close\" = \"关闭\"\n\"copy\" = \"复制\"\n\"copied\" = \"已复制\"\n\"download\" = \"下载\"\n\"remark\" = \"备注\"\n\"enable\" = \"启用\"\n\"protocol\" = \"协议\"\n\"search\" = \"搜索\"\n\"filter\" = \"筛选\"\n\"loading\" = \"加载中...\"\n\"second\" = \"秒\"\n\"minute\" = \"分钟\"\n\"hour\" = \"小时\"\n\"day\" = \"天\"\n\"check\" = \"查看\"\n\"indefinite\" = \"无限期\"\n\"unlimited\" = \"无限制\"\n\"none\" = \"无\"\n\"qrCode\" = \"二维码\"\n\"info\" = \"更多信息\"\n\"edit\" = \"编辑\"\n\"delete\" = \"删除\"\n\"reset\" = \"重置\"\n\"copySuccess\" = \"复制成功\"\n\"sure\" = \"确定\"\n\"encryption\" = \"加密\"\n\"transmission\" = \"传输\"\n\"host\" = \"主机\"\n\"path\" = \"路径\"\n\"camouflage\" = \"伪装\"\n\"status\" = \"状态\"\n\"enabled\" = \"开启\"\n\"disabled\" = \"关闭\"\n\"depleted\" = \"耗尽\"\n\"depletingSoon\" = \"即将耗尽\"\n\"offline\" = \"离线\"\n\"online\" = \"在线\"\n\"domainName\" = \"域名\"\n\"monitor\" = \"监听\"\n\"certificate\" = \"数字证书\"\n\"fail\" = \"失败\"\n\"success\" = \"成功\"\n\"getVersion\" = \"获取版本\"\n\"install\" = \"安装\"\n\"clients\" = \"客户端\"\n\"usage\" = \"使用情况\"\n\"secretToken\" = \"安全密钥\"\n\"remained\" = \"剩余\"\n\"security\" = \"安全\"\n\"secAlertTitle\" = \"安全警报\"\n\"secAlertSsl\" = \"此连接不安全。在激活 TLS 进行数据保护之前，请勿输入敏感信息。\"\n\"secAlertConf\" = \"某些设置易受攻击。建议加强安全协议以防止潜在漏洞。\"\n\"secAlertSSL\" = \"面板缺少安全连接。请安装 TLS 证书以保护数据安全。\"\n\"secAlertPanelPort\" = \"面板默认端口存在安全风险。请配置随机端口或特定端口。\"\n\"secAlertPanelURI\" = \"面板默认 URI 路径不安全。请配置复杂的 URI 路径。\"\n\"secAlertSubURI\" = \"订阅默认 URI 路径不安全。请配置复杂的 URI 路径。\"\n\"secAlertSubJsonURI\" = \"订阅 JSON 默认 URI 路径不安全。请配置复杂的 URI 路径。\"\n\n[menu]\n\"dashboard\" = \"系统状态\"\n\"inbounds\" = \"入站列表\"\n\"settings\" = \"面板设置\"\n\"xray\" = \"Xray设置\"\n\"logout\" = \"退出登录\"\n\"link\" = \"管理\"\n\"navigation\" = \"实用导航\"\n\n[pages.login]\n\"hello\" = \"你好\"\n\"title\" = \"欢迎\"\n\"loginAgain\" = \"登录时效已过，请重新登录\"\n\n[pages.login.toasts]\n\"invalidFormData\" = \"数据格式错误\"\n\"emptyUsername\" = \"请输入用户名\"\n\"emptyPassword\" = \"请输入密码\"\n\"wrongUsernameOrPassword\" = \"用户名或密码错误\"\n\"successLogin\" = \"登录\"\n\n[pages.index]\n\"title\" = \"系统状态\"\n\"memory\" = \"内存\"\n\"hard\" = \"磁盘\"\n\"xrayStatus\" = \"Xray\"\n\"stopXray\" = \"停止\"\n\"restartXray\" = \"重启\"\n\"xraySwitch\" = \"版本\"\n\"xraySwitchClick\" = \"选择你要切换到的版本\"\n\"xraySwitchClickDesk\" = \"请谨慎选择，因为较旧版本可能与当前配置不兼容\"\n\"operationHours\" = \"系统正常运行时间\"\n\"systemLoad\" = \"系统负载\"\n\"systemLoadDesc\" = \"过去 1、5 和 15 分钟的系统平均负载\"\n\"connectionTcpCountDesc\" = \"系统中所有 TCP 连接数\"\n\"connectionUdpCountDesc\" = \"系统中所有 UDP 连接数\"\n\"connectionCount\" = \"连接数\"\n\"upSpeed\" = \"总上传速度\"\n\"downSpeed\" = \"总下载速度\"\n\"totalSent\" = \"系统启动以来发送的总数据量\"\n\"totalReceive\" = \"系统启动以来接收的总数据量\"\n\"xraySwitchVersionDialog\" = \"切换 Xray 版本\"\n\"xraySwitchVersionDialogDesc\" = \"是否切换 Xray 版本至\"\n\"dontRefresh\" = \"安装中，请勿刷新此页面\"\n\"logs\" = \"日志\"\n\"config\" = \"配置\"\n\"backup\" = \"备份和恢复\"\n\"backupTitle\" = \"备份和恢复数据库\"\n\"backupDescription\" = \"恢复数据库之前建议进行备份\"\n\"exportDatabase\" = \"备份\"\n\"importDatabase\" = \"恢复\"\n\n[pages.inbounds]\n\"title\" = \"入站列表\"\n\"totalDownUp\" = \"总上传 / 下载\"\n\"totalUsage\" = \"总用量\"\n\"inboundCount\" = \"入站数量\"\n\"operate\" = \"菜单\"\n\"enable\" = \"启用\"\n\"remark\" = \"备注\"\n\"protocol\" = \"协议\"\n\"port\" = \"端口\"\n\"traffic\" = \"流量\"\n\"details\" = \"详细信息\"\n\"transportConfig\" = \"传输配置\"\n\"expireDate\" = \"到期时间\"\n\"resetTraffic\" = \"重置流量\"\n\"addInbound\" = \"添加入站\"\n\"generalActions\" = \"通用操作\"\n\"create\" = \"添加\"\n\"update\" = \"修改\"\n\"modifyInbound\" = \"修改入站\"\n\"deleteInbound\" = \"删除入站\"\n\"deleteInboundContent\" = \"确定要删除入站吗？\"\n\"deleteClient\" = \"删除客户端\"\n\"deleteClientContent\" = \"确定要删除客户端吗？\"\n\"resetTrafficContent\" = \"确定要重置流量吗？\"\n\"copyLink\" = \"复制链接\"\n\"address\" = \"地址\"\n\"network\" = \"网络\"\n\"destinationPort\" = \"目标端口\"\n\"targetAddress\" = \"目标地址\"\n\"monitorDesc\" = \"留空表示监听所有 IP\"\n\"meansNoLimit\" = \" = 无限制（单位：GB)\"\n\"totalFlow\" = \"总流量\"\n\"leaveBlankToNeverExpire\" = \"留空表示永不过期\"\n\"noRecommendKeepDefault\" = \"建议保留默认值\"\n\"certificatePath\" = \"文件路径\"\n\"certificateContent\" = \"文件内容\"\n\"publicKey\" = \"公钥\"\n\"privatekey\" = \"私钥\"\n\"clickOnQRcode\" = \"点击二维码复制\"\n\"client\" = \"客户\"\n\"export\" = \"导出链接\"\n\"clone\" = \"克隆\"\n\"cloneInbound\" = \"克隆\"\n\"cloneInboundContent\" = \"此入站规则除端口（Port）、监听 IP（Listening IP）和客户端（Clients）以外的所有配置都将应用于克隆\"\n\"cloneInboundOk\" = \"创建克隆\"\n\"resetAllTraffic\" = \"重置所有入站流量\"\n\"resetAllTrafficTitle\" = \"重置所有入站流量\"\n\"resetAllTrafficContent\" = \"确定要重置所有入站流量吗？\"\n\"resetInboundClientTraffics\" = \"重置客户端流量\"\n\"resetInboundClientTrafficTitle\" = \"重置所有客户端流量\"\n\"resetInboundClientTrafficContent\" = \"确定要重置此入站客户端的所有流量吗？\"\n\"resetAllClientTraffics\" = \"重置所有客户端流量\"\n\"resetAllClientTrafficTitle\" = \"重置所有客户端流量\"\n\"resetAllClientTrafficContent\" = \"确定要重置所有客户端的所有流量吗？\"\n\"delDepletedClients\" = \"删除流量耗尽的客户端\"\n\"delDepletedClientsTitle\" = \"删除流量耗尽的客户端\"\n\"delDepletedClientsContent\" = \"确定要删除所有流量耗尽的客户端吗？\"\n\"email\" = \"电子邮件\"\n\"emailDesc\" = \"电子邮件必须确保唯一\"\n\"IPLimit\" = \"IP 限制\"\n\"IPLimitDesc\" = \"如果数量超过设置值，则禁用入站流量。（0 = 禁用）\"\n\"IPLimitlog\" = \"IP 日志\"\n\"IPLimitlogDesc\" = \"IP 历史日志（要启用被禁用的入站流量，请清除日志）\"\n\"IPLimitlogclear\" = \"清除日志\"\n\"setDefaultCert\" = \"从面板设置证书\"\n\"xtlsDesc\" = \"Xray 核心需要 1.7.5\"\n\"realityDesc\" = \"Xray 核心需要 1.8.0 及以上版本\"\n\"telegramDesc\" = \"请提供Telegram聊天ID。（跟@userinfobot机器人对话获取）\"\n\"subscriptionDesc\" = \"要找到你的订阅 URL，请导航到“详细信息”。此外，你可以为多个客户端使用相同的名称。\"\n\"info\" = \"信息\"\n\"same\" = \"相同\"\n\"inboundData\" = \"入站数据\"\n\"exportInbound\" = \"导出入站规则\"\n\"import\"=\"导入\"\n\"importInbound\" = \"导入入站规则\"\n\n[pages.client]\n\"add\" = \"添加客户端\"\n\"edit\" = \"编辑客户端\"\n\"submitAdd\" = \"添加客户端\"\n\"submitEdit\" = \"保存修改\"\n\"clientCount\" = \"客户端数量\"\n\"bulk\" = \"批量创建\"\n\"method\" = \"方法\"\n\"first\" = \"置顶\"\n\"last\" = \"置底\"\n\"prefix\" = \"前缀\"\n\"postfix\" = \"后缀\"\n\"delayedStart\" = \"首次使用后开始\"\n\"expireDays\" = \"期间\"\n\"days\" = \"天\"\n\"renew\" = \"自动续订\"\n\"renewDesc\" = \"到期后自动续订。(0 = 禁用)(单位: 天)\"\n\n[pages.inbounds.toasts]\n\"obtain\" = \"获取\"\n\n[pages.inbounds.stream.general]\n\"request\" = \"请求\"\n\"response\" = \"响应\"\n\"name\" = \"名称\"\n\"value\" = \"值\"\n\n[pages.inbounds.stream.tcp]\n\"version\" = \"版本\"\n\"method\" = \"方法\"\n\"path\" = \"路径\"\n\"status\" = \"状态\"\n\"statusDescription\" = \"状态说明\"\n\"requestHeader\" = \"请求头\"\n\"responseHeader\" = \"响应头\"\n\n[pages.inbounds.stream.quic]\n\"encryption\" = \"加密\"\n\n[pages.settings]\n\"title\" = \"面板设置\"\n\"save\" = \"保存\"\n\"infoDesc\" = \"此处的所有更改都需要保存并重启面板才能生效\"\n\"restartPanel\" = \"重启面板\"\n\"restartPanelDesc\" = \"确定要重启面板吗？若重启后无法访问面板，请前往服务器查看面板日志信息\"\n\"actions\" = \"操作\"\n\"resetDefaultConfig\" = \"重置为默认配置\"\n\"panelSettings\" = \"常规\"\n\"securitySettings\" = \"安全设定\"\n\"TGBotSettings\" = \"Telegram机器人配置\"\n\"panelListeningIP\" = \"面板监听 IP\"\n\"panelListeningIPDesc\" = \"默认留空监听所有 IP\"\n\"panelListeningDomain\" = \"面板监听域名\"\n\"panelListeningDomainDesc\" = \"默认情况下留空以监视所有域名和 IP 地址\"\n\"panelPort\" = \"面板监听端口\"\n\"panelPortDesc\" = \"重启面板生效\"\n\"publicKeyPath\" = \"面板证书公钥文件路径\"\n\"DefaultpublicKeyPath\" = \"/root/.acme.sh/域名_ecc/域名.cer\"\n\"publicKeyPathDesc\" = \"填写一个 '/' 开头的绝对路径,〔acme方式〕请自行在填入时修改域名\"\n\"privateKeyPath\" = \"面板证书密钥文件路径\"\n\"DefaultprivateKeyPath\" = \"/root/.acme.sh/域名_ecc/域名.key\"\n\"privateKeyPathDesc\" = \"填写一个 '/' 开头的绝对路径，〔acme方式〕请自行在填入时修改域名\"\n\"panelUrlPath\" = \"面板登录访问路径\"\n\"panelUrlPathDesc\" = \"必须以 '/' 开头，以 '/' 结尾\"\n\"pageSize\" = \"分页大小\"\n\"pageSizeDesc\" = \"定义入站表的页面大小。设置 0 表示禁用\"\n\"remarkModel\" = \"备注模型和分隔符\"\n\"datepicker\" = \"日期选择器\"\n\"datepickerPlaceholder\" = \"选择日期\"\n\"datepickerDescription\" = \"选择器日历类型指定到期日期\"\n\"sampleRemark\" = \"备注示例\"\n\"oldUsername\" = \"原用户名\"\n\"currentPassword\" = \"原密码\"\n\"newUsername\" = \"新用户名\"\n\"newPassword\" = \"新密码\"\n\"telegramBotEnable\" = \"启用 Telegram 机器人\"\n\"telegramBotEnableDesc\" = \"启用 Telegram 机器人功能\"\n\"telegramToken\" = \"Telegram 机器人令牌（token）\"\n\"telegramTokenDesc\" = \"跟 '@BotFather' 对话获取的 Telegram 机器人令牌\"\n\"telegramProxy\" = \"SOCKS5 Proxy\"\n\"telegramProxyDesc\" = \"启用 SOCKS5 代理连接到 Telegram（根据指南调整设置）\"\n\"telegramChatId\" = \"管理员聊天 ID\"\n\"telegramChatIdDesc\" = \"Telegram 管理员聊天 ID (多个以逗号分隔)（可通过 @userinfobot 获取，或在机器人中使用 '/id' 命令获取）\"\n\"telegramNotifyTime\" = \"通知时间\"\n\"telegramNotifyTimeDesc\" = \"设置周期性的 Telegram 机器人通知时间（使用 crontab 时间格式）\"\n\"tgNotifyBackup\" = \"数据库备份\"\n\"tgNotifyBackupDesc\" = \"发送带有报告的数据库备份文件\"\n\"tgNotifyLogin\" = \"登录通知\"\n\"tgNotifyLoginDesc\" = \"当有人试图登录你的面板时显示用户名、IP 地址和时间\"\n\"sessionMaxAge\" = \"会话时长\"\n\"sessionMaxAgeDesc\" = \"保持登录状态的时长（单位：分钟）\"\n\"expireTimeDiff\" = \"到期通知阈值\"\n\"expireTimeDiffDesc\" = \"达到此阈值时，将收到有关到期时间的通知（单位：天）\"\n\"trafficDiff\" = \"流量耗尽阈值\"\n\"trafficDiffDesc\" = \"达到此阈值时，将收到有关流量耗尽的通知（单位：GB）\"\n\"tgNotifyCpu\" = \"CPU 负载通知阈值\"\n\"tgNotifyCpuDesc\" = \"CPU 负载超过此阈值时，将收到通知（单位：%）\"\n\"timeZone\" = \"时区\"\n\"timeZoneDesc\" = \"定时任务将按照该时区的时间运行\"\n\"subSettings\" = \"订阅设置\"\n\"subEnable\" = \"启用订阅服务\"\n\"subEnableDesc\" = \"启用订阅服务功能\"\n\"subListen\" = \"监听 IP\"\n\"subListenDesc\" = \"订阅服务监听的 IP 地址（留空表示监听所有 IP）\"\n\"subPort\" = \"监听端口\"\n\"subPortDesc\" = \"订阅服务监听的端口号（必须是未使用的端口）\"\n\"subCertPath\" = \"公钥路径\"\n\"subCertPathDesc\" = \"订阅服务使用的公钥文件路径（以 '/' 开头）\"\n\"subKeyPath\" = \"私钥路径\"\n\"subKeyPathDesc\" = \"订阅服务使用的私钥文件路径（以 '/' 开头）\"\n\"subPath\" = \"URI 路径\"\n\"subPathDesc\" = \"订阅服务使用的 URI 路径（以 '/' 开头，以 '/' 结尾）\"\n\"subDomain\" = \"监听域名\"\n\"subDomainDesc\" = \"订阅服务监听的域名（留空表示监听所有域名和 IP）\"\n\"subUpdates\" = \"更新间隔\"\n\"subUpdatesDesc\" = \"客户端应用中订阅 URL 的更新间隔（单位：小时）\"\n\"subEncrypt\" = \"编码\"\n\"subEncryptDesc\" = \"订阅服务返回的内容将采用 Base64 编码\"\n\"subShowInfo\" = \"显示使用信息\"\n\"subShowInfoDesc\" = \"客户端应用中将显示剩余流量和日期信息\"\n\"subURI\" = \"反向代理 URI\"\n\"subURIDesc\" = \"用于代理后面的订阅 URL 的 URI 路径\"\n\"fragment\" = \"分片\"\n\"fragmentDesc\" = \"启用 TLS hello 数据包分片\"\n\"fragmentSett\" = \"设置\"\n\"mux\" = \"多路复用器\"\n\"muxDesc\" = \"在已建立的数据流内传输多个独立的数据流\"\n\"muxSett\" = \"复用器设置\"\n\"direct\" = \"直接连接\"\n\"directDesc\" = \"直接与特定国家的域或IP范围建立连接\"\n\"directSett\" = \"直接连接选项\"\n\n[pages.xray]\n\"title\" = \"Xray 配置\"\n\"save\" = \"保存\"\n\"restart\" = \"重新启动 Xray\"\n\"basicTemplate\" = \"基础配置\"\n\"advancedTemplate\" = \"高级配置\"\n\"generalConfigs\" = \"常规配置\"\n\"generalConfigsDesc\" = \"这些选项将决定常规配置\"\n\"logConfigs\" = \"日志\"\n\"logConfigsDesc\" = \"日志可能会影响服务器的性能，建议仅在需要时启用\"\n\"blockConfigs\" = \"防护屏蔽\"\n\"blockConfigsDesc\" = \"这些选项将阻止用户连接到特定协议和网站\"\n\"blockCountryConfigs\" = \"屏蔽国家/地区\"\n\"blockCountryConfigsDesc\" = \"这些选项将阻止用户连接到特定国家/地区\"\n\"directCountryConfigs\" = \"直连国家/地区\"\n\"directCountryConfigsDesc\" = \"直接连接可确保特定流量不会通过其他服务器路由\"\n\"ipv4Configs\" = \"IPv4 路由\"\n\"ipv4ConfigsDesc\" = \"此选项将仅通过 IPv4 路由到目标域\"\n\"warpConfigs\" = \"WARP 路由\"\n\"warpConfigsDesc\" = \"注意：在使用这些选项之前，请按照面板 GitHub 上的步骤在你的服务器上以 socks5 代理模式安装 WARP。WARP 将通过 Cloudflare 服务器将流量路由到网站。\"\n\"Template\" = \"高级 Xray 配置模板\"\n\"TemplateDesc\" = \"最终的 Xray 配置文件将基于此模板生成\"\n\"FreedomStrategy\" = \"Freedom 协议策略\"\n\"FreedomStrategyDesc\" = \"设置 Freedom 协议中网络的输出策略\"\n\"RoutingStrategy\" = \"配置路由域策略\"\n\"RoutingStrategyDesc\" = \"设置 DNS 解析的整体路由策略\"\n\"Torrent\" = \"屏蔽 BitTorrent 协议\"\n\"TorrentDesc\" = \"禁止使用 BitTorrent\"\n\"PrivateIp\" = \"屏蔽私有 IP\"\n\"PrivateIpDesc\" = \"阻止连接到私有 IP\"\n\"Ads\" = \"屏蔽广告\"\n\"AdsDesc\" = \"屏蔽广告网站\"\n\"Family\" = \"家庭保护\"\n\"FamilyDesc\" = \"屏蔽成人内容和恶意网站\"\n\"Security\" = \"安全防护\"\n\"SecurityDesc\" = \"屏蔽恶意软件、网络钓鱼和挖矿网站\"\n\"Speedtest\" = \"屏蔽测速网站\"\n\"SpeedtestDesc\" = \"阻止连接到测速网站\"\n\"IRIp\" = \"屏蔽连接到伊朗 IP\"\n\"IRIpDesc\" = \"阻止建立到伊朗 IP 范围的连接\"\n\"IRDomain\" = \"屏蔽连接到伊朗域名\"\n\"IRDomainDesc\" = \"阻止建立到伊朗域名的连接\"\n\"ChinaIp\" = \"屏蔽连接到中国 IP\"\n\"ChinaIpDesc\" = \"阻止建立到中国 IP 范围的连接\"\n\"ChinaDomain\" = \"屏蔽连接到中国域名\"\n\"ChinaDomainDesc\" = \"阻止建立到中国域名的连接\"\n\"RussiaIp\" = \"屏蔽连接到俄罗斯 IP\"\n\"RussiaIpDesc\" = \"阻止建立到俄罗斯 IP 范围的连接\"\n\"RussiaDomain\" = \"屏蔽连接到俄罗斯域名\"\n\"RussiaDomainDesc\" = \"阻止建立到俄罗斯域名的连接\"\n\"VNIp\" = \"屏蔽连接到越南 IP\"\n\"VNIpDesc\" = \"阻止建立到越南 IP 范围的连接\"\n\"VNDomain\" = \"屏蔽连接到越南域名\"\n\"VNDomainDesc\" = \"阻止建立到越南域名的连接\"\n\"DirectIRIp\" = \"直连伊朗 IP\"\n\"DirectIRIpDesc\" = \"直接建立到伊朗 IP 范围的连接\"\n\"DirectIRDomain\" = \"直连伊朗域名\"\n\"DirectIRDomainDesc\" = \"直接建立到伊朗域名的连接\"\n\"DirectChinaIp\" = \"直连中国 IP\"\n\"DirectChinaIpDesc\" = \"直接建立到中国 IP 范围的连接\"\n\"DirectChinaDomain\" = \"直连中国域名\"\n\"DirectChinaDomainDesc\" = \"直接建立到中国域名的连接\"\n\"DirectRussiaIp\" = \"直连俄罗斯 IP\"\n\"DirectRussiaIpDesc\" = \"直接建立到俄罗斯 IP 范围的连接\"\n\"DirectRussiaDomain\" = \"直连俄罗斯域名\"\n\"DirectRussiaDomainDesc\" = \"直接建立到俄罗斯域名的连接\"\n\"DirectVNIp\" = \"直连越南 IP\"\n\"DirectVNIpDesc\" = \"直接建立到越南 IP 范围的连接\"\n\"DirectVNDomain\" = \"直连越南域名\"\n\"DirectVNDomainDesc\" = \"直接建立到越南域名的连接\"\n\"GoogleIPv4\" = \"Google\"\n\"GoogleIPv4Desc\" = \"通过 IPv4 将流量路由到谷歌\"\n\"NetflixIPv4\" = \"Netflix\"\n\"NetflixIPv4Desc\" = \"通过 IPv4 将流量路由到 Netflix\"\n\"GoogleWARP\" = \"Google\"\n\"GoogleWARPDesc\" = \"通过 WARP 将流量路由到 Google\"\n\"OpenAIWARP\" = \"OpenAI (ChatGPT)\"\n\"OpenAIWARPDesc\" = \"通过 WARP 将流量路由到 OpenAI (ChatGPT)\"\n\"NetflixWARP\" = \"Netflix\"\n\"NetflixWARPDesc\" = \"通过 WARP 将流量路由到 Netflix\"\n\"MetaWARP\"=\"Meta\"\n\"MetaWARPDesc\" = \"通过 WARP 将流量路由到 Meta（Instagram、Facebook、WhatsApp、Threads...）\"\n\"AppleWARP\" = \"Apple\"\n\"AppleWARPDesc\" = \"通过 WARP 将流量路由到 Apple\"\n\"RedditWARP\" = \"Reddit\"\n\"RedditWARPDesc\" = \"通过 WARP 将流量路由到 Reddit\"\n\"SpotifyWARP\" = \"Spotify\"\n\"SpotifyWARPDesc\" = \"通过 WARP 将流量路由到 Spotify\"\n\"IRWARP\" = \"伊朗域名\"\n\"IRWARPDesc\" = \"通过 WARP 将流量路由到伊朗域名\"\n\"Inbounds\" = \"入站规则\"\n\"InboundsDesc\" = \"接受来自特定客户端的流量\"\n\"Outbounds\" = \"出站规则\"\n\"Balancers\" = \"负载均衡\"\n\"OutboundsDesc\" = \"设置出站流量传出方式\"\n\"Routings\" = \"路由规则\"\n\"RoutingsDesc\" = \"每条规则的优先级都很重要\"\n\"completeTemplate\" = \"全部\"\n\"logLevel\" = \"日志级别\"\n\"logLevelDesc\" = \"错误日志的日志级别，用于指示需要记录的信息\"\n\"accessLog\" = \"访问日志\"\n\"accessLogDesc\" = \"访问日志的文件路径。特殊值 'none' 禁用访问日志\"\n\"errorLog\" = \"错误日志\"\n\"errorLogDesc\" = \"错误日志的文件路径。特殊值 'none' 禁用错误日志\"\n\n[pages.navigation]\n\"title\" = \"实用导航\"\n\n[pages.xray.rules]\n\"first\" = \"置顶\"\n\"last\" = \"置底\"\n\"up\" = \"向上\"\n\"down\" = \"向下\"\n\"source\" = \"来源\"\n\"dest\" = \"目标地址\"\n\"inbound\" = \"入站\"\n\"outbound\" = \"出站\"\n\"balancer\" = \"负载均衡\"\n\"info\" = \"信息\"\n\"add\" = \"添加规则\"\n\"edit\" = \"编辑规则\"\n\"useComma\" = \"逗号分隔的项目\"\n\"DomainMatcher\" = \"域匹配类型\"\n\"SourceIPs\" = \"源IP\"\n\"SourcePort\" = \"源端口\"\n\"Network\" = \"网络类型\"\n\"Protocol\" = \"传输协议\"\n\"Attributes\" = \"属性\"\n\"Domain\" = \"域地址\"\n\"User\" = \"用户\"\n\"Port\" = \"端口\"\n\"InboundTag\" = \"入站 Tag\"\n\"OutboundTag\" = \"出站 Tag\"\n\"BalancerTag\" = \"负载均衡 Tag\"\n\n[pages.xray.outbound]\n\"addOutbound\" = \"添加出站\"\n\"addReverse\" = \"添加反向\"\n\"editOutbound\" = \"编辑出站\"\n\"editReverse\" = \"编辑反向\"\n\"tag\" = \"标签\"\n\"tagDesc\" = \"唯一标签\"\n\"address\" = \"地址\"\n\"reverse\" = \"反向\"\n\"domain\" = \"域名\"\n\"type\" = \"类型\"\n\"bridge\" = \"Bridge\"\n\"portal\" = \"Portal\"\n\"intercon\" = \"互连\"\n\"settings\" = \"设置\"\n\"accountInfo\" = \"帐户信息\"\n\"outboundStatus\" = \"出站状态\"\n\"sendThrough\" = \"发送通过\"\n\n[pages.xray.balancer]\n\"addBalancer\" = \"添加负载均衡\"\n\"editBalancer\" = \"编辑负载均衡\"\n\"balancerStrategy\" = \"策略\"\n\"balancerSelectors\" = \"选择器\"\n\"tag\" = \"标签\"\n\"tagDesc\" = \"唯一标签\"\n\"balancerDesc\" = \"无法同时使用 balancerTag 和 outboundTag。如果同时使用，则只有 outboundTag 会生效。\"\n\n[pages.xray.wireguard]\n\"secretKey\" = \"密钥\"\n\"publicKey\" = \"公钥\"\n\"allowedIPs\" = \"允许的 IP\"\n\"endpoint\" = \"端点\"\n\"psk\" = \"共享密钥\"\n\"domainStrategy\" = \"域策略\"\n\n[pages.xray.dns]\n\"enable\" = \"启用 DNS\"\n\"enableDesc\" = \"启用内置 DNS 服务器\"\n\"tag\" = \"DNS 入站标签\"\n\"tagDesc\" = \"此标签将在路由规则中可用作入站标签\"\n\"strategy\" = \"查询策略\"\n\"strategyDesc\" = \"解析域名的总体策略\"\n\"add\" = \"添加服务器\"\n\"edit\" = \"编辑服务器\"\n\"domains\" = \"域\"\n\n[pages.xray.fakedns]\n\"add\" = \"添加假 DNS\"\n\"edit\" = \"编辑假 DNS\"\n\"ipPool\" = \"IP 池子网\"\n\"poolSize\" = \"池大小\"\n\n[pages.settings.security]\n\"admin\" = \"管理员\"\n\"secret\" = \"安全令牌\"\n\"loginSecurity\" = \"登录安全\"\n\"loginSecurityDesc\" = \"添加额外的身份验证以提高安全性\"\n\"secretToken\" = \"安全令牌\"\n\"secretTokenDesc\" = \"请将此令牌存储在安全的地方。此令牌用于登录，丢失无法恢复。\" \n\n[pages.settings.toasts]\n\"modifySettings\" = \"修改设置\"\n\"getSettings\" = \"获取设置\"\n\"modifyUser\" = \"修改管理员\"\n\"originalUserPassIncorrect\" = \"原用户名或原密码错误\"\n\"userPassMustBeNotEmpty\" = \"新用户名和新密码不能为空\"\n\n[tgbot]\n\"keyboardClosed\" = \"❌ 自定义键盘已关闭！\"\n\"noResult\" = \"❗ 没有结果！\"\n\"noQuery\" = \"❌ 未找到查询！请重新使用命令！\"\n\"wentWrong\" = \"❌ 出了点问题！\"\n\"noIpRecord\" = \"❗ 没有 IP 记录！\"\n\"noInbounds\" = \"❗ 没有找到入站连接！\"\n\"unlimited\" = \"♾ 无限制\"\n\"add\" = \"添加\"\n\"month\" = \"月\"\n\"months\" = \"月\"\n\"day\" = \"天\"\n\"days\" = \"天\"\n\"hours\" = \"小时\"\n\"unknown\" = \"未知\"\n\"inbounds\" = \"入站连接\"\n\"clients\" = \"客户端\"\n\"offline\" = \"🔴 离线\"\n\"online\" = \"🟢 在线\"\n\n[tgbot.commands]\n\"unknown\" = \"❗ 未知命令\"\n\"pleaseChoose\" = \"👇请〔按照需求〕选择下方按钮：\\r\\n\"\n\"help\" = \"🤖 欢迎使用本机器人！它旨在为您提供来自服务器的特定数据，并允许您进行必要的修改。\\r\\n\\r\\n\"\n\"start\" = \"👋 你好，<i>{{ .Firstname }}</i>。\\r\\n\"\n\"welcome\" = \"🤖 欢迎来到 <b>{{ .Hostname }}</b> 管理机器人。\\r\\n\"\n\"status\" = \"✅ 机器人正常运行！\"\n\"usage\" = \"❗ 请输入要搜索的文本！\"\n\"getID\" = \"🆔 您的 ID 为：<code>{{ .ID }}</code>\"\n\"helpAdminCommands\" = \"要搜索客户电子邮件：\\r\\n<code>/usage [电子邮件]</code>\\r\\n\\r\\n要搜索入站（带有客户统计数据）：\\r\\n<code>/inbound [备注]</code>\\r\\n\\r\\n要获取Telegram聊天ID：\\r\\n<code>/id</code>\"\n\"helpClientCommands\" = \"要搜索统计数据，请使用以下命令：\\r\\n<code>/usage [电子邮件]</code>\\r\\n\\r\\nTelegram聊天ID：\\r\\n<code>/id</code>\"\n\n[tgbot.messages]\n\"cpuThreshold\" = \"🔴 CPU 使用率为 {{ .Percent }}%，超过阈值 {{ .Threshold }}%\"\n\"selectUserFailed\" = \"❌ 用户选择错误！\"\n\"userSaved\" = \"✅ 电报用户已保存。\"\n\"loginSuccess\" = \"✅ 成功登录到面板。\\r\\n\"\n\"loginFailed\" = \"❗️ 面板登录失败。\\r\\n\"\n\"report\" = \"🕰 定时报告：{{ .RunTime }}\\r\\n\"\n\"datetime\" = \"⏰ 日期时间：{{ .DateTime }}\\r\\n\"\n\"hostname\" = \"💻 主机名：{{ .Hostname }}\\r\\n\"\n\"version\" = \"🚀 3X-UI 版本：{{ .Version }}\\r\\n\"\n\"xrayVersion\" = \"📡 Xray 版本: {{ .XrayVersion }}\\r\\n\"\n\"ipv6\" = \"🌐 IPv6：{{ .IPv6 }}\\r\\n\"\n\"ipv4\" = \"🌐 IPv4：{{ .IPv4 }}\\r\\n\"\n\"ip\" = \"🌐 IP：{{ .IP }}\\r\\n\"\n\"ips\" = \"🔢 IP 地址：\\r\\n{{ .IPs }}\\r\\n\"\n\"serverUpTime\" = \"⏳ 服务器运行时间：{{ .UpTime }} {{ .Unit }}\\r\\n\"\n\"serverLoad\" = \"📈 服务器负载：{{ .Load1 }}, {{ .Load2 }}, {{ .Load3 }}\\r\\n\"\n\"serverMemory\" = \"📋 服务器内存：{{ .Current }}/{{ .Total }}\\r\\n\"\n\"tcpCount\" = \"🔹 TCP 连接数：{{ .Count }}\\r\\n\"\n\"udpCount\" = \"🔸 UDP 连接数：{{ .Count }}\\r\\n\"\n\"traffic\" = \"🚦 流量：{{ .Total }} (↑{{ .Upload }},↓{{ .Download }})\\r\\n\"\n\"xrayStatus\" = \"ℹ️ Xray 状态：{{ .State }}\\r\\n\"\n\"username\" = \"👤 用户名：{{ .Username }}\\r\\n\"\n\"password\" = \"👤 密码: {{ .Password }}\\r\\n\"\n\"time\" = \"⏰ 时间：{{ .Time }}\\r\\n\"\n\"inbound\" = \"📍 入站：{{ .Remark }}\\r\\n\"\n\"port\" = \"🔌 端口：{{ .Port }}\\r\\n\"\n\"expire\" = \"📅 过期日期：{{ .Time }}\\r\\n\"\n\"expireIn\" = \"📅 剩余时间：{{ .Time }}\\r\\n\"\n\"active\" = \"💡 激活：{{ .Enable }}\\r\\n\"\n\"enabled\" = \"🚨 已启用：{{ .Enable }}\\r\\n\"\n\"online\" = \"🌐 连接状态：{{ .Status }}\\r\\n\"\n\"email\" = \"📧 邮箱（用户）：{{ .Email }}\\r\\n\"\n\"upload\" = \"🔼 上传↑：{{ .Upload }}\\r\\n\"\n\"download\" = \"🔽 下载↓：{{ .Download }}\\r\\n\"\n\"total\" = \"📊 总计：{{ .UpDown }} / {{ .Total }}\\r\\n\"\n\"TGUser\" = \"👤 电报用户：{{ .TelegramID }}\\r\\n\"\n\"exhaustedMsg\" = \"🚨 耗尽的 {{ .Type }}：\\r\\n\"\n\"exhaustedCount\" = \"🚨 耗尽的 {{ .Type }} 数量：\\r\\n\"\n\"onlinesCount\" = \"🌐 在线客户：{{ .Count }}\\r\\n\"\n\"disabled\" = \"🛑 禁用：{{ .Disabled }}\\r\\n\"\n\"depleteSoon\" = \"🔜 即将耗尽：{{ .Deplete }}\\r\\n\\r\\n\"\n\"backupTime\" = \"🗄 备份时间：{{ .Time }}\\r\\n\"\n\"refreshedOn\" = \"\\r\\n📋🔄 刷新时间：{{ .Time }}\\r\\n\\r\\n\"\n\"yes\" = \"✅ 是的\"\n\"no\" = \"❌ 没有\"\n\n[tgbot.buttons]\n\"closeKeyboard\" = \"❌ 关闭键盘\"\n\"cancel\" = \"❌ 取消\"\n\"cancelReset\" = \"❌ 取消重置\"\n\"cancelIpLimit\" = \"❌ 取消 IP 限制\"\n\"confirmResetTraffic\" = \"✅ 确认重置流量？\"\n\"confirmClearIps\" = \"✅ 确认清除 IP？\"\n\"confirmRemoveTGUser\" = \"✅ 确认移除 Telegram 用户？\"\n\"confirmToggle\" = \"✅ 确认启用/禁用用户？\"\n\"dbBackup\" = \"获取数据库备份\"\n\"serverUsage\" = \"查询✰服务器✰使用状态\"\n\"getInbounds\" = \"获取入站信息\"\n\"depleteSoon\" = \"即将耗尽\"\n\"clientUsage\" = \"获取使用情况\"\n\"onlines\" = \"在线客户端\"\n\"commands\" = \"常用命令\"\n\"refresh\" = \"🔄 刷新\"\n\"clearIPs\" = \"❌ 清除 IP\"\n\"removeTGUser\" = \"❌ 移除 Telegram 用户\"\n\"selectTGUser\" = \"👤 选择 Telegram 用户\"\n\"selectOneTGUser\" = \"👤 选择一个 Telegram 用户：\"\n\"resetTraffic\" = \"📈 重置流量\"\n\"resetExpire\" = \"📅 更改到期日期\"\n\"ipLog\" = \"🔢 IP 日志\"\n\"ipLimit\" = \"🔢 IP 限制\"\n\"setTGUser\" = \"👤 设置 Telegram 用户\"\n\"toggle\" = \"🔘 启用/禁用\"\n\"custom\" = \"🔢 自定义输入\"\n\"confirmNumber\" = \"✅ 确认: {{ .Num }}\"\n\"confirmNumberAdd\" = \"✅ 确认添加：{{ .Num }}\"\n\"limitTraffic\" = \"🚧 流量限制\"\n\"getBanLogs\" = \"禁止日志\"\n\n[tgbot.answers]\n\"successfulOperation\" = \"✅ 成功！\"\n\"errorOperation\" = \"❗ 操作错误。\"\n\"getInboundsFailed\" = \"❌ 获取入站信息失败。\"\n\"canceled\" = \"❌ {{ .Email }}：操作已取消。\"\n\"clientRefreshSuccess\" = \"✅ {{ .Email }}：客户端刷新成功。\"\n\"IpRefreshSuccess\" = \"✅ {{ .Email }}：IP 刷新成功。\"\n\"TGIdRefreshSuccess\" = \"✅ {{ .Email }}：客户端的 Telegram 用户刷新成功。\"\n\"resetTrafficSuccess\" = \"✅ {{ .Email }}：流量已重置成功。\"\n\"setTrafficLimitSuccess\" = \"✅ {{ .Email }}: 流量限制保存成功。\"\n\"expireResetSuccess\" = \"✅ {{ .Email }}：过期天数已重置成功。\"\n\"resetIpSuccess\" = \"✅ {{ .Email }}：成功保存 IP 限制数量为 {{ .Count }}。\"\n\"clearIpSuccess\" = \"✅ {{ .Email }}：IP 已成功清除。\"\n\"getIpLog\" = \"✅ {{ .Email }}：获取 IP 日志。\"\n\"getUserInfo\" = \"✅ {{ .Email }}：获取 Telegram 用户信息。\"\n\"removedTGUserSuccess\" = \"✅ {{ .Email }}：Telegram 用户已成功移除。\"\n\"enableSuccess\" = \"✅ {{ .Email }}：已成功启用。\"\n\"disableSuccess\" = \"✅ {{ .Email }}：已成功禁用。\"\n\"askToAddUserId\" = \"未找到您的配置！\\r\\n请向管理员询问，在您的配置中使用您的 Telegram 用户 ID。\\r\\n\\r\\n您的用户 ID：<code>{{ .TgUserID }}</code>\"\n"
  },
  {
    "path": "web/web.go",
    "content": "package web\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"embed\"\n\t\"html/template\"\n\t\"io\"\n\t\"io/fs\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"x-ui/config\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/web/controller\"\n\t\"x-ui/web/job\"\n\t\"x-ui/web/locale\"\n\t\"x-ui/web/middleware\"\n\t\"x-ui/web/network\"\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-contrib/gzip\"\n\t\"github.com/gin-contrib/sessions\"\n\t\"github.com/gin-contrib/sessions/cookie\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/robfig/cron/v3\"\n)\n\n//go:embed assets/*\nvar assetsFS embed.FS\n\n//go:embed html/*\nvar htmlFS embed.FS\n\n//go:embed translation/*\nvar i18nFS embed.FS\n\nvar startTime = time.Now()\n\ntype wrapAssetsFS struct {\n\tembed.FS\n}\n\nfunc (f *wrapAssetsFS) Open(name string) (fs.File, error) {\n\tfile, err := f.FS.Open(\"assets/\" + name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &wrapAssetsFile{\n\t\tFile: file,\n\t}, nil\n}\n\ntype wrapAssetsFile struct {\n\tfs.File\n}\n\nfunc (f *wrapAssetsFile) Stat() (fs.FileInfo, error) {\n\tinfo, err := f.File.Stat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &wrapAssetsFileInfo{\n\t\tFileInfo: info,\n\t}, nil\n}\n\ntype wrapAssetsFileInfo struct {\n\tfs.FileInfo\n}\n\nfunc (f *wrapAssetsFileInfo) ModTime() time.Time {\n\treturn startTime\n}\n\ntype Server struct {\n\thttpServer *http.Server\n\tlistener   net.Listener\n\n\tindex  *controller.IndexController\n\tserver *controller.ServerController\n\tpanel  *controller.XUIController\n\tapi    *controller.APIController\n\n\txrayService    service.XrayService\n\tsettingService service.SettingService\n\ttgbotService   service.Tgbot\n\n\tcron *cron.Cron\n\n\tctx    context.Context\n\tcancel context.CancelFunc\n}\n\nfunc NewServer() *Server {\n\tctx, cancel := context.WithCancel(context.Background())\n\treturn &Server{\n\t\tctx:    ctx,\n\t\tcancel: cancel,\n\t}\n}\n\nfunc (s *Server) getHtmlFiles() ([]string, error) {\n\tfiles := make([]string, 0)\n\tdir, _ := os.Getwd()\n\terr := fs.WalkDir(os.DirFS(dir), \"web/html\", func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif d.IsDir() {\n\t\t\treturn nil\n\t\t}\n\t\tfiles = append(files, path)\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn files, nil\n}\n\nfunc (s *Server) getHtmlTemplate(funcMap template.FuncMap) (*template.Template, error) {\n\tt := template.New(\"\").Funcs(funcMap)\n\terr := fs.WalkDir(htmlFS, \"html\", func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif d.IsDir() {\n\t\t\tnewT, err := t.ParseFS(htmlFS, path+\"/*.html\")\n\t\t\tif err != nil {\n\t\t\t\t// ignore\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tt = newT\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn t, nil\n}\n\nfunc (s *Server) initRouter() (*gin.Engine, error) {\n\tif config.IsDebug() {\n\t\tgin.SetMode(gin.DebugMode)\n\t} else {\n\t\tgin.DefaultWriter = io.Discard\n\t\tgin.DefaultErrorWriter = io.Discard\n\t\tgin.SetMode(gin.ReleaseMode)\n\t}\n\n\tengine := gin.Default()\n\n\twebDomain, err := s.settingService.GetWebDomain()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif webDomain != \"\" {\n\t\tengine.Use(middleware.DomainValidatorMiddleware(webDomain))\n\t}\n\n\tsecret, err := s.settingService.GetSecret()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbasePath, err := s.settingService.GetBasePath()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tengine.Use(gzip.Gzip(gzip.DefaultCompression, gzip.WithExcludedPaths([]string{basePath + \"panel/API/\"})))\n\tassetsBasePath := basePath + \"assets/\"\n\n\tstore := cookie.NewStore(secret)\n\tengine.Use(sessions.Sessions(\"3x-ui\", store))\n\tengine.Use(func(c *gin.Context) {\n\t\tc.Set(\"base_path\", basePath)\n\t})\n\tengine.Use(func(c *gin.Context) {\n\t\turi := c.Request.RequestURI\n\t\tif strings.HasPrefix(uri, assetsBasePath) {\n\t\t\tc.Header(\"Cache-Control\", \"max-age=31536000\")\n\t\t}\n\t})\n\n\t// init i18n\n\terr = locale.InitLocalizer(i18nFS, &s.settingService)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Apply locale middleware for i18n\n\ti18nWebFunc := func(key string, params ...string) string {\n\t\treturn locale.I18n(locale.Web, key, params...)\n\t}\n\tengine.FuncMap[\"i18n\"] = i18nWebFunc\n\tengine.Use(locale.LocalizerMiddleware())\n\n\t// set static files and template\n\tif config.IsDebug() {\n\t\t// for development\n\t\tfiles, err := s.getHtmlFiles()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tengine.LoadHTMLFiles(files...)\n\t\tengine.StaticFS(basePath+\"assets\", http.FS(os.DirFS(\"web/assets\")))\n\t} else {\n\t\t// for production\n\t\ttemplate, err := s.getHtmlTemplate(engine.FuncMap)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tengine.SetHTMLTemplate(template)\n\t\tengine.StaticFS(basePath+\"assets\", http.FS(&wrapAssetsFS{FS: assetsFS}))\n\t}\n\n\t// Apply the redirect middleware (`/xui` to `/panel`)\n\tengine.Use(middleware.RedirectMiddleware(basePath))\n\n\tg := engine.Group(basePath)\n\n\ts.index = controller.NewIndexController(g)\n\ts.server = controller.NewServerController(g)\n\ts.panel = controller.NewXUIController(g)\n\ts.api = controller.NewAPIController(g)\n\n\treturn engine, nil\n}\n\nfunc (s *Server) startTask() {\n\terr := s.xrayService.RestartXray(true)\n\tif err != nil {\n\t\tlogger.Warning(\"start xray failed:\", err)\n\t}\n\t// Check whether xray is running every second\n\ts.cron.AddJob(\"@every 1s\", job.NewCheckXrayRunningJob())\n\n\t// Check if xray needs to be restarted every 30 seconds\n\ts.cron.AddFunc(\"@every 30s\", func() {\n\t\tif s.xrayService.IsNeedRestartAndSetFalse() {\n\t\t\terr := s.xrayService.RestartXray(false)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"restart xray failed:\", err)\n\t\t\t}\n\t\t}\n\t})\n\n\tgo func() {\n\t\ttime.Sleep(time.Second * 5)\n\t\t// Statistics every 10 seconds, start the delay for 5 seconds for the first time, and staggered with the time to restart xray\n\t\ts.cron.AddJob(\"@every 10s\", job.NewXrayTrafficJob())\n\t}()\n\n\t// check client ips from log file every 10 sec\n\ts.cron.AddJob(\"@every 10s\", job.NewCheckClientIpJob())\n\n\t// check client ips from log file every day\n\ts.cron.AddJob(\"@daily\", job.NewClearLogsJob())\n\n\t// Make a traffic condition every day, 8:30\n\tvar entry cron.EntryID\n\tisTgbotenabled, err := s.settingService.GetTgbotEnabled()\n\tif (err == nil) && (isTgbotenabled) {\n\t\truntime, err := s.settingService.GetTgbotRuntime()\n\t\tif err != nil || runtime == \"\" {\n\t\t\tlogger.Errorf(\"Add NewStatsNotifyJob error[%s], Runtime[%s] invalid, will run default\", err, runtime)\n\t\t\truntime = \"@daily\"\n\t\t}\n\t\tlogger.Infof(\"Tg notify enabled,run at %s\", runtime)\n\t\t_, err = s.cron.AddJob(runtime, job.NewStatsNotifyJob())\n\t\tif err != nil {\n\t\t\tlogger.Warning(\"Add NewStatsNotifyJob error\", err)\n\t\t\treturn\n\t\t}\n\n\t\t// check for Telegram bot callback query hash storage reset\n\t\ts.cron.AddJob(\"@every 2m\", job.NewCheckHashStorageJob())\n\n\t\t// Check CPU load and alarm to TgBot if threshold passes\n\t\tcpuThreshold, err := s.settingService.GetTgCpu()\n\t\tif (err == nil) && (cpuThreshold > 0) {\n\t\t\ts.cron.AddJob(\"@every 10s\", job.NewCheckCpuJob())\n\t\t}\n\t} else {\n\t\ts.cron.Remove(entry)\n\t}\n}\n\nfunc (s *Server) Start() (err error) {\n\t// This is an anonymous function, no function name\n\tdefer func() {\n\t\tif err != nil {\n\t\t\ts.Stop()\n\t\t}\n\t}()\n\n\tloc, err := s.settingService.GetTimeLocation()\n\tif err != nil {\n\t\treturn err\n\t}\n\ts.cron = cron.New(cron.WithLocation(loc), cron.WithSeconds())\n\ts.cron.Start()\n\n\tengine, err := s.initRouter()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcertFile, err := s.settingService.GetCertFile()\n\tif err != nil {\n\t\treturn err\n\t}\n\tkeyFile, err := s.settingService.GetKeyFile()\n\tif err != nil {\n\t\treturn err\n\t}\n\tlisten, err := s.settingService.GetListen()\n\tif err != nil {\n\t\treturn err\n\t}\n\tport, err := s.settingService.GetPort()\n\tif err != nil {\n\t\treturn err\n\t}\n\tlistenAddr := net.JoinHostPort(listen, strconv.Itoa(port))\n\tlistener, err := net.Listen(\"tcp\", listenAddr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif certFile != \"\" || keyFile != \"\" {\n\t\tcert, err := tls.LoadX509KeyPair(certFile, keyFile)\n\t\tif err == nil {\n\t\t\tc := &tls.Config{\n\t\t\t\tCertificates: []tls.Certificate{cert},\n\t\t\t}\n\t\t\tlistener = network.NewAutoHttpsListener(listener)\n\t\t\tlistener = tls.NewListener(listener, c)\n\t\t\tlogger.Info(\"Web server running HTTPS on\", listener.Addr())\n\t\t} else {\n\t\t\tlogger.Error(\"Error loading certificates:\", err)\n\t\t\tlogger.Info(\"Web server running HTTP on\", listener.Addr())\n\t\t}\n\t} else {\n\t\tlogger.Info(\"Web server running HTTP on\", listener.Addr())\n\t}\n\ts.listener = listener\n\n\ts.httpServer = &http.Server{\n\t\tHandler: engine,\n\t}\n\n\tgo func() {\n\t\ts.httpServer.Serve(listener)\n\t}()\n\n\ts.startTask()\n\n\tisTgbotenabled, err := s.settingService.GetTgbotEnabled()\n\tif (err == nil) && (isTgbotenabled) {\n\t\ttgBot := s.tgbotService.NewTgbot()\n\t\ttgBot.Start(i18nFS)\n\t}\n\n\treturn nil\n}\n\nfunc (s *Server) Stop() error {\n\ts.cancel()\n\ts.xrayService.StopXray()\n\tif s.cron != nil {\n\t\ts.cron.Stop()\n\t}\n\tif s.tgbotService.IsRunning() {\n\t\ts.tgbotService.Stop()\n\t}\n\tvar err1 error\n\tvar err2 error\n\tif s.httpServer != nil {\n\t\terr1 = s.httpServer.Shutdown(s.ctx)\n\t}\n\tif s.listener != nil {\n\t\terr2 = s.listener.Close()\n\t}\n\treturn common.Combine(err1, err2)\n}\n\nfunc (s *Server) GetCtx() context.Context {\n\treturn s.ctx\n}\n\nfunc (s *Server) GetCron() *cron.Cron {\n\treturn s.cron\n}\n"
  },
  {
    "path": "x-ui.service",
    "content": "[Unit]\nDescription=x-ui Service\nAfter=network.target\nWants=network.target\n\n[Service]\nEnvironment=\"XRAY_VMESS_AEAD_FORCED=false\"\nType=simple\nWorkingDirectory=/usr/local/x-ui/\nExecStart=/usr/local/x-ui/x-ui\nRestart=on-failure\nRestartSec=5s\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "x-ui.sh",
    "content": "#!/bin/bash\n\nred='\\033[0;31m'\ngreen='\\033[0;32m'\nyellow='\\033[0;33m'\nplain='\\033[0m'\n\n#Add some basic function here\nfunction LOGD() {\n    echo -e \"${yellow}[DEG] $* ${plain}\"\n}\n\nfunction LOGE() {\n    echo -e \"${red}[ERR] $* ${plain}\"\n}\n\nfunction LOGI() {\n    echo -e \"${green}[INF] $* ${plain}\"\n}\n\n# check root\n[[ $EUID -ne 0 ]] && echo -e \"${red}致命错误: ${plain} 请使用 root 权限运行此脚本\\n\" && exit 1\n\n# Check OS and set release variable\nif [[ -f /etc/os-release ]]; then\n    source /etc/os-release\n    release=$ID\nelif [[ -f /usr/lib/os-release ]]; then\n    source /usr/lib/os-release\n    release=$ID\nelse\n    echo -e \"${red}检查服务器操作系统失败，请联系作者!${plain}\" >&2\n    exit 1\nfi\n\necho -e \"——————————————————————\"\necho -e \"当前服务器的操作系统为:${red} $release${plain}\"\necho \"\"\nxui_version=$(/usr/local/x-ui/x-ui -v)\nlast_version=$(curl -Ls \"https://api.github.com/repos/xeefei/3x-ui/releases/latest\" | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\\1/')\necho -e \"${green}当前代理面板的版本为: ${red}〔3X-UI优化版〕v${xui_version}${plain}\"\necho \"\"\necho -e \"${yellow}〔3X-UI优化版〕最新版为---------->>> ${last_version}${plain}\"\n\nos_version=$(grep -i version_id /etc/os-release | cut -d \\\" -f2 | cut -d . -f1)\n\nif [[ \"${release}\" == \"centos\" ]]; then\n    if [[ ${os_version} -lt 8 ]]; then\n        echo -e \"${red} 请使用 CentOS 8 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"ubuntu\" ]]; then\n    if [[ ${os_version} -lt 20 ]]; then\n        echo -e \"${red} 请使用 Ubuntu 20 或更高版本!${plain}\\n\" && exit 1\n    fi\n\nelif [[ \"${release}\" == \"fedora\" ]]; then\n    if [[ ${os_version} -lt 36 ]]; then\n        echo -e \"${red} 请使用 Fedora 36 或更高版本!${plain}\\n\" && exit 1\n    fi\n\nelif [[ \"${release}\" == \"debian\" ]]; then\n    if [[ ${os_version} -lt 11 ]]; then\n        echo -e \"${red} 请使用 Debian 11 或更高版本 ${plain}\\n\" && exit 1\n    fi\n\nelif [[ \"${release}\" == \"almalinux\" ]]; then\n    if [[ ${os_version} -lt 9 ]]; then\n        echo -e \"${red} 请使用 AlmaLinux 9 或更高版本 ${plain}\\n\" && exit 1\n    fi\n\nelif [[ \"${release}\" == \"rocky\" ]]; then\n    if [[ ${os_version} -lt 9 ]]; then\n        echo -e \"${red} 请使用 RockyLinux 9 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelif [[ \"${release}\" == \"arch\" ]]; then\n    echo \"您的操作系统是 ArchLinux\"\nelif [[ \"${release}\" == \"manjaro\" ]]; then\n    echo \"您的操作系统是 Manjaro\"\nelif [[ \"${release}\" == \"armbian\" ]]; then\n    echo \"您的操作系统是 Armbian\"\nelif [[ \"${release}\" == \"alpine\" ]]; then\n    echo \"您的操作系统是 Alpine Linux\"\nelif [[ \"${release}\" == \"opensuse-tumbleweed\" ]]; then\n    echo \"您的操作系统是 OpenSUSE Tumbleweed\"\nelif [[ \"${release}\" == \"oracle\" ]]; then\n    if [[ ${os_version} -lt 8 ]]; then\n        echo -e \"${red} 请使用 Oracle Linux 8 或更高版本 ${plain}\\n\" && exit 1\n    fi\nelse\n    echo -e \"${red}此脚本不支持您的操作系统。${plain}\\n\"\n    echo \"请确保您使用的是以下受支持的操作系统之一：\"\n    echo \"- Ubuntu 20.04+\"\n    echo \"- Debian 11+\"\n    echo \"- CentOS 8+\"\n    echo \"- Fedora 36+\"\n    echo \"- Arch Linux\"\n    echo \"- Parch Linux\"\n    echo \"- Manjaro\"\n    echo \"- Armbian\"\n    echo \"- Alpine Linux\"\n    echo \"- AlmaLinux 9+\"\n    echo \"- Rocky Linux 9+\"\n    echo \"- Oracle Linux 8+\"\n    echo \"- OpenSUSE Tumbleweed\"\n    exit 1\n\nfi\n\n# Declare Variables\nlog_folder=\"${XUI_LOG_FOLDER:=/var/log}\"\niplimit_log_path=\"${log_folder}/3xipl.log\"\niplimit_banned_log_path=\"${log_folder}/3xipl-banned.log\"\n\nconfirm() {\n    if [[ $# > 1 ]]; then\n        echo && read -p \"$1 [Default $2]: \" temp\n        if [[ \"${temp}\" == \"\" ]]; then\n            temp=$2\n        fi\n    else\n        read -p \"$1 [y/n]: \" temp\n    fi\n    if [[ \"${temp}\" == \"y\" || \"${temp}\" == \"Y\" ]]; then\n        return 0\n    else\n        return 1\n    fi\n}\n\nconfirm_restart() {\n    confirm \"重启面板，注意：重启面板也会重启 Xray\" \"y\"\n    if [[ $? == 0 ]]; then\n        restart\n    else\n        show_menu\n    fi\n}\n\nbefore_show_menu() {\n    echo && echo -n -e \"${yellow}按 Enter 键返回主菜单：${plain}\" && read temp\n    show_menu\n}\n\ninstall() {\n    bash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/main/install.sh)\n    if [[ $? == 0 ]]; then\n        if [[ $# == 0 ]]; then\n            start\n        else\n            start 0\n        fi\n    fi\n}\n\nupdate() {\n    confirm \"$(echo -e \"${green}该功能将强制安装最新版本，并且数据不会丢失。${red}你想继续吗？${plain}---->>请输入\")\" \"y\"\n    if [[ $? != 0 ]]; then\n        LOGE \"已取消\"\n        if [[ $# == 0 ]]; then\n            before_show_menu\n        fi\n        return 0\n    fi\n    bash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/main/install.sh)\n    if [[ $? == 0 ]]; then\n        LOGI \"更新完成，面板已自动重启\"\n        exit 0\n    fi\n}\n\nupdate_menu() {\n    echo -e \"${yellow}更新菜单项${plain}\"\n    confirm \"此功能会将所有菜单项更新为最新显示状态\" \"y\"\n    if [[ $? != 0 ]]; then\n        LOGE \"Cancelled\"\n        if [[ $# == 0 ]]; then\n            before_show_menu\n        fi\n        return 0\n    fi\n    \n    wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/xeefei/3x-ui/main/x-ui.sh\n    chmod +x /usr/local/x-ui/x-ui.sh\n    chmod +x /usr/bin/x-ui\n    \n     if [[ $? == 0 ]]; then\n        echo -e \"${green}更新成功，面板已自动重启${plain}\"\n        exit 0\n    else\n        echo -e \"${red}更新菜单项失败${plain}\"\n        return 1\n    fi\n}\n\ncustom_version() {\n    echo \"输入面板版本 (例: 2.3.8):\"\n    read panel_version\n\n    if [ -z \"$panel_version\" ]; then\n        echo \"面板版本不能为空。\"\n        exit 1\n    fi\n\n    download_link=\"https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh\"\n\n    # Use the entered panel version in the download link\n    install_command=\"bash <(curl -Ls $download_link) v$panel_version\"\n\n    echo \"下载并安装面板版本 $panel_version...\"\n    eval $install_command\n}\n\n# Function to handle the deletion of the script file\ndelete_script() {\n    rm \"$0\"  # Remove the script file itself\n    exit 1\n}\n\nuninstall() {\n    confirm \"您确定要卸载面板吗? Xray 也将被卸载!\" \"n\"\n    if [[ $? != 0 ]]; then\n        if [[ $# == 0 ]]; then\n            show_menu\n        fi\n        return 0\n    fi\n    systemctl stop x-ui\n    systemctl disable x-ui\n    rm /etc/systemd/system/x-ui.service -f\n    systemctl daemon-reload\n    systemctl reset-failed\n    rm /etc/x-ui/ -rf\n    rm /usr/local/x-ui/ -rf\n\n    echo \"\"\n    echo -e \"卸载成功\\n\"\n    echo \"如果您需要再次安装此面板，可以使用以下命令:\"\n    echo -e \"${green}bash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)${plain}\"\n    echo \"\"\n    # Trap the SIGTERM signal\n    trap delete_script SIGTERM\n    delete_script\n}\n\nreset_user() {\n    confirm \"您确定重置面板的用户名和密码吗?\" \"n\"\n    if [[ $? != 0 ]]; then\n        if [[ $# == 0 ]]; then\n            show_menu\n        fi\n        return 0\n    fi\n    read -rp \"请设置用户名 [默认为随机用户名]: \" config_account\n    [[ -z $config_account ]] && config_account=$(date +%s%N | md5sum | cut -c 1-8)\n    read -rp \"请设置密码 [默认为随机密码]: \" config_password\n    [[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8)\n    /usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password} >/dev/null 2>&1\n    /usr/local/x-ui/x-ui setting -remove_secret >/dev/null 2>&1\n    echo -e \"面板登录用户名已重置为：${green} ${config_account} ${plain}\"\n    echo -e \"面板登录密码已重置为：${green} ${config_password} ${plain}\"\n    echo -e \"${yellow} 面板 Secret Token 已禁用 ${plain}\"\n    echo -e \"${green} 请使用新的登录用户名和密码访问 3X-UI 面板。也请记住它们！${plain}\"\n    confirm_restart\n}\n\ngen_random_string() {\n    local length=\"$1\"\n    local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w \"$length\" | head -n 1)\n    echo \"$random_string\"\n}\n\nreset_webbasepath() {\n    echo -e \"${yellow}修改访问路径${plain}\"\n    \n    # Prompt user to set a new web base path\n    read -rp \"请设置新的访问路径（若回车默认或输入y则为随机路径）: \" config_webBasePath\n    \n    if [[ $config_webBasePath == \"y\" ]]; then\n        config_webBasePath=$(gen_random_string 10)\n    fi\n    \n    # Apply the new web base path setting\n    /usr/local/x-ui/x-ui setting -webBasePath \"${config_webBasePath}\" >/dev/null 2>&1\n    systemctl restart x-ui\n    \n    # Display confirmation message\n    echo -e \"面板访问路径已重置为: ${green}${config_webBasePath}${plain}\"\n    echo -e \"${green}请使用新的路径登录访问面板${plain}\"\n}\n\nreset_config() {\n    confirm \"您确定要重置所有面板设置，帐户数据不会丢失，用户名和密码不会更改\" \"n\"\n    if [[ $? != 0 ]]; then\n        if [[ $# == 0 ]]; then\n            show_menu\n        fi\n        return 0\n    fi\n    /usr/local/x-ui/x-ui setting -reset\n    echo -e \"所有面板设置已重置为默认，请立即重新启动面板，并使用默认的${green}2053${plain}端口访问网页面板\"\n    confirm_restart\n}\n\ncheck_config() {\n    info=$(/usr/local/x-ui/x-ui setting -show true)\n    if [[ $? != 0 ]]; then\n        LOGE \"获取当前设置错误，请检查日志\"\n        show_menu\n    fi\n    echo -e \"${info}${plain}\"\n}\n\nset_port() {\n    echo && echo -n -e \"输入端口号 [1-65535]: \" && read port\n    if [[ -z \"${port}\" ]]; then\n        LOGD \"Cancelled\"\n        before_show_menu\n    else\n        /usr/local/x-ui/x-ui setting -port ${port}\n        echo -e \"端口已设置，请立即重启面板，并使用新端口 ${green}${port}${plain} 以访问面板\"\n        confirm_restart\n    fi\n}\n\nstart() {\n    check_status\n    if [[ $? == 0 ]]; then\n        echo \"\"\n        LOGI \"面板正在运行，无需再次启动，如需重新启动，请选择重新启动\"\n    else\n        systemctl start x-ui\n        sleep 2\n        check_status\n        if [[ $? == 0 ]]; then\n            LOGI \"x-ui 已成功启动\"\n        else\n            LOGE \"面板启动失败，可能是启动时间超过两秒，请稍后查看日志信息\"\n        fi\n    fi\n\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nstop() {\n    check_status\n    if [[ $? == 1 ]]; then\n        echo \"\"\n        LOGI \"面板已关闭，无需再次关闭！\"\n    else\n        systemctl stop x-ui\n        sleep 2\n        check_status\n        if [[ $? == 1 ]]; then\n            LOGI \"x-ui 和 Xray 已成功关闭\"\n        else\n            LOGE \"面板关闭失败，可能是停止时间超过两秒，请稍后查看日志信息\"\n        fi\n    fi\n\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nrestart() {\n    systemctl restart x-ui\n    sleep 2\n    check_status\n    if [[ $? == 0 ]]; then\n        LOGI \"x-ui and Xray 已成功重启\"\n    else\n        LOGE \"面板重启失败，可能是启动时间超过两秒，请稍后查看日志信息\"\n    fi\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nstatus() {\n    systemctl status x-ui -l\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nenable() {\n    systemctl enable x-ui\n    if [[ $? == 0 ]]; then\n        LOGI \"x-ui 已成功设置开机启动\"\n    else\n        LOGE \"x-ui 设置开机启动失败\"\n    fi\n\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\ndisable() {\n    systemctl disable x-ui\n    if [[ $? == 0 ]]; then\n        LOGI \"x-ui 已成功取消开机启动\"\n    else\n        LOGE \"x-ui 取消开机启动失败\"\n    fi\n\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nshow_log() {\n    journalctl -u x-ui.service -e --no-pager -f\n    if [[ $# == 0 ]]; then\n        before_show_menu\n    fi\n}\n\nshow_banlog() {\n    if test -f \"${iplimit_banned_log_path}\"; then\n        if [[ -s \"${iplimit_banned_log_path}\" ]]; then\n            cat ${iplimit_banned_log_path}\n        else\n            echo -e \"${red}日志文件为空${plain}\\n\"\n        fi\n    else\n        echo -e \"${red}未找到日志文件。 请先安装 Fail2ban 和 IP Limit${plain}\\n\"\n    fi\n}\n\nbbr_menu() {\n    echo -e \"${green}\\t1.${plain} 启用 BBR\"\n    echo -e \"${green}\\t2.${plain} 禁用 BBR\"\n    echo -e \"${green}\\t0.${plain} 返回主菜单\"\n    read -p \"请输入选项: \" choice\n    case \"$choice\" in\n    0)\n        show_menu\n        ;;\n    1)\n        enable_bbr\n        ;;\n    2)\n        disable_bbr\n        ;;\n    *) echo \"无效选项\" ;;\n    esac\n}\n\ndisable_bbr() {\n    if ! grep -q \"net.core.default_qdisc=fq\" /etc/sysctl.conf || ! grep -q \"net.ipv4.tcp_congestion_control=bbr\" /etc/sysctl.conf; then\n        echo -e \"${yellow}BBR 当前未启用${plain}\"\n        exit 0\n    fi\n\n    # Replace BBR with CUBIC configurations\n    sed -i 's/net.core.default_qdisc=fq/net.core.default_qdisc=pfifo_fast/' /etc/sysctl.conf\n    sed -i 's/net.ipv4.tcp_congestion_control=bbr/net.ipv4.tcp_congestion_control=cubic/' /etc/sysctl.conf\n\n    # Apply changes\n    sysctl -p\n\n    # Verify that BBR is replaced with CUBIC\n    if [[ $(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}') == \"cubic\" ]]; then\n        echo -e \"${green}BBR 已成功替换为 CUBIC${plain}\"\n    else\n        echo -e \"${red}用 CUBIC 替换 BBR 失败，请检查您的系统配置。${plain}\"\n    fi\n}\n\nenable_bbr() {\n    if grep -q \"net.core.default_qdisc=fq\" /etc/sysctl.conf && grep -q \"net.ipv4.tcp_congestion_control=bbr\" /etc/sysctl.conf; then\n        echo -e \"${green}BBR 已经启用!${plain}\"\n        exit 0\n    fi\n\n    # Check the OS and install necessary packages\n    case \"${release}\" in\n    ubuntu | debian | armbian)\n        apt-get update && apt-get install -yqq --no-install-recommends ca-certificates\n        ;;\n    centos | almalinux | rocky | oracle)\n        yum -y update && yum -y install ca-certificates\n        ;;\n    fedora)\n        dnf -y update && dnf -y install ca-certificates\n        ;;\n    arch | manjaro)\n        pacman -Sy --noconfirm ca-certificates\n        ;;\n    *)\n        echo -e \"${red}不支持的操作系统。请检查脚本并手动安装必要的软件包${plain}\\n\"\n        exit 1\n        ;;\n    esac\n\n    # Enable BBR\n    echo \"net.core.default_qdisc=fq\" | tee -a /etc/sysctl.conf\n    echo \"net.ipv4.tcp_congestion_control=bbr\" | tee -a /etc/sysctl.conf\n\n    # Apply changes\n    sysctl -p\n\n    # Verify that BBR is enabled\n    if [[ $(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}') == \"bbr\" ]]; then\n        echo -e \"${green}BBR 已成功启用${plain}\"\n    else\n        echo -e \"${red}启用 BBR 失败，请检查您的系统配置${plain}\"\n    fi\n}\n\nupdate_shell() {\n    wget -O /usr/bin/x-ui -N --no-check-certificate https://github.com/xeefei/3x-ui/raw/main/x-ui.sh\n    if [[ $? != 0 ]]; then\n        echo \"\"\n        LOGE \"下载脚本失败，请检查机器是否可以连接至 GitHub\"\n        before_show_menu\n    else\n        chmod +x /usr/bin/x-ui\n        LOGI \"升级脚本成功，请重新运行脚本\" && exit 0\n    fi\n}\n\n# 0: running, 1: not running, 2: not installed\ncheck_status() {\n    if [[ ! -f /etc/systemd/system/x-ui.service ]]; then\n        return 2\n    fi\n    temp=$(systemctl status x-ui | grep Active | awk '{print $3}' | cut -d \"(\" -f2 | cut -d \")\" -f1)\n    if [[ \"${temp}\" == \"running\" ]]; then\n        return 0\n    else\n        return 1\n    fi\n}\n\ncheck_enabled() {\n    temp=$(systemctl is-enabled x-ui)\n    if [[ \"${temp}\" == \"enabled\" ]]; then\n        return 0\n    else\n        return 1\n    fi\n}\n\ncheck_uninstall() {\n    check_status\n    if [[ $? != 2 ]]; then\n        echo \"\"\n        LOGE \"面板已安装，请勿重新安装\"\n        if [[ $# == 0 ]]; then\n            before_show_menu\n        fi\n        return 1\n    else\n        return 0\n    fi\n}\n\ncheck_install() {\n    check_status\n    if [[ $? == 2 ]]; then\n        echo \"\"\n        LOGE \"请先安装面板\"\n        if [[ $# == 0 ]]; then\n            before_show_menu\n        fi\n        return 1\n    else\n        return 0\n    fi\n}\n\nshow_status() {\n    check_status\n    case $? in\n    0)\n        echo -e \"面板状态: ${green}运行中${plain}\"\n        show_enable_status\n        ;;\n    1)\n        echo -e \"面板状态: ${yellow}未运行${plain}\"\n        show_enable_status\n        ;;\n    2)\n        echo -e \"面板状态: ${red}未安装${plain}\"\n        ;;\n    esac\n    show_xray_status\n}\n\nshow_enable_status() {\n    check_enabled\n    if [[ $? == 0 ]]; then\n        echo -e \"开机启动: ${green}是${plain}\"\n    else\n        echo -e \"开机启动: ${red}否${plain}\"\n    fi\n}\n\ncheck_xray_status() {\n    count=$(ps -ef | grep \"xray-linux\" | grep -v \"grep\" | wc -l)\n    if [[ count -ne 0 ]]; then\n        return 0\n    else\n        return 1\n    fi\n}\n\nshow_xray_status() {\n    check_xray_status\n    if [[ $? == 0 ]]; then\n        echo -e \"Xray状态: ${green}运行中${plain}\"\n    else\n        echo -e \"Xray状态: ${red}未运行${plain}\"\n    fi\n}\n\nfirewall_menu() {\n    echo -e \"${green}\\t1.${plain} 安装防火墙并开放端口\"\n    echo -e \"${green}\\t2.${plain} 允许列表\"\n    echo -e \"${green}\\t3.${plain} 从列表中删除端口\"\n    echo -e \"${green}\\t4.${plain} 禁用防火墙\"\n    echo -e \"${green}\\t0.${plain} 返回主菜单\"\n    read -p \"请输入选项: \" choice\n    case \"$choice\" in\n    0)\n        show_menu\n        ;;\n    1)\n        open_ports\n        ;;\n    2)\n        sudo ufw status\n        ;;\n    3)\n        delete_ports\n        ;;\n    4)\n        sudo ufw disable\n        ;;\n    *) echo \"无效选项\" ;;\n    esac\n}\n\nopen_ports() {\n    if ! command -v ufw &>/dev/null; then\n        echo \"ufw 防火墙未安装，正在安装...\"\n        apt-get update\n        apt-get install -y ufw\n    else\n        echo \"ufw 防火墙已安装\"\n    fi\n\n    # Check if the firewall is inactive\n    if ufw status | grep -q \"Status: active\"; then\n        echo \"防火墙已经激活\"\n    else\n        # Open the necessary ports\n        ufw allow ssh\n        ufw allow http\n        ufw allow https\n        ufw allow 2053/tcp\n\n        # Enable the firewall\n        ufw --force enable\n    fi\n\n    # Prompt the user to enter a list of ports\n    read -p \"输入您要打开的端口（例如 80,443,2053 或端口范围 400-500): \" ports\n\n    # Check if the input is valid\n    if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then\n        echo \"错误：输入无效。请输入以英文逗号分隔的端口列表或端口范围（例如 80,443,2053 或 400-500)\" >&2\n        exit 1\n    fi\n\n    # Open the specified ports using ufw\n    IFS=',' read -ra PORT_LIST <<<\"$ports\"\n    for port in \"${PORT_LIST[@]}\"; do\n        if [[ $port == *-* ]]; then\n            # Split the range into start and end ports\n            start_port=$(echo $port | cut -d'-' -f1)\n            end_port=$(echo $port | cut -d'-' -f2)\n            # Loop through the range and open each port\n            for ((i = start_port; i <= end_port; i++)); do\n                ufw allow $i\n            done\n        else\n            ufw allow \"$port\"\n        fi\n    done\n\n    # Confirm that the ports are open\n    ufw status | grep $ports\n}\n\ndelete_ports() {\n    # Prompt the user to enter the ports they want to delete\n    read -p \"输入要删除的端口（例如 80,443,2053 或范围 400-500): \" ports\n\n    # Check if the input is valid\n    if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then\n        echo \"错误：输入无效。请输入以英文逗号分隔的端口列表或端口范围（例如 80,443,2053 或 400-500)\" >&2\n        exit 1\n    fi\n\n    # Delete the specified ports using ufw\n    IFS=',' read -ra PORT_LIST <<<\"$ports\"\n    for port in \"${PORT_LIST[@]}\"; do\n        if [[ $port == *-* ]]; then\n            # Split the range into start and end ports\n            start_port=$(echo $port | cut -d'-' -f1)\n            end_port=$(echo $port | cut -d'-' -f2)\n            # Loop through the range and delete each port\n            for ((i = start_port; i <= end_port; i++)); do\n                ufw delete allow $i\n            done\n        else\n            ufw delete allow \"$port\"\n        fi\n    done\n\n    # Confirm that the ports are deleted\n    echo \"删除指定端口:\"\n    ufw status | grep $ports\n}\n\nupdate_geo() {\n    local defaultBinFolder=\"/usr/local/x-ui/bin\"\n    read -p \"请输入 x-ui bin 文件夹路径，默认留空。（默认值：'${defaultBinFolder}')\" binFolder\n    binFolder=${binFolder:-${defaultBinFolder}}\n    if [[ ! -d ${binFolder} ]]; then\n        LOGE \"文件夹 ${binFolder} 不存在！\"\n        LOGI \"制作 bin 文件夹：${binFolder}...\"\n        mkdir -p ${binFolder}\n    fi\n\n    systemctl stop x-ui\n    cd ${binFolder}\n    rm -f geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat geoip_VN.dat geosite_VN.dat\n    wget -N https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat\n    wget -N https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\n    wget -O geoip_IR.dat -N https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat\n    wget -O geosite_IR.dat -N https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat\n    wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat\n    wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat\n    systemctl start x-ui\n    echo -e \"${green}Geosite.dat + Geoip.dat + geoip_IR.dat + geosite_IR.dat 在 bin 文件夹: '${binfolder}' 中已经更新成功 !${plain}\"\n    before_show_menu\n}\n\ninstall_acme() {\n    cd ~\n    LOGI \"install acme...\"\n    curl https://get.acme.sh | sh\n    if [ $? -ne 0 ]; then\n        LOGE \"安装 acme 失败\"\n        return 1\n    else\n        LOGI \"安装 acme 成功\"\n    fi\n    return 0\n}\n\nssl_cert_issue_main() {\n    echo -e \"${green}\\t1.${plain} 获取 SSL 证书\"\n    echo -e \"${green}\\t2.${plain} 吊销证书\"\n    echo -e \"${green}\\t3.${plain} 续签证书\"\n    echo -e \"${green}\\t0.${plain} 返回主菜单\"\n    read -p \"请输入选项: \" choice\n    case \"$choice\" in\n    0)\n        show_menu\n        ;;\n    1)\n        ssl_cert_issue\n        ;;\n    2)\n        local domain=\"\"\n        read -p \"请输入您的域名以吊销证书: \" domain\n        ~/.acme.sh/acme.sh --revoke -d ${domain}\n        LOGI \"证书吊销成功\"\n        ;;\n    3)\n        local domain=\"\"\n        read -p \"请输入您的域名以续签 SSL 证书: \" domain\n        ~/.acme.sh/acme.sh --renew -d ${domain} --force\n        ;;\n    *) echo \"无效选项\" ;;\n    esac\n}\n\nssl_cert_issue() {\n    # check for acme.sh first\n    if ! command -v ~/.acme.sh/acme.sh &>/dev/null; then\n        echo \"未找到 acme.sh, 正在安装\"\n        install_acme\n        if [ $? -ne 0 ]; then\n            LOGE \"安装 acme 失败，请检查日志\"\n            exit 1\n        fi\n    fi\n    # install socat second\n    case \"${release}\" in\n    ubuntu | debian | armbian)\n        apt update && apt install socat -y\n        ;;\n    centos | almalinux | rocky | oracle)\n        yum -y update && yum -y install socat\n        ;;\n    fedora)\n        dnf -y update && dnf -y install socat\n        ;;\n    arch | manjaro)\n        pacman -Sy --noconfirm socat\n        ;;\n    *)\n        echo -e \"${red}不支持的操作系统，请检查脚本并手动安装必要的软件包。${plain}\\n\"\n        exit 1\n        ;;\n    esac\n    if [ $? -ne 0 ]; then\n        LOGE \"安装 socat 失败，请检查日志\"\n        exit 1\n    else\n        LOGI \"安装 socat 成功...\"\n    fi\n\n    # get the domain here,and we need verify it\n    local domain=\"\"\n    read -p \"请输入您的域名:\" domain\n    LOGD \"您的域名是：${domain}，正在检查...\"\n    # here we need to judge whether there exists cert already\n    local currentCert=$(~/.acme.sh/acme.sh --list | tail -1 | awk '{print $1}')\n\n    if [ ${currentCert} == ${domain} ]; then\n        local certInfo=$(~/.acme.sh/acme.sh --list)\n        LOGE \"系统已经有证书，无法再次颁发，当前证书详细信息:\"\n        LOGI \"$certInfo\"\n        echo \"\"\n        echo -e \"${green}如果要申请安装证书并每3个月〔自动续签〕证书，请确保${red} 80 ${green}和 ${red}443 ${green}端口已打开放行${plain}\"\n        exit 1\n    else\n        LOGI \"您的域现在已准备好颁发证书...\"\n    fi\n\n    # create a directory for install cert\n    certPath=\"/root/cert/${domain}\"\n    if [ ! -d \"$certPath\" ]; then\n        mkdir -p \"$certPath\"\n    else\n        rm -rf \"$certPath\"\n        mkdir -p \"$certPath\"\n    fi\n\n    # get needed port here\n    local WebPort=80\n    read -p \"请选择您使用的端口，默认为 80 端口:\" WebPort\n    if [[ ${WebPort} -gt 65535 || ${WebPort} -lt 1 ]]; then\n        LOGE \"您输入的端口 ${WebPort} 无效，将使用默认端口\"\n    fi\n    LOGI \"将使用端口：${WebPort} 来颁发证书，请确保该端口已开启...\"\n    # NOTE:This should be handled by user\n    # open the port and kill the occupied progress\n    ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt\n    ~/.acme.sh/acme.sh --issue -d ${domain} --listen-v6 --standalone --httpport ${WebPort}\n    if [ $? -ne 0 ]; then\n        LOGE \"颁发证书失败，请检查日志\"\n        rm -rf ~/.acme.sh/${domain}\n        exit 1\n    else\n        LOGE \"颁发证书成功，安装证书...\"\n    fi\n    # install cert\n    ~/.acme.sh/acme.sh --installcert -d ${domain} \\\n        --key-file /root/cert/${domain}/privkey.pem \\\n        --fullchain-file /root/cert/${domain}/fullchain.pem\n\n    if [ $? -ne 0 ]; then\n        LOGE \"安装证书失败\"\n        rm -rf ~/.acme.sh/${domain}\n        exit 1\n    else\n        LOGI \"安装证书成功，启用自动续订...\"\n        echo \"\"\n        echo -e \"${green}如果要申请安装证书并每3个月〔自动续签〕证书，请确保${red} 80 ${green}和 ${red}443 ${green}端口已打开放行${plain}\"\n    fi\n\n    ~/.acme.sh/acme.sh --upgrade --auto-upgrade\n    if [ $? -ne 0 ]; then\n        LOGE \"自动续订失败，证书详细信息:\"\n        ls -lah cert/*\n        chmod 755 $certPath/*\n        exit 1\n    else\n        LOGI \"自动续订成功，证书详细信息:\"\n        ls -lah cert/*\n        chmod 755 $certPath/*\n        echo \"\"\n        echo -e \"${green}如果要申请安装证书并每3个月〔自动续签〕证书，请确保${red} 80 ${green}和 ${red}443 ${green}端口已打开放行${plain}\"\n    fi\n}\n\nssl_cert_issue_CF() {\n    echo -E \"\"\n    LOGD \"******使用说明******\"\n    LOGI \"此 Acme 脚本需要以下数据：\"\n    LOGI \"1. Cloudflare 注册邮箱\"\n    LOGI \"2. Cloudflare 全局 API 密钥\"\n    LOGI \"3. Cloudflare 已解析 dns 到当前服务器的域名\"\n    LOGI \"4. 脚本申请证书，默认安装路径为 /root/cert \"\n    confirm \"确认申请? [y/n]\" \"y\"\n    if [ $? -eq 0 ]; then\n        # check for acme.sh first\n        if ! command -v ~/.acme.sh/acme.sh &>/dev/null; then\n            echo \"未找到 acme.sh, 正在安装\"\n            install_acme\n            if [ $? -ne 0 ]; then\n                LOGE \"安装 acme 失败，请检查日志\"\n                exit 1\n            fi\n        fi\n        CF_Domain=\"\"\n        CF_GlobalKey=\"\"\n        CF_AccountEmail=\"\"\n        certPath=/root/cert\n        if [ ! -d \"$certPath\" ]; then\n            mkdir $certPath\n        else\n            rm -rf $certPath\n            mkdir $certPath\n        fi\n        LOGD \"请设置域名:\"\n        read -p \"在此输入您的域名:\" CF_Domain\n        LOGD \"您的域名为: ${CF_Domain}\"\n        LOGD \"请设置 CF Global API Key:\"\n        read -p \"在此输入您的 API Key:\" CF_GlobalKey\n        LOGD \"您的 API 密钥是: ${CF_GlobalKey}\"\n        LOGD \"请设置注册邮箱:\"\n        read -p \"在此输入您的邮箱:\" CF_AccountEmail\n        LOGD \"您的账号邮箱地址是: ${CF_AccountEmail}\"\n        ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt\n        if [ $? -ne 0 ]; then\n            LOGE \"默认 CA: Lets'Encrypt 失败，脚本退出...\"\n            exit 1\n        fi\n        export CF_Key=\"${CF_GlobalKey}\"\n        export CF_Email=${CF_AccountEmail}\n        ~/.acme.sh/acme.sh --issue --dns dns_cf -d ${CF_Domain} -d *.${CF_Domain} --log\n        if [ $? -ne 0 ]; then\n            LOGE \"证书颁发失败，脚本退出...\"\n            exit 1\n        else\n            LOGI \"证书颁发成功，正在安装...\"\n        fi\n        ~/.acme.sh/acme.sh --installcert -d ${CF_Domain} -d *.${CF_Domain} --ca-file /root/cert/ca.cer \\\n            --cert-file /root/cert/${CF_Domain}.cer --key-file /root/cert/${CF_Domain}.key \\\n            --fullchain-file /root/cert/fullchain.cer\n        if [ $? -ne 0 ]; then\n            LOGE \"证书安装失败，脚本退出...\"\n            exit 1\n        else\n            LOGI \"证书安装成功，开启自动更新...\"\n            echo \"\"\n            echo -e \"${green}如果要申请安装证书并每3个月〔自动续签〕证书，请确保${red} 80 ${green}和 ${red}443 ${green}端口已打开放行${plain}\"\n        fi\n        ~/.acme.sh/acme.sh --upgrade --auto-upgrade\n        if [ $? -ne 0 ]; then\n            LOGE \"自动更新设置失败，脚本退出...\"\n            ls -lah cert\n            chmod 755 $certPath\n            exit 1\n        else\n            LOGI \"证书已安装并开启自动续订，具体信息如下:\"\n            ls -lah cert\n            chmod 755 $certPath\n            echo \"\"\n            echo -e \"${green}如果要申请安装证书并每3个月〔自动续签〕证书，请确保${red} 80 ${green}和 ${red}443 ${green}端口已打开放行${plain}\"\n        fi\n    else\n        show_menu\n    fi\n}\n\nwarp_cloudflare() {\n    echo -e \"${green}\\t1.${plain} 安装 WARP socks5 代理\"\n    echo -e \"${green}\\t2.${plain} 账户类型 (free, plus, team)\"\n    echo -e \"${green}\\t3.${plain} 开启 / 关闭 WireProxy\"\n    echo -e \"${green}\\t4.${plain} 卸载 WARP\"\n    echo -e \"${green}\\t0.${plain} 返回主菜单\"\n    read -p \"请输入选项: \" choice\n    case \"$choice\" in\n    0)\n        show_menu\n        ;;\n    1)\n        bash <(curl -sSL https://raw.githubusercontent.com/hamid-gh98/x-ui-scripts/main/install_warp_proxy.sh)\n        ;;\n    2)\n        warp a\n        ;;\n    3)\n        warp y\n        ;;\n    4)\n        warp u\n        ;;\n    *) echo \"无效选项\" ;;\n    esac\n}\n\nsubconverter() {\n        bash <(curl -fsSL https://get.docker.com | bash -s docker) \n        ipv4=$(curl -s4m8 ip.p3terx.com -k | sed -n 1p)\n        docker run -d --name sub --restart always -p 18080:80 -p 25500:25500 -v /PATH/sub/conf:/usr/share/nginx/html/conf stilleshan/sub\n    echo -e \"${yellow}【链接转换模块】安装完成！！！\"\n    echo -e \"${green}【订阅转换功能】访问地址为：${plain}${green}http://$ipv4:18080\"\n    echo -e \"${green}【后端服务】拉取地址为：${plain}${green}http://$ipv4:25500\"\n    show_menu\n}\n\nrun_speedtest() {\n    # Check if Speedtest is already installed\n    if ! command -v speedtest &>/dev/null; then\n        # If not installed, install it\n        local pkg_manager=\"\"\n        local speedtest_install_script=\"\"\n\n        if command -v dnf &>/dev/null; then\n            pkg_manager=\"dnf\"\n            speedtest_install_script=\"https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh\"\n        elif command -v yum &>/dev/null; then\n            pkg_manager=\"yum\"\n            speedtest_install_script=\"https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh\"\n        elif command -v apt-get &>/dev/null; then\n            pkg_manager=\"apt-get\"\n            speedtest_install_script=\"https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh\"\n        elif command -v apt &>/dev/null; then\n            pkg_manager=\"apt\"\n            speedtest_install_script=\"https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh\"\n        fi\n\n        if [[ -z $pkg_manager ]]; then\n            echo \"错误：找不到包管理器。 您可能需要手动安装 Speedtest\"\n            return 1\n        else\n            curl -s $speedtest_install_script | bash\n            $pkg_manager install -y speedtest\n        fi\n    fi\n\n    # Run Speedtest\n    speedtest\n}\n\ncreate_iplimit_jails() {\n    # Use default bantime if not passed => 15 minutes\n    local bantime=\"${1:-15}\"\n\n    # Uncomment 'allowipv6 = auto' in fail2ban.conf\n    sed -i 's/#allowipv6 = auto/allowipv6 = auto/g' /etc/fail2ban/fail2ban.conf\n\n    #On Debian 12+ fail2ban's default backend should be changed to systemd\n    if [[  \"${release}\" == \"debian\" && ${os_version} -ge 12 ]]; then\n        sed -i '0,/action =/s/backend = auto/backend = systemd/' /etc/fail2ban/jail.conf\n    fi\n\n    cat << EOF > /etc/fail2ban/jail.d/3x-ipl.conf\n[3x-ipl]\nenabled=true\nbackend=auto\nfilter=3x-ipl\naction=3x-ipl\nlogpath=${iplimit_log_path}\nmaxretry=2\nfindtime=32\nbantime=${bantime}m\nEOF\n\n    cat << EOF > /etc/fail2ban/filter.d/3x-ipl.conf\n[Definition]\ndatepattern = ^%%Y/%%m/%%d %%H:%%M:%%S\nfailregex   = \\[LIMIT_IP\\]\\s*Email\\s*=\\s*<F-USER>.+</F-USER>\\s*\\|\\|\\s*SRC\\s*=\\s*<ADDR>\nignoreregex =\nEOF\n\n    cat << EOF > /etc/fail2ban/action.d/3x-ipl.conf\n[INCLUDES]\nbefore = iptables-allports.conf\n\n[Definition]\nactionstart = <iptables> -N f2b-<name>\n              <iptables> -A f2b-<name> -j <returntype>\n              <iptables> -I <chain> -p <protocol> -j f2b-<name>\n\nactionstop = <iptables> -D <chain> -p <protocol> -j f2b-<name>\n             <actionflush>\n             <iptables> -X f2b-<name>\n\nactioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \\t]'\n\nactionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>\n            echo \"\\$(date +\"%%Y/%%m/%%d %%H:%%M:%%S\")   BAN   [Email] = <F-USER> [IP] = <ip> banned for <bantime> seconds.\" >> ${iplimit_banned_log_path}\n\nactionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>\n              echo \"\\$(date +\"%%Y/%%m/%%d %%H:%%M:%%S\")   UNBAN   [Email] = <F-USER> [IP] = <ip> unbanned.\" >> ${iplimit_banned_log_path}\n\n[Init]\nEOF\n\n    echo -e \"${green}使用 ${bantime} 分钟的禁止时间以创建的 IP Limit 限制文件。${plain}\"\n}\n\niplimit_remove_conflicts() {\n    local jail_files=(\n        /etc/fail2ban/jail.conf\n        /etc/fail2ban/jail.local\n    )\n\n    for file in \"${jail_files[@]}\"; do\n        # Check for [3x-ipl] config in jail file then remove it\n        if test -f \"${file}\" && grep -qw '3x-ipl' ${file}; then\n            sed -i \"/\\[3x-ipl\\]/,/^$/d\" ${file}\n            echo -e \"${yellow}消除系统环境中 [3x-ipl] 的冲突 (${file})!${plain}\\n\"\n        fi\n    done\n}\n\niplimit_main() {\n    echo -e \"\\n${green}\\t1.${plain} 安装 Fail2ban 并配置 IP 限制\"\n    echo -e \"${green}\\t2.${plain} 更改禁止期限\"\n    echo -e \"${green}\\t3.${plain} 解禁所有 IP\"\n    echo -e \"${green}\\t4.${plain} 查看日志\"\n    echo -e \"${green}\\t5.${plain} Fail2ban 状态\"\n    echo -e \"${green}\\t6.${plain} 重启 Fail2ban\"\n    echo -e \"${green}\\t7.${plain} 卸载 Fail2ban\"\n    echo -e \"${green}\\t0.${plain} 返回主菜单\"\n    read -p \"请输入选项: \" choice\n    case \"$choice\" in\n    0)\n        show_menu\n        ;;\n    1)\n        confirm \"继续安装 Fail2ban 和 IP 限制?\" \"y\"\n        if [[ $? == 0 ]]; then\n            install_iplimit\n        else\n            iplimit_main\n        fi\n        ;;\n    2)\n        read -rp \"请输入新的禁令持续时间（以分钟为单位）[默认 30]: \" NUM\n        if [[ $NUM =~ ^[0-9]+$ ]]; then\n            create_iplimit_jails ${NUM}\n            systemctl restart fail2ban\n        else\n            echo -e \"${red}${NUM} 不是一个数字！ 请再试一次.${plain}\"\n        fi\n        iplimit_main\n        ;;\n    3)\n        confirm \"继续解除所有人的 IP 限制禁令?\" \"y\"\n        if [[ $? == 0 ]]; then\n            fail2ban-client reload --restart --unban 3x-ipl\n            truncate -s 0 \"${iplimit_banned_log_path}\"\n            echo -e \"${green}所有用户已成功解封${plain}\"\n            iplimit_main\n        else\n            echo -e \"${yellow}已取消${plain}\"\n        fi\n        iplimit_main\n        ;;\n    4)\n        show_banlog\n        ;;\n    5)\n        service fail2ban status\n        ;;\n    6)\n        systemctl restart fail2ban\n        ;;\n    7)\n        remove_iplimit\n        ;;\n    *) echo \"无效选项\" ;;\n    esac\n}\n\ninstall_iplimit() {\n    if ! command -v fail2ban-client &>/dev/null; then\n        echo -e \"${green}未安装 Fail2ban。正在安装...!${plain}\\n\"\n\n        # Check the OS and install necessary packages\n        case \"${release}\" in\n        ubuntu)\n            if [[ \"${os_version}\" -ge 24 ]]; then\n                apt update && apt install python3-pip -y\n                python3 -m pip install pyasynchat --break-system-packages\n            fi\n            apt update && apt install fail2ban -y\n            ;;\n        debian | armbian)\n            apt update && apt install fail2ban -y\n            ;;\n        centos | almalinux | rocky | oracle)\n            yum update -y && yum install epel-release -y\n            yum -y install fail2ban\n            ;;\n        fedora)\n            dnf -y update && dnf -y install fail2ban\n            ;;\n        arch | manjaro | parch)\n            pacman -Syu --noconfirm fail2ban\n            ;;\n        *)\n            echo -e \"${red}不支持的操作系统，请检查脚本并手动安装必要的软件包.${plain}\\n\"\n            exit 1\n            ;;\n        esac\n\n        if ! command -v fail2ban-client &>/dev/null; then\n            echo -e \"${red}Fail2ban 安装失败${plain}\\n\"\n            exit 1\n        fi\n\n        echo -e \"${green}Fail2ban 安装成功!${plain}\\n\"\n    else\n        echo -e \"${yellow}Fail2ban 已安装${plain}\\n\"\n    fi\n\n    echo -e \"${green}配置 IP 限制中...${plain}\\n\"\n\n    # make sure there's no conflict for jail files\n    iplimit_remove_conflicts\n\n    # Check if log file exists\n    if ! test -f \"${iplimit_banned_log_path}\"; then\n        touch ${iplimit_banned_log_path}\n    fi\n\n    # Check if service log file exists so fail2ban won't return error\n    if ! test -f \"${iplimit_log_path}\"; then\n        touch ${iplimit_log_path}\n    fi\n\n    # Create the iplimit jail files\n    # we didn't pass the bantime here to use the default value\n    create_iplimit_jails\n\n    # Launching fail2ban\n    if ! systemctl is-active --quiet fail2ban; then\n        systemctl start fail2ban\n        systemctl enable fail2ban\n    else\n        systemctl restart fail2ban\n    fi\n    systemctl enable fail2ban\n\n    echo -e \"${green}IP 限制安装并配置成功!${plain}\\n\"\n    before_show_menu\n}\n\nremove_iplimit() {\n    echo -e \"${green}\\t1.${plain} 仅删除 IP 限制配置\"\n    echo -e \"${green}\\t2.${plain} 卸载 Fail2ban 和 IP 限制\"\n    echo -e \"${green}\\t0.${plain} 终止\"\n    read -p \"请输入选项: \" num\n    case \"$num\" in\n    1)\n        rm -f /etc/fail2ban/filter.d/3x-ipl.conf\n        rm -f /etc/fail2ban/action.d/3x-ipl.conf\n        rm -f /etc/fail2ban/jail.d/3x-ipl.conf\n        systemctl restart fail2ban\n        echo -e \"${green}IP 限制成功解除!${plain}\\n\"\n        before_show_menu\n        ;;\n    2)\n        rm -rf /etc/fail2ban\n        systemctl stop fail2ban\n        case \"${release}\" in\n        ubuntu | debian | armbian)\n            apt-get remove -y fail2ban\n            apt-get purge -y fail2ban -y\n            apt-get autoremove -y\n            ;;\n        centos | almalinux | rocky | oracle)\n            yum remove fail2ban -y\n            yum autoremove -y\n            ;;\n        fedora)\n            dnf remove fail2ban -y\n            dnf autoremove -y\n            ;;\n        arch | manjaro)\n            pacman -Rns --noconfirm fail2ban\n            ;;\n        *)\n            echo -e \"${red}不支持的操作系统，请手动卸载 Fail2ban.${plain}\\n\"\n            exit 1\n            ;;\n        esac\n        echo -e \"${green}Fail2ban 和 IP 限制已成功删除!${plain}\\n\"\n        before_show_menu\n        ;;\n    0)\n        echo -e \"${yellow}已取消${plain}\\n\"\n        iplimit_main\n        ;;\n    *)\n        echo -e \"${red}无效选项。 请选择一个有效的选项。${plain}\\n\"\n        remove_iplimit\n        ;;\n    esac\n}\n\nshow_usage() {\n    echo -e \"         ---------------------\"\n    echo -e \"         |${green}3X-UI 控制菜单用法 ${plain}|${plain}\"\n    echo -e \"         |  ${yellow}一个更好的面板   ${plain}|${plain}\"   \n    echo -e \"         | ${yellow}基于Xray Core构建 ${plain}|${plain}\"  \n    echo -e \"--------------------------------------------\"\n    echo -e \"x-ui              - 进入管理脚本\"\n    echo -e \"x-ui start        - 启动 3x-ui 面板\"\n    echo -e \"x-ui stop         - 关闭 3x-ui 面板\"\n    echo -e \"x-ui restart      - 重启 3x-ui 面板\"\n    echo -e \"x-ui status       - 查看 3x-ui 状态\"\n    echo -e \"x-ui settings     - 查看当前设置信息\"\n    echo -e \"x-ui enable       - 启用 3x-ui 开机启动\"\n    echo -e \"x-ui disable      - 禁用 3x-ui 开机启动\"\n    echo -e \"x-ui log          - 查看 3x-ui 运行日志\"\n    echo -e \"x-ui banlog       - 检查 Fail2ban 禁止日志\"\n    echo -e \"x-ui update       - 更新 3x-ui 面板\"\n    echo -e \"x-ui custom       - 自定义 3x-ui 版本\"\n    echo -e \"x-ui install      - 安装 3x-ui 面板\"\n    echo -e \"x-ui uninstall    - 卸载 3x-ui 面板\"\n    echo -e \"--------------------------------------------\"\n}\n\nshow_menu() {\n    echo -e \"\n——————————————————————\n  ${green}3X-UI 面板管理脚本${plain}\n  ${yellow}  一个更好的面板${plain}\n  ${yellow} 基于Xray Core构建${plain}\n——————————————————————\n  ${green}0.${plain} 退出脚本\n  ${green}1.${plain} 安装面板\n  ${green}2.${plain} 更新面板\n  ${green}3.${plain} 更新菜单项\n  ${green}4.${plain} 自定义版本\n  ${green}5.${plain} 卸载面板\n——————————————————————\n  ${green}6.${plain} 重置用户名、密码和Secret Token\n  ${green}7.${plain} 修改访问路径\n  ${green}8.${plain} 重置面板设置\n  ${green}9.${plain} 修改面板端口\n  ${green}10.${plain} 查看面板设置\n——————————————————————\n  ${green}11.${plain} 启动面板\n  ${green}12.${plain} 关闭面板\n  ${green}13.${plain} 重启面板\n  ${green}14.${plain} 检查面板状态\n  ${green}15.${plain} 检查面板日志\n——————————————————————\n  ${green}16.${plain} 启用开机启动\n  ${green}17.${plain} 禁用开机启动\n——————————————————————\n  ${green}18.${plain} SSL 证书管理\n  ${green}19.${plain} CF SSL 证书\n  ${green}20.${plain} IP 限制管理\n  ${green}21.${plain} WARP 管理\n  ${green}22.${plain} 防火墙管理\n——————————————————————\n  ${green}23.${plain} 启用 BBR \n  ${green}24.${plain} 更新 Geo 文件\n  ${green}25.${plain} Speedtest by Ookla\n  ${green}26.${plain} 安装订阅转换 \n——————————————————————\n  ${green}若在使用过程中有任何问题${plain}\n  ${yellow}请加入〔3X-UI〕中文交流群${plain}\n  ${red}https://t.me/XUI_CN ${yellow}截图进行反馈${plain}\n  ${green}〔3X-UI〕优化版项目地址${plain}\n  ${yellow}https://github.com/xeefei/3x-ui${plain}\n  ${green}详细〔安装配置〕教程${plain}\n  ${yellow}https://xeefei.github.io/xufei/2024/05/3x-ui${plain}\n——————————————————————\n\"\n    show_status\n    echo && read -p \"请输入选项 [0-26]: \" num\n\n    case \"${num}\" in\n    0)\n        exit 0\n        ;;\n    1)\n        check_uninstall && install\n        ;;\n    2)\n        check_install && update\n        ;;\n    3)\n        check_install && update_menu\n        ;;\n    4)\n        check_install && custom_version\n        ;;\n    5)\n        check_install && uninstall\n        ;;\n    6)\n        check_install && reset_user\n        ;;\n    7)\n        check_install && reset_webbasepath\n        ;;\n    8)\n        check_install && reset_config\n        ;;\n    9)\n        check_install && set_port\n        ;;\n    10)\n        check_install && check_config\n        ;;\n    11)\n        check_install && start\n        ;;\n    12)\n        check_install && stop\n        ;;\n    13)\n        check_install && restart\n        ;;\n    14)\n        check_install && status\n        ;;\n    15)\n        check_install && show_log\n        ;;\n    16)\n        check_install && enable\n        ;;\n    17)\n        check_install && disable\n        ;;\n    18)\n        ssl_cert_issue_main\n        ;;\n    19)\n        ssl_cert_issue_CF\n        ;;\n    20)\n        iplimit_main\n        ;;\n    21)\n        warp_cloudflare\n        ;;\n    22)\n        firewall_menu\n        ;;\n    23)\n        bbr_menu\n        ;;\n    24)\n        update_geo\n        ;;\n    25)\n        run_speedtest\n        ;;\n    26)\n        subconverter\n        ;;\n    *)\n        LOGE \"请输入正确的数字选项 [0-26]\"\n        ;;\n    esac\n}\n\nif [[ $# > 0 ]]; then\n    case $1 in\n    \"start\")\n        check_install 0 && start 0\n        ;;\n    \"stop\")\n        check_install 0 && stop 0\n        ;;\n    \"restart\")\n        check_install 0 && restart 0\n        ;;\n    \"status\")\n        check_install 0 && status 0\n        ;;\n    \"settings\")\n        check_install 0 && check_config 0\n        ;;\n    \"enable\")\n        check_install 0 && enable 0\n        ;;\n    \"disable\")\n        check_install 0 && disable 0\n        ;;\n    \"log\")\n        check_install 0 && show_log 0\n        ;;\n    \"banlog\")\n        check_install 0 && show_banlog 0\n        ;;\n    \"update\")\n        check_install 0 && update 0\n        ;;\n    \"custom\")\n        check_install 0 && custom_version 0\n        ;;\n    \"install\")\n        check_uninstall 0 && install 0\n        ;;\n    \"uninstall\")\n        check_install 0 && uninstall 0\n        ;;\n    *) show_usage ;;\n    esac\nelse\n    show_menu\nfi\n"
  },
  {
    "path": "xray/api.go",
    "content": "package xray\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"time\"\n\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\n\t\"github.com/xtls/xray-core/app/proxyman/command\"\n\tstatsService \"github.com/xtls/xray-core/app/stats/command\"\n\t\"github.com/xtls/xray-core/common/protocol\"\n\t\"github.com/xtls/xray-core/common/serial\"\n\t\"github.com/xtls/xray-core/infra/conf\"\n\t\"github.com/xtls/xray-core/proxy/shadowsocks\"\n\t\"github.com/xtls/xray-core/proxy/shadowsocks_2022\"\n\t\"github.com/xtls/xray-core/proxy/trojan\"\n\t\"github.com/xtls/xray-core/proxy/vless\"\n\t\"github.com/xtls/xray-core/proxy/vmess\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\ntype XrayAPI struct {\n\tHandlerServiceClient *command.HandlerServiceClient\n\tStatsServiceClient   *statsService.StatsServiceClient\n\tgrpcClient           *grpc.ClientConn\n\tisConnected          bool\n}\n\nfunc (x *XrayAPI) Init(apiPort int) error {\n\tif apiPort <= 0 {\n\t\treturn fmt.Errorf(\"invalid Xray API port: %d\", apiPort)\n\t}\n\n\taddr := fmt.Sprintf(\"127.0.0.1:%d\", apiPort)\n\tconn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to connect to Xray API: %w\", err)\n\t}\n\n\tx.grpcClient = conn\n\tx.isConnected = true\n\n\thsClient := command.NewHandlerServiceClient(conn)\n\tssClient := statsService.NewStatsServiceClient(conn)\n\n\tx.HandlerServiceClient = &hsClient\n\tx.StatsServiceClient = &ssClient\n\n\treturn nil\n}\n\nfunc (x *XrayAPI) Close() {\n\tif x.grpcClient != nil {\n\t\tx.grpcClient.Close()\n\t}\n\tx.HandlerServiceClient = nil\n\tx.StatsServiceClient = nil\n\tx.isConnected = false\n}\n\nfunc (x *XrayAPI) AddInbound(inbound []byte) error {\n\tclient := *x.HandlerServiceClient\n\n\tconf := new(conf.InboundDetourConfig)\n\terr := json.Unmarshal(inbound, conf)\n\tif err != nil {\n\t\tlogger.Debug(\"Failed to unmarshal inbound:\", err)\n\t\treturn err\n\t}\n\tconfig, err := conf.Build()\n\tif err != nil {\n\t\tlogger.Debug(\"Failed to build inbound Detur:\", err)\n\t\treturn err\n\t}\n\tinboundConfig := command.AddInboundRequest{Inbound: config}\n\n\t_, err = client.AddInbound(context.Background(), &inboundConfig)\n\n\treturn err\n}\n\nfunc (x *XrayAPI) DelInbound(tag string) error {\n\tclient := *x.HandlerServiceClient\n\t_, err := client.RemoveInbound(context.Background(), &command.RemoveInboundRequest{\n\t\tTag: tag,\n\t})\n\treturn err\n}\n\nfunc (x *XrayAPI) AddUser(Protocol string, inboundTag string, user map[string]interface{}) error {\n\tvar account *serial.TypedMessage\n\tswitch Protocol {\n\tcase \"vmess\":\n\t\taccount = serial.ToTypedMessage(&vmess.Account{\n\t\t\tId: user[\"id\"].(string),\n\t\t})\n\tcase \"vless\":\n\t\taccount = serial.ToTypedMessage(&vless.Account{\n\t\t\tId:   user[\"id\"].(string),\n\t\t\tFlow: user[\"flow\"].(string),\n\t\t})\n\tcase \"trojan\":\n\t\taccount = serial.ToTypedMessage(&trojan.Account{\n\t\t\tPassword: user[\"password\"].(string),\n\t\t})\n\tcase \"shadowsocks\":\n\t\tvar ssCipherType shadowsocks.CipherType\n\t\tswitch user[\"cipher\"].(string) {\n\t\tcase \"aes-128-gcm\":\n\t\t\tssCipherType = shadowsocks.CipherType_AES_128_GCM\n\t\tcase \"aes-256-gcm\":\n\t\t\tssCipherType = shadowsocks.CipherType_AES_256_GCM\n\t\tcase \"chacha20-poly1305\", \"chacha20-ietf-poly1305\":\n\t\t\tssCipherType = shadowsocks.CipherType_CHACHA20_POLY1305\n\t\tcase \"xchacha20-poly1305\", \"xchacha20-ietf-poly1305\":\n\t\t\tssCipherType = shadowsocks.CipherType_XCHACHA20_POLY1305\n\t\tdefault:\n\t\t\tssCipherType = shadowsocks.CipherType_NONE\n\t\t}\n\n\t\tif ssCipherType != shadowsocks.CipherType_NONE {\n\t\t\taccount = serial.ToTypedMessage(&shadowsocks.Account{\n\t\t\t\tPassword:   user[\"password\"].(string),\n\t\t\t\tCipherType: ssCipherType,\n\t\t\t})\n\t\t} else {\n\t\t\taccount = serial.ToTypedMessage(&shadowsocks_2022.User{\n\t\t\t\tKey:   user[\"password\"].(string),\n\t\t\t\tEmail: user[\"email\"].(string),\n\t\t\t})\n\t\t}\n\tdefault:\n\t\treturn nil\n\t}\n\n\tclient := *x.HandlerServiceClient\n\n\t_, err := client.AlterInbound(context.Background(), &command.AlterInboundRequest{\n\t\tTag: inboundTag,\n\t\tOperation: serial.ToTypedMessage(&command.AddUserOperation{\n\t\t\tUser: &protocol.User{\n\t\t\t\tEmail:   user[\"email\"].(string),\n\t\t\t\tAccount: account,\n\t\t\t},\n\t\t}),\n\t})\n\treturn err\n}\n\nfunc (x *XrayAPI) RemoveUser(inboundTag, email string) error {\n\tctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\n\tdefer cancel()\n\n\top := &command.RemoveUserOperation{Email: email}\n\treq := &command.AlterInboundRequest{\n\t\tTag:       inboundTag,\n\t\tOperation: serial.ToTypedMessage(op),\n\t}\n\n\t_, err := (*x.HandlerServiceClient).AlterInbound(ctx, req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to remove user: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (x *XrayAPI) GetTraffic(reset bool) ([]*Traffic, []*ClientTraffic, error) {\n\tif x.grpcClient == nil {\n\t\treturn nil, nil, common.NewError(\"xray api is not initialized\")\n\t}\n\n\ttrafficRegex := regexp.MustCompile(`(inbound|outbound)>>>([^>]+)>>>traffic>>>(downlink|uplink)`)\n\tclientTrafficRegex := regexp.MustCompile(`user>>>([^>]+)>>>traffic>>>(downlink|uplink)`)\n\n\tctx, cancel := context.WithTimeout(context.Background(), time.Second*10)\n\tdefer cancel()\n\n\tresp, err := (*x.StatsServiceClient).QueryStats(ctx, &statsService.QueryStatsRequest{Reset_: reset})\n\tif err != nil {\n\t\tlogger.Debug(\"Failed to query Xray stats:\", err)\n\t\treturn nil, nil, err\n\t}\n\n\ttagTrafficMap := make(map[string]*Traffic)\n\temailTrafficMap := make(map[string]*ClientTraffic)\n\n\tfor _, stat := range resp.GetStat() {\n\t\tif matches := trafficRegex.FindStringSubmatch(stat.Name); len(matches) == 4 {\n\t\t\tprocessTraffic(matches, stat.Value, tagTrafficMap)\n\t\t} else if matches := clientTrafficRegex.FindStringSubmatch(stat.Name); len(matches) == 3 {\n\t\t\tprocessClientTraffic(matches, stat.Value, emailTrafficMap)\n\t\t}\n\t}\n\treturn mapToSlice(tagTrafficMap), mapToSlice(emailTrafficMap), nil\n}\n\nfunc processTraffic(matches []string, value int64, trafficMap map[string]*Traffic) {\n\tisInbound := matches[1] == \"inbound\"\n\ttag := matches[2]\n\tisDown := matches[3] == \"downlink\"\n\n\tif tag == \"api\" {\n\t\treturn\n\t}\n\n\ttraffic, ok := trafficMap[tag]\n\tif !ok {\n\t\ttraffic = &Traffic{\n\t\t\tIsInbound:  isInbound,\n\t\t\tIsOutbound: !isInbound,\n\t\t\tTag:        tag,\n\t\t}\n\t\ttrafficMap[tag] = traffic\n\t}\n\n\tif isDown {\n\t\ttraffic.Down = value\n\t} else {\n\t\ttraffic.Up = value\n\t}\n}\n\nfunc processClientTraffic(matches []string, value int64, clientTrafficMap map[string]*ClientTraffic) {\n\temail := matches[1]\n\tisDown := matches[2] == \"downlink\"\n\n\ttraffic, ok := clientTrafficMap[email]\n\tif !ok {\n\t\ttraffic = &ClientTraffic{Email: email}\n\t\tclientTrafficMap[email] = traffic\n\t}\n\n\tif isDown {\n\t\ttraffic.Down = value\n\t} else {\n\t\ttraffic.Up = value\n\t}\n}\n\nfunc mapToSlice[T any](m map[string]*T) []*T {\n\tresult := make([]*T, 0, len(m))\n\tfor _, v := range m {\n\t\tresult = append(result, v)\n\t}\n\treturn result\n}\n"
  },
  {
    "path": "xray/client_traffic.go",
    "content": "package xray\n\ntype ClientTraffic struct {\n\tId         int    `json:\"id\" form:\"id\" gorm:\"primaryKey;autoIncrement\"`\n\tInboundId  int    `json:\"inboundId\" form:\"inboundId\"`\n\tEnable     bool   `json:\"enable\" form:\"enable\"`\n\tEmail      string `json:\"email\" form:\"email\" gorm:\"unique\"`\n\tUp         int64  `json:\"up\" form:\"up\"`\n\tDown       int64  `json:\"down\" form:\"down\"`\n\tExpiryTime int64  `json:\"expiryTime\" form:\"expiryTime\"`\n\tTotal      int64  `json:\"total\" form:\"total\"`\n\tReset      int    `json:\"reset\" form:\"reset\" gorm:\"default:0\"`\n}\n"
  },
  {
    "path": "xray/config.go",
    "content": "package xray\n\nimport (\n\t\"bytes\"\n\n\t\"x-ui/util/json_util\"\n)\n\ntype Config struct {\n\tLogConfig        json_util.RawMessage `json:\"log\"`\n\tRouterConfig     json_util.RawMessage `json:\"routing\"`\n\tDNSConfig        json_util.RawMessage `json:\"dns\"`\n\tInboundConfigs   []InboundConfig      `json:\"inbounds\"`\n\tOutboundConfigs  json_util.RawMessage `json:\"outbounds\"`\n\tTransport        json_util.RawMessage `json:\"transport\"`\n\tPolicy           json_util.RawMessage `json:\"policy\"`\n\tAPI              json_util.RawMessage `json:\"api\"`\n\tStats            json_util.RawMessage `json:\"stats\"`\n\tReverse          json_util.RawMessage `json:\"reverse\"`\n\tFakeDNS          json_util.RawMessage `json:\"fakedns\"`\n\tObservatory      json_util.RawMessage `json:\"observatory\"`\n\tBurstObservatory json_util.RawMessage `json:\"burstObservatory\"`\n}\n\nfunc (c *Config) Equals(other *Config) bool {\n\tif len(c.InboundConfigs) != len(other.InboundConfigs) {\n\t\treturn false\n\t}\n\tfor i, inbound := range c.InboundConfigs {\n\t\tif !inbound.Equals(&other.InboundConfigs[i]) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !bytes.Equal(c.LogConfig, other.LogConfig) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.RouterConfig, other.RouterConfig) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.DNSConfig, other.DNSConfig) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.OutboundConfigs, other.OutboundConfigs) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Transport, other.Transport) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Policy, other.Policy) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.API, other.API) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Stats, other.Stats) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Reverse, other.Reverse) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.FakeDNS, other.FakeDNS) {\n\t\treturn false\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "xray/inbound.go",
    "content": "package xray\n\nimport (\n\t\"bytes\"\n\n\t\"x-ui/util/json_util\"\n)\n\ntype InboundConfig struct {\n\tListen         json_util.RawMessage `json:\"listen\"` // listen cannot be an empty string\n\tPort           int                  `json:\"port\"`\n\tProtocol       string               `json:\"protocol\"`\n\tSettings       json_util.RawMessage `json:\"settings\"`\n\tStreamSettings json_util.RawMessage `json:\"streamSettings\"`\n\tTag            string               `json:\"tag\"`\n\tSniffing       json_util.RawMessage `json:\"sniffing\"`\n}\n\nfunc (c *InboundConfig) Equals(other *InboundConfig) bool {\n\tif !bytes.Equal(c.Listen, other.Listen) {\n\t\treturn false\n\t}\n\tif c.Port != other.Port {\n\t\treturn false\n\t}\n\tif c.Protocol != other.Protocol {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Settings, other.Settings) {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.StreamSettings, other.StreamSettings) {\n\t\treturn false\n\t}\n\tif c.Tag != other.Tag {\n\t\treturn false\n\t}\n\tif !bytes.Equal(c.Sniffing, other.Sniffing) {\n\t\treturn false\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "xray/log_writer.go",
    "content": "package xray\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n\n\t\"x-ui/logger\"\n)\n\nfunc NewLogWriter() *LogWriter {\n\treturn &LogWriter{}\n}\n\ntype LogWriter struct {\n\tlastLine string\n}\n\nfunc (lw *LogWriter) Write(m []byte) (n int, err error) {\n\tregex := regexp.MustCompile(`^(\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}:\\d{2}) \\[([^\\]]+)\\] (.+)$`)\n\t// Convert the data to a string\n\tmessage := strings.TrimSpace(string(m))\n\tmessages := strings.Split(message, \"\\n\")\n\tlw.lastLine = messages[len(messages)-1]\n\n\tfor _, msg := range messages {\n\t\tmatches := regex.FindStringSubmatch(msg)\n\n\t\tif len(matches) > 3 {\n\t\t\tlevel := matches[2]\n\t\t\tmsgBody := matches[3]\n\n\t\t\t// Map the level to the appropriate logger function\n\t\t\tswitch level {\n\t\t\tcase \"Debug\":\n\t\t\t\tlogger.Debug(\"XRAY: \" + msgBody)\n\t\t\tcase \"Info\":\n\t\t\t\tlogger.Info(\"XRAY: \" + msgBody)\n\t\t\tcase \"Warning\":\n\t\t\t\tlogger.Warning(\"XRAY: \" + msgBody)\n\t\t\tcase \"Error\":\n\t\t\t\tlogger.Error(\"XRAY: \" + msgBody)\n\t\t\tdefault:\n\t\t\t\tlogger.Debug(\"XRAY: \" + msg)\n\t\t\t}\n\t\t} else if msg != \"\" {\n\t\t\tlogger.Debug(\"XRAY: \" + msg)\n\t\t\treturn len(m), nil\n\t\t}\n\t}\n\n\treturn len(m), nil\n}\n"
  },
  {
    "path": "xray/process.go",
    "content": "package xray\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"x-ui/config\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n)\n\nfunc GetBinaryName() string {\n\treturn fmt.Sprintf(\"xray-%s-%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc GetBinaryPath() string {\n\treturn config.GetBinFolderPath() + \"/\" + GetBinaryName()\n}\n\nfunc GetConfigPath() string {\n\treturn config.GetBinFolderPath() + \"/config.json\"\n}\n\nfunc GetGeositePath() string {\n\treturn config.GetBinFolderPath() + \"/geosite.dat\"\n}\n\nfunc GetGeoipPath() string {\n\treturn config.GetBinFolderPath() + \"/geoip.dat\"\n}\n\nfunc GetIPLimitLogPath() string {\n\treturn config.GetLogFolder() + \"/3xipl.log\"\n}\n\nfunc GetIPLimitBannedLogPath() string {\n\treturn config.GetLogFolder() + \"/3xipl-banned.log\"\n}\n\nfunc GetIPLimitBannedPrevLogPath() string {\n\treturn config.GetLogFolder() + \"/3xipl-banned.prev.log\"\n}\n\nfunc GetAccessPersistentLogPath() string {\n\treturn config.GetLogFolder() + \"/3xipl-ap.log\"\n}\n\nfunc GetAccessPersistentPrevLogPath() string {\n\treturn config.GetLogFolder() + \"/3xipl-ap.prev.log\"\n}\n\nfunc GetAccessLogPath() (string, error) {\n\tconfig, err := os.ReadFile(GetConfigPath())\n\tif err != nil {\n\t\tlogger.Warningf(\"Failed to read configuration file: %s\", err)\n\t\treturn \"\", err\n\t}\n\n\tjsonConfig := map[string]interface{}{}\n\terr = json.Unmarshal([]byte(config), &jsonConfig)\n\tif err != nil {\n\t\tlogger.Warningf(\"Failed to parse JSON configuration: %s\", err)\n\t\treturn \"\", err\n\t}\n\n\tif jsonConfig[\"log\"] != nil {\n\t\tjsonLog := jsonConfig[\"log\"].(map[string]interface{})\n\t\tif jsonLog[\"access\"] != nil {\n\t\t\taccessLogPath := jsonLog[\"access\"].(string)\n\t\t\treturn accessLogPath, nil\n\t\t}\n\t}\n\treturn \"\", err\n}\n\nfunc stopProcess(p *Process) {\n\tp.Stop()\n}\n\ntype Process struct {\n\t*process\n}\n\nfunc NewProcess(xrayConfig *Config) *Process {\n\tp := &Process{newProcess(xrayConfig)}\n\truntime.SetFinalizer(p, stopProcess)\n\treturn p\n}\n\ntype process struct {\n\tcmd *exec.Cmd\n\n\tversion string\n\tapiPort int\n\n\tonlineClients []string\n\n\tconfig    *Config\n\tlogWriter *LogWriter\n\texitErr   error\n\tstartTime time.Time\n}\n\nfunc newProcess(config *Config) *process {\n\treturn &process{\n\t\tversion:   \"Unknown\",\n\t\tconfig:    config,\n\t\tlogWriter: NewLogWriter(),\n\t\tstartTime: time.Now(),\n\t}\n}\n\nfunc (p *process) IsRunning() bool {\n\tif p.cmd == nil || p.cmd.Process == nil {\n\t\treturn false\n\t}\n\tif p.cmd.ProcessState == nil {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (p *process) GetErr() error {\n\treturn p.exitErr\n}\n\nfunc (p *process) GetResult() string {\n\tif len(p.logWriter.lastLine) == 0 && p.exitErr != nil {\n\t\treturn p.exitErr.Error()\n\t}\n\treturn p.logWriter.lastLine\n}\n\nfunc (p *process) GetVersion() string {\n\treturn p.version\n}\n\nfunc (p *Process) GetAPIPort() int {\n\treturn p.apiPort\n}\n\nfunc (p *Process) GetConfig() *Config {\n\treturn p.config\n}\n\nfunc (p *Process) GetOnlineClients() []string {\n\treturn p.onlineClients\n}\n\nfunc (p *Process) SetOnlineClients(users []string) {\n\tp.onlineClients = users\n}\n\nfunc (p *Process) GetUptime() uint64 {\n\treturn uint64(time.Since(p.startTime).Seconds())\n}\n\nfunc (p *process) refreshAPIPort() {\n\tfor _, inbound := range p.config.InboundConfigs {\n\t\tif inbound.Tag == \"api\" {\n\t\t\tp.apiPort = inbound.Port\n\t\t\tbreak\n\t\t}\n\t}\n}\n\nfunc (p *process) refreshVersion() {\n\tcmd := exec.Command(GetBinaryPath(), \"-version\")\n\tdata, err := cmd.Output()\n\tif err != nil {\n\t\tp.version = \"Unknown\"\n\t} else {\n\t\tdatas := bytes.Split(data, []byte(\" \"))\n\t\tif len(datas) <= 1 {\n\t\t\tp.version = \"Unknown\"\n\t\t} else {\n\t\t\tp.version = string(datas[1])\n\t\t}\n\t}\n}\n\nfunc (p *process) Start() (err error) {\n\tif p.IsRunning() {\n\t\treturn errors.New(\"xray is already running\")\n\t}\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Failure in running xray-core process: \", err)\n\t\t\tp.exitErr = err\n\t\t}\n\t}()\n\n\tdata, err := json.MarshalIndent(p.config, \"\", \"  \")\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Failed to generate XRAY configuration files: %v\", err)\n\t}\n\n\terr = os.MkdirAll(config.GetLogFolder(), 0o770)\n\tif err != nil {\n\t\tlogger.Warningf(\"Failed to create log folder: %s\", err)\n\t}\n\n\tconfigPath := GetConfigPath()\n\terr = os.WriteFile(configPath, data, fs.ModePerm)\n\tif err != nil {\n\t\treturn common.NewErrorf(\"Failed to write configuration file: %v\", err)\n\t}\n\n\tcmd := exec.Command(GetBinaryPath(), \"-c\", configPath)\n\tp.cmd = cmd\n\n\tcmd.Stdout = p.logWriter\n\tcmd.Stderr = p.logWriter\n\n\tgo func() {\n\t\terr := cmd.Run()\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Failure in running xray-core:\", err)\n\t\t\tp.exitErr = err\n\t\t}\n\t}()\n\n\tp.refreshVersion()\n\tp.refreshAPIPort()\n\n\treturn nil\n}\n\nfunc (p *process) Stop() error {\n\tif !p.IsRunning() {\n\t\treturn errors.New(\"xray is not running\")\n\t}\n\treturn p.cmd.Process.Signal(syscall.SIGTERM)\n}\n"
  },
  {
    "path": "xray/traffic.go",
    "content": "package xray\n\ntype Traffic struct {\n\tIsInbound  bool\n\tIsOutbound bool\n\tTag        string\n\tUp         int64\n\tDown       int64\n}\n"
  }
]